|
|
@ -1,12 +1,17 @@
|
|
|
|
package com.mudu.controller;
|
|
|
|
package com.mudu.controller;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import cn.hutool.http.HttpRequest;
|
|
|
|
|
|
|
|
import com.alibaba.fastjson2.JSON;
|
|
|
|
|
|
|
|
import com.alibaba.fastjson2.JSONObject;
|
|
|
|
import com.mudu.base.domain.AjaxResult;
|
|
|
|
import com.mudu.base.domain.AjaxResult;
|
|
|
|
import com.mudu.entity.*;
|
|
|
|
import com.mudu.entity.*;
|
|
|
|
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.service.*;
|
|
|
|
import com.mudu.service.*;
|
|
|
|
import io.swagger.annotations.Api;
|
|
|
|
import io.swagger.annotations.Api;
|
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
|
|
|
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
|
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.RequestBody;
|
|
|
|
import org.springframework.web.bind.annotation.RequestBody;
|
|
|
@ -14,6 +19,8 @@ import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
|
import javax.annotation.Resource;
|
|
|
|
|
|
|
|
import java.text.ParseException;
|
|
|
|
|
|
|
|
import java.text.SimpleDateFormat;
|
|
|
|
import java.util.Date;
|
|
|
|
import java.util.Date;
|
|
|
|
import java.util.List;
|
|
|
|
import java.util.List;
|
|
|
|
import java.util.UUID;
|
|
|
|
import java.util.UUID;
|
|
|
@ -72,6 +79,23 @@ public class AcheckTaskController {
|
|
|
|
@Resource
|
|
|
|
@Resource
|
|
|
|
private ASafeXcrwwzService aSafeXcrwwzService;
|
|
|
|
private ASafeXcrwwzService aSafeXcrwwzService;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Resource
|
|
|
|
|
|
|
|
private ASafeQyjcxxService aSafeQyjcxxService;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Resource
|
|
|
|
|
|
|
|
private ASafeRwzqService aSafeRwzqService;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Value("${improveUrl}")
|
|
|
|
|
|
|
|
private String url;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Value("${api}")
|
|
|
|
|
|
|
|
private String api;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Value("${zcUrl}")
|
|
|
|
|
|
|
|
private String zcUrl;
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* 新增创建时间为昨天且处于审批通过的工单数据
|
|
|
|
* 新增创建时间为昨天且处于审批通过的工单数据
|
|
|
|
*
|
|
|
|
*
|
|
|
@ -80,328 +104,617 @@ public class AcheckTaskController {
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
@PostMapping("/insert")
|
|
|
|
@PostMapping("/insert")
|
|
|
|
@ApiOperation(value = "新增创建时间为昨天且处于审批通过的工单数据")
|
|
|
|
@ApiOperation(value = "新增创建时间为昨天且处于审批通过的工单数据")
|
|
|
|
public AjaxResult selectAll(@RequestBody List<ACheckQuatzRequest> list) {
|
|
|
|
public AjaxResult selectAll(@RequestBody List<ACheckQuatzRequest> list) throws ParseException {
|
|
|
|
for (ACheckQuatzRequest a : list) {
|
|
|
|
for (ACheckQuatzRequest a : list) {
|
|
|
|
|
|
|
|
String rwzqUuid = UUID.randomUUID().toString().replace("-", "").toLowerCase();
|
|
|
|
String xcrwuuid = UUID.randomUUID().toString().replace("-", "").toLowerCase();
|
|
|
|
String xcrwuuid = UUID.randomUUID().toString().replace("-", "").toLowerCase();
|
|
|
|
String xcrwjcxUuid = UUID.randomUUID().toString().replace("-", "").toLowerCase();
|
|
|
|
|
|
|
|
String xcrwjcxzgxxUuid = UUID.randomUUID().toString().replace("-", "").toLowerCase();
|
|
|
|
|
|
|
|
String xcrwwzUuid = UUID.randomUUID().toString().replace("-", "").toLowerCase();
|
|
|
|
|
|
|
|
String yhzgxxUuid = UUID.randomUUID().toString().replace("-", "").toLowerCase();
|
|
|
|
|
|
|
|
String rwfjUuid = UUID.randomUUID().toString().replace("-", "").toLowerCase();
|
|
|
|
|
|
|
|
//获取企业编号
|
|
|
|
//获取企业编号
|
|
|
|
String enterPriseId = a.getEnterpriseID();
|
|
|
|
ASafeQyjcxx aSafeQyjcxx = aSafeQyjcxxService.findOneByqymcOrXybm(a.getName(), a.getEntCode());
|
|
|
|
//获取人员编号
|
|
|
|
String enterPriseId = aSafeQyjcxx.getXxbh();
|
|
|
|
String rybh = a.getRybh();
|
|
|
|
//根据工单获取数据
|
|
|
|
|
|
|
|
JSONObject jsonObject = new JSONObject();
|
|
|
|
|
|
|
|
jsonObject.put("improvingNo", a.getImprovingNo());
|
|
|
|
|
|
|
|
String response = HttpRequest.post(url)
|
|
|
|
|
|
|
|
.contentType("application/x-www-form-urlencoded;charset=UTF-8")
|
|
|
|
|
|
|
|
.body(jsonObject.toJSONString())
|
|
|
|
|
|
|
|
.execute()
|
|
|
|
|
|
|
|
.body();
|
|
|
|
|
|
|
|
JSONObject jsonResponse = JSON.parseObject(response);
|
|
|
|
|
|
|
|
// 提取数据
|
|
|
|
|
|
|
|
String data = jsonResponse.getString("data");
|
|
|
|
|
|
|
|
JSONObject json = JSONObject.parseObject(data);
|
|
|
|
|
|
|
|
Object zgqtpListObj = json.get("zgqtpList");
|
|
|
|
|
|
|
|
Object zghtpListObj = json.get("zghtpList");
|
|
|
|
|
|
|
|
String zgqtpListStr = JSONObject.toJSONString(zgqtpListObj);
|
|
|
|
|
|
|
|
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_xcrw
|
|
|
|
* 附件表a_safe_rwfj
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
ASafeXcrw aSafeXcrw = new ASafeXcrw();
|
|
|
|
for (ACheckXcTpResponse zgq : zgqTpList) {
|
|
|
|
//信息编号
|
|
|
|
/**
|
|
|
|
aSafeXcrw.setXxbh(xcrwuuid);
|
|
|
|
* 新增整改前任务附件
|
|
|
|
//企业编号
|
|
|
|
*/
|
|
|
|
aSafeXcrw.setQybh(enterPriseId);
|
|
|
|
saveZgqTp(zgq, xcrwuuid, xxsx);
|
|
|
|
//任务类型
|
|
|
|
|
|
|
|
aSafeXcrw.setRwlx("WGXC");
|
|
|
|
|
|
|
|
//巡查项
|
|
|
|
|
|
|
|
aSafeXcrw.setXcx(list.size());
|
|
|
|
|
|
|
|
//完成项
|
|
|
|
|
|
|
|
aSafeXcrw.setWcx(list.size());
|
|
|
|
|
|
|
|
//发现隐患数
|
|
|
|
|
|
|
|
aSafeXcrw.setFxyhs(list.size());
|
|
|
|
|
|
|
|
//检查时间
|
|
|
|
|
|
|
|
if (a.getReportDateTime() != null) {
|
|
|
|
|
|
|
|
aSafeXcrw.setJcsj(a.getReportDateTime());
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
aSafeXcrw.setJcsj(null);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//完成状态
|
|
|
|
for (ACheckXcTpResponse zgh : zghtpList) {
|
|
|
|
aSafeXcrw.setWczt(1);
|
|
|
|
/**
|
|
|
|
//入库人员
|
|
|
|
* 新增整改后任务附件
|
|
|
|
aSafeXcrw.setRkry(rybh);
|
|
|
|
*/
|
|
|
|
//入库时间
|
|
|
|
svaeZghTp(zgh, xcrwuuid, xxsx);
|
|
|
|
aSafeXcrw.setRksj(new Date());
|
|
|
|
|
|
|
|
//更新时间
|
|
|
|
|
|
|
|
aSafeXcrw.setGxsj(new Date());
|
|
|
|
|
|
|
|
//更新人员
|
|
|
|
|
|
|
|
aSafeXcrw.setGxry(rybh);
|
|
|
|
|
|
|
|
//记录状态
|
|
|
|
|
|
|
|
aSafeXcrw.setJlzt(1);
|
|
|
|
|
|
|
|
//新增
|
|
|
|
|
|
|
|
aSafeXcrwService.save(aSafeXcrw);
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
|
|
* 巡查任务检查项记录 a_safe_xcrwjcx
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
ASafeXcrwjcx aSafeXcrwjcx = new ASafeXcrwjcx();
|
|
|
|
|
|
|
|
//信息编号
|
|
|
|
|
|
|
|
aSafeXcrwjcx.setXxbh(xcrwjcxUuid);
|
|
|
|
|
|
|
|
//企业编号
|
|
|
|
|
|
|
|
aSafeXcrwjcx.setQybh(enterPriseId);
|
|
|
|
|
|
|
|
//任务编号对应a_safe_xcrw的信息编号
|
|
|
|
|
|
|
|
aSafeXcrwjcx.setRwbh(xcrwuuid);
|
|
|
|
|
|
|
|
//企业风险点编号 对应a_safe_fxd的信息编号 todo
|
|
|
|
|
|
|
|
if (a.getCheckId() != null) {
|
|
|
|
|
|
|
|
aSafeXcrwjcx.setQyfxdbh(a.getCheckId());
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
aSafeXcrwjcx.setQyfxdbh("测试");
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
//周期编号 todo
|
|
|
|
|
|
|
|
aSafeXcrwjcx.setZqbh("测试");
|
|
|
|
|
|
|
|
//完成状态
|
|
|
|
|
|
|
|
aSafeXcrwjcx.setWczt(1);
|
|
|
|
|
|
|
|
//检查项结果
|
|
|
|
|
|
|
|
aSafeXcrwjcx.setJcxjg(String.valueOf(1));
|
|
|
|
|
|
|
|
//隐患描述
|
|
|
|
|
|
|
|
aSafeXcrwjcx.setYhms(a.getDescription());
|
|
|
|
|
|
|
|
//检查时间
|
|
|
|
|
|
|
|
if (a.getReportDateTime() != null) {
|
|
|
|
|
|
|
|
aSafeXcrwjcx.setJcsj(a.getReportDateTime());
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
aSafeXcrwjcx.setJcsj(null);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
//整改时间 todo 整改完成时间
|
|
|
|
|
|
|
|
if (a.getReportDateTime() != null) {
|
|
|
|
|
|
|
|
aSafeXcrwjcx.setZgsj(a.getReportDateTime());
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
aSafeXcrwjcx.setZgsj(null);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
//整改描述 todo
|
|
|
|
|
|
|
|
//整改期限
|
|
|
|
|
|
|
|
aSafeXcrwjcx.setZgqx(a.getNeedFinalDateTime());
|
|
|
|
|
|
|
|
//整改状态
|
|
|
|
|
|
|
|
aSafeXcrwjcx.setZgzt(1);
|
|
|
|
|
|
|
|
//整改逾期
|
|
|
|
|
|
|
|
Date currentTime = new Date(); // 获取当前时间
|
|
|
|
|
|
|
|
if (a.getNeedFinalDateTime() != null && currentTime.after(a.getNeedFinalDateTime())) {
|
|
|
|
|
|
|
|
// 超过截止时间,
|
|
|
|
|
|
|
|
aSafeXcrwjcx.setZgyq(1);
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
// 未超过截止时间,
|
|
|
|
|
|
|
|
aSafeXcrwjcx.setZgyq(0);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
//市风险点编号 todo
|
|
|
|
|
|
|
|
//任务类型
|
|
|
|
|
|
|
|
aSafeXcrwjcx.setRwlx(3);
|
|
|
|
|
|
|
|
//入库人员
|
|
|
|
|
|
|
|
aSafeXcrwjcx.setRkry(rybh);
|
|
|
|
|
|
|
|
//入库时间
|
|
|
|
|
|
|
|
aSafeXcrwjcx.setRksj(new Date());
|
|
|
|
|
|
|
|
//更新人员
|
|
|
|
|
|
|
|
aSafeXcrwjcx.setGxry(rybh);
|
|
|
|
|
|
|
|
//更新时间
|
|
|
|
|
|
|
|
aSafeXcrwjcx.setGxsj(new Date());
|
|
|
|
|
|
|
|
//记录状态
|
|
|
|
|
|
|
|
aSafeXcrwjcx.setJlzt(1);
|
|
|
|
|
|
|
|
aSafeXcrwjcxService.save(aSafeXcrwjcx);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* 巡查任务隐患整改/隐患复查 a_safe_xcrwjcxzgxx
|
|
|
|
*新增任务周期a_safe_rwzq
|
|
|
|
*/
|
|
|
|
|
|
|
|
ASafeXcrwjcxzgxx aSafeXcrwjcxzgxx = new ASafeXcrwjcxzgxx();
|
|
|
|
|
|
|
|
//信息编号
|
|
|
|
|
|
|
|
aSafeXcrwjcxzgxx.setXxbh(xcrwjcxzgxxUuid);
|
|
|
|
|
|
|
|
//任务编号对应a_safe_xcrw的信息编号
|
|
|
|
|
|
|
|
aSafeXcrwjcx.setRwbh(xcrwuuid);
|
|
|
|
|
|
|
|
//描述 content todo
|
|
|
|
|
|
|
|
//巡查检查项编号 a_safe_xcrwjcx的XXBH
|
|
|
|
|
|
|
|
aSafeXcrwjcxzgxx.setXcjcxbh(xcrwjcxUuid);
|
|
|
|
|
|
|
|
//时间
|
|
|
|
|
|
|
|
aSafeXcrwjcxzgxx.setSj(a.getFinalDateTime());
|
|
|
|
|
|
|
|
//类型
|
|
|
|
|
|
|
|
aSafeXcrwjcxzgxx.setSjlx("ZG");
|
|
|
|
|
|
|
|
//是否合格
|
|
|
|
|
|
|
|
aSafeXcrwjcxzgxx.setSfhg(1);
|
|
|
|
|
|
|
|
//到期日期
|
|
|
|
|
|
|
|
aSafeXcrwjcxzgxx.setDqrq(a.getNeedFinalDateTime());
|
|
|
|
|
|
|
|
//入库人员
|
|
|
|
|
|
|
|
aSafeXcrwjcxzgxx.setRkry(rybh);
|
|
|
|
|
|
|
|
//入库时间
|
|
|
|
|
|
|
|
aSafeXcrwjcxzgxx.setRksj(new Date());
|
|
|
|
|
|
|
|
//更新人员
|
|
|
|
|
|
|
|
aSafeXcrwjcxzgxx.setGxry(rybh);
|
|
|
|
|
|
|
|
//更新时间
|
|
|
|
|
|
|
|
aSafeXcrwjcxzgxx.setGxsj(new Date());
|
|
|
|
|
|
|
|
//记录状态
|
|
|
|
|
|
|
|
aSafeXcrwjcxzgxx.setJlzt(1);
|
|
|
|
|
|
|
|
aSafeXcrwjcxzgxxService.save(aSafeXcrwjcxzgxx);
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
|
|
* 巡查任务位置 a_safe_xcrwwz
|
|
|
|
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
ASafeXcrwwz aSafeXcrwwz = new ASafeXcrwwz();
|
|
|
|
saveRwzq(a, rwzqUuid);
|
|
|
|
//xxbh
|
|
|
|
|
|
|
|
aSafeXcrwwz.setXxbh(xcrwwzUuid);
|
|
|
|
|
|
|
|
//任务编号
|
|
|
|
|
|
|
|
aSafeXcrwwz.setRwbh(xcrwuuid);
|
|
|
|
|
|
|
|
//完成状态
|
|
|
|
|
|
|
|
aSafeXcrwwz.setWczt(1);
|
|
|
|
|
|
|
|
//入库时间
|
|
|
|
|
|
|
|
aSafeXcrwwz.setRksj(new Date());
|
|
|
|
|
|
|
|
//更新时间
|
|
|
|
|
|
|
|
aSafeXcrwwz.setGxsj(new Date());
|
|
|
|
|
|
|
|
//记录状态
|
|
|
|
|
|
|
|
aSafeXcrwwz.setJlzt(1);
|
|
|
|
|
|
|
|
aSafeXcrwwzService.save(aSafeXcrwwz);
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* 巡查风险点位置隐患 a_safe_yhzgxx
|
|
|
|
* 新增巡查信息表 a_safe_xcrw
|
|
|
|
*/
|
|
|
|
|
|
|
|
ASafeYhzgxx aSafeYhzgxx = new ASafeYhzgxx();
|
|
|
|
|
|
|
|
//信息编号
|
|
|
|
|
|
|
|
aSafeYhzgxx.setXxbh(yhzgxxUuid);
|
|
|
|
|
|
|
|
//任务编号
|
|
|
|
|
|
|
|
aSafeYhzgxx.setRwbh(xcrwuuid);
|
|
|
|
|
|
|
|
//企业编号
|
|
|
|
|
|
|
|
aSafeYhzgxx.setQybh(enterPriseId);
|
|
|
|
|
|
|
|
//周期编号
|
|
|
|
|
|
|
|
aSafeYhzgxx.setZqbh(null);
|
|
|
|
|
|
|
|
//企业风险点编号 对应a_safe_fxd的信息编号
|
|
|
|
|
|
|
|
if (a.getCheckId() != null) {
|
|
|
|
|
|
|
|
aSafeYhzgxx.setQyfxdbh(a.getCheckId());
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
//隐患来源
|
|
|
|
|
|
|
|
aSafeYhzgxx.setYhly("1");
|
|
|
|
|
|
|
|
//检查时间
|
|
|
|
|
|
|
|
if (a.getReportDateTime() != null) {
|
|
|
|
|
|
|
|
aSafeYhzgxx.setJcsj(a.getReportDateTime());
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
aSafeYhzgxx.setJcsj(null);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
//整改期限
|
|
|
|
|
|
|
|
aSafeYhzgxx.setZgqx(a.getNeedFinalDateTime());
|
|
|
|
|
|
|
|
//不合格检查项a_safe_xcrwjcx中JCXJG=1的数量
|
|
|
|
|
|
|
|
aSafeYhzgxx.setBhgjcx(0);
|
|
|
|
|
|
|
|
//整改时间 todo 隐患描述
|
|
|
|
|
|
|
|
//整改状态
|
|
|
|
|
|
|
|
aSafeYhzgxx.setZgzt(1);
|
|
|
|
|
|
|
|
//入库人员
|
|
|
|
|
|
|
|
aSafeYhzgxx.setRkry(rybh);
|
|
|
|
|
|
|
|
//入库时间
|
|
|
|
|
|
|
|
aSafeYhzgxx.setRksj(new Date());
|
|
|
|
|
|
|
|
//更新人员
|
|
|
|
|
|
|
|
aSafeYhzgxx.setGxry(rybh);
|
|
|
|
|
|
|
|
//更新时间
|
|
|
|
|
|
|
|
aSafeYhzgxx.setGxsj(new Date());
|
|
|
|
|
|
|
|
//记录状态
|
|
|
|
|
|
|
|
aSafeYhzgxx.setJlzt(1);
|
|
|
|
|
|
|
|
aSafeYhzgxxService.save(aSafeYhzgxx);
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
|
|
* 附件表a_safe_rwfj todo 少字段
|
|
|
|
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
ASafeRwfj aSafeRwfj = new ASafeRwfj();
|
|
|
|
saveXcrw(list, a, xcrwuuid, enterPriseId, rwzqUuid);
|
|
|
|
String api = "http://221.229.220.83:8007/api/";
|
|
|
|
|
|
|
|
aSafeRwfj.setXxbh(rwfjUuid);
|
|
|
|
for (ACheckQuatzEntity b : a.getList()) {
|
|
|
|
//附件地址
|
|
|
|
String xcrwjcxUuid = UUID.randomUUID().toString().replace("-", "").toLowerCase();
|
|
|
|
if (a.getRelativePath() != null) {
|
|
|
|
String xcrwjcxzgxxUuid = UUID.randomUUID().toString().replace("-", "").toLowerCase();
|
|
|
|
aSafeRwfj.setFjdz(api + a.getRelativePath());
|
|
|
|
String xcrwwzUuid = UUID.randomUUID().toString().replace("-", "").toLowerCase();
|
|
|
|
|
|
|
|
String yhzgxxUuid = UUID.randomUUID().toString().replace("-", "").toLowerCase();
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
|
|
* 巡查任务检查项记录 a_safe_xcrwjcx
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
saveXcrwJcx(b, xcrwjcxUuid, enterPriseId, xcrwuuid, rwzqUuid);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
|
|
* 巡查任务隐患整改/隐患复查 a_safe_xcrwjcxzgxx
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
saveXcrwJcxZgxx(a, b, xcrwjcxzgxxUuid, xcrwuuid, xcrwjcxUuid, rwzqUuid);
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
|
|
* 巡查任务位置 a_safe_xcrwwz
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
saveXcrwwz(b, xcrwwzUuid, xcrwuuid, rwzqUuid);
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
|
|
* 巡查风险点位置隐患 a_safe_yhzgxx
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
saveYhzgxx(list, a, b, yhzgxxUuid, xcrwuuid, enterPriseId, rwzqUuid, xcrwwzUuid);
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
//文件类型
|
|
|
|
}
|
|
|
|
aSafeRwfj.setWjlx("ZGQTP");
|
|
|
|
|
|
|
|
//关联父级编号 自查巡查任务主表的XXBH
|
|
|
|
return success();
|
|
|
|
aSafeRwfj.setPid(xcrwuuid);
|
|
|
|
}
|
|
|
|
//显示顺序 todo
|
|
|
|
|
|
|
|
int b = 0;
|
|
|
|
private void saveYhzgxx(List<ACheckQuatzRequest> list, ACheckQuatzRequest a, ACheckQuatzEntity b, String yhzgxxUuid, String xcrwuuid, String enterPriseId, String rwzqUuid, String xcrwwzUuid) {
|
|
|
|
aSafeRwfj.setXssx(b++);
|
|
|
|
ASafeYhzgxx aSafeYhzgxx = new ASafeYhzgxx();
|
|
|
|
//记录状态
|
|
|
|
//信息编号
|
|
|
|
aSafeRwfj.setJlzt(1);
|
|
|
|
aSafeYhzgxx.setXxbh(yhzgxxUuid);
|
|
|
|
//入库时间
|
|
|
|
//任务编号
|
|
|
|
aSafeRwfj.setRksj(new Date());
|
|
|
|
aSafeYhzgxx.setRwbh(xcrwuuid);
|
|
|
|
//更新时间
|
|
|
|
//位置编号
|
|
|
|
aSafeRwfj.setGxsj(new Date());
|
|
|
|
aSafeYhzgxx.setWzbh(b.getWzxxbh());
|
|
|
|
aSafeRwfjService.save(aSafeRwfj);
|
|
|
|
//企业编号
|
|
|
|
|
|
|
|
aSafeYhzgxx.setQybh(enterPriseId);
|
|
|
|
|
|
|
|
//周期编号
|
|
|
|
|
|
|
|
aSafeYhzgxx.setZqbh(rwzqUuid);
|
|
|
|
|
|
|
|
//企业风险点编号 对应a_safe_fxd的信息编号
|
|
|
|
|
|
|
|
aSafeYhzgxx.setQyfxdbh(b.getCheckId());
|
|
|
|
|
|
|
|
//隐患来源
|
|
|
|
|
|
|
|
aSafeYhzgxx.setYhly("1");
|
|
|
|
|
|
|
|
//检查时间
|
|
|
|
|
|
|
|
aSafeYhzgxx.setJcsj(a.getReportDateTime());
|
|
|
|
|
|
|
|
//整改期限
|
|
|
|
|
|
|
|
aSafeYhzgxx.setZgqx(b.getNeedFinalDateTime());
|
|
|
|
|
|
|
|
//不合格检查项a_safe_xcrwjcx中JCXJG=1的数量
|
|
|
|
|
|
|
|
aSafeYhzgxx.setBhgjcx(list.size());
|
|
|
|
|
|
|
|
//是否展示
|
|
|
|
|
|
|
|
aSafeYhzgxx.setSfzs(1);
|
|
|
|
|
|
|
|
//巡查位置编号
|
|
|
|
|
|
|
|
aSafeYhzgxx.setXcwzbh(xcrwwzUuid);
|
|
|
|
|
|
|
|
//复查是否合格
|
|
|
|
|
|
|
|
aSafeYhzgxx.setFcsfhg(1);
|
|
|
|
|
|
|
|
//隐患描述
|
|
|
|
|
|
|
|
aSafeYhzgxx.setYhms(null);
|
|
|
|
|
|
|
|
//整改时间
|
|
|
|
|
|
|
|
aSafeYhzgxx.setZgsj(b.getReportDateTime());
|
|
|
|
|
|
|
|
//整改状态
|
|
|
|
|
|
|
|
aSafeYhzgxx.setZgzt(1);
|
|
|
|
|
|
|
|
//入库人员
|
|
|
|
|
|
|
|
aSafeYhzgxx.setRkry(b.getRybh());
|
|
|
|
|
|
|
|
//入库时间
|
|
|
|
|
|
|
|
aSafeYhzgxx.setRksj(new Date());
|
|
|
|
|
|
|
|
//更新人员
|
|
|
|
|
|
|
|
aSafeYhzgxx.setGxry(b.getRybh());
|
|
|
|
|
|
|
|
//更新时间
|
|
|
|
|
|
|
|
aSafeYhzgxx.setGxsj(new Date());
|
|
|
|
|
|
|
|
//记录状态
|
|
|
|
|
|
|
|
aSafeYhzgxx.setJlzt(1);
|
|
|
|
|
|
|
|
aSafeYhzgxxService.save(aSafeYhzgxx);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private void saveXcrwwz(ACheckQuatzEntity b, String xcrwwzUuid, String xcrwuuid, String rwzqUuid) {
|
|
|
|
|
|
|
|
ASafeXcrwwz aSafeXcrwwz = new ASafeXcrwwz();
|
|
|
|
|
|
|
|
//xxbh
|
|
|
|
|
|
|
|
aSafeXcrwwz.setXxbh(xcrwwzUuid);
|
|
|
|
|
|
|
|
//任务编号
|
|
|
|
|
|
|
|
aSafeXcrwwz.setRwbh(xcrwuuid);
|
|
|
|
|
|
|
|
//位置编号
|
|
|
|
|
|
|
|
aSafeXcrwwz.setWzbh(b.getWzxxbh());
|
|
|
|
|
|
|
|
//位置名称
|
|
|
|
|
|
|
|
aSafeXcrwwz.setWzmc(b.getWzmc());
|
|
|
|
|
|
|
|
//周期编号
|
|
|
|
|
|
|
|
aSafeXcrwwz.setZqbh(rwzqUuid);
|
|
|
|
|
|
|
|
//完成状态
|
|
|
|
|
|
|
|
aSafeXcrwwz.setWczt(1);
|
|
|
|
|
|
|
|
//入库时间
|
|
|
|
|
|
|
|
aSafeXcrwwz.setRksj(new Date());
|
|
|
|
|
|
|
|
//更新时间
|
|
|
|
|
|
|
|
aSafeXcrwwz.setGxsj(new Date());
|
|
|
|
|
|
|
|
//记录状态
|
|
|
|
|
|
|
|
aSafeXcrwwz.setJlzt(1);
|
|
|
|
|
|
|
|
aSafeXcrwwzService.save(aSafeXcrwwz);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private void saveXcrwJcxZgxx(ACheckQuatzRequest a, ACheckQuatzEntity b, String xcrwjcxzgxxUuid, String xcrwuuid, String xcrwjcxUuid, String rwzqUuid) {
|
|
|
|
|
|
|
|
ASafeXcrwjcxzgxx aSafeXcrwjcxzgxx = new ASafeXcrwjcxzgxx();
|
|
|
|
|
|
|
|
//信息编号
|
|
|
|
|
|
|
|
aSafeXcrwjcxzgxx.setXxbh(xcrwjcxzgxxUuid);
|
|
|
|
|
|
|
|
//任务编号对应a_safe_xcrw的信息编号
|
|
|
|
|
|
|
|
aSafeXcrwjcxzgxx.setRwbh(xcrwuuid);
|
|
|
|
|
|
|
|
//描述 content
|
|
|
|
|
|
|
|
aSafeXcrwjcxzgxx.setMs(b.getContent());
|
|
|
|
|
|
|
|
//巡查检查项编号 a_safe_xcrwjcx的XXBH
|
|
|
|
|
|
|
|
aSafeXcrwjcxzgxx.setXcjcxbh(xcrwjcxUuid);
|
|
|
|
|
|
|
|
//时间
|
|
|
|
|
|
|
|
aSafeXcrwjcxzgxx.setSj(a.getFinalDateTime());
|
|
|
|
|
|
|
|
//类型
|
|
|
|
|
|
|
|
aSafeXcrwjcxzgxx.setSjlx("ZG");
|
|
|
|
|
|
|
|
//是否合格
|
|
|
|
|
|
|
|
aSafeXcrwjcxzgxx.setSfhg(1);
|
|
|
|
|
|
|
|
//到期日期
|
|
|
|
|
|
|
|
aSafeXcrwjcxzgxx.setDqrq(b.getNeedFinalDateTime());
|
|
|
|
|
|
|
|
//周期编号
|
|
|
|
|
|
|
|
aSafeXcrwjcxzgxx.setZqbh(rwzqUuid);
|
|
|
|
|
|
|
|
//入库人员
|
|
|
|
|
|
|
|
aSafeXcrwjcxzgxx.setRkry(b.getRybh());
|
|
|
|
|
|
|
|
//入库时间
|
|
|
|
|
|
|
|
aSafeXcrwjcxzgxx.setRksj(new Date());
|
|
|
|
|
|
|
|
//更新人员
|
|
|
|
|
|
|
|
aSafeXcrwjcxzgxx.setGxry(b.getRybh());
|
|
|
|
|
|
|
|
//更新时间
|
|
|
|
|
|
|
|
aSafeXcrwjcxzgxx.setGxsj(new Date());
|
|
|
|
|
|
|
|
//记录状态
|
|
|
|
|
|
|
|
aSafeXcrwjcxzgxx.setJlzt(1);
|
|
|
|
|
|
|
|
aSafeXcrwjcxzgxxService.save(aSafeXcrwjcxzgxx);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private void saveXcrwJcx(ACheckQuatzEntity b, String xcrwjcxUuid, String enterPriseId, String xcrwuuid, String rwzqUuid) {
|
|
|
|
|
|
|
|
ASafeXcrwjcx aSafeXcrwjcx = new ASafeXcrwjcx();
|
|
|
|
|
|
|
|
//信息编号
|
|
|
|
|
|
|
|
aSafeXcrwjcx.setXxbh(xcrwjcxUuid);
|
|
|
|
|
|
|
|
//企业编号
|
|
|
|
|
|
|
|
aSafeXcrwjcx.setQybh(enterPriseId);
|
|
|
|
|
|
|
|
//任务编号对应a_safe_xcrw的信息编号
|
|
|
|
|
|
|
|
aSafeXcrwjcx.setRwbh(xcrwuuid);
|
|
|
|
|
|
|
|
//企业风险点编号 对应a_safe_fxd的信息编号
|
|
|
|
|
|
|
|
aSafeXcrwjcx.setQyfxdbh(b.getCheckId());
|
|
|
|
|
|
|
|
//周期编号
|
|
|
|
|
|
|
|
aSafeXcrwjcx.setZqbh(rwzqUuid);
|
|
|
|
|
|
|
|
//完成状态
|
|
|
|
|
|
|
|
aSafeXcrwjcx.setWczt(1);
|
|
|
|
|
|
|
|
//检查项结果
|
|
|
|
|
|
|
|
aSafeXcrwjcx.setJcxjg(String.valueOf(1));
|
|
|
|
|
|
|
|
//隐患描述
|
|
|
|
|
|
|
|
aSafeXcrwjcx.setYhms(b.getDescription());
|
|
|
|
|
|
|
|
//检查时间
|
|
|
|
|
|
|
|
aSafeXcrwjcx.setJcsj(b.getReportDateTime());
|
|
|
|
|
|
|
|
//整改时间
|
|
|
|
|
|
|
|
aSafeXcrwjcx.setZgsj(b.getFinalDateTime());
|
|
|
|
|
|
|
|
//整改描述
|
|
|
|
|
|
|
|
aSafeXcrwjcx.setZgms(b.getContent());
|
|
|
|
|
|
|
|
//整改期限
|
|
|
|
|
|
|
|
aSafeXcrwjcx.setZgqx(b.getNeedFinalDateTime());
|
|
|
|
|
|
|
|
//整改状态
|
|
|
|
|
|
|
|
aSafeXcrwjcx.setZgzt(1);
|
|
|
|
|
|
|
|
//整改逾期
|
|
|
|
|
|
|
|
aSafeXcrwjcx.setZgyq(0);
|
|
|
|
|
|
|
|
//复查时间
|
|
|
|
|
|
|
|
aSafeXcrwjcx.setFcsj(b.getReviewDateTime());
|
|
|
|
|
|
|
|
//复查是否合格
|
|
|
|
|
|
|
|
aSafeXcrwjcx.setFcsfhg(1);
|
|
|
|
|
|
|
|
//复查期限
|
|
|
|
|
|
|
|
aSafeXcrwjcx.setFcqx(b.getReviewDateTime());
|
|
|
|
|
|
|
|
//复查逾期
|
|
|
|
|
|
|
|
aSafeXcrwjcx.setFcyq(0);
|
|
|
|
|
|
|
|
//复查状态
|
|
|
|
|
|
|
|
aSafeXcrwjcx.setFczt(1);
|
|
|
|
|
|
|
|
//是否重点检查项
|
|
|
|
|
|
|
|
aSafeXcrwjcx.setSfzdjcx(1);
|
|
|
|
|
|
|
|
//是否重点检查项
|
|
|
|
|
|
|
|
aSafeXcrwjcx.setSfzdjcx(1);
|
|
|
|
|
|
|
|
//历史整改逾期
|
|
|
|
|
|
|
|
aSafeXcrwjcx.setLszgyq(0);
|
|
|
|
|
|
|
|
//复查历史逾期
|
|
|
|
|
|
|
|
aSafeXcrwjcx.setFclsyq(0);
|
|
|
|
|
|
|
|
//复查信息
|
|
|
|
|
|
|
|
aSafeXcrwjcx.setFcxx(b.getReviewContent());
|
|
|
|
|
|
|
|
//位置编号
|
|
|
|
|
|
|
|
aSafeXcrwjcx.setWzbh(b.getWzxxbh());
|
|
|
|
|
|
|
|
//任务类型
|
|
|
|
|
|
|
|
aSafeXcrwjcx.setRwlx(3);
|
|
|
|
|
|
|
|
//入库人员
|
|
|
|
|
|
|
|
aSafeXcrwjcx.setRkry(b.getRybh());
|
|
|
|
|
|
|
|
//入库时间
|
|
|
|
|
|
|
|
aSafeXcrwjcx.setRksj(new Date());
|
|
|
|
|
|
|
|
//更新人员
|
|
|
|
|
|
|
|
aSafeXcrwjcx.setGxry(b.getRybh());
|
|
|
|
|
|
|
|
//更新时间
|
|
|
|
|
|
|
|
aSafeXcrwjcx.setGxsj(new Date());
|
|
|
|
|
|
|
|
//记录状态
|
|
|
|
|
|
|
|
aSafeXcrwjcx.setJlzt(1);
|
|
|
|
|
|
|
|
aSafeXcrwjcxService.save(aSafeXcrwjcx);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private void saveXcrw(List<ACheckQuatzRequest> list, ACheckQuatzRequest a, String xcrwuuid, String enterPriseId, String rwzqUuid) {
|
|
|
|
|
|
|
|
ASafeXcrw aSafeXcrw = new ASafeXcrw();
|
|
|
|
|
|
|
|
//信息编号
|
|
|
|
|
|
|
|
aSafeXcrw.setXxbh(xcrwuuid);
|
|
|
|
|
|
|
|
//企业编号
|
|
|
|
|
|
|
|
aSafeXcrw.setQybh(enterPriseId);
|
|
|
|
|
|
|
|
//任务类型
|
|
|
|
|
|
|
|
aSafeXcrw.setRwlx("WGXC");
|
|
|
|
|
|
|
|
//巡查项
|
|
|
|
|
|
|
|
aSafeXcrw.setXcx(list.size());
|
|
|
|
|
|
|
|
//完成项
|
|
|
|
|
|
|
|
aSafeXcrw.setWcx(list.size());
|
|
|
|
|
|
|
|
//发现隐患数
|
|
|
|
|
|
|
|
aSafeXcrw.setFxyhs(list.size());
|
|
|
|
|
|
|
|
//检查时间
|
|
|
|
|
|
|
|
if (a.getReportDateTime() != null) {
|
|
|
|
|
|
|
|
aSafeXcrw.setJcsj(a.getReportDateTime());
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
aSafeXcrw.setJcsj(null);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
//任务周期
|
|
|
|
|
|
|
|
aSafeXcrw.setZqbh(rwzqUuid);
|
|
|
|
|
|
|
|
//完成状态
|
|
|
|
|
|
|
|
aSafeXcrw.setWczt(1);
|
|
|
|
|
|
|
|
//入库人员
|
|
|
|
|
|
|
|
aSafeXcrw.setRkry(a.getRybh());
|
|
|
|
|
|
|
|
//入库时间
|
|
|
|
|
|
|
|
aSafeXcrw.setRksj(new Date());
|
|
|
|
|
|
|
|
//更新时间
|
|
|
|
|
|
|
|
aSafeXcrw.setGxsj(new Date());
|
|
|
|
|
|
|
|
//更新人员
|
|
|
|
|
|
|
|
aSafeXcrw.setGxry(a.getRybh());
|
|
|
|
|
|
|
|
//记录状态
|
|
|
|
|
|
|
|
aSafeXcrw.setJlzt(1);
|
|
|
|
|
|
|
|
//新增
|
|
|
|
|
|
|
|
aSafeXcrwService.save(aSafeXcrw);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private void saveZgqTp(ACheckXcTpResponse zgq, String xcrwuuid, int xxsx) throws ParseException {
|
|
|
|
|
|
|
|
String rwfjUuid = UUID.randomUUID().toString().replace("-", "").toLowerCase();
|
|
|
|
|
|
|
|
ASafeRwfj aSafeRwfj = new ASafeRwfj();
|
|
|
|
|
|
|
|
aSafeRwfj.setXxbh(rwfjUuid);
|
|
|
|
|
|
|
|
//附件名称
|
|
|
|
|
|
|
|
aSafeRwfj.setFjmc(zgq.getFileName());
|
|
|
|
|
|
|
|
//附件后缀
|
|
|
|
|
|
|
|
aSafeRwfj.setFjhz(zgq.getContentType());
|
|
|
|
|
|
|
|
//关联父级编号
|
|
|
|
|
|
|
|
aSafeRwfj.setPid(xcrwuuid);
|
|
|
|
|
|
|
|
//附件地址
|
|
|
|
|
|
|
|
aSafeRwfj.setFjdz(api + zgq.getRelativePath());
|
|
|
|
|
|
|
|
//文件类型
|
|
|
|
|
|
|
|
aSafeRwfj.setWjlx("ZGQTP");
|
|
|
|
|
|
|
|
//显示顺序
|
|
|
|
|
|
|
|
aSafeRwfj.setXssx(xxsx++);
|
|
|
|
|
|
|
|
//记录状态
|
|
|
|
|
|
|
|
aSafeRwfj.setJlzt(1);
|
|
|
|
|
|
|
|
//入库人员
|
|
|
|
|
|
|
|
aSafeRwfj.setRkry(zgq.getAddUserName());
|
|
|
|
|
|
|
|
//入库时间
|
|
|
|
|
|
|
|
String dateString = zgq.getAddDateTime();
|
|
|
|
|
|
|
|
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
|
|
|
|
|
|
|
Date date = format.parse(dateString);
|
|
|
|
|
|
|
|
aSafeRwfj.setRksj(date);
|
|
|
|
|
|
|
|
//更新时间
|
|
|
|
|
|
|
|
aSafeRwfj.setGxsj(date);
|
|
|
|
|
|
|
|
//更新人员
|
|
|
|
|
|
|
|
aSafeRwfj.setGxry(zgq.getAddUserName());
|
|
|
|
|
|
|
|
aSafeRwfjService.save(aSafeRwfj);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private void svaeZghTp(ACheckXcTpResponse zgh, String xcrwuuid, int xxsx) 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.setFjdz(api + zgh.getRelativePath());
|
|
|
|
|
|
|
|
//文件类型
|
|
|
|
|
|
|
|
aSafeRwfj.setWjlx("ZGHTP");
|
|
|
|
|
|
|
|
//记录状态
|
|
|
|
|
|
|
|
aSafeRwfj.setJlzt(1);
|
|
|
|
|
|
|
|
//显示顺序
|
|
|
|
|
|
|
|
aSafeRwfj.setXssx(xxsx++);
|
|
|
|
|
|
|
|
//入库人员
|
|
|
|
|
|
|
|
aSafeRwfj.setRkry(zgh.getAddUserName());
|
|
|
|
|
|
|
|
//入库时间
|
|
|
|
|
|
|
|
String dateString = zgh.getAddDateTime();
|
|
|
|
|
|
|
|
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
|
|
|
|
|
|
|
Date date = format.parse(dateString);
|
|
|
|
|
|
|
|
aSafeRwfj.setRksj(date);
|
|
|
|
|
|
|
|
//更新时间
|
|
|
|
|
|
|
|
aSafeRwfj.setGxsj(date);
|
|
|
|
|
|
|
|
//更新人员
|
|
|
|
|
|
|
|
aSafeRwfj.setGxry(zgh.getAddUserName());
|
|
|
|
|
|
|
|
aSafeRwfjService.save(aSafeRwfj);
|
|
|
|
|
|
|
|
|
|
|
|
return success();
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@PostMapping("/ziChainsert")
|
|
|
|
@PostMapping("/ziChainsert")
|
|
|
|
@ApiOperation(value = "自查")
|
|
|
|
@ApiOperation(value = "自查")
|
|
|
|
public AjaxResult zicha(@RequestBody List<ACheckQuatzZichaRequest> list) {
|
|
|
|
public AjaxResult zicha(@RequestBody List<ACheckQuatzZichaRequest> list) throws ParseException {
|
|
|
|
for (ACheckQuatzZichaRequest a : list) {
|
|
|
|
for (ACheckQuatzZichaRequest a : list) {
|
|
|
|
/**
|
|
|
|
String rwzqUuid = UUID.randomUUID().toString().replace("-", "").toLowerCase();
|
|
|
|
* 自查任务 a_safe_zcrw
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
String zcrwUuid = UUID.randomUUID().toString().replace("-", "").toLowerCase();
|
|
|
|
String zcrwUuid = UUID.randomUUID().toString().replace("-", "").toLowerCase();
|
|
|
|
String zcrwjlUuid = UUID.randomUUID().toString().replace("-", "").toLowerCase();
|
|
|
|
|
|
|
|
String zcrwwzUuid = UUID.randomUUID().toString().replace("-", "").toLowerCase();
|
|
|
|
|
|
|
|
String zcyhxxUuid = UUID.randomUUID().toString().replace("-", "").toLowerCase();
|
|
|
|
|
|
|
|
ASafeZcrw aSafeZcrw = new ASafeZcrw();
|
|
|
|
|
|
|
|
aSafeZcrw.setXxbh(zcrwUuid);
|
|
|
|
|
|
|
|
//企业编号
|
|
|
|
|
|
|
|
aSafeZcrw.setQybh(a.getEnterpriseID());
|
|
|
|
|
|
|
|
//自查项 小的listsize
|
|
|
|
|
|
|
|
aSafeZcrw.setZcx(list.size());
|
|
|
|
|
|
|
|
//完成项
|
|
|
|
|
|
|
|
aSafeZcrw.setWcx(list.size());
|
|
|
|
|
|
|
|
//发现隐患数
|
|
|
|
|
|
|
|
aSafeZcrw.setFxyhs(list.size());
|
|
|
|
|
|
|
|
//完成状态
|
|
|
|
|
|
|
|
aSafeZcrw.setWczt(1);
|
|
|
|
|
|
|
|
//入库时间
|
|
|
|
|
|
|
|
aSafeZcrw.setRksj(new Date());
|
|
|
|
|
|
|
|
//更新时间
|
|
|
|
|
|
|
|
aSafeZcrw.setGxsj(new Date());
|
|
|
|
|
|
|
|
aSafeZcrwService.save(aSafeZcrw);
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* 自查任务检查项记录 a_safe_zcrwjl
|
|
|
|
*新增任务周期a_safe_rwzq
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
ASafeZcrwjl aSafeZcrwjl = new ASafeZcrwjl();
|
|
|
|
saveRwzq(a, rwzqUuid);
|
|
|
|
aSafeZcrwjl.setXxbh(zcrwjlUuid);
|
|
|
|
|
|
|
|
//企业编号
|
|
|
|
|
|
|
|
aSafeZcrwjl.setQybh(a.getEnterpriseID());
|
|
|
|
|
|
|
|
//任务编号
|
|
|
|
|
|
|
|
aSafeZcrwjl.setRwbh(zcrwUuid);
|
|
|
|
|
|
|
|
//企业风险点编号
|
|
|
|
|
|
|
|
aSafeZcrwjl.setQyfxdbh(a.getCheckId());
|
|
|
|
|
|
|
|
//入库时间
|
|
|
|
|
|
|
|
aSafeZcrwjl.setRksj(new Date());
|
|
|
|
|
|
|
|
//更新时间
|
|
|
|
|
|
|
|
aSafeZcrwjl.setGxsj(new Date());//todo 完成状态
|
|
|
|
|
|
|
|
//是否发现隐患 todo
|
|
|
|
|
|
|
|
//AddDateTime 检查时间
|
|
|
|
|
|
|
|
//检查时间
|
|
|
|
|
|
|
|
// AddUserNamere人员
|
|
|
|
|
|
|
|
//市风险点编号 todo
|
|
|
|
|
|
|
|
//content 隐患描述
|
|
|
|
|
|
|
|
aSafeZcrwjlService.save(aSafeZcrwjl);
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
*自查任务位置表a_safe_zcrwwz
|
|
|
|
* 自查任务 a_safe_zcrw
|
|
|
|
*/
|
|
|
|
|
|
|
|
ASafeZcrwwz aSafeZcrwwz = new ASafeZcrwwz();
|
|
|
|
|
|
|
|
aSafeZcrwwz.setXxbh(zcrwwzUuid);
|
|
|
|
|
|
|
|
aSafeZcrwwz.setQybh(a.getEnterpriseID());
|
|
|
|
|
|
|
|
aSafeZcrwwz.setRwbh(zcrwUuid);
|
|
|
|
|
|
|
|
//市风险点编号 todo
|
|
|
|
|
|
|
|
//入库时间
|
|
|
|
|
|
|
|
aSafeZcrwwz.setRksj(new Date());
|
|
|
|
|
|
|
|
//更新时间
|
|
|
|
|
|
|
|
aSafeZcrwwz.setGxsj(new Date());
|
|
|
|
|
|
|
|
aSafeZcrwwz.setJlzt(1);
|
|
|
|
|
|
|
|
aSafeZcrwwzService.save(aSafeZcrwwz);
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
|
|
* 自查任务隐患/整改 szs_a_safe_zcyhxx同巡查信息
|
|
|
|
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
SzsASafeZcyhxx szsASafeZcyhxx = new SzsASafeZcyhxx();
|
|
|
|
saveZcrw(a, zcrwUuid, rwzqUuid);
|
|
|
|
//信息编号
|
|
|
|
for (ACheckQuatzZichaEntity b : a.getList()) {
|
|
|
|
szsASafeZcyhxx.setXxbh(zcyhxxUuid);
|
|
|
|
String zcrwjlUuid = UUID.randomUUID().toString().replace("-", "").toLowerCase();
|
|
|
|
//任务编号对应a_safe_xcrw的信息编号
|
|
|
|
String zcrwwzUuid = UUID.randomUUID().toString().replace("-", "").toLowerCase();
|
|
|
|
szsASafeZcyhxx.setRwbh(zcrwUuid);
|
|
|
|
String zcyhxxUuid = UUID.randomUUID().toString().replace("-", "").toLowerCase();
|
|
|
|
//巡查检查项编号 a_safe_xcrwjcx的XXBH
|
|
|
|
/**
|
|
|
|
szsASafeZcyhxx.setXcjcxbh(zcrwjlUuid);
|
|
|
|
* 附件表a_safe_rwfj
|
|
|
|
//类型
|
|
|
|
*/
|
|
|
|
szsASafeZcyhxx.setSjlx("ZG");
|
|
|
|
//根据工单获取数据
|
|
|
|
//时间 todo时间必填
|
|
|
|
JSONObject jsonObject = new JSONObject();
|
|
|
|
szsASafeZcyhxx.setSj(new Date());
|
|
|
|
jsonObject.put("imageRelationID", b.getImgId());
|
|
|
|
//是否合格
|
|
|
|
String response = HttpRequest.post(zcUrl)
|
|
|
|
szsASafeZcyhxx.setSfhg(1);
|
|
|
|
.contentType("application/x-www-form-urlencoded;charset=UTF-8")
|
|
|
|
//入库时间
|
|
|
|
.body(jsonObject.toJSONString())
|
|
|
|
szsASafeZcyhxx.setRksj(new Date());
|
|
|
|
.execute()
|
|
|
|
//更新时间
|
|
|
|
.body();
|
|
|
|
szsASafeZcyhxx.setGxsj(new Date());
|
|
|
|
JSONObject jsonResponse = JSON.parseObject(response);
|
|
|
|
//记录状态
|
|
|
|
// 提取数据
|
|
|
|
szsASafeZcyhxx.setJlzt(1);
|
|
|
|
String data = jsonResponse.getString("data");
|
|
|
|
szsASafeZcyhxxService.save(szsASafeZcyhxx);
|
|
|
|
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);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
|
|
*自查任务位置表a_safe_zcrwwz
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
saveZcRwwz(a, b, zcrwwzUuid, zcrwUuid, rwzqUuid);
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
|
|
* 自查任务检查项记录 a_safe_zcrwjl
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
saveZcrwjl(b, zcrwjlUuid, zcrwUuid, rwzqUuid, zcrwwzUuid);
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
|
|
* 自查任务隐患/整改 szs_a_safe_zcyhxx同巡查信息
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
saveZcyHxx(a, b, zcyhxxUuid, zcrwUuid, zcrwjlUuid, rwzqUuid);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return success();
|
|
|
|
return success();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private void saveZcyHxx(ACheckQuatzZichaRequest a, ACheckQuatzZichaEntity b, String zcyhxxUuid, String zcrwUuid, String zcrwjlUuid, String rwzqUuid) {
|
|
|
|
|
|
|
|
SzsASafeZcyhxx szsASafeZcyhxx = new SzsASafeZcyhxx();
|
|
|
|
|
|
|
|
//信息编号
|
|
|
|
|
|
|
|
szsASafeZcyhxx.setXxbh(zcyhxxUuid);
|
|
|
|
|
|
|
|
//任务编号对应a_safe_xcrw的信息编号
|
|
|
|
|
|
|
|
szsASafeZcyhxx.setRwbh(zcrwUuid);
|
|
|
|
|
|
|
|
//描述 content
|
|
|
|
|
|
|
|
szsASafeZcyhxx.setMs(b.getContent());
|
|
|
|
|
|
|
|
//巡查检查项编号 a_safe_xcrwjcx的XXBH
|
|
|
|
|
|
|
|
szsASafeZcyhxx.setXcjcxbh(zcrwjlUuid);
|
|
|
|
|
|
|
|
//时间
|
|
|
|
|
|
|
|
szsASafeZcyhxx.setSj(a.getReportDateTime());
|
|
|
|
|
|
|
|
//类型
|
|
|
|
|
|
|
|
szsASafeZcyhxx.setSjlx("FC");
|
|
|
|
|
|
|
|
//是否合格
|
|
|
|
|
|
|
|
szsASafeZcyhxx.setSfhg(1);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//周期编号
|
|
|
|
|
|
|
|
szsASafeZcyhxx.setZqbh(rwzqUuid);
|
|
|
|
|
|
|
|
//入库人员
|
|
|
|
|
|
|
|
szsASafeZcyhxx.setRkry(b.getAddUserID());
|
|
|
|
|
|
|
|
//入库时间
|
|
|
|
|
|
|
|
szsASafeZcyhxx.setRksj(new Date());
|
|
|
|
|
|
|
|
//更新人员
|
|
|
|
|
|
|
|
szsASafeZcyhxx.setGxry(b.getAddUserID());
|
|
|
|
|
|
|
|
//更新时间
|
|
|
|
|
|
|
|
szsASafeZcyhxx.setGxsj(new Date());
|
|
|
|
|
|
|
|
//记录状态
|
|
|
|
|
|
|
|
szsASafeZcyhxx.setJlzt(1);
|
|
|
|
|
|
|
|
szsASafeZcyhxxService.save(szsASafeZcyhxx);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private void saveZcrwjl(ACheckQuatzZichaEntity b, String zcrwjlUuid, String zcrwUuid, String rwzqUuid, String zcrwwzUuid) {
|
|
|
|
|
|
|
|
ASafeZcrwjl aSafeZcrwjl = new ASafeZcrwjl();
|
|
|
|
|
|
|
|
//信息编号
|
|
|
|
|
|
|
|
aSafeZcrwjl.setXxbh(zcrwjlUuid);
|
|
|
|
|
|
|
|
//企业编号
|
|
|
|
|
|
|
|
aSafeZcrwjl.setQybh(b.getEnterpriseID());
|
|
|
|
|
|
|
|
//任务编号
|
|
|
|
|
|
|
|
aSafeZcrwjl.setRwbh(zcrwUuid);
|
|
|
|
|
|
|
|
//企业风险点编号
|
|
|
|
|
|
|
|
aSafeZcrwjl.setQyfxdbh(b.getFxdbh());
|
|
|
|
|
|
|
|
//企业风险点位置编号
|
|
|
|
|
|
|
|
aSafeZcrwjl.setQyfxdwzbh(b.getFxbh());
|
|
|
|
|
|
|
|
//是否发现隐患
|
|
|
|
|
|
|
|
aSafeZcrwjl.setSffxyh(0);
|
|
|
|
|
|
|
|
//完成状态
|
|
|
|
|
|
|
|
aSafeZcrwjl.setWczt(1);
|
|
|
|
|
|
|
|
//检查时间
|
|
|
|
|
|
|
|
aSafeZcrwjl.setJcsj(b.getAddDateTime());
|
|
|
|
|
|
|
|
//周期编号
|
|
|
|
|
|
|
|
aSafeZcrwjl.setZqbh(rwzqUuid);
|
|
|
|
|
|
|
|
//位置编号
|
|
|
|
|
|
|
|
aSafeZcrwjl.setWzbh(b.getWzbh());
|
|
|
|
|
|
|
|
//自查任务位置编号
|
|
|
|
|
|
|
|
aSafeZcrwjl.setZcrwwzbh(zcrwwzUuid);
|
|
|
|
|
|
|
|
//设备数量
|
|
|
|
|
|
|
|
aSafeZcrwjl.setSbsl(b.getSbsl());
|
|
|
|
|
|
|
|
//检查状态
|
|
|
|
|
|
|
|
aSafeZcrwjl.setJczt(1);
|
|
|
|
|
|
|
|
//是否检查
|
|
|
|
|
|
|
|
aSafeZcrwjl.setSfjc(1);
|
|
|
|
|
|
|
|
//是否采取有限管控措施
|
|
|
|
|
|
|
|
aSafeZcrwjl.setSfcqyxgkcs(1);
|
|
|
|
|
|
|
|
//隐患描述
|
|
|
|
|
|
|
|
aSafeZcrwjl.setYhms(b.getContent());
|
|
|
|
|
|
|
|
//入库人员
|
|
|
|
|
|
|
|
aSafeZcrwjl.setRkry(b.getAddUserID());
|
|
|
|
|
|
|
|
//入库时间
|
|
|
|
|
|
|
|
aSafeZcrwjl.setRksj(new Date());
|
|
|
|
|
|
|
|
//更新人员
|
|
|
|
|
|
|
|
aSafeZcrwjl.setGxry(b.getAddUserID());
|
|
|
|
|
|
|
|
//更新时间
|
|
|
|
|
|
|
|
aSafeZcrwjl.setGxsj(new Date());
|
|
|
|
|
|
|
|
// 完成状态
|
|
|
|
|
|
|
|
aSafeZcrwjl.setWczt(1);
|
|
|
|
|
|
|
|
aSafeZcrwjlService.save(aSafeZcrwjl);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private void saveZcRwwz(ACheckQuatzZichaRequest a, ACheckQuatzZichaEntity b, String zcrwwzUuid, String zcrwUuid, String rwzqUuid) {
|
|
|
|
|
|
|
|
ASafeZcrwwz aSafeZcrwwz = new ASafeZcrwwz();
|
|
|
|
|
|
|
|
//信息编号
|
|
|
|
|
|
|
|
aSafeZcrwwz.setXxbh(zcrwwzUuid);
|
|
|
|
|
|
|
|
//企业编号
|
|
|
|
|
|
|
|
aSafeZcrwwz.setQybh(a.getEnterpriseID());
|
|
|
|
|
|
|
|
//任务编号
|
|
|
|
|
|
|
|
aSafeZcrwwz.setRwbh(zcrwUuid);
|
|
|
|
|
|
|
|
//周期编号
|
|
|
|
|
|
|
|
aSafeZcrwwz.setZqbh(rwzqUuid);
|
|
|
|
|
|
|
|
//市风险点编号
|
|
|
|
|
|
|
|
aSafeZcrwwz.setSfxdbh(b.getSfxdbh());
|
|
|
|
|
|
|
|
//位置编号
|
|
|
|
|
|
|
|
aSafeZcrwwz.setWzbh(b.getWzbh());
|
|
|
|
|
|
|
|
//入库人员
|
|
|
|
|
|
|
|
aSafeZcrwwz.setRkry(b.getAddUserID());
|
|
|
|
|
|
|
|
//入库时间
|
|
|
|
|
|
|
|
aSafeZcrwwz.setRksj(new Date());
|
|
|
|
|
|
|
|
//更新时间
|
|
|
|
|
|
|
|
aSafeZcrwwz.setGxsj(new Date());
|
|
|
|
|
|
|
|
//更新人员
|
|
|
|
|
|
|
|
aSafeZcrwwz.setGxry(b.getAddUserID());
|
|
|
|
|
|
|
|
aSafeZcrwwz.setJlzt(1);
|
|
|
|
|
|
|
|
aSafeZcrwwzService.save(aSafeZcrwwz);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private void saveZczgqTp(ACheckXcTpResponse zc, String zcrwUuid, int xxsx) throws ParseException {
|
|
|
|
|
|
|
|
String rwfjUuid = UUID.randomUUID().toString().replace("-", "").toLowerCase();
|
|
|
|
|
|
|
|
ASafeRwfj aSafeRwfj = new ASafeRwfj();
|
|
|
|
|
|
|
|
aSafeRwfj.setXxbh(rwfjUuid);
|
|
|
|
|
|
|
|
//附件名称
|
|
|
|
|
|
|
|
aSafeRwfj.setFjmc(zc.getFileName());
|
|
|
|
|
|
|
|
//附件后缀
|
|
|
|
|
|
|
|
aSafeRwfj.setFjhz(zc.getContentType());
|
|
|
|
|
|
|
|
//关联父级编号
|
|
|
|
|
|
|
|
aSafeRwfj.setPid(zcrwUuid);
|
|
|
|
|
|
|
|
//附件地址
|
|
|
|
|
|
|
|
aSafeRwfj.setFjdz(api + zc.getRelativePath());
|
|
|
|
|
|
|
|
//文件类型
|
|
|
|
|
|
|
|
aSafeRwfj.setWjlx("ZGQTP");
|
|
|
|
|
|
|
|
//记录状态
|
|
|
|
|
|
|
|
aSafeRwfj.setJlzt(1);
|
|
|
|
|
|
|
|
//入库人员
|
|
|
|
|
|
|
|
aSafeRwfj.setRkry(zc.getAddUserName());
|
|
|
|
|
|
|
|
//入库时间
|
|
|
|
|
|
|
|
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());
|
|
|
|
|
|
|
|
aSafeRwfjService.save(aSafeRwfj);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private void saveZcrw(ACheckQuatzZichaRequest a, String zcrwUuid, String rwzqUuid) {
|
|
|
|
|
|
|
|
ASafeZcrw aSafeZcrw = new ASafeZcrw();
|
|
|
|
|
|
|
|
aSafeZcrw.setXxbh(zcrwUuid);
|
|
|
|
|
|
|
|
//企业编号
|
|
|
|
|
|
|
|
aSafeZcrw.setQybh(a.getEnterpriseID());
|
|
|
|
|
|
|
|
//自查项
|
|
|
|
|
|
|
|
aSafeZcrw.setZcx(a.getList().size());
|
|
|
|
|
|
|
|
//完成项
|
|
|
|
|
|
|
|
aSafeZcrw.setWcx(a.getList().size());
|
|
|
|
|
|
|
|
//周期编号
|
|
|
|
|
|
|
|
aSafeZcrw.setZqbh(rwzqUuid);
|
|
|
|
|
|
|
|
//发现隐患数
|
|
|
|
|
|
|
|
aSafeZcrw.setFxyhs(a.getList().size());
|
|
|
|
|
|
|
|
//完成状态
|
|
|
|
|
|
|
|
aSafeZcrw.setWczt(1);
|
|
|
|
|
|
|
|
//入库人员
|
|
|
|
|
|
|
|
aSafeZcrw.setRkry(a.getAddUserID());
|
|
|
|
|
|
|
|
//入库时间
|
|
|
|
|
|
|
|
aSafeZcrw.setRksj(new Date());
|
|
|
|
|
|
|
|
//更新时间
|
|
|
|
|
|
|
|
aSafeZcrw.setGxsj(new Date());
|
|
|
|
|
|
|
|
//更新人员
|
|
|
|
|
|
|
|
aSafeZcrw.setGxry(a.getAddUserID());
|
|
|
|
|
|
|
|
aSafeZcrwService.save(aSafeZcrw);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|