main
吴顺杰 6 months ago
parent 8c7c5c1013
commit b8a0b8b8fc

@ -40,7 +40,7 @@ public class ACheckQuatzZichaEntity {
* id * id
*/ */
@ApiModelProperty(value = "人员id") @ApiModelProperty(value = "人员id")
private String addUserID; private String rybh;
/** /**

@ -37,7 +37,7 @@ public class ACheckQuatzZichaRequest {
* id * id
*/ */
@ApiModelProperty(value = "人员id") @ApiModelProperty(value = "人员id")
private String addUserID; private String rybh;
/** /**
* *

@ -19,6 +19,10 @@ public class FxdwzResponse {
*/ */
private String xxbh; private String xxbh;
/**
*
*/
private String wzmc;
} }

@ -37,5 +37,13 @@ public interface ASafeRwzqMapper extends BaseMapper<ASafeRwzq> {
* @return * @return
*/ */
String findByEnIdFxd(@Param("enterPriseId") String enterPriseId, @Param("fxdbh") String fxdbh); String findByEnIdFxd(@Param("enterPriseId") String enterPriseId, @Param("fxdbh") String fxdbh);
/**
* ids_safe_fxdfxdbh
* @param enterPriseId id
* @param fxdbh
* @return
*/
String findSfxdbhByEnIdFxd(@Param("enterPriseId") String enterPriseId, @Param("fxdbh") String fxdbh);
} }

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

@ -37,5 +37,13 @@ public interface ASafeRwzqService extends IService<ASafeRwzq> {
* @return * @return
*/ */
String findByEnIdFxd(String enterPriseId, String fxdbh); String findByEnIdFxd(String enterPriseId, String fxdbh);
/**
* ids_safe_fxdfxdbh
* @param enterPriseId id
* @param fxdbh
* @return
*/
String findSfxdbhByEnIdFxd(String enterPriseId, String fxdbh);
} }

@ -1,9 +1,9 @@
package com.mudu.service.impl; package com.mudu.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.mudu.entity.ASafeRwzq;
import com.mudu.entity.dto.response.RwzqUuidResponse; import com.mudu.entity.dto.response.RwzqUuidResponse;
import com.mudu.mapper.ASafeRwzqMapper; import com.mudu.mapper.ASafeRwzqMapper;
import com.mudu.entity.ASafeRwzq;
import com.mudu.service.ASafeRwzqService; import com.mudu.service.ASafeRwzqService;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
@ -34,5 +34,17 @@ public class ASafeRwzqServiceImpl extends ServiceImpl<ASafeRwzqMapper, ASafeRwzq
public String findByEnIdFxd(String enterPriseId, String fxdbh) { public String findByEnIdFxd(String enterPriseId, String fxdbh) {
return aSafeRwzqMapper.findByEnIdFxd(enterPriseId,fxdbh); return aSafeRwzqMapper.findByEnIdFxd(enterPriseId,fxdbh);
} }
/**
* ids_safe_fxdfxdbh
*
* @param enterPriseId id
* @param fxdbh
* @return
*/
@Override
public String findSfxdbhByEnIdFxd(String enterPriseId, String fxdbh) {
return aSafeRwzqMapper.findSfxdbhByEnIdFxd(enterPriseId,fxdbh);
}
} }

@ -4,7 +4,7 @@ spring:
datasource: datasource:
url: jdbc:mysql://localhost:3306/wzawb?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 url: jdbc:mysql://localhost:3306/wzawb?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
username: root username: root
password: adminadmin password: 123456
#公司本地 #公司本地
# url: jdbc:mysql://localhost:3307/mudu?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 # url: jdbc:mysql://localhost:3307/mudu?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
# username: root # username: root
@ -38,7 +38,7 @@ url: http://localhost:9028
##工单url ##工单url
#improveUrl: http://localhost:9028/mudu/quatz/xctp #improveUrl: http://localhost:9028/mudu/quatz/xctp
##自查url ##自查url
#zcUrl: http://localhost:9028/mudu/quatz/zctp #zctpUrl: http://localhost:9028/mudu/quatz/zctp
##图片路径 ##图片路径
#api: http://221.229.220.83:8007/api/ #api: http://221.229.220.83:8007/api/
# #
@ -62,13 +62,13 @@ url: http://localhost:9028
#工单url #巡查图片url
#improveUrl: https://www.jichuanglanhai.com:88/csapi/mudu/quatz/xctp #xctpUrl: https://www.jichuanglanhai.com:88/csapi/mudu/quatz/xctp
improveUrl: http://localhost:9028/mudu/quatz/xctp xctpUrl: http://localhost:9028/mudu/quatz/xctp
#自查url #自查图片url
#zcUrl: https://www.jichuanglanhai.com:88/csapi/mudu/quatz/zctp #zctpUrl: https://www.jichuanglanhai.com:88/csapi/mudu/quatz/zctp
zcUrl: http://localhost:9028/mudu/quatz/zctp zctpUrl: http://localhost:9028/mudu/quatz/zctp
#图片路径 #图片路径
api: http://mdapi.junln.net/api/ api: http://mdapi.junln.net/api/

@ -30,14 +30,14 @@ knife4j:
url: http://localhost:9028 url: http://localhost:9028
#工单url #巡查图片url
improveUrl: https://www.jichuanglanhai.com:88/csapi/mudu/quatz/xctp xctpUrl: https://www.jichuanglanhai.com:88/csapi/mudu/quatz/xctp
#自查url #自查图片url
zcUrl: https://www.jichuanglanhai.com:88/csapi/mudu/quatz/zctp zctpUrl: https://www.jichuanglanhai.com:88/csapi/mudu/quatz/zctp
#图片路径 #图片路径
api: https://www.jichuanglanhai.com:88/img/ api: https://www.jichuanglanhai.com:88/api/
#获取工单信息 #获取工单信息
imUrl: https://www.jichuanglanhai.com:88/csapi/mudu/quatz/get imUrl: https://www.jichuanglanhai.com:88/csapi/mudu/quatz/get
@ -64,4 +64,7 @@ tfgUrl: https://www.jichuanglanhai.com:88/csapi/mudu/aSafeTfg
addEntUrl: https://www.jichuanglanhai.com:88/csapi/mudu/enterprise/findAddEnt addEntUrl: https://www.jichuanglanhai.com:88/csapi/mudu/enterprise/findAddEnt
# 获取删除企业信息 # 获取删除企业信息
findEntDelUrl: https://www.jichuanglanhai.com:88/csapi/mudu/enterprise/findEntDel findEntDelUrl: https://www.jichuanglanhai.com:88/csapi/mudu/enterprise/findEntDel
#获取token
getToken: https://www.jichuanglanhai.com:88/loginnocaptcha

@ -30,11 +30,11 @@ knife4j:
url: http://localhost:9028 url: http://localhost:9028
#工单url #巡查图片url
improveUrl: https://www.jichuanglanhai.com:88/csapi/mudu/quatz/xctp xctpUrl: https://www.jichuanglanhai.com:88/csapi/mudu/quatz/xctp
#自查url #自查图片url
zcUrl: https://www.jichuanglanhai.com:88/csapi/mudu/quatz/zctp zctpUrl: https://www.jichuanglanhai.com:88/csapi/mudu/quatz/zctp
#图片路径 #图片路径
api: http://mdapi.junln.net/api/ api: http://mdapi.junln.net/api/

@ -4,7 +4,7 @@ spring:
profiles: profiles:
active: prod active: prod
#获取token #获取token
getToken: https://www.jichuanglanhai.com:88/loginnocaptcha getToken: http://localhost:9028/loginnocaptcha
# 日志配置 # 日志配置

@ -40,8 +40,11 @@
</select> </select>
<select id="findByEnterPeriseId" resultType="com.mudu.entity.dto.response.FxdwzResponse" <select id="findByEnterPeriseId" resultType="com.mudu.entity.dto.response.FxdwzResponse"
parameterType="java.lang.String"> parameterType="java.lang.String">
select wzbh, xxbh select a.wzbh, a.xxbh, s.wzmc
from a_safe_fxdwz from a_safe_fxdwz a
where QYBH = #{enterPriseId} limit 1 LEFT JOIN a_safe_qyfxwz s on a.WZBH = s.XXBH
WHERE s.XXBH is not NULL
and a.QYBH = #{enterPriseId}
limit 1
</select> </select>
</mapper> </mapper>

@ -28,4 +28,10 @@
where FXDBH =#{fxdbh} where FXDBH =#{fxdbh}
AND QYBH=#{enterPriseId} limit 1 AND QYBH=#{enterPriseId} limit 1
</select> </select>
<select id="findSfxdbhByEnIdFxd" resultType="java.lang.String">
select SFXDBH from a_safe_fxd
where FXDBH =#{fxdbh}
AND QYBH=#{enterPriseId} limit 1
</select>
</mapper> </mapper>
Loading…
Cancel
Save