材料调整
This commit is contained in:
parent
a6674264c4
commit
a2ca7e1351
@ -154,6 +154,12 @@ public class ProjectExtend implements Serializable {
|
|||||||
@Excel(name = "安全教育ID", width = 15)
|
@Excel(name = "安全教育ID", width = 15)
|
||||||
@ApiModelProperty(value = "安全教育ID")
|
@ApiModelProperty(value = "安全教育ID")
|
||||||
private Long educationId;
|
private Long educationId;
|
||||||
|
/**
|
||||||
|
* 总投资额
|
||||||
|
*/
|
||||||
|
@Excel(name = "总投资额", width = 15)
|
||||||
|
@ApiModelProperty(value = "总投资额")
|
||||||
|
private String investmentPrice;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -197,13 +197,14 @@ public class XzMaterialController {
|
|||||||
}
|
}
|
||||||
xzMaterial.setNum(index);
|
xzMaterial.setNum(index);
|
||||||
}
|
}
|
||||||
JSONArray entryTime = obj.getJSONArray("entryTime");
|
// JSONArray entryTime = obj.getJSONArray("entryTime");
|
||||||
if (entryTime != null) {
|
// if (entryTime != null) {
|
||||||
String begin = entryTime.getString(0);
|
// String begin = entryTime.getString(0);
|
||||||
String end = entryTime.getString(1);
|
// String end = entryTime.getString(1);
|
||||||
xzMaterial.setEntryBeginTime(DateUtil.parse(begin + ":00", DatePattern.NORM_DATETIME_FORMAT));
|
xzMaterial.setEntryBeginTime(DateUtil.parse(obj.getString("startTime") + ":00", DatePattern.NORM_DATETIME_FORMAT));
|
||||||
xzMaterial.setEntryEndTime(DateUtil.parse(end + ":00", DatePattern.NORM_DATETIME_FORMAT));
|
xzMaterial.setEntryEndTime(DateUtil.parse(obj.getString("endTime") + ":00", DatePattern.NORM_DATETIME_FORMAT));
|
||||||
}
|
xzMaterial.setCarNumber(obj.getString("carNumber"));
|
||||||
|
// }
|
||||||
JSONArray detail = obj.getJSONArray("detail");
|
JSONArray detail = obj.getJSONArray("detail");
|
||||||
if (detail != null) {
|
if (detail != null) {
|
||||||
for (int i = 0; i < detail.size(); i++) {
|
for (int i = 0; i < detail.size(); i++) {
|
||||||
|
|||||||
@ -63,6 +63,12 @@ public class XzMaterial implements Serializable {
|
|||||||
@Excel(name = "入场时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
|
@Excel(name = "入场时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
|
||||||
@ApiModelProperty(value = "入场时间")
|
@ApiModelProperty(value = "入场时间")
|
||||||
private Date entryEndTime;
|
private Date entryEndTime;
|
||||||
|
/**
|
||||||
|
* 车牌号
|
||||||
|
*/
|
||||||
|
@Excel(name = "车牌号", width = 15)
|
||||||
|
@ApiModelProperty(value = "车牌号")
|
||||||
|
private String carNumber;
|
||||||
/**
|
/**
|
||||||
* 项目sn
|
* 项目sn
|
||||||
*/
|
*/
|
||||||
|
|||||||
@ -3,13 +3,18 @@ package com.zhgd.xmgl.task;
|
|||||||
import cn.hutool.core.date.DateTime;
|
import cn.hutool.core.date.DateTime;
|
||||||
import cn.hutool.core.date.DateUtil;
|
import cn.hutool.core.date.DateUtil;
|
||||||
import cn.hutool.core.util.StrUtil;
|
import cn.hutool.core.util.StrUtil;
|
||||||
|
import com.baomidou.mybatisplus.core.toolkit.StringUtils;
|
||||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||||
|
import com.zhgd.xmgl.modules.car.entity.CarInfo;
|
||||||
|
import com.zhgd.xmgl.modules.car.service.ICarInfoService;
|
||||||
import com.zhgd.xmgl.modules.exam.entity.*;
|
import com.zhgd.xmgl.modules.exam.entity.*;
|
||||||
import com.zhgd.xmgl.modules.exam.service.*;
|
import com.zhgd.xmgl.modules.exam.service.*;
|
||||||
import com.zhgd.xmgl.modules.project.entity.Project;
|
import com.zhgd.xmgl.modules.project.entity.Project;
|
||||||
import com.zhgd.xmgl.modules.project.service.IProjectService;
|
import com.zhgd.xmgl.modules.project.service.IProjectService;
|
||||||
import com.zhgd.xmgl.modules.worker.entity.WorkerInfo;
|
import com.zhgd.xmgl.modules.worker.entity.WorkerInfo;
|
||||||
import com.zhgd.xmgl.modules.worker.service.IWorkerInfoService;
|
import com.zhgd.xmgl.modules.worker.service.IWorkerInfoService;
|
||||||
|
import com.zhgd.xmgl.modules.xz.entity.XzMaterial;
|
||||||
|
import com.zhgd.xmgl.modules.xz.service.IXzMaterialService;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.scheduling.annotation.Scheduled;
|
import org.springframework.scheduling.annotation.Scheduled;
|
||||||
@ -57,6 +62,31 @@ public class ExamTask {
|
|||||||
@Autowired
|
@Autowired
|
||||||
private IWorkerInfoService workerInfoService;
|
private IWorkerInfoService workerInfoService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IXzMaterialService xzMaterialService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private ICarInfoService carInfoService;
|
||||||
|
|
||||||
|
@Scheduled(cron = "0 0/1 * * * ?")
|
||||||
|
public void xzMaterial() {
|
||||||
|
List<XzMaterial> list = xzMaterialService.list();
|
||||||
|
List<String> carNumber = new ArrayList<>();
|
||||||
|
for (XzMaterial xzMaterial : list) {
|
||||||
|
if (xzMaterial.getEntryEndTime().compareTo(new Date()) < 0) {
|
||||||
|
if (StringUtils.isNotBlank(xzMaterial.getCarNumber())) {
|
||||||
|
carNumber.add(xzMaterial.getCarNumber());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
List<CarInfo> carInfos = carInfoService.list(Wrappers.<CarInfo>lambdaQuery().ne(CarInfo::getCarType, 1));
|
||||||
|
if (carInfos.size() > 0) {
|
||||||
|
carInfos = carInfos.stream().filter(c -> carNumber.contains(c.getCarNumber())).collect(Collectors.toList());
|
||||||
|
if (carInfos.size() > 0) {
|
||||||
|
carInfoService.removeByIds(carInfos.stream().map(c -> c.getId()).collect(Collectors.toSet()));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Scheduled(cron = "0 0/1 * * * ?")
|
@Scheduled(cron = "0 0/1 * * * ?")
|
||||||
public void examNotice() {
|
public void examNotice() {
|
||||||
|
|||||||
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user