定时任务企业风险点编号修改

main
dongdingding 8 months ago
parent 1f9a399dd9
commit 604c261991

@ -33,12 +33,12 @@ import java.util.UUID;
* @author dong * @author dong
* @since 2024/3/12 16:37 * @since 2024/3/12 16:37
*/ */
@RestController //@RestController
@RequestMapping("pharmaceuticals/aCheck") //@RequestMapping("pharmaceuticals/aCheck")
@Api(tags = "新增") //@Api(tags = "新增")
//@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
//@Configuration @Configuration
//@EnableScheduling @EnableScheduling
public class AcheckTaskQuartz { public class AcheckTaskQuartz {
/** /**
@ -126,10 +126,10 @@ public class AcheckTaskQuartz {
* *
* @Param qymc * @Param qymc
*/ */
// @Scheduled(cron = "0 0 4 * * ? ") @Scheduled(cron = "0 0 4 * * ? ")
// @Scheduled(cron = "0 0/5 * * * ?") // @Scheduled(cron = "0 0/5 * * * ?")
@PostMapping("/insert") // @PostMapping("/insert")
@ApiOperation(value = "新增创建时间为昨天且处于审批通过的工单数据") // @ApiOperation(value = "新增创建时间为昨天且处于审批通过的工单数据")
public void selectAll() throws ParseException { public void selectAll() throws ParseException {
//巡查任务周期id //巡查任务周期id
@ -148,7 +148,13 @@ public class AcheckTaskQuartz {
for (ACheckQuatzRequest a : list) { for (ACheckQuatzRequest a : list) {
//获取企业编号 //获取企业编号
ASafeQyjcxx aSafeQyjcxx = aSafeQyjcxxService.findOneByqymcOrXybm(a.getName(), a.getEntCode()); ASafeQyjcxx aSafeQyjcxx = aSafeQyjcxxService.findOneByqymcOrXybm(a.getName(), a.getEntCode());
String enterPriseId = aSafeQyjcxx.getXxbh(); String enterPriseId = "";
if (aSafeQyjcxx == null) {
continue;
} else {
enterPriseId = aSafeQyjcxx.getXxbh();
}
// todo 查询巡查任务主表2月是否有记录就不推 // todo 查询巡查任务主表2月是否有记录就不推
Integer xcrwNum = aSafeXcrwService.xcrwNum(enterPriseId); Integer xcrwNum = aSafeXcrwService.xcrwNum(enterPriseId);
if (xcrwNum > 0) { if (xcrwNum > 0) {
@ -259,7 +265,11 @@ public class AcheckTaskQuartz {
//周期编号 //周期编号
aSafeYhzgxx.setZqbh(rwzqUuid); aSafeYhzgxx.setZqbh(rwzqUuid);
//企业风险点编号 对应a_safe_fxd的信息编号 //企业风险点编号 对应a_safe_fxd的信息编号
aSafeYhzgxx.setQyfxdbh(b.getFxdxxbh()); if (b.getFxdxxbh() == null) {
aSafeYhzgxx.setQyfxdbh("03_20240617093239130405");
} else {
aSafeYhzgxx.setQyfxdbh(b.getFxdxxbh());
}
//隐患来源 //隐患来源
aSafeYhzgxx.setYhly("1"); aSafeYhzgxx.setYhly("1");
//检查时间 //检查时间
@ -386,7 +396,12 @@ public class AcheckTaskQuartz {
aSafeXcrwjcx.setRwbh(xcrwuuid); aSafeXcrwjcx.setRwbh(xcrwuuid);
//企业风险点编号 对应a_safe_fxd的信息编号 //企业风险点编号 对应a_safe_fxd的信息编号
//todo //todo
aSafeXcrwjcx.setQyfxdbh(b.getFxdxxbh()); if (b.getFxdxxbh() == null) {
aSafeXcrwjcx.setQyfxdbh("03_20240617093239130405");
} else {
aSafeXcrwjcx.setQyfxdbh(b.getFxdxxbh());
}
//周期编号 //周期编号
aSafeXcrwjcx.setZqbh(rwzqUuid); aSafeXcrwjcx.setZqbh(rwzqUuid);
//完成状态 //完成状态
@ -595,11 +610,11 @@ public class AcheckTaskQuartz {
} }
// @Scheduled(cron = "0 0 4 * * ? ") @Scheduled(cron = "0 0 4 * * ? ")
// @Scheduled(cron = "0 0/5 * * * ?") // @Scheduled(cron = "0 0/5 * * * ?")
//@Scheduled(cron = "0 58 18 * * ?") //@Scheduled(cron = "0 58 18 * * ?")
@PostMapping("/zicha") // @PostMapping("/zicha")
@ApiOperation(value = "自查") // @ApiOperation(value = "自查")
public void zicha() throws ParseException { public void zicha() throws ParseException {
//自己查任务周期id //自己查任务周期id
@ -621,6 +636,9 @@ public class AcheckTaskQuartz {
if (zcrwNum > 0) { if (zcrwNum > 0) {
return; return;
} }
if (a.getEnterpriseID()==null){
continue;
}
JSONObject zcjsonObject = new JSONObject(); JSONObject zcjsonObject = new JSONObject();
zcjsonObject.put("qybh", a.getEnterpriseID()); zcjsonObject.put("qybh", a.getEnterpriseID());
zcjsonObject.put("zqbh", rwzqUuid); zcjsonObject.put("zqbh", rwzqUuid);
@ -741,7 +759,11 @@ public class AcheckTaskQuartz {
//任务编号 //任务编号
aSafeZcrwjl.setRwbh(zcrwUuid); aSafeZcrwjl.setRwbh(zcrwUuid);
//企业风险点编号 //企业风险点编号
aSafeZcrwjl.setQyfxdbh(b.getFxdxxbh()); if (b.getFxdxxbh() == null) {
aSafeZcrwjl.setQyfxdbh("03_20240617093239130405");
} else {
aSafeZcrwjl.setQyfxdbh(b.getFxdxxbh());
}
//企业风险点位置编号 //企业风险点位置编号
aSafeZcrwjl.setQyfxdwzbh(b.getFxbh()); aSafeZcrwjl.setQyfxdwzbh(b.getFxbh());
//是否发现隐患 //是否发现隐患
@ -927,7 +949,11 @@ public class AcheckTaskQuartz {
//周期编号 //周期编号
aSafeYhzgxx.setZqbh(rwzqUuid); aSafeYhzgxx.setZqbh(rwzqUuid);
//企业风险点编号 对应a_safe_fxd的信息编号 //企业风险点编号 对应a_safe_fxd的信息编号
aSafeYhzgxx.setQyfxdbh(b.getFxdxxbh()); if (b.getFxdxxbh() == null) {
aSafeYhzgxx.setQyfxdbh("03_20240617093239130405");
} else {
aSafeYhzgxx.setQyfxdbh(b.getFxdxxbh());
}
//隐患来源 //隐患来源
aSafeYhzgxx.setYhly("2"); aSafeYhzgxx.setYhly("2");
//检查时间 //检查时间

Loading…
Cancel
Save