|
|
|
@ -3,16 +3,42 @@ package com.mudu.quartz;
|
|
|
|
|
import cn.hutool.core.collection.CollectionUtil;
|
|
|
|
|
import cn.hutool.core.util.StrUtil;
|
|
|
|
|
import cn.hutool.http.HttpRequest;
|
|
|
|
|
import cn.hutool.json.JSONUtil;
|
|
|
|
|
import com.alibaba.fastjson2.JSON;
|
|
|
|
|
import com.alibaba.fastjson2.JSONObject;
|
|
|
|
|
import com.mudu.entity.*;
|
|
|
|
|
import com.mudu.entity.ACheckQuatzEntity;
|
|
|
|
|
import com.mudu.entity.ACheckQuatzZichaEntity;
|
|
|
|
|
import com.mudu.entity.ASafeQyjcxx;
|
|
|
|
|
import com.mudu.entity.ASafeRwfj;
|
|
|
|
|
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.ACheckQuatzZichaRequest;
|
|
|
|
|
import com.mudu.entity.dto.response.ACheckXcTpResponse;
|
|
|
|
|
import com.mudu.entity.dto.response.FxdwzResponse;
|
|
|
|
|
import com.mudu.entity.dto.response.RwzqUuidResponse;
|
|
|
|
|
import com.mudu.service.*;
|
|
|
|
|
import com.mudu.service.ASafeQyjcxxService;
|
|
|
|
|
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 io.swagger.annotations.Api;
|
|
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
|
@ -102,14 +128,14 @@ public class AcheckTaskQuartz {
|
|
|
|
|
@Resource
|
|
|
|
|
private LoginService loginService;
|
|
|
|
|
|
|
|
|
|
@Value("${improveUrl}")
|
|
|
|
|
private String url;
|
|
|
|
|
@Value("${xctpUrl}")
|
|
|
|
|
private String xctpUrl;
|
|
|
|
|
|
|
|
|
|
@Value("${api}")
|
|
|
|
|
private String api;
|
|
|
|
|
|
|
|
|
|
@Value("${zcUrl}")
|
|
|
|
|
private String zcUrl;
|
|
|
|
|
@Value("${zctpUrl}")
|
|
|
|
|
private String zctpUrl;
|
|
|
|
|
|
|
|
|
|
@Value("${imUrl}")
|
|
|
|
|
private String imUrl;
|
|
|
|
@ -170,7 +196,7 @@ public class AcheckTaskQuartz {
|
|
|
|
|
}
|
|
|
|
|
for (ACheckQuatzRequest a : list) {
|
|
|
|
|
//获取企业编号
|
|
|
|
|
String enterPriseId = "";
|
|
|
|
|
String enterPriseId;
|
|
|
|
|
if (a.getXxbh() == null) {
|
|
|
|
|
continue;
|
|
|
|
|
} else {
|
|
|
|
@ -193,10 +219,10 @@ public class AcheckTaskQuartz {
|
|
|
|
|
}
|
|
|
|
|
String xcrwuuid = xcjsonResponse.getString("msg");
|
|
|
|
|
|
|
|
|
|
//根据工单获取数据
|
|
|
|
|
//根据工单获取巡查图片
|
|
|
|
|
JSONObject jsonObject = new JSONObject();
|
|
|
|
|
jsonObject.put("improvingNo", a.getImprovingNo());
|
|
|
|
|
String response = HttpRequest.post(url)
|
|
|
|
|
String response = HttpRequest.post(xctpUrl)
|
|
|
|
|
.contentType("application/x-www-form-urlencoded;charset=UTF-8")
|
|
|
|
|
.header("Authorization", token)
|
|
|
|
|
.body(jsonObject.toJSONString())
|
|
|
|
@ -211,34 +237,13 @@ public class AcheckTaskQuartz {
|
|
|
|
|
String zghtpListStr = JSONObject.toJSONString(zghtpListObj);
|
|
|
|
|
List<ACheckXcTpResponse> zgqTpList = JSON.parseArray(zgqtpListStr, ACheckXcTpResponse.class);
|
|
|
|
|
List<ACheckXcTpResponse> zghtpList = JSON.parseArray(zghtpListStr, ACheckXcTpResponse.class);
|
|
|
|
|
int xxsx = 0;
|
|
|
|
|
/**
|
|
|
|
|
* 附件表a_safe_rwfj
|
|
|
|
|
*/
|
|
|
|
|
for (ACheckXcTpResponse zgq : zgqTpList) {
|
|
|
|
|
/**
|
|
|
|
|
* 新增整改前任务附件
|
|
|
|
|
*/
|
|
|
|
|
saveZgqTp(zgq, xcrwuuid, xxsx);
|
|
|
|
|
}
|
|
|
|
|
String rybh = a.getRybh();
|
|
|
|
|
|
|
|
|
|
for (ACheckXcTpResponse zgh : zghtpList) {
|
|
|
|
|
/**
|
|
|
|
|
* 新增整改后任务附件
|
|
|
|
|
*/
|
|
|
|
|
svaeZghTp(zgh, xcrwuuid, xxsx);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// /**
|
|
|
|
|
// *新增任务周期a_safe_rwzq
|
|
|
|
|
// */
|
|
|
|
|
// saveRwzq(a, rwzqUuid);
|
|
|
|
|
/**
|
|
|
|
|
* 新增巡查信息表 a_safe_xcrw
|
|
|
|
|
*/
|
|
|
|
|
try {
|
|
|
|
|
// 新增巡查信息表 a_safe_xcrw
|
|
|
|
|
saveXcrw(list, a, xcrwuuid, enterPriseId, rwzqUuid);
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
logger.error("============巡查任务: " + a.getImprovingNo() + "==============" + "============" + rwzqUuidResponse.getXxbh() + "==============保存失败");
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -248,35 +253,39 @@ public class AcheckTaskQuartz {
|
|
|
|
|
String xcrwjcxzgxxUuid = UUID.randomUUID().toString().replace("-", "").toLowerCase();
|
|
|
|
|
String xcrwwzUuid = 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
|
|
|
|
|
*/
|
|
|
|
|
saveXcrwwz(b, xcrwwzUuid, xcrwuuid, rwzqUuid, fxdwzResponse);
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 巡查风险点位置隐患 a_safe_yhzgxx
|
|
|
|
|
*/
|
|
|
|
|
saveYhzgxx(list, a, b, yhzgxxUuid, xcrwuuid, enterPriseId, rwzqUuid, xcrwwzUuid, fxdwzResponse);
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 巡查任务检查项记录 a_safe_xcrwjcx
|
|
|
|
|
*/
|
|
|
|
|
// 附件表
|
|
|
|
|
for (ACheckXcTpResponse zgq : zgqTpList) {
|
|
|
|
|
// 新增整改前任务附件
|
|
|
|
|
saveZgqTp(zgq, xcrwjcxUuid, rybh);
|
|
|
|
|
}
|
|
|
|
|
for (ACheckXcTpResponse zgh : zghtpList) {
|
|
|
|
|
// 新增整改后任务附件
|
|
|
|
|
svaeZghTp(zgh, xcrwjcxUuid, rybh);
|
|
|
|
|
}
|
|
|
|
|
//根据企业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
|
|
|
|
|
*/
|
|
|
|
|
saveXcrwJcxZgxx(a, b, xcrwjcxzgxxUuid, xcrwuuid, xcrwjcxUuid, rwzqUuid);
|
|
|
|
|
//根据企业id查询a_safe_fxdwz的wzbh和xxbh
|
|
|
|
|
FxdwzResponse fxdwzResponse = aSafeQyjcxxService.findByEnterPeriseId(enterPriseId);
|
|
|
|
|
try {
|
|
|
|
|
// 巡查任务位置 a_safe_xcrwwz
|
|
|
|
|
saveXcrwwz(b, xcrwwzUuid, xcrwuuid, rwzqUuid, fxdwzResponse, rybh);
|
|
|
|
|
// 巡查风险点位置隐患 a_safe_yhzgxx
|
|
|
|
|
saveYhzgxx(list, a, b, yhzgxxUuid, xcrwuuid, enterPriseId, rwzqUuid, xcrwwzUuid, fxdwzResponse, fxdxxbh, rybh);
|
|
|
|
|
// 巡查任务检查项记录 a_safe_xcrwjcx
|
|
|
|
|
saveXcrwJcx(b, xcrwjcxUuid, yhzgxxUuid, xcrwwzUuid, enterPriseId, xcrwuuid, rwzqUuid, fxdxxbh, fxdwzResponse, rybh);
|
|
|
|
|
// 巡查任务隐患整改/隐患复查 a_safe_xcrwjcxzgxx
|
|
|
|
|
saveXcrwJcxZgxx(a, b, xcrwjcxzgxxUuid, xcrwuuid, xcrwjcxUuid, rwzqUuid, rybh);
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
e.printStackTrace();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 隐患整改信息
|
|
|
|
|
*
|
|
|
|
|
* @param list
|
|
|
|
|
* @param a 定时任务巡查请求类
|
|
|
|
|
* @param b 定时任务实体类
|
|
|
|
@ -286,22 +295,25 @@ public class AcheckTaskQuartz {
|
|
|
|
|
* @param rwzqUuid 任务周期id
|
|
|
|
|
* @param xcrwwzUuid 巡查任务位置id
|
|
|
|
|
*/
|
|
|
|
|
private void saveYhzgxx(List<ACheckQuatzRequest> list, ACheckQuatzRequest a, ACheckQuatzEntity b, String yhzgxxUuid, String xcrwuuid, String enterPriseId, String rwzqUuid, String xcrwwzUuid, FxdwzResponse fxdwzResponse) {
|
|
|
|
|
private void saveYhzgxx(List<ACheckQuatzRequest> list, ACheckQuatzRequest a, ACheckQuatzEntity b, String yhzgxxUuid, String xcrwuuid, String enterPriseId, String rwzqUuid, String xcrwwzUuid, FxdwzResponse fxdwzResponse, String fxdxxbh, String rybh) {
|
|
|
|
|
ASafeYhzgxx aSafeYhzgxx = new ASafeYhzgxx();
|
|
|
|
|
//信息编号
|
|
|
|
|
aSafeYhzgxx.setXxbh(yhzgxxUuid);
|
|
|
|
|
//任务编号
|
|
|
|
|
aSafeYhzgxx.setRwbh(xcrwuuid);
|
|
|
|
|
//todo 位置编号
|
|
|
|
|
// 位置编号
|
|
|
|
|
if (fxdwzResponse != null) {
|
|
|
|
|
aSafeYhzgxx.setWzbh(fxdwzResponse.getWzbh());
|
|
|
|
|
}
|
|
|
|
|
//企业编号
|
|
|
|
|
//企业基础信息jyjcxx表xxbh
|
|
|
|
|
aSafeYhzgxx.setQybh(enterPriseId);
|
|
|
|
|
//周期编号
|
|
|
|
|
aSafeYhzgxx.setZqbh(rwzqUuid);
|
|
|
|
|
//企业风险点编号 对应a_safe_fxd的信息编号
|
|
|
|
|
aSafeYhzgxx.setQyfxdbh("03_20240621172152865517");
|
|
|
|
|
// aSafeYhzgxx.setQyfxdbh("03_20240621172152865517");
|
|
|
|
|
if (fxdxxbh != null) {
|
|
|
|
|
aSafeYhzgxx.setQyfxdbh(fxdxxbh);
|
|
|
|
|
}
|
|
|
|
|
//隐患来源
|
|
|
|
|
aSafeYhzgxx.setYhly("1");
|
|
|
|
|
//检查时间
|
|
|
|
@ -329,11 +341,11 @@ public class AcheckTaskQuartz {
|
|
|
|
|
//整改状态
|
|
|
|
|
aSafeYhzgxx.setZgzt(1);
|
|
|
|
|
//入库人员
|
|
|
|
|
aSafeYhzgxx.setRkry(b.getRybh());
|
|
|
|
|
aSafeYhzgxx.setRkry(rybh);
|
|
|
|
|
//入库时间
|
|
|
|
|
aSafeYhzgxx.setRksj(new Date());
|
|
|
|
|
//更新人员
|
|
|
|
|
aSafeYhzgxx.setGxry(b.getRybh());
|
|
|
|
|
aSafeYhzgxx.setGxry(rybh);
|
|
|
|
|
//更新时间
|
|
|
|
|
aSafeYhzgxx.setGxsj(new Date());
|
|
|
|
|
//记录状态
|
|
|
|
@ -342,12 +354,14 @@ public class AcheckTaskQuartz {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 巡查任务位置
|
|
|
|
|
*
|
|
|
|
|
* @param b 定时任务实体类
|
|
|
|
|
* @param xcrwwzUuid 巡查任务位置ido
|
|
|
|
|
* @param xcrwuuid 巡查任务id
|
|
|
|
|
* @param rwzqUuid 任务周期id
|
|
|
|
|
*/
|
|
|
|
|
private void saveXcrwwz(ACheckQuatzEntity b, String xcrwwzUuid, String xcrwuuid, String rwzqUuid, FxdwzResponse fxdwzResponse) {
|
|
|
|
|
private void saveXcrwwz(ACheckQuatzEntity b, String xcrwwzUuid, String xcrwuuid, String rwzqUuid, FxdwzResponse fxdwzResponse, String rybh) {
|
|
|
|
|
ASafeXcrwwz aSafeXcrwwz = new ASafeXcrwwz();
|
|
|
|
|
//xxbh
|
|
|
|
|
aSafeXcrwwz.setXxbh(xcrwwzUuid);
|
|
|
|
@ -356,15 +370,19 @@ public class AcheckTaskQuartz {
|
|
|
|
|
//位置编号 todo
|
|
|
|
|
if (fxdwzResponse != null) {
|
|
|
|
|
aSafeXcrwwz.setWzbh(fxdwzResponse.getWzbh());
|
|
|
|
|
}
|
|
|
|
|
//位置名称
|
|
|
|
|
aSafeXcrwwz.setWzmc(null);
|
|
|
|
|
aSafeXcrwwz.setWzmc(fxdwzResponse.getWzmc());
|
|
|
|
|
}
|
|
|
|
|
//周期编号
|
|
|
|
|
aSafeXcrwwz.setZqbh(rwzqUuid);
|
|
|
|
|
//完成状态 todo 1
|
|
|
|
|
aSafeXcrwwz.setWczt(1);
|
|
|
|
|
//入库时间
|
|
|
|
|
aSafeXcrwwz.setRksj(new Date());
|
|
|
|
|
// 入库人员
|
|
|
|
|
aSafeXcrwwz.setRkry(rybh);
|
|
|
|
|
// 更新人员
|
|
|
|
|
aSafeXcrwwz.setGxry(rybh);
|
|
|
|
|
//更新时间
|
|
|
|
|
aSafeXcrwwz.setGxsj(new Date());
|
|
|
|
|
//记录状态
|
|
|
|
@ -373,6 +391,8 @@ public class AcheckTaskQuartz {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 巡查任务检查项整改信息
|
|
|
|
|
*
|
|
|
|
|
* @param a 定时任务巡查请求类
|
|
|
|
|
* @param b 定时任务实体类
|
|
|
|
|
* @param xcrwjcxzgxxUuid 巡查任务检查项整改id
|
|
|
|
@ -380,11 +400,11 @@ public class AcheckTaskQuartz {
|
|
|
|
|
* @param xcrwjcxUuid 巡查任务检查项id
|
|
|
|
|
* @param rwzqUuid 任务周期id
|
|
|
|
|
*/
|
|
|
|
|
private void saveXcrwJcxZgxx(ACheckQuatzRequest a, ACheckQuatzEntity b, String xcrwjcxzgxxUuid, String xcrwuuid, String xcrwjcxUuid, String rwzqUuid) {
|
|
|
|
|
private void saveXcrwJcxZgxx(ACheckQuatzRequest a, ACheckQuatzEntity b, String xcrwjcxzgxxUuid, String xcrwuuid, String xcrwjcxUuid, String rwzqUuid, String rybh) {
|
|
|
|
|
ASafeXcrwjcxzgxx aSafeXcrwjcxzgxx = new ASafeXcrwjcxzgxx();
|
|
|
|
|
//信息编号
|
|
|
|
|
aSafeXcrwjcxzgxx.setXxbh(xcrwjcxzgxxUuid);
|
|
|
|
|
//任务编号对应a_safe_xcrw的信息编号
|
|
|
|
|
// 任务编号对应a_safe_xcrw的xxbh
|
|
|
|
|
aSafeXcrwjcxzgxx.setRwbh(xcrwuuid);
|
|
|
|
|
//描述 content
|
|
|
|
|
aSafeXcrwjcxzgxx.setMs(b.getContent());
|
|
|
|
@ -401,11 +421,11 @@ public class AcheckTaskQuartz {
|
|
|
|
|
//周期编号
|
|
|
|
|
aSafeXcrwjcxzgxx.setZqbh(rwzqUuid);
|
|
|
|
|
//入库人员
|
|
|
|
|
aSafeXcrwjcxzgxx.setRkry(b.getRybh());
|
|
|
|
|
aSafeXcrwjcxzgxx.setRkry(rybh);
|
|
|
|
|
//入库时间
|
|
|
|
|
aSafeXcrwjcxzgxx.setRksj(new Date());
|
|
|
|
|
//更新人员
|
|
|
|
|
aSafeXcrwjcxzgxx.setGxry(b.getRybh());
|
|
|
|
|
aSafeXcrwjcxzgxx.setGxry(rybh);
|
|
|
|
|
//更新时间
|
|
|
|
|
aSafeXcrwjcxzgxx.setGxsj(new Date());
|
|
|
|
|
//记录状态
|
|
|
|
@ -414,23 +434,27 @@ public class AcheckTaskQuartz {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 巡查任务检查项
|
|
|
|
|
*
|
|
|
|
|
* @param b 定时任务实体类
|
|
|
|
|
* @param xcrwjcxUuid 巡查任务检查项id
|
|
|
|
|
* @param enterPriseId 企业id
|
|
|
|
|
* @param xcrwuuid 巡查任务id
|
|
|
|
|
* @param rwzqUuid 任务周期id
|
|
|
|
|
*/
|
|
|
|
|
private void saveXcrwJcx(ACheckQuatzEntity b, String xcrwjcxUuid, String yhzgxxUuid, String xcrwwzUuid, String enterPriseId, String xcrwuuid, String rwzqUuid, String fxdxxbh, FxdwzResponse fxdwzResponse) {
|
|
|
|
|
private void saveXcrwJcx(ACheckQuatzEntity b, String xcrwjcxUuid, String yhzgxxUuid, String xcrwwzUuid, String enterPriseId, String xcrwuuid, String rwzqUuid, String fxdxxbh, FxdwzResponse fxdwzResponse, String rybh) {
|
|
|
|
|
ASafeXcrwjcx aSafeXcrwjcx = new ASafeXcrwjcx();
|
|
|
|
|
//信息编号
|
|
|
|
|
aSafeXcrwjcx.setXxbh(xcrwjcxUuid);
|
|
|
|
|
//企业编号
|
|
|
|
|
//企业基础信息jyjcxx表xxbh
|
|
|
|
|
aSafeXcrwjcx.setQybh(enterPriseId);
|
|
|
|
|
//任务编号对应a_safe_xcrw的信息编号
|
|
|
|
|
//任务编号对应a_safe_xcrw的信息编号 a_safe_xcrw的xxbh
|
|
|
|
|
aSafeXcrwjcx.setRwbh(xcrwuuid);
|
|
|
|
|
//企业风险点编号 对应a_safe_fxd的信息编号
|
|
|
|
|
//todo
|
|
|
|
|
aSafeXcrwjcx.setQyfxdbh("03_20240621172152865517");
|
|
|
|
|
// aSafeXcrwjcx.setQyfxdbh("03_20240621172152865517");
|
|
|
|
|
if (fxdxxbh != null) {
|
|
|
|
|
aSafeXcrwjcx.setQyfxdbh(fxdxxbh);
|
|
|
|
|
}
|
|
|
|
|
//周期编号
|
|
|
|
|
aSafeXcrwjcx.setZqbh(rwzqUuid);
|
|
|
|
|
//完成状态
|
|
|
|
@ -481,16 +505,17 @@ public class AcheckTaskQuartz {
|
|
|
|
|
}
|
|
|
|
|
//巡查位置编号
|
|
|
|
|
aSafeXcrwjcx.setXcwzbh(xcrwwzUuid);
|
|
|
|
|
//巡查风险点编号 todo默认木渎通用检查点,检查要点
|
|
|
|
|
aSafeXcrwjcx.setXcfxdbh(fxdxxbh);
|
|
|
|
|
//巡查风险点编号 todo默认木渎通用检查点,检查要点 换成隐患整改信息的xxbh
|
|
|
|
|
// aSafeXcrwjcx.setXcfxdbh(fxdxxbh);
|
|
|
|
|
aSafeXcrwjcx.setXcfxdbh(yhzgxxUuid);
|
|
|
|
|
//任务类型
|
|
|
|
|
aSafeXcrwjcx.setRwlx(3);
|
|
|
|
|
//入库人员
|
|
|
|
|
aSafeXcrwjcx.setRkry(b.getRybh());
|
|
|
|
|
aSafeXcrwjcx.setRkry(rybh);
|
|
|
|
|
//入库时间
|
|
|
|
|
aSafeXcrwjcx.setRksj(new Date());
|
|
|
|
|
//更新人员
|
|
|
|
|
aSafeXcrwjcx.setGxry(b.getRybh());
|
|
|
|
|
aSafeXcrwjcx.setGxry(rybh);
|
|
|
|
|
//更新时间
|
|
|
|
|
aSafeXcrwjcx.setGxsj(new Date());
|
|
|
|
|
//记录状态
|
|
|
|
@ -499,6 +524,8 @@ public class AcheckTaskQuartz {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 巡查任务
|
|
|
|
|
*
|
|
|
|
|
* @param list 定时任务巡查请求类list
|
|
|
|
|
* @param a 定时任务巡查请求类
|
|
|
|
|
* @param xcrwuuid 巡查任务id
|
|
|
|
@ -507,9 +534,9 @@ public class AcheckTaskQuartz {
|
|
|
|
|
*/
|
|
|
|
|
private void saveXcrw(List<ACheckQuatzRequest> list, ACheckQuatzRequest a, String xcrwuuid, String enterPriseId, String rwzqUuid) {
|
|
|
|
|
ASafeXcrw aSafeXcrw = new ASafeXcrw();
|
|
|
|
|
//信息编号
|
|
|
|
|
// xcrw_read表的xxbh
|
|
|
|
|
aSafeXcrw.setXxbh(xcrwuuid);
|
|
|
|
|
//企业编号
|
|
|
|
|
// 企业基础信息jyjcxx表xxbh
|
|
|
|
|
aSafeXcrw.setQybh(enterPriseId);
|
|
|
|
|
//任务类型
|
|
|
|
|
aSafeXcrw.setRwlx("WGXC");
|
|
|
|
@ -543,33 +570,13 @@ public class AcheckTaskQuartz {
|
|
|
|
|
aSafeXcrwService.save(aSafeXcrw);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @param a 定时任务巡查请求类
|
|
|
|
|
* @param rwzqUuid 任务周期id
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
private void saveRwzq(ACheckQuatzRequest a, String rwzqUuid) {
|
|
|
|
|
ASafeRwzq aSafeRwzq = new ASafeRwzq();
|
|
|
|
|
//信息编号
|
|
|
|
|
aSafeRwzq.setXxbh(rwzqUuid);
|
|
|
|
|
//周期开始时间
|
|
|
|
|
aSafeRwzq.setZqkssj(a.getReportDateTime());
|
|
|
|
|
//周期结束时间
|
|
|
|
|
aSafeRwzq.setZqjssj(a.getFinalDateTime());
|
|
|
|
|
//任务类型,QYZC,WGXC,AJB,JNRY
|
|
|
|
|
aSafeRwzq.setRwlx("WGXC");
|
|
|
|
|
aSafeRwzq.setGxsj(new Date());
|
|
|
|
|
aSafeRwzq.setRksj(new Date());
|
|
|
|
|
aSafeRwzqService.save(aSafeRwzq);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @param zgq 图片响应类
|
|
|
|
|
* @param xcrwuuid 巡查任务id
|
|
|
|
|
* @param xxsx 显示顺序
|
|
|
|
|
* @param xcrwjcxUuid 巡查任务检查项xxbh
|
|
|
|
|
* @param rybh 入库人员编号
|
|
|
|
|
* @throws ParseException
|
|
|
|
|
*/
|
|
|
|
|
private void saveZgqTp(ACheckXcTpResponse zgq, String xcrwuuid, int xxsx) throws ParseException {
|
|
|
|
|
private void saveZgqTp(ACheckXcTpResponse zgq, String xcrwjcxUuid, String rybh) throws ParseException {
|
|
|
|
|
String rwfjUuid = UUID.randomUUID().toString().replace("-", "").toLowerCase();
|
|
|
|
|
ASafeRwfj aSafeRwfj = new ASafeRwfj();
|
|
|
|
|
aSafeRwfj.setXxbh(rwfjUuid);
|
|
|
|
@ -578,17 +585,17 @@ public class AcheckTaskQuartz {
|
|
|
|
|
//附件后缀
|
|
|
|
|
aSafeRwfj.setFjhz(zgq.getContentType());
|
|
|
|
|
//关联父级编号
|
|
|
|
|
aSafeRwfj.setPid(xcrwuuid);
|
|
|
|
|
aSafeRwfj.setPid(xcrwjcxUuid);
|
|
|
|
|
//附件地址
|
|
|
|
|
aSafeRwfj.setFjdz(api + zgq.getRelativePath());
|
|
|
|
|
//文件类型
|
|
|
|
|
aSafeRwfj.setWjlx("ZGQTP");
|
|
|
|
|
//显示顺序
|
|
|
|
|
aSafeRwfj.setXssx(xxsx++);
|
|
|
|
|
aSafeRwfj.setXssx(0);
|
|
|
|
|
//记录状态
|
|
|
|
|
aSafeRwfj.setJlzt(1);
|
|
|
|
|
//入库人员
|
|
|
|
|
aSafeRwfj.setRkry(zgq.getAddUserName());
|
|
|
|
|
aSafeRwfj.setRkry(rybh);
|
|
|
|
|
//入库时间
|
|
|
|
|
String dateString = zgq.getAddDateTime();
|
|
|
|
|
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
|
|
|
@ -597,28 +604,27 @@ public class AcheckTaskQuartz {
|
|
|
|
|
//更新时间
|
|
|
|
|
aSafeRwfj.setGxsj(date);
|
|
|
|
|
//更新人员
|
|
|
|
|
aSafeRwfj.setGxry(zgq.getAddUserName());
|
|
|
|
|
aSafeRwfj.setGxry(rybh);
|
|
|
|
|
System.err.println(aSafeRwfj);
|
|
|
|
|
aSafeRwfjService.save(aSafeRwfj);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @param zgh 图片响应类
|
|
|
|
|
* @param xcrwuuid 巡查任务id
|
|
|
|
|
* @param xxsx 显示顺序
|
|
|
|
|
* @param xcrwjcxUuid 巡查任务检查项id
|
|
|
|
|
* @throws ParseException
|
|
|
|
|
*/
|
|
|
|
|
private void svaeZghTp(ACheckXcTpResponse zgh, String xcrwuuid, int xxsx) throws ParseException {
|
|
|
|
|
private void svaeZghTp(ACheckXcTpResponse zgh, String xcrwjcxUuid, String rybh) throws ParseException {
|
|
|
|
|
String rwfjUuid = UUID.randomUUID().toString().replace("-", "").toLowerCase();
|
|
|
|
|
ASafeRwfj aSafeRwfj = new ASafeRwfj();
|
|
|
|
|
|
|
|
|
|
aSafeRwfj.setXxbh(rwfjUuid);
|
|
|
|
|
//附件名称
|
|
|
|
|
aSafeRwfj.setFjmc(zgh.getFileName());
|
|
|
|
|
//附件后缀
|
|
|
|
|
aSafeRwfj.setFjhz(zgh.getContentType());
|
|
|
|
|
//关联父级编号
|
|
|
|
|
aSafeRwfj.setPid(xcrwuuid);
|
|
|
|
|
aSafeRwfj.setPid(xcrwjcxUuid);
|
|
|
|
|
//附件地址
|
|
|
|
|
aSafeRwfj.setFjdz(api + zgh.getRelativePath());
|
|
|
|
|
//文件类型
|
|
|
|
@ -626,9 +632,9 @@ public class AcheckTaskQuartz {
|
|
|
|
|
//记录状态
|
|
|
|
|
aSafeRwfj.setJlzt(1);
|
|
|
|
|
//显示顺序
|
|
|
|
|
aSafeRwfj.setXssx(xxsx++);
|
|
|
|
|
aSafeRwfj.setXssx(0);
|
|
|
|
|
//入库人员
|
|
|
|
|
aSafeRwfj.setRkry(zgh.getAddUserName());
|
|
|
|
|
aSafeRwfj.setRkry(rybh);
|
|
|
|
|
//入库时间
|
|
|
|
|
String dateString = zgh.getAddDateTime();
|
|
|
|
|
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
|
|
|
@ -637,7 +643,7 @@ public class AcheckTaskQuartz {
|
|
|
|
|
//更新时间
|
|
|
|
|
aSafeRwfj.setGxsj(date);
|
|
|
|
|
//更新人员
|
|
|
|
|
aSafeRwfj.setGxry(zgh.getAddUserName());
|
|
|
|
|
aSafeRwfj.setGxry(rybh);
|
|
|
|
|
aSafeRwfjService.save(aSafeRwfj);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
@ -659,7 +665,6 @@ public class AcheckTaskQuartz {
|
|
|
|
|
.execute().body();
|
|
|
|
|
JSONObject jsonResponseList = JSON.parseObject(responseList);
|
|
|
|
|
String dataList = jsonResponseList.getString("data");
|
|
|
|
|
logger.info(JSONUtil.toJsonStr(responseList));
|
|
|
|
|
if (StrUtil.isEmpty(dataList)) {
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
@ -671,10 +676,13 @@ public class AcheckTaskQuartz {
|
|
|
|
|
if (a.getEnterpriseID() == null) {
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
|
String rybh = a.getRybh();
|
|
|
|
|
//根据企业id和s_safe_fxd的fxdbh查询风险点的信息编号
|
|
|
|
|
String fxdxxbh = aSafeRwzqService.findByEnIdFxd(a.getEnterpriseID(), "03_20240621172152865517");
|
|
|
|
|
String sfxdbh = aSafeRwzqService.findSfxdbhByEnIdFxd(a.getEnterpriseID(), "03_20240621172152865517");
|
|
|
|
|
JSONObject zcjsonObject = new JSONObject();
|
|
|
|
|
zcjsonObject.put("qybh", a.getEnterpriseID());
|
|
|
|
|
zcjsonObject.put("zqbh", rwzqUuid);
|
|
|
|
|
logger.info(JSONUtil.toJsonStr(zcjsonObject));
|
|
|
|
|
String zcresponse = HttpRequest.post(zczqUrl)
|
|
|
|
|
.contentType("application/x-www-form-urlencoded;charset=UTF-8")
|
|
|
|
|
.header("Authorization", token)
|
|
|
|
@ -687,17 +695,12 @@ public class AcheckTaskQuartz {
|
|
|
|
|
}
|
|
|
|
|
String zcrwUuid = zcjsonResponse.getString("msg");
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
*新增任务周期a_safe_rwzq
|
|
|
|
|
*/
|
|
|
|
|
// saveRwzq(a, rwzqUuid);
|
|
|
|
|
/**
|
|
|
|
|
* 自查任务 a_safe_zcrw
|
|
|
|
|
*/
|
|
|
|
|
// 自查任务 a_safe_zcrw
|
|
|
|
|
try {
|
|
|
|
|
saveZcrw(a, zcrwUuid, rwzqUuid);
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
logger.error("============" + a.getEnterpriseID() + "==============" + "============" + rwzqUuidResponse.getXxbh() + "==============");
|
|
|
|
|
logger.error("============自查任务: " + a.getEnterpriseID() + "==============" + "============" + rwzqUuidResponse.getXxbh() + "==============保存失败");
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
for (ACheckQuatzZichaEntity b : a.getList()) {
|
|
|
|
@ -705,13 +708,10 @@ public class AcheckTaskQuartz {
|
|
|
|
|
String zcrwwzUuid = UUID.randomUUID().toString().replace("-", "").toLowerCase();
|
|
|
|
|
String zcyhxxUuid = UUID.randomUUID().toString().replace("-", "").toLowerCase();
|
|
|
|
|
String yhzgxxUuid = UUID.randomUUID().toString().replace("-", "").toLowerCase();
|
|
|
|
|
/**
|
|
|
|
|
* 附件表a_safe_rwfj
|
|
|
|
|
*/
|
|
|
|
|
//根据工单获取数据
|
|
|
|
|
// 获取自查图片 附件表a_safe_rwfj
|
|
|
|
|
JSONObject jsonObject = new JSONObject();
|
|
|
|
|
jsonObject.put("imageRelationID", b.getImgId());
|
|
|
|
|
String response = HttpRequest.post(zcUrl)
|
|
|
|
|
String response = HttpRequest.post(zctpUrl)
|
|
|
|
|
.contentType("application/x-www-form-urlencoded;charset=UTF-8")
|
|
|
|
|
.header("Authorization", token)
|
|
|
|
|
.body(jsonObject.toJSONString())
|
|
|
|
@ -722,32 +722,25 @@ public class AcheckTaskQuartz {
|
|
|
|
|
JSONObject json = JSONObject.parseObject(data);
|
|
|
|
|
Object zgqtpListObj = json.get("zcList");
|
|
|
|
|
String zgqtpListStr = JSONObject.toJSONString(zgqtpListObj);
|
|
|
|
|
int xxsx = 0;
|
|
|
|
|
List<ACheckXcTpResponse> zgqTpList = JSON.parseArray(zgqtpListStr, ACheckXcTpResponse.class);
|
|
|
|
|
for (ACheckXcTpResponse zc : zgqTpList) {
|
|
|
|
|
/**
|
|
|
|
|
* 自查整改前图片
|
|
|
|
|
*/
|
|
|
|
|
saveZczgqTp(zc, zcrwUuid, xxsx);
|
|
|
|
|
// 自查整改前图片
|
|
|
|
|
saveZczgqTp(zc, zcrwUuid, rybh);
|
|
|
|
|
}
|
|
|
|
|
//根据企业id查询a_safe_fxdwz的wzbh和xxbh
|
|
|
|
|
// 根据企业id查询a_safe_fxdwz的wzbh和xxbh
|
|
|
|
|
FxdwzResponse fxdwzResponse = aSafeQyjcxxService.findByEnterPeriseId(a.getEnterpriseID());
|
|
|
|
|
/**
|
|
|
|
|
*自查任务位置表a_safe_zcrwwz
|
|
|
|
|
*/
|
|
|
|
|
saveZcRwwz(a, b, zcrwwzUuid, zcrwUuid, rwzqUuid, fxdwzResponse);
|
|
|
|
|
/**
|
|
|
|
|
* 自查任务检查项记录 a_safe_zcrwjl
|
|
|
|
|
*/
|
|
|
|
|
saveZcrwjl(b, zcrwjlUuid, zcrwUuid, rwzqUuid, zcrwwzUuid, fxdwzResponse);
|
|
|
|
|
/**
|
|
|
|
|
* 自查任务隐患/整改 szs_a_safe_zcyhxx同巡查信息
|
|
|
|
|
*/
|
|
|
|
|
try {
|
|
|
|
|
// 自查任务位置表a_safe_zcrwwz
|
|
|
|
|
saveZcRwwz(a, sfxdbh, zcrwwzUuid, zcrwUuid, rwzqUuid, fxdwzResponse, rybh);
|
|
|
|
|
// 自查任务检查项记录 a_safe_zcrwjl
|
|
|
|
|
saveZcrwjl(b, zcrwjlUuid, zcrwUuid, rwzqUuid, zcrwwzUuid, fxdwzResponse, fxdxxbh, rybh);
|
|
|
|
|
// 自查任务隐患/整改 szs_a_safe_zcyhxx同巡查信息
|
|
|
|
|
saveZcyHxx(a, b, zcyhxxUuid, zcrwUuid, zcrwjlUuid, rwzqUuid);
|
|
|
|
|
/**
|
|
|
|
|
* 自查风险点位置隐患 a_safe_yhzgxx
|
|
|
|
|
*/
|
|
|
|
|
saveZihaYhzgxx(list, a, b, yhzgxxUuid, zcrwUuid, rwzqUuid, zcrwUuid, fxdwzResponse);
|
|
|
|
|
// 自查风险点位置隐患 a_safe_yhzgxx
|
|
|
|
|
saveZihaYhzgxx(list, a, b, yhzgxxUuid, zcrwUuid, rwzqUuid, zcrwUuid, fxdwzResponse, fxdxxbh);
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
e.printStackTrace();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -780,11 +773,11 @@ public class AcheckTaskQuartz {
|
|
|
|
|
//周期编号
|
|
|
|
|
szsASafeZcyhxx.setZqbh(rwzqUuid);
|
|
|
|
|
//入库人员
|
|
|
|
|
szsASafeZcyhxx.setRkry(b.getAddUserID());
|
|
|
|
|
szsASafeZcyhxx.setRkry(a.getRybh());
|
|
|
|
|
//入库时间
|
|
|
|
|
szsASafeZcyhxx.setRksj(new Date());
|
|
|
|
|
//更新人员
|
|
|
|
|
szsASafeZcyhxx.setGxry(b.getAddUserID());
|
|
|
|
|
szsASafeZcyhxx.setGxry(a.getRybh());
|
|
|
|
|
//更新时间
|
|
|
|
|
szsASafeZcyhxx.setGxsj(new Date());
|
|
|
|
|
//记录状态
|
|
|
|
@ -799,7 +792,8 @@ public class AcheckTaskQuartz {
|
|
|
|
|
* @param rwzqUuid 任务周期id
|
|
|
|
|
* @param zcrwwzUuid 自查任务位置id
|
|
|
|
|
*/
|
|
|
|
|
private void saveZcrwjl(ACheckQuatzZichaEntity b, String zcrwjlUuid, String zcrwUuid, String rwzqUuid, String zcrwwzUuid, FxdwzResponse fxdwzResponse) {
|
|
|
|
|
private void saveZcrwjl(ACheckQuatzZichaEntity b, String zcrwjlUuid, String zcrwUuid
|
|
|
|
|
, String rwzqUuid, String zcrwwzUuid, FxdwzResponse fxdwzResponse, String fxdxxbh, String rybh) {
|
|
|
|
|
ASafeZcrwjl aSafeZcrwjl = new ASafeZcrwjl();
|
|
|
|
|
//信息编号
|
|
|
|
|
aSafeZcrwjl.setXxbh(zcrwjlUuid);
|
|
|
|
@ -808,7 +802,10 @@ public class AcheckTaskQuartz {
|
|
|
|
|
//任务编号
|
|
|
|
|
aSafeZcrwjl.setRwbh(zcrwUuid);
|
|
|
|
|
//企业风险点编号
|
|
|
|
|
aSafeZcrwjl.setQyfxdbh("03_20240621172152865517");
|
|
|
|
|
// aSafeZcrwjl.setQyfxdbh("03_20240621172152865517");
|
|
|
|
|
if (fxdxxbh != null) {
|
|
|
|
|
aSafeZcrwjl.setQyfxdbh(fxdxxbh);
|
|
|
|
|
}
|
|
|
|
|
//企业风险点位置编号
|
|
|
|
|
// TODO 企业风险点位置编号
|
|
|
|
|
if (fxdwzResponse != null) {
|
|
|
|
@ -822,8 +819,7 @@ public class AcheckTaskQuartz {
|
|
|
|
|
aSafeZcrwjl.setJcsj(b.getAddDateTime());
|
|
|
|
|
//周期编号
|
|
|
|
|
aSafeZcrwjl.setZqbh(rwzqUuid);
|
|
|
|
|
//位置编号
|
|
|
|
|
//todo 位置编号
|
|
|
|
|
// 位置编号
|
|
|
|
|
if (fxdwzResponse != null) {
|
|
|
|
|
aSafeZcrwjl.setWzbh(fxdwzResponse.getWzbh());
|
|
|
|
|
}
|
|
|
|
@ -842,11 +838,11 @@ public class AcheckTaskQuartz {
|
|
|
|
|
//记录状态
|
|
|
|
|
aSafeZcrwjl.setJlzt(1);
|
|
|
|
|
//入库人员
|
|
|
|
|
aSafeZcrwjl.setRkry(b.getAddUserID());
|
|
|
|
|
aSafeZcrwjl.setRkry(rybh);
|
|
|
|
|
//入库时间
|
|
|
|
|
aSafeZcrwjl.setRksj(new Date());
|
|
|
|
|
//更新人员
|
|
|
|
|
aSafeZcrwjl.setGxry(b.getAddUserID());
|
|
|
|
|
aSafeZcrwjl.setGxry(rybh);
|
|
|
|
|
//更新时间
|
|
|
|
|
aSafeZcrwjl.setGxsj(new Date());
|
|
|
|
|
// 完成状态
|
|
|
|
@ -856,12 +852,12 @@ public class AcheckTaskQuartz {
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @param a 定时任务自查请求类
|
|
|
|
|
* @param b 定时任务自查实体类
|
|
|
|
|
* @param sfxdbh 市风险点编号
|
|
|
|
|
* @param zcrwwzUuid 自查任务位置id
|
|
|
|
|
* @param zcrwUuid 自查任务id
|
|
|
|
|
* @param rwzqUuid 任务周期id
|
|
|
|
|
*/
|
|
|
|
|
private void saveZcRwwz(ACheckQuatzZichaRequest a, ACheckQuatzZichaEntity b, String zcrwwzUuid, String zcrwUuid, String rwzqUuid, FxdwzResponse fxdwzResponse) {
|
|
|
|
|
private void saveZcRwwz(ACheckQuatzZichaRequest a, String sfxdbh, String zcrwwzUuid, String zcrwUuid, String rwzqUuid, FxdwzResponse fxdwzResponse, String rybh) {
|
|
|
|
|
ASafeZcrwwz aSafeZcrwwz = new ASafeZcrwwz();
|
|
|
|
|
//信息编号
|
|
|
|
|
aSafeZcrwwz.setXxbh(zcrwwzUuid);
|
|
|
|
@ -872,20 +868,19 @@ public class AcheckTaskQuartz {
|
|
|
|
|
//周期编号
|
|
|
|
|
aSafeZcrwwz.setZqbh(rwzqUuid);
|
|
|
|
|
//市风险点编号
|
|
|
|
|
aSafeZcrwwz.setSfxdbh(b.getSfxdbh());
|
|
|
|
|
//位置编号
|
|
|
|
|
//todo 位置编号
|
|
|
|
|
aSafeZcrwwz.setSfxdbh(sfxdbh);
|
|
|
|
|
// 位置编号
|
|
|
|
|
if (fxdwzResponse != null) {
|
|
|
|
|
aSafeZcrwwz.setWzbh(fxdwzResponse.getWzbh());
|
|
|
|
|
}
|
|
|
|
|
//入库人员
|
|
|
|
|
aSafeZcrwwz.setRkry(b.getAddUserID());
|
|
|
|
|
aSafeZcrwwz.setRkry(rybh);
|
|
|
|
|
//入库时间
|
|
|
|
|
aSafeZcrwwz.setRksj(new Date());
|
|
|
|
|
//更新时间
|
|
|
|
|
aSafeZcrwwz.setGxsj(new Date());
|
|
|
|
|
//更新人员
|
|
|
|
|
aSafeZcrwwz.setGxry(b.getAddUserID());
|
|
|
|
|
aSafeZcrwwz.setGxry(rybh);
|
|
|
|
|
aSafeZcrwwz.setJlzt(1);
|
|
|
|
|
aSafeZcrwwzService.save(aSafeZcrwwz);
|
|
|
|
|
}
|
|
|
|
@ -893,10 +888,9 @@ public class AcheckTaskQuartz {
|
|
|
|
|
/**
|
|
|
|
|
* @param zc 图片响应类
|
|
|
|
|
* @param zcrwUuid 自查任务id
|
|
|
|
|
* @param xxsx 显示顺序
|
|
|
|
|
* @throws ParseException
|
|
|
|
|
*/
|
|
|
|
|
private void saveZczgqTp(ACheckXcTpResponse zc, String zcrwUuid, int xxsx) throws ParseException {
|
|
|
|
|
private void saveZczgqTp(ACheckXcTpResponse zc, String zcrwUuid, String rybh) throws ParseException {
|
|
|
|
|
String rwfjUuid = UUID.randomUUID().toString().replace("-", "").toLowerCase();
|
|
|
|
|
ASafeRwfj aSafeRwfj = new ASafeRwfj();
|
|
|
|
|
aSafeRwfj.setXxbh(rwfjUuid);
|
|
|
|
@ -910,21 +904,21 @@ public class AcheckTaskQuartz {
|
|
|
|
|
aSafeRwfj.setFjdz(api + zc.getRelativePath());
|
|
|
|
|
//文件类型
|
|
|
|
|
aSafeRwfj.setWjlx("ZGQTP");
|
|
|
|
|
//显示顺序
|
|
|
|
|
aSafeRwfj.setXssx(0);
|
|
|
|
|
//记录状态
|
|
|
|
|
aSafeRwfj.setJlzt(1);
|
|
|
|
|
//入库人员
|
|
|
|
|
aSafeRwfj.setRkry(zc.getAddUserName());
|
|
|
|
|
aSafeRwfj.setRkry(rybh);
|
|
|
|
|
//入库时间
|
|
|
|
|
String dateString = zc.getAddDateTime();
|
|
|
|
|
SimpleDateFormat zcformat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
|
|
|
|
Date zcdate = zcformat.parse(dateString);
|
|
|
|
|
aSafeRwfj.setRksj(zcdate);
|
|
|
|
|
//显示顺序
|
|
|
|
|
aSafeRwfj.setXssx(xxsx++);
|
|
|
|
|
//更新时间
|
|
|
|
|
aSafeRwfj.setGxsj(zcdate);
|
|
|
|
|
//更新人员
|
|
|
|
|
aSafeRwfj.setGxry(zc.getAddUserName());
|
|
|
|
|
aSafeRwfj.setGxry(rybh);
|
|
|
|
|
aSafeRwfjService.save(aSafeRwfj);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
@ -950,38 +944,18 @@ public class AcheckTaskQuartz {
|
|
|
|
|
//完成状态
|
|
|
|
|
aSafeZcrw.setWczt(1);
|
|
|
|
|
//入库人员
|
|
|
|
|
aSafeZcrw.setRkry(a.getAddUserID());
|
|
|
|
|
aSafeZcrw.setRkry(a.getRybh());
|
|
|
|
|
//入库时间
|
|
|
|
|
aSafeZcrw.setRksj(new Date());
|
|
|
|
|
//更新时间
|
|
|
|
|
aSafeZcrw.setGxsj(new Date());
|
|
|
|
|
aSafeZcrw.setGxsj(a.getEndDateTime());
|
|
|
|
|
//更新人员
|
|
|
|
|
aSafeZcrw.setGxry(a.getAddUserID());
|
|
|
|
|
aSafeZcrw.setGxry(a.getRybh());
|
|
|
|
|
aSafeZcrw.setJlzt(1);
|
|
|
|
|
|
|
|
|
|
aSafeZcrwService.save(aSafeZcrw);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @param a 定时任务自查请求类
|
|
|
|
|
* @param rwzqUuid 任务周期id
|
|
|
|
|
*/
|
|
|
|
|
private void saveRwzq(ACheckQuatzZichaRequest a, String rwzqUuid) {
|
|
|
|
|
ASafeRwzq aSafeRwzq = new ASafeRwzq();
|
|
|
|
|
//信息编号
|
|
|
|
|
aSafeRwzq.setXxbh(rwzqUuid);
|
|
|
|
|
//周期开始时间
|
|
|
|
|
aSafeRwzq.setZqkssj(a.getReportDateTime());
|
|
|
|
|
//周期结束时间
|
|
|
|
|
aSafeRwzq.setZqjssj(a.getEndDateTime());
|
|
|
|
|
//任务类型,QYZC,WGXC,AJB,JNRY
|
|
|
|
|
aSafeRwzq.setRwlx("QYZC");
|
|
|
|
|
aSafeRwzq.setGxsj(new Date());
|
|
|
|
|
aSafeRwzq.setRksj(new Date());
|
|
|
|
|
aSafeRwzqService.save(aSafeRwzq);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @param list
|
|
|
|
|
* @param a 定时任务巡查请求类
|
|
|
|
@ -990,7 +964,9 @@ public class AcheckTaskQuartz {
|
|
|
|
|
* @param rwzqUuid 任务周期id
|
|
|
|
|
* @param xcrwwzUuid 巡查任务位置id
|
|
|
|
|
*/
|
|
|
|
|
private void saveZihaYhzgxx(List<ACheckQuatzZichaRequest> list, ACheckQuatzZichaRequest a, ACheckQuatzZichaEntity b, String yhzgxxUuid, String zcrwUuid, String rwzqUuid, String xcrwwzUuid, FxdwzResponse fxdwzResponse) {
|
|
|
|
|
private void saveZihaYhzgxx(List<ACheckQuatzZichaRequest> list, ACheckQuatzZichaRequest a,
|
|
|
|
|
ACheckQuatzZichaEntity b, String yhzgxxUuid, String zcrwUuid,
|
|
|
|
|
String rwzqUuid, String xcrwwzUuid, FxdwzResponse fxdwzResponse, String fxdxxbh) {
|
|
|
|
|
ASafeYhzgxx aSafeYhzgxx = new ASafeYhzgxx();
|
|
|
|
|
//信息编号
|
|
|
|
|
aSafeYhzgxx.setXxbh(yhzgxxUuid);
|
|
|
|
@ -1005,7 +981,10 @@ public class AcheckTaskQuartz {
|
|
|
|
|
//周期编号
|
|
|
|
|
aSafeYhzgxx.setZqbh(rwzqUuid);
|
|
|
|
|
//企业风险点编号 对应a_safe_fxd的信息编号
|
|
|
|
|
aSafeYhzgxx.setQyfxdbh("03_20240621172152865517");
|
|
|
|
|
// aSafeYhzgxx.setQyfxdbh("03_20240621172152865517");
|
|
|
|
|
if (fxdxxbh != null) {
|
|
|
|
|
aSafeYhzgxx.setQyfxdbh(fxdxxbh);
|
|
|
|
|
}
|
|
|
|
|
//隐患来源
|
|
|
|
|
aSafeYhzgxx.setYhly("2");
|
|
|
|
|
//检查时间
|
|
|
|
@ -1033,11 +1012,11 @@ public class AcheckTaskQuartz {
|
|
|
|
|
//整改状态
|
|
|
|
|
aSafeYhzgxx.setZgzt(1);
|
|
|
|
|
//入库人员
|
|
|
|
|
// aSafeYhzgxx.setRkry(b.getRybh());
|
|
|
|
|
aSafeYhzgxx.setRkry(a.getRybh());
|
|
|
|
|
//入库时间
|
|
|
|
|
aSafeYhzgxx.setRksj(new Date());
|
|
|
|
|
//更新人员
|
|
|
|
|
// aSafeYhzgxx.setGxry(b.getRybh());
|
|
|
|
|
aSafeYhzgxx.setGxry(a.getRybh());
|
|
|
|
|
//更新时间
|
|
|
|
|
aSafeYhzgxx.setGxsj(new Date());
|
|
|
|
|
//记录状态
|
|
|
|
|