|
|
@ -6,50 +6,20 @@ import cn.hutool.http.HttpRequest;
|
|
|
|
import cn.hutool.json.JSONUtil;
|
|
|
|
import cn.hutool.json.JSONUtil;
|
|
|
|
import com.alibaba.fastjson2.JSON;
|
|
|
|
import com.alibaba.fastjson2.JSON;
|
|
|
|
import com.alibaba.fastjson2.JSONObject;
|
|
|
|
import com.alibaba.fastjson2.JSONObject;
|
|
|
|
import com.mudu.entity.ACheckQuatzEntity;
|
|
|
|
import com.mudu.entity.*;
|
|
|
|
import com.mudu.entity.ACheckQuatzZichaEntity;
|
|
|
|
|
|
|
|
import com.mudu.entity.ASafeQyjcxx;
|
|
|
|
|
|
|
|
import com.mudu.entity.ASafeRwfj;
|
|
|
|
|
|
|
|
import com.mudu.entity.ASafeRwzq;
|
|
|
|
|
|
|
|
import com.mudu.entity.ASafeTfg;
|
|
|
|
|
|
|
|
import com.mudu.entity.ASafeTfgsh;
|
|
|
|
|
|
|
|
import com.mudu.entity.ASafeXcrw;
|
|
|
|
|
|
|
|
import com.mudu.entity.ASafeXcrwjcx;
|
|
|
|
|
|
|
|
import com.mudu.entity.ASafeXcrwjcxzgxx;
|
|
|
|
|
|
|
|
import com.mudu.entity.ASafeXcrwwz;
|
|
|
|
|
|
|
|
import com.mudu.entity.ASafeYhzgxx;
|
|
|
|
|
|
|
|
import com.mudu.entity.ASafeZcrw;
|
|
|
|
|
|
|
|
import com.mudu.entity.ASafeZcrwjl;
|
|
|
|
|
|
|
|
import com.mudu.entity.ASafeZcrwwz;
|
|
|
|
|
|
|
|
import com.mudu.entity.SzsASafeZcyhxx;
|
|
|
|
|
|
|
|
import com.mudu.entity.dto.request.ACheckQuatzRequest;
|
|
|
|
import com.mudu.entity.dto.request.ACheckQuatzRequest;
|
|
|
|
import com.mudu.entity.dto.request.ACheckQuatzZichaRequest;
|
|
|
|
import com.mudu.entity.dto.request.ACheckQuatzZichaRequest;
|
|
|
|
import com.mudu.entity.dto.response.ACheckXcTpResponse;
|
|
|
|
import com.mudu.entity.dto.response.ACheckXcTpResponse;
|
|
|
|
|
|
|
|
import com.mudu.entity.dto.response.FxdwzResponse;
|
|
|
|
import com.mudu.entity.dto.response.RwzqUuidResponse;
|
|
|
|
import com.mudu.entity.dto.response.RwzqUuidResponse;
|
|
|
|
import com.mudu.service.ASafeQyjcxxService;
|
|
|
|
import com.mudu.service.*;
|
|
|
|
import com.mudu.service.ASafeRwfjService;
|
|
|
|
|
|
|
|
import com.mudu.service.ASafeRwzqService;
|
|
|
|
|
|
|
|
import com.mudu.service.ASafeTfgService;
|
|
|
|
|
|
|
|
import com.mudu.service.ASafeTfgshService;
|
|
|
|
|
|
|
|
import com.mudu.service.ASafeXcrwService;
|
|
|
|
|
|
|
|
import com.mudu.service.ASafeXcrwjcxService;
|
|
|
|
|
|
|
|
import com.mudu.service.ASafeXcrwjcxzgxxService;
|
|
|
|
|
|
|
|
import com.mudu.service.ASafeXcrwwzService;
|
|
|
|
|
|
|
|
import com.mudu.service.ASafeYhzgxxService;
|
|
|
|
|
|
|
|
import com.mudu.service.ASafeZcrwService;
|
|
|
|
|
|
|
|
import com.mudu.service.ASafeZcrwjlService;
|
|
|
|
|
|
|
|
import com.mudu.service.ASafeZcrwwzService;
|
|
|
|
|
|
|
|
import com.mudu.service.SzsASafeZcyhxxService;
|
|
|
|
|
|
|
|
import com.mudu.service.impl.LoginService;
|
|
|
|
import com.mudu.service.impl.LoginService;
|
|
|
|
import io.swagger.annotations.Api;
|
|
|
|
import io.swagger.annotations.Api;
|
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
|
import org.slf4j.Logger;
|
|
|
|
import org.slf4j.Logger;
|
|
|
|
import org.slf4j.LoggerFactory;
|
|
|
|
import org.slf4j.LoggerFactory;
|
|
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
|
|
import org.springframework.context.annotation.Configuration;
|
|
|
|
|
|
|
|
import org.springframework.scheduling.annotation.EnableScheduling;
|
|
|
|
|
|
|
|
import org.springframework.scheduling.annotation.Scheduled;
|
|
|
|
import org.springframework.scheduling.annotation.Scheduled;
|
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
|
|
|
|
|
import org.springframework.web.bind.annotation.PostMapping;
|
|
|
|
import org.springframework.web.bind.annotation.PostMapping;
|
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
@ -188,35 +158,29 @@ public class AcheckTaskQuartz {
|
|
|
|
.header("Authorization", token)
|
|
|
|
.header("Authorization", token)
|
|
|
|
// .timeout(60*1000*2)
|
|
|
|
// .timeout(60*1000*2)
|
|
|
|
.execute().body();
|
|
|
|
.execute().body();
|
|
|
|
logger.info(responseList);
|
|
|
|
|
|
|
|
JSONObject jsonResponseList = JSON.parseObject(responseList);
|
|
|
|
JSONObject jsonResponseList = JSON.parseObject(responseList);
|
|
|
|
logger.info(responseList);
|
|
|
|
|
|
|
|
String dataList = jsonResponseList.getString("data");
|
|
|
|
String dataList = jsonResponseList.getString("data");
|
|
|
|
if (StrUtil.isEmpty(dataList)) {
|
|
|
|
if (StrUtil.isEmpty(dataList)) {
|
|
|
|
logger.info("dataList没有数据");
|
|
|
|
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
logger.info(dataList);
|
|
|
|
|
|
|
|
List<ACheckQuatzRequest> list = JSON.parseArray(dataList, ACheckQuatzRequest.class);
|
|
|
|
List<ACheckQuatzRequest> list = JSON.parseArray(dataList, ACheckQuatzRequest.class);
|
|
|
|
if (CollectionUtil.isEmpty(list)) {
|
|
|
|
if (CollectionUtil.isEmpty(list)) {
|
|
|
|
logger.info("list没有数据");
|
|
|
|
|
|
|
|
logger.info(list.toString());
|
|
|
|
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
for (ACheckQuatzRequest a : list) {
|
|
|
|
for (ACheckQuatzRequest a : list) {
|
|
|
|
//获取企业编号
|
|
|
|
//获取企业编号
|
|
|
|
ASafeQyjcxx aSafeQyjcxx = aSafeQyjcxxService.findOneByqymcOrXybm(a.getName(), a.getEntCode());
|
|
|
|
|
|
|
|
String enterPriseId = "";
|
|
|
|
String enterPriseId = "";
|
|
|
|
if (aSafeQyjcxx == null) {
|
|
|
|
if (a.getXxbh() == null) {
|
|
|
|
continue;
|
|
|
|
continue;
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
enterPriseId = aSafeQyjcxx.getXxbh();
|
|
|
|
enterPriseId = a.getXxbh();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// todo 来自新表查询 根据企业xxbh 以及周期编号
|
|
|
|
// todo 来自新表查询 根据企业xxbh 以及周期编号
|
|
|
|
JSONObject xcjsonObject = new JSONObject();
|
|
|
|
JSONObject xcjsonObject = new JSONObject();
|
|
|
|
xcjsonObject.put("qybh", aSafeQyjcxx.getXxbh());
|
|
|
|
xcjsonObject.put("qybh", a.getXxbh());
|
|
|
|
xcjsonObject.put("zqbh", rwzqUuid);
|
|
|
|
xcjsonObject.put("zqbh", rwzqUuid);
|
|
|
|
String xcresponse = HttpRequest.post(xczqUrl)
|
|
|
|
String xcresponse = HttpRequest.post(xczqUrl)
|
|
|
|
.contentType("application/x-www-form-urlencoded;charset=UTF-8")
|
|
|
|
.contentType("application/x-www-form-urlencoded;charset=UTF-8")
|
|
|
@ -284,7 +248,8 @@ public class AcheckTaskQuartz {
|
|
|
|
String xcrwjcxzgxxUuid = UUID.randomUUID().toString().replace("-", "").toLowerCase();
|
|
|
|
String xcrwjcxzgxxUuid = UUID.randomUUID().toString().replace("-", "").toLowerCase();
|
|
|
|
String xcrwwzUuid = UUID.randomUUID().toString().replace("-", "").toLowerCase();
|
|
|
|
String xcrwwzUuid = UUID.randomUUID().toString().replace("-", "").toLowerCase();
|
|
|
|
String yhzgxxUuid = UUID.randomUUID().toString().replace("-", "").toLowerCase();
|
|
|
|
String yhzgxxUuid = UUID.randomUUID().toString().replace("-", "").toLowerCase();
|
|
|
|
|
|
|
|
//根据企业id查询a_safe_fxdwz的wzbh和xxbh
|
|
|
|
|
|
|
|
FxdwzResponse fxdwzResponse = aSafeQyjcxxService.findByEnterPeriseId(enterPriseId);
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* 巡查任务位置 a_safe_xcrwwz
|
|
|
|
* 巡查任务位置 a_safe_xcrwwz
|
|
|
|
*/
|
|
|
|
*/
|
|
|
@ -293,12 +258,14 @@ public class AcheckTaskQuartz {
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* 巡查风险点位置隐患 a_safe_yhzgxx
|
|
|
|
* 巡查风险点位置隐患 a_safe_yhzgxx
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
saveYhzgxx(list, a, b, yhzgxxUuid, xcrwuuid, enterPriseId, rwzqUuid, xcrwwzUuid);
|
|
|
|
saveYhzgxx(list, a, b, yhzgxxUuid, xcrwuuid, enterPriseId, rwzqUuid, xcrwwzUuid, fxdwzResponse);
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* 巡查任务检查项记录 a_safe_xcrwjcx
|
|
|
|
* 巡查任务检查项记录 a_safe_xcrwjcx
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
saveXcrwJcx(b, xcrwjcxUuid, yhzgxxUuid, xcrwwzUuid, enterPriseId, xcrwuuid, rwzqUuid);
|
|
|
|
//根据企业id和s_safe_fxd的fxdbh查询风险点的信息编号
|
|
|
|
|
|
|
|
String fxdxxbh = aSafeRwzqService.findByEnIdFxd(enterPriseId, "03_20240621172152865517");
|
|
|
|
|
|
|
|
saveXcrwJcx(b, xcrwjcxUuid, yhzgxxUuid, xcrwwzUuid, enterPriseId, xcrwuuid, rwzqUuid, fxdxxbh, fxdwzResponse);
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* 巡查任务隐患整改/隐患复查 a_safe_xcrwjcxzgxx
|
|
|
|
* 巡查任务隐患整改/隐患复查 a_safe_xcrwjcxzgxx
|
|
|
@ -319,24 +286,22 @@ public class AcheckTaskQuartz {
|
|
|
|
* @param rwzqUuid 任务周期id
|
|
|
|
* @param rwzqUuid 任务周期id
|
|
|
|
* @param xcrwwzUuid 巡查任务位置id
|
|
|
|
* @param xcrwwzUuid 巡查任务位置id
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
private void saveYhzgxx(List<ACheckQuatzRequest> list, ACheckQuatzRequest a, ACheckQuatzEntity b, String yhzgxxUuid, String xcrwuuid, String enterPriseId, String rwzqUuid, String xcrwwzUuid) {
|
|
|
|
private void saveYhzgxx(List<ACheckQuatzRequest> list, ACheckQuatzRequest a, ACheckQuatzEntity b, String yhzgxxUuid, String xcrwuuid, String enterPriseId, String rwzqUuid, String xcrwwzUuid, FxdwzResponse fxdwzResponse) {
|
|
|
|
ASafeYhzgxx aSafeYhzgxx = new ASafeYhzgxx();
|
|
|
|
ASafeYhzgxx aSafeYhzgxx = new ASafeYhzgxx();
|
|
|
|
//信息编号
|
|
|
|
//信息编号
|
|
|
|
aSafeYhzgxx.setXxbh(yhzgxxUuid);
|
|
|
|
aSafeYhzgxx.setXxbh(yhzgxxUuid);
|
|
|
|
//任务编号
|
|
|
|
//任务编号
|
|
|
|
aSafeYhzgxx.setRwbh(xcrwuuid);
|
|
|
|
aSafeYhzgxx.setRwbh(xcrwuuid);
|
|
|
|
//位置编号
|
|
|
|
//todo 位置编号
|
|
|
|
aSafeYhzgxx.setWzbh(b.getWzxxbh());
|
|
|
|
if (fxdwzResponse != null) {
|
|
|
|
|
|
|
|
aSafeYhzgxx.setWzbh(fxdwzResponse.getWzbh());
|
|
|
|
|
|
|
|
}
|
|
|
|
//企业编号
|
|
|
|
//企业编号
|
|
|
|
aSafeYhzgxx.setQybh(enterPriseId);
|
|
|
|
aSafeYhzgxx.setQybh(enterPriseId);
|
|
|
|
//周期编号
|
|
|
|
//周期编号
|
|
|
|
aSafeYhzgxx.setZqbh(rwzqUuid);
|
|
|
|
aSafeYhzgxx.setZqbh(rwzqUuid);
|
|
|
|
//企业风险点编号 对应a_safe_fxd的信息编号
|
|
|
|
//企业风险点编号 对应a_safe_fxd的信息编号
|
|
|
|
if (b.getFxdxxbh() == null) {
|
|
|
|
aSafeYhzgxx.setQyfxdbh("03_20240621172152865517");
|
|
|
|
aSafeYhzgxx.setQyfxdbh("03_20240617093239130405");
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
aSafeYhzgxx.setQyfxdbh(b.getFxdxxbh());
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
//隐患来源
|
|
|
|
//隐患来源
|
|
|
|
aSafeYhzgxx.setYhly("1");
|
|
|
|
aSafeYhzgxx.setYhly("1");
|
|
|
|
//检查时间
|
|
|
|
//检查时间
|
|
|
@ -389,9 +354,9 @@ public class AcheckTaskQuartz {
|
|
|
|
//任务编号
|
|
|
|
//任务编号
|
|
|
|
aSafeXcrwwz.setRwbh(xcrwuuid);
|
|
|
|
aSafeXcrwwz.setRwbh(xcrwuuid);
|
|
|
|
//位置编号
|
|
|
|
//位置编号
|
|
|
|
aSafeXcrwwz.setWzbh(b.getWzxxbh());
|
|
|
|
aSafeXcrwwz.setWzbh(null);
|
|
|
|
//位置名称
|
|
|
|
//位置名称
|
|
|
|
aSafeXcrwwz.setWzmc(b.getWzmc());
|
|
|
|
aSafeXcrwwz.setWzmc(null);
|
|
|
|
//周期编号
|
|
|
|
//周期编号
|
|
|
|
aSafeXcrwwz.setZqbh(rwzqUuid);
|
|
|
|
aSafeXcrwwz.setZqbh(rwzqUuid);
|
|
|
|
//完成状态 todo 1
|
|
|
|
//完成状态 todo 1
|
|
|
@ -453,7 +418,7 @@ public class AcheckTaskQuartz {
|
|
|
|
* @param xcrwuuid 巡查任务id
|
|
|
|
* @param xcrwuuid 巡查任务id
|
|
|
|
* @param rwzqUuid 任务周期id
|
|
|
|
* @param rwzqUuid 任务周期id
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
private void saveXcrwJcx(ACheckQuatzEntity b, String xcrwjcxUuid, String yhzgxxUuid, String xcrwwzUuid, String enterPriseId, String xcrwuuid, String rwzqUuid) {
|
|
|
|
private void saveXcrwJcx(ACheckQuatzEntity b, String xcrwjcxUuid, String yhzgxxUuid, String xcrwwzUuid, String enterPriseId, String xcrwuuid, String rwzqUuid, String fxdxxbh, FxdwzResponse fxdwzResponse) {
|
|
|
|
ASafeXcrwjcx aSafeXcrwjcx = new ASafeXcrwjcx();
|
|
|
|
ASafeXcrwjcx aSafeXcrwjcx = new ASafeXcrwjcx();
|
|
|
|
//信息编号
|
|
|
|
//信息编号
|
|
|
|
aSafeXcrwjcx.setXxbh(xcrwjcxUuid);
|
|
|
|
aSafeXcrwjcx.setXxbh(xcrwjcxUuid);
|
|
|
@ -463,12 +428,7 @@ public class AcheckTaskQuartz {
|
|
|
|
aSafeXcrwjcx.setRwbh(xcrwuuid);
|
|
|
|
aSafeXcrwjcx.setRwbh(xcrwuuid);
|
|
|
|
//企业风险点编号 对应a_safe_fxd的信息编号
|
|
|
|
//企业风险点编号 对应a_safe_fxd的信息编号
|
|
|
|
//todo
|
|
|
|
//todo
|
|
|
|
if (b.getFxdxxbh() == null) {
|
|
|
|
aSafeXcrwjcx.setQyfxdbh("03_20240621172152865517");
|
|
|
|
aSafeXcrwjcx.setQyfxdbh("03_20240617093239130405");
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
aSafeXcrwjcx.setQyfxdbh(b.getFxdxxbh());
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//周期编号
|
|
|
|
//周期编号
|
|
|
|
aSafeXcrwjcx.setZqbh(rwzqUuid);
|
|
|
|
aSafeXcrwjcx.setZqbh(rwzqUuid);
|
|
|
|
//完成状态
|
|
|
|
//完成状态
|
|
|
@ -502,9 +462,9 @@ public class AcheckTaskQuartz {
|
|
|
|
//是否重点检查项
|
|
|
|
//是否重点检查项
|
|
|
|
aSafeXcrwjcx.setSfzdjcx(1);
|
|
|
|
aSafeXcrwjcx.setSfzdjcx(1);
|
|
|
|
//检查要点 todo 检查要点要传中文描述内容
|
|
|
|
//检查要点 todo 检查要点要传中文描述内容
|
|
|
|
aSafeXcrwjcx.setJcyd(b.getJcyd());
|
|
|
|
aSafeXcrwjcx.setJcyd("请网格员认真核查企业基本信息、历史记录、委外作业、安全投入等内容,并反馈在此风险点上。");
|
|
|
|
// 检查要点编号
|
|
|
|
// 检查要点编号
|
|
|
|
aSafeXcrwjcx.setJcydbh(b.getJcydId());
|
|
|
|
aSafeXcrwjcx.setJcydbh("9b46ab79101844f58843cbcc41156b67");
|
|
|
|
//是否展示
|
|
|
|
//是否展示
|
|
|
|
aSafeXcrwjcx.setSfzs(1);
|
|
|
|
aSafeXcrwjcx.setSfzs(1);
|
|
|
|
//历史整改逾期
|
|
|
|
//历史整改逾期
|
|
|
@ -513,12 +473,14 @@ public class AcheckTaskQuartz {
|
|
|
|
aSafeXcrwjcx.setFclsyq(0);
|
|
|
|
aSafeXcrwjcx.setFclsyq(0);
|
|
|
|
//复查信息
|
|
|
|
//复查信息
|
|
|
|
aSafeXcrwjcx.setFcxx(b.getReviewContent());
|
|
|
|
aSafeXcrwjcx.setFcxx(b.getReviewContent());
|
|
|
|
//位置编号 todo 企业风险点位置的位置编号即 企业风险位置的xxbh
|
|
|
|
//位置编号 todo 位置编号
|
|
|
|
aSafeXcrwjcx.setWzbh(b.getWzxxbh());
|
|
|
|
if (fxdwzResponse != null) {
|
|
|
|
|
|
|
|
aSafeXcrwjcx.setWzbh(fxdwzResponse.getWzbh());
|
|
|
|
|
|
|
|
}
|
|
|
|
//巡查位置编号
|
|
|
|
//巡查位置编号
|
|
|
|
aSafeXcrwjcx.setXcwzbh(xcrwwzUuid);
|
|
|
|
aSafeXcrwjcx.setXcwzbh(xcrwwzUuid);
|
|
|
|
//巡查风险点编号 todo默认木渎通用检查点,检查要点
|
|
|
|
//巡查风险点编号 todo默认木渎通用检查点,检查要点
|
|
|
|
aSafeXcrwjcx.setXcfxdbh(b.getFxdxxbh());
|
|
|
|
aSafeXcrwjcx.setXcfxdbh(fxdxxbh);
|
|
|
|
//任务类型
|
|
|
|
//任务类型
|
|
|
|
aSafeXcrwjcx.setRwlx(3);
|
|
|
|
aSafeXcrwjcx.setRwlx(3);
|
|
|
|
//入库人员
|
|
|
|
//入库人员
|
|
|
@ -679,10 +641,10 @@ public class AcheckTaskQuartz {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Scheduled(cron = "0 0 4 * * ? ")
|
|
|
|
// @Scheduled(cron = "0 0 4 * * ? ")
|
|
|
|
// @Scheduled(cron = "0 0/5 * * * ?")
|
|
|
|
// @Scheduled(cron = "0 0/5 * * * ?")
|
|
|
|
// @PostMapping("/zicha")
|
|
|
|
@PostMapping("/zicha")
|
|
|
|
// @ApiOperation(value = "自查")
|
|
|
|
@ApiOperation(value = "自查")
|
|
|
|
public void zicha() throws ParseException {
|
|
|
|
public void zicha() throws ParseException {
|
|
|
|
// 获取token
|
|
|
|
// 获取token
|
|
|
|
getToken();
|
|
|
|
getToken();
|
|
|
@ -697,7 +659,6 @@ public class AcheckTaskQuartz {
|
|
|
|
String dataList = jsonResponseList.getString("data");
|
|
|
|
String dataList = jsonResponseList.getString("data");
|
|
|
|
logger.info(JSONUtil.toJsonStr(responseList));
|
|
|
|
logger.info(JSONUtil.toJsonStr(responseList));
|
|
|
|
if (StrUtil.isEmpty(dataList)) {
|
|
|
|
if (StrUtil.isEmpty(dataList)) {
|
|
|
|
logger.info("dataList没有数据");
|
|
|
|
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
List<ACheckQuatzZichaRequest> list = JSON.parseArray(dataList, ACheckQuatzZichaRequest.class);
|
|
|
|
List<ACheckQuatzZichaRequest> list = JSON.parseArray(dataList, ACheckQuatzZichaRequest.class);
|
|
|
@ -705,9 +666,7 @@ public class AcheckTaskQuartz {
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
for (ACheckQuatzZichaRequest a : list) {
|
|
|
|
for (ACheckQuatzZichaRequest a : list) {
|
|
|
|
|
|
|
|
|
|
|
|
if (a.getEnterpriseID() == null) {
|
|
|
|
if (a.getEnterpriseID() == null) {
|
|
|
|
logger.info("getEnterpriseID为空");
|
|
|
|
|
|
|
|
continue;
|
|
|
|
continue;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
JSONObject zcjsonObject = new JSONObject();
|
|
|
|
JSONObject zcjsonObject = new JSONObject();
|
|
|
@ -769,14 +728,16 @@ public class AcheckTaskQuartz {
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
saveZczgqTp(zc, zcrwUuid, xxsx);
|
|
|
|
saveZczgqTp(zc, zcrwUuid, xxsx);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
//根据企业id查询a_safe_fxdwz的wzbh和xxbh
|
|
|
|
|
|
|
|
FxdwzResponse fxdwzResponse = aSafeQyjcxxService.findByEnterPeriseId(a.getEnterpriseID());
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
*自查任务位置表a_safe_zcrwwz
|
|
|
|
*自查任务位置表a_safe_zcrwwz
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
saveZcRwwz(a, b, zcrwwzUuid, zcrwUuid, rwzqUuid);
|
|
|
|
saveZcRwwz(a, b, zcrwwzUuid, zcrwUuid, rwzqUuid, fxdwzResponse);
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* 自查任务检查项记录 a_safe_zcrwjl
|
|
|
|
* 自查任务检查项记录 a_safe_zcrwjl
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
saveZcrwjl(b, zcrwjlUuid, zcrwUuid, rwzqUuid, zcrwwzUuid);
|
|
|
|
saveZcrwjl(b, zcrwjlUuid, zcrwUuid, rwzqUuid, zcrwwzUuid, fxdwzResponse);
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* 自查任务隐患/整改 szs_a_safe_zcyhxx同巡查信息
|
|
|
|
* 自查任务隐患/整改 szs_a_safe_zcyhxx同巡查信息
|
|
|
|
*/
|
|
|
|
*/
|
|
|
@ -836,7 +797,7 @@ public class AcheckTaskQuartz {
|
|
|
|
* @param rwzqUuid 任务周期id
|
|
|
|
* @param rwzqUuid 任务周期id
|
|
|
|
* @param zcrwwzUuid 自查任务位置id
|
|
|
|
* @param zcrwwzUuid 自查任务位置id
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
private void saveZcrwjl(ACheckQuatzZichaEntity b, String zcrwjlUuid, String zcrwUuid, String rwzqUuid, String zcrwwzUuid) {
|
|
|
|
private void saveZcrwjl(ACheckQuatzZichaEntity b, String zcrwjlUuid, String zcrwUuid, String rwzqUuid, String zcrwwzUuid, FxdwzResponse fxdwzResponse) {
|
|
|
|
ASafeZcrwjl aSafeZcrwjl = new ASafeZcrwjl();
|
|
|
|
ASafeZcrwjl aSafeZcrwjl = new ASafeZcrwjl();
|
|
|
|
//信息编号
|
|
|
|
//信息编号
|
|
|
|
aSafeZcrwjl.setXxbh(zcrwjlUuid);
|
|
|
|
aSafeZcrwjl.setXxbh(zcrwjlUuid);
|
|
|
@ -845,13 +806,12 @@ public class AcheckTaskQuartz {
|
|
|
|
//任务编号
|
|
|
|
//任务编号
|
|
|
|
aSafeZcrwjl.setRwbh(zcrwUuid);
|
|
|
|
aSafeZcrwjl.setRwbh(zcrwUuid);
|
|
|
|
//企业风险点编号
|
|
|
|
//企业风险点编号
|
|
|
|
if (b.getFxdxxbh() == null) {
|
|
|
|
aSafeZcrwjl.setQyfxdbh("03_20240621172152865517");
|
|
|
|
aSafeZcrwjl.setQyfxdbh("03_20240617093239130405");
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
aSafeZcrwjl.setQyfxdbh(b.getFxdxxbh());
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
//企业风险点位置编号
|
|
|
|
//企业风险点位置编号
|
|
|
|
aSafeZcrwjl.setQyfxdwzbh(b.getFxbh());
|
|
|
|
// TODO 企业风险点位置编号
|
|
|
|
|
|
|
|
if (fxdwzResponse != null) {
|
|
|
|
|
|
|
|
aSafeZcrwjl.setQyfxdwzbh(fxdwzResponse.getXxbh());
|
|
|
|
|
|
|
|
}
|
|
|
|
//是否发现隐患
|
|
|
|
//是否发现隐患
|
|
|
|
aSafeZcrwjl.setSffxyh(0);
|
|
|
|
aSafeZcrwjl.setSffxyh(0);
|
|
|
|
//完成状态
|
|
|
|
//完成状态
|
|
|
@ -861,7 +821,10 @@ public class AcheckTaskQuartz {
|
|
|
|
//周期编号
|
|
|
|
//周期编号
|
|
|
|
aSafeZcrwjl.setZqbh(rwzqUuid);
|
|
|
|
aSafeZcrwjl.setZqbh(rwzqUuid);
|
|
|
|
//位置编号
|
|
|
|
//位置编号
|
|
|
|
aSafeZcrwjl.setWzbh(b.getWzbh());
|
|
|
|
//todo 位置编号
|
|
|
|
|
|
|
|
if (fxdwzResponse != null) {
|
|
|
|
|
|
|
|
aSafeZcrwjl.setWzbh(fxdwzResponse.getWzbh());
|
|
|
|
|
|
|
|
}
|
|
|
|
//自查任务位置编号
|
|
|
|
//自查任务位置编号
|
|
|
|
aSafeZcrwjl.setZcrwwzbh(zcrwwzUuid);
|
|
|
|
aSafeZcrwjl.setZcrwwzbh(zcrwwzUuid);
|
|
|
|
//设备数量
|
|
|
|
//设备数量
|
|
|
@ -896,7 +859,7 @@ public class AcheckTaskQuartz {
|
|
|
|
* @param zcrwUuid 自查任务id
|
|
|
|
* @param zcrwUuid 自查任务id
|
|
|
|
* @param rwzqUuid 任务周期id
|
|
|
|
* @param rwzqUuid 任务周期id
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
private void saveZcRwwz(ACheckQuatzZichaRequest a, ACheckQuatzZichaEntity b, String zcrwwzUuid, String zcrwUuid, String rwzqUuid) {
|
|
|
|
private void saveZcRwwz(ACheckQuatzZichaRequest a, ACheckQuatzZichaEntity b, String zcrwwzUuid, String zcrwUuid, String rwzqUuid, FxdwzResponse fxdwzResponse) {
|
|
|
|
ASafeZcrwwz aSafeZcrwwz = new ASafeZcrwwz();
|
|
|
|
ASafeZcrwwz aSafeZcrwwz = new ASafeZcrwwz();
|
|
|
|
//信息编号
|
|
|
|
//信息编号
|
|
|
|
aSafeZcrwwz.setXxbh(zcrwwzUuid);
|
|
|
|
aSafeZcrwwz.setXxbh(zcrwwzUuid);
|
|
|
@ -909,7 +872,10 @@ public class AcheckTaskQuartz {
|
|
|
|
//市风险点编号
|
|
|
|
//市风险点编号
|
|
|
|
aSafeZcrwwz.setSfxdbh(b.getSfxdbh());
|
|
|
|
aSafeZcrwwz.setSfxdbh(b.getSfxdbh());
|
|
|
|
//位置编号
|
|
|
|
//位置编号
|
|
|
|
aSafeZcrwwz.setWzbh(b.getWzbh());
|
|
|
|
//todo 位置编号
|
|
|
|
|
|
|
|
if (fxdwzResponse != null) {
|
|
|
|
|
|
|
|
aSafeZcrwwz.setWzbh(fxdwzResponse.getWzbh());
|
|
|
|
|
|
|
|
}
|
|
|
|
//入库人员
|
|
|
|
//入库人员
|
|
|
|
aSafeZcrwwz.setRkry(b.getAddUserID());
|
|
|
|
aSafeZcrwwz.setRkry(b.getAddUserID());
|
|
|
|
//入库时间
|
|
|
|
//入库时间
|
|
|
@ -1029,17 +995,15 @@ public class AcheckTaskQuartz {
|
|
|
|
//任务编号
|
|
|
|
//任务编号
|
|
|
|
aSafeYhzgxx.setRwbh(zcrwUuid);
|
|
|
|
aSafeYhzgxx.setRwbh(zcrwUuid);
|
|
|
|
//位置编号
|
|
|
|
//位置编号
|
|
|
|
aSafeYhzgxx.setWzbh(b.getWzbh());
|
|
|
|
if (b.getWzbh() != null) {
|
|
|
|
|
|
|
|
aSafeYhzgxx.setWzbh(b.getWzbh());
|
|
|
|
|
|
|
|
}
|
|
|
|
//企业编号
|
|
|
|
//企业编号
|
|
|
|
aSafeYhzgxx.setQybh(b.getEnterpriseID());
|
|
|
|
aSafeYhzgxx.setQybh(b.getEnterpriseID());
|
|
|
|
//周期编号
|
|
|
|
//周期编号
|
|
|
|
aSafeYhzgxx.setZqbh(rwzqUuid);
|
|
|
|
aSafeYhzgxx.setZqbh(rwzqUuid);
|
|
|
|
//企业风险点编号 对应a_safe_fxd的信息编号
|
|
|
|
//企业风险点编号 对应a_safe_fxd的信息编号
|
|
|
|
if (b.getFxdxxbh() == null) {
|
|
|
|
aSafeYhzgxx.setQyfxdbh("03_20240621172152865517");
|
|
|
|
aSafeYhzgxx.setQyfxdbh("03_20240617093239130405");
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
aSafeYhzgxx.setQyfxdbh(b.getFxdxxbh());
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
//隐患来源
|
|
|
|
//隐患来源
|
|
|
|
aSafeYhzgxx.setYhly("2");
|
|
|
|
aSafeYhzgxx.setYhly("2");
|
|
|
|
//检查时间
|
|
|
|
//检查时间
|
|
|
|