|
|
|
@ -1,5 +1,6 @@
|
|
|
|
|
package com.mudu.quartz;
|
|
|
|
|
|
|
|
|
|
import cn.hutool.core.bean.BeanUtil;
|
|
|
|
|
import cn.hutool.core.collection.CollectionUtil;
|
|
|
|
|
import cn.hutool.core.util.StrUtil;
|
|
|
|
|
import cn.hutool.http.HttpRequest;
|
|
|
|
@ -197,10 +198,13 @@ public class AcheckTaskQuartz {
|
|
|
|
|
}
|
|
|
|
|
for (ACheckQuatzRequest a : list) {
|
|
|
|
|
//获取企业编号
|
|
|
|
|
ASafeQyjcxx oneByqymcOrXybm = aSafeQyjcxxService.findOneByqymcOrXybm(a.getName(), a.getEntCode());
|
|
|
|
|
String enterPriseId;
|
|
|
|
|
if (a.getXxbh() == null) {
|
|
|
|
|
if (BeanUtil.isEmpty(oneByqymcOrXybm)) {
|
|
|
|
|
logger.error(a.getName() + "企业不存在吴中-----------------" + a.getEntCode());
|
|
|
|
|
continue;
|
|
|
|
|
} else {
|
|
|
|
|
a.setXxbh(oneByqymcOrXybm.getXxbh());
|
|
|
|
|
enterPriseId = a.getXxbh();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -208,11 +212,11 @@ public class AcheckTaskQuartz {
|
|
|
|
|
XcRequest xcRequest = new XcRequest();
|
|
|
|
|
xcRequest.setQybh(a.getXxbh());
|
|
|
|
|
xcRequest.setZqbh(rwzqUuid);
|
|
|
|
|
String xcrwuuid=null;
|
|
|
|
|
try{
|
|
|
|
|
xcrwuuid = xcrwMdService.getByxxbh(xcRequest);
|
|
|
|
|
}catch (Exception e){
|
|
|
|
|
logger.error("周期编号重复-----------------"+JSONUtil.toJsonStr(xcRequest));
|
|
|
|
|
String xcrwuuid = null;
|
|
|
|
|
try {
|
|
|
|
|
xcrwuuid = xcrwMdService.getByxxbh(xcRequest);
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
logger.error("周期编号重复-----------------" + JSONUtil.toJsonStr(xcRequest));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -343,11 +347,11 @@ public class AcheckTaskQuartz {
|
|
|
|
|
//入库人员
|
|
|
|
|
aSafeYhzgxx.setRkry(rybh);
|
|
|
|
|
//入库时间
|
|
|
|
|
aSafeYhzgxx.setRksj(new Date());
|
|
|
|
|
aSafeYhzgxx.setRksj(a.getReportDateTime());
|
|
|
|
|
//更新人员
|
|
|
|
|
aSafeYhzgxx.setGxry(rybh);
|
|
|
|
|
//更新时间
|
|
|
|
|
aSafeYhzgxx.setGxsj(b.getReportDateTime());
|
|
|
|
|
aSafeYhzgxx.setGxsj(a.getReportDateTime());
|
|
|
|
|
//记录状态
|
|
|
|
|
aSafeYhzgxx.setJlzt(1);
|
|
|
|
|
aSafeYhzgxxService.save(aSafeYhzgxx);
|
|
|
|
@ -423,7 +427,7 @@ public class AcheckTaskQuartz {
|
|
|
|
|
//入库人员
|
|
|
|
|
aSafeXcrwjcxzgxx.setRkry(rybh);
|
|
|
|
|
//入库时间
|
|
|
|
|
aSafeXcrwjcxzgxx.setRksj(new Date());
|
|
|
|
|
aSafeXcrwjcxzgxx.setRksj(b.getNeedFinalDateTime());
|
|
|
|
|
//更新人员
|
|
|
|
|
aSafeXcrwjcxzgxx.setGxry(rybh);
|
|
|
|
|
//更新时间
|
|
|
|
@ -513,11 +517,11 @@ public class AcheckTaskQuartz {
|
|
|
|
|
//入库人员
|
|
|
|
|
aSafeXcrwjcx.setRkry(rybh);
|
|
|
|
|
//入库时间
|
|
|
|
|
aSafeXcrwjcx.setRksj(new Date());
|
|
|
|
|
aSafeXcrwjcx.setRksj(b.getReportDateTime());
|
|
|
|
|
//更新人员
|
|
|
|
|
aSafeXcrwjcx.setGxry(rybh);
|
|
|
|
|
//更新时间
|
|
|
|
|
aSafeXcrwjcx.setGxsj(new Date());
|
|
|
|
|
aSafeXcrwjcx.setGxsj(b.getReportDateTime());
|
|
|
|
|
//记录状态
|
|
|
|
|
aSafeXcrwjcx.setJlzt(1);
|
|
|
|
|
aSafeXcrwjcxService.save(aSafeXcrwjcx);
|
|
|
|
@ -546,9 +550,13 @@ public class AcheckTaskQuartz {
|
|
|
|
|
aSafeXcrw.setWcx(a.getList().size());
|
|
|
|
|
//发现隐患数
|
|
|
|
|
aSafeXcrw.setFxyhs(a.getList().size());
|
|
|
|
|
//检查时间
|
|
|
|
|
if (a.getReportDateTime() != null) {
|
|
|
|
|
//检查时间
|
|
|
|
|
aSafeXcrw.setJcsj(a.getReportDateTime());
|
|
|
|
|
//入库时间
|
|
|
|
|
aSafeXcrw.setRksj(a.getReportDateTime());
|
|
|
|
|
//更新时间
|
|
|
|
|
aSafeXcrw.setGxsj(a.getFinalDateTime());
|
|
|
|
|
}
|
|
|
|
|
//任务周期
|
|
|
|
|
aSafeXcrw.setZqbh(rwzqUuid);
|
|
|
|
@ -556,12 +564,6 @@ public class AcheckTaskQuartz {
|
|
|
|
|
aSafeXcrw.setWczt(1);
|
|
|
|
|
//入库人员
|
|
|
|
|
aSafeXcrw.setRkry(a.getRybh());
|
|
|
|
|
//入库时间
|
|
|
|
|
aSafeXcrw.setRksj(new Date());
|
|
|
|
|
//更新时间
|
|
|
|
|
if (a.getReportDateTime() != null) {
|
|
|
|
|
aSafeXcrw.setGxsj(a.getFinalDateTime());
|
|
|
|
|
}
|
|
|
|
|
//更新人员
|
|
|
|
|
aSafeXcrw.setGxry(a.getRybh());
|
|
|
|
|
//记录状态
|
|
|
|
@ -650,7 +652,6 @@ public class AcheckTaskQuartz {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Scheduled(cron = "0 0 4 * * ? ")
|
|
|
|
|
// @Scheduled(cron = "0 0/5 * * * ?")
|
|
|
|
|
// @PostMapping("/zicha")
|
|
|
|
|
// @ApiOperation(value = "自查")
|
|
|
|
|
public void zicha() throws ParseException {
|
|
|
|
@ -672,10 +673,14 @@ public class AcheckTaskQuartz {
|
|
|
|
|
if (CollectionUtil.isEmpty(list)) {
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
//获取企业编号
|
|
|
|
|
for (ACheckQuatzZichaRequest a : list) {
|
|
|
|
|
if (a.getEnterpriseID() == null) {
|
|
|
|
|
ASafeQyjcxx oneByqymcOrXybm = aSafeQyjcxxService.findOneByqymcOrXybm(null, a.getEnterpriseID());
|
|
|
|
|
if (BeanUtil.isEmpty(oneByqymcOrXybm)) {
|
|
|
|
|
logger.error(a.getEnterpriseID() + "企业信用代码在吴中不存在-----------------");
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
|
a.setEnterpriseID(oneByqymcOrXybm.getXxbh());
|
|
|
|
|
String rybh = a.getRybh();
|
|
|
|
|
//根据企业id和s_safe_fxd的fxdbh查询风险点的信息编号
|
|
|
|
|
String fxdxxbh = aSafeRwzqService.findByEnIdFxd(a.getEnterpriseID(), "03_20240621172152865517");
|
|
|
|
@ -832,7 +837,7 @@ public class AcheckTaskQuartz {
|
|
|
|
|
//入库人员
|
|
|
|
|
aSafeZcrwjl.setRkry(rybh);
|
|
|
|
|
//入库时间
|
|
|
|
|
aSafeZcrwjl.setRksj(new Date());
|
|
|
|
|
aSafeZcrwjl.setRksj(b.getAddDateTime());
|
|
|
|
|
//更新人员
|
|
|
|
|
aSafeZcrwjl.setGxry(rybh);
|
|
|
|
|
//更新时间
|
|
|
|
@ -1006,7 +1011,7 @@ public class AcheckTaskQuartz {
|
|
|
|
|
//入库人员
|
|
|
|
|
aSafeYhzgxx.setRkry(a.getRybh());
|
|
|
|
|
//入库时间
|
|
|
|
|
aSafeYhzgxx.setRksj(new Date());
|
|
|
|
|
aSafeYhzgxx.setRksj(a.getReportDateTime());
|
|
|
|
|
//更新人员
|
|
|
|
|
aSafeYhzgxx.setGxry(a.getRybh());
|
|
|
|
|
//更新时间
|
|
|
|
|