提供检查点接口,修改数据源配置,数据上报

main
dongdingding 8 months ago
parent 3647807973
commit beb0889edd

@ -53,6 +53,11 @@
<artifactId>hutool-all</artifactId>
<version>5.8.16</version>
</dependency>
<dependency>
<groupId>com.alibaba.fastjson2</groupId>
<artifactId>fastjson2</artifactId>
<version>2.0.41</version>
</dependency>
</dependencies>
<dependencyManagement>

@ -113,5 +113,17 @@ public class ASafeQyjcxxController extends BaseController {
aSafeQyjcxxService.dataSynchronous();
return success();
}
/**
* xxbh
*
* @return
*/
@GetMapping("/getQyXxbh")
@ApiOperation(value = "获取企业xxbh")
public AjaxResult getQyXxbh(@RequestParam("qymc") String qymc, @RequestParam("xybm") String xybm) {
return success(aSafeQyjcxxService.findOneByqymcOrXybm(qymc,xybm));
}
}

@ -1,12 +1,17 @@
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.entity.*;
import com.mudu.entity.dto.request.ACheckQuatzRequest;
import com.mudu.entity.dto.request.ACheckQuatzZichaRequest;
import com.mudu.entity.dto.response.ACheckXcTpResponse;
import com.mudu.service.*;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.PostMapping;
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 javax.annotation.Resource;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;
import java.util.UUID;
@ -72,6 +79,23 @@ public class AcheckTaskController {
@Resource
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,129 +104,166 @@ public class AcheckTaskController {
*/
@PostMapping("/insert")
@ApiOperation(value = "新增创建时间为昨天且处于审批通过的工单数据")
public AjaxResult selectAll(@RequestBody List<ACheckQuatzRequest> list) {
public AjaxResult selectAll(@RequestBody List<ACheckQuatzRequest> list) throws ParseException {
for (ACheckQuatzRequest a : list) {
String rwzqUuid = UUID.randomUUID().toString().replace("-", "").toLowerCase();
String xcrwuuid = UUID.randomUUID().toString().replace("-", "").toLowerCase();
//获取企业编号
ASafeQyjcxx aSafeQyjcxx = aSafeQyjcxxService.findOneByqymcOrXybm(a.getName(), a.getEntCode());
String enterPriseId = aSafeQyjcxx.getXxbh();
//根据工单获取数据
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_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
*/
saveXcrw(list, a, xcrwuuid, enterPriseId, rwzqUuid);
for (ACheckQuatzEntity b : a.getList()) {
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();
//获取人员编号
String rybh = a.getRybh();
/**
* a_safe_xcrw
* a_safe_xcrwjcx
*/
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);
}
saveXcrwJcx(b, xcrwjcxUuid, enterPriseId, xcrwuuid, rwzqUuid);
//完成状态
aSafeXcrw.setWczt(1);
//入库人员
aSafeXcrw.setRkry(rybh);
//入库时间
aSafeXcrw.setRksj(new Date());
//更新时间
aSafeXcrw.setGxsj(new Date());
//更新人员
aSafeXcrw.setGxry(rybh);
//记录状态
aSafeXcrw.setJlzt(1);
//新增
aSafeXcrwService.save(aSafeXcrw);
/**
* a_safe_xcrwjcx
* / a_safe_xcrwjcxzgxx
*/
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("测试");
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);
}
//周期编号 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);
return success();
}
//整改描述 todo
private void saveYhzgxx(List<ACheckQuatzRequest> list, ACheckQuatzRequest a, ACheckQuatzEntity b, String yhzgxxUuid, String xcrwuuid, String enterPriseId, String rwzqUuid, String xcrwwzUuid) {
ASafeYhzgxx aSafeYhzgxx = new ASafeYhzgxx();
//信息编号
aSafeYhzgxx.setXxbh(yhzgxxUuid);
//任务编号
aSafeYhzgxx.setRwbh(xcrwuuid);
//位置编号
aSafeYhzgxx.setWzbh(b.getWzxxbh());
//企业编号
aSafeYhzgxx.setQybh(enterPriseId);
//周期编号
aSafeYhzgxx.setZqbh(rwzqUuid);
//企业风险点编号 对应a_safe_fxd的信息编号
aSafeYhzgxx.setQyfxdbh(b.getCheckId());
//隐患来源
aSafeYhzgxx.setYhly("1");
//检查时间
aSafeYhzgxx.setJcsj(a.getReportDateTime());
//整改期限
aSafeXcrwjcx.setZgqx(a.getNeedFinalDateTime());
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());
//整改状态
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);
aSafeYhzgxx.setZgzt(1);
//入库人员
aSafeXcrwjcx.setRkry(rybh);
aSafeYhzgxx.setRkry(b.getRybh());
//入库时间
aSafeXcrwjcx.setRksj(new Date());
aSafeYhzgxx.setRksj(new Date());
//更新人员
aSafeXcrwjcx.setGxry(rybh);
aSafeYhzgxx.setGxry(b.getRybh());
//更新时间
aSafeXcrwjcx.setGxsj(new Date());
aSafeYhzgxx.setGxsj(new Date());
//记录状态
aSafeXcrwjcx.setJlzt(1);
aSafeXcrwjcxService.save(aSafeXcrwjcx);
aSafeYhzgxx.setJlzt(1);
aSafeYhzgxxService.save(aSafeYhzgxx);
}
/**
* / a_safe_xcrwjcxzgxx
*/
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的信息编号
aSafeXcrwjcx.setRwbh(xcrwuuid);
//描述 content todo
aSafeXcrwjcxzgxx.setRwbh(xcrwuuid);
//描述 content
aSafeXcrwjcxzgxx.setMs(b.getContent());
//巡查检查项编号 a_safe_xcrwjcx的XXBH
aSafeXcrwjcxzgxx.setXcjcxbh(xcrwjcxUuid);
//时间
@ -212,196 +273,448 @@ public class AcheckTaskController {
//是否合格
aSafeXcrwjcxzgxx.setSfhg(1);
//到期日期
aSafeXcrwjcxzgxx.setDqrq(a.getNeedFinalDateTime());
aSafeXcrwjcxzgxx.setDqrq(b.getNeedFinalDateTime());
//周期编号
aSafeXcrwjcxzgxx.setZqbh(rwzqUuid);
//入库人员
aSafeXcrwjcxzgxx.setRkry(rybh);
aSafeXcrwjcxzgxx.setRkry(b.getRybh());
//入库时间
aSafeXcrwjcxzgxx.setRksj(new Date());
//更新人员
aSafeXcrwjcxzgxx.setGxry(rybh);
aSafeXcrwjcxzgxx.setGxry(b.getRybh());
//更新时间
aSafeXcrwjcxzgxx.setGxsj(new Date());
//记录状态
aSafeXcrwjcxzgxx.setJlzt(1);
aSafeXcrwjcxzgxxService.save(aSafeXcrwjcxzgxx);
/**
* a_safe_xcrwwz
*/
ASafeXcrwwz aSafeXcrwwz = new ASafeXcrwwz();
//xxbh
aSafeXcrwwz.setXxbh(xcrwwzUuid);
//任务编号
aSafeXcrwwz.setRwbh(xcrwuuid);
}
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);
//完成状态
aSafeXcrwwz.setWczt(1);
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());
//入库时间
aSafeXcrwwz.setRksj(new Date());
aSafeXcrwjcx.setRksj(new Date());
//更新人员
aSafeXcrwjcx.setGxry(b.getRybh());
//更新时间
aSafeXcrwwz.setGxsj(new Date());
aSafeXcrwjcx.setGxsj(new Date());
//记录状态
aSafeXcrwwz.setJlzt(1);
aSafeXcrwwzService.save(aSafeXcrwwz);
/**
* a_safe_yhzgxx
*/
ASafeYhzgxx aSafeYhzgxx = new ASafeYhzgxx();
aSafeXcrwjcx.setJlzt(1);
aSafeXcrwjcxService.save(aSafeXcrwjcx);
}
private void saveXcrw(List<ACheckQuatzRequest> list, ACheckQuatzRequest a, String xcrwuuid, String enterPriseId, String rwzqUuid) {
ASafeXcrw aSafeXcrw = new ASafeXcrw();
//信息编号
aSafeYhzgxx.setXxbh(yhzgxxUuid);
//任务编号
aSafeYhzgxx.setRwbh(xcrwuuid);
aSafeXcrw.setXxbh(xcrwuuid);
//企业编号
aSafeYhzgxx.setQybh(enterPriseId);
//周期编号
aSafeYhzgxx.setZqbh(null);
//企业风险点编号 对应a_safe_fxd的信息编号
if (a.getCheckId() != null) {
aSafeYhzgxx.setQyfxdbh(a.getCheckId());
}
//隐患来源
aSafeYhzgxx.setYhly("1");
aSafeXcrw.setQybh(enterPriseId);
//任务类型
aSafeXcrw.setRwlx("WGXC");
//巡查项
aSafeXcrw.setXcx(list.size());
//完成项
aSafeXcrw.setWcx(list.size());
//发现隐患数
aSafeXcrw.setFxyhs(list.size());
//检查时间
if (a.getReportDateTime() != null) {
aSafeYhzgxx.setJcsj(a.getReportDateTime());
aSafeXcrw.setJcsj(a.getReportDateTime());
} else {
aSafeYhzgxx.setJcsj(null);
aSafeXcrw.setJcsj(null);
}
//整改期限
aSafeYhzgxx.setZgqx(a.getNeedFinalDateTime());
//不合格检查项a_safe_xcrwjcx中JCXJG=1的数量
aSafeYhzgxx.setBhgjcx(0);
//整改时间 todo 隐患描述
//整改状态
aSafeYhzgxx.setZgzt(1);
//任务周期
aSafeXcrw.setZqbh(rwzqUuid);
//完成状态
aSafeXcrw.setWczt(1);
//入库人员
aSafeYhzgxx.setRkry(rybh);
aSafeXcrw.setRkry(a.getRybh());
//入库时间
aSafeYhzgxx.setRksj(new Date());
//更新人员
aSafeYhzgxx.setGxry(rybh);
aSafeXcrw.setRksj(new Date());
//更新时间
aSafeYhzgxx.setGxsj(new Date());
aSafeXcrw.setGxsj(new Date());
//更新人员
aSafeXcrw.setGxry(a.getRybh());
//记录状态
aSafeYhzgxx.setJlzt(1);
aSafeYhzgxxService.save(aSafeYhzgxx);
/**
* a_safe_rwfj todo
*/
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();
String api = "http://221.229.220.83:8007/api/";
aSafeRwfj.setXxbh(rwfjUuid);
//附件名称
aSafeRwfj.setFjmc(zgq.getFileName());
//附件后缀
aSafeRwfj.setFjhz(zgq.getContentType());
//关联父级编号
aSafeRwfj.setPid(xcrwuuid);
//附件地址
if (a.getRelativePath() != null) {
aSafeRwfj.setFjdz(api + a.getRelativePath());
}
aSafeRwfj.setFjdz(api + zgq.getRelativePath());
//文件类型
aSafeRwfj.setWjlx("ZGQTP");
//关联父级编号 自查巡查任务主表的XXBH
aSafeRwfj.setPid(xcrwuuid);
//显示顺序 todo
int b = 0;
aSafeRwfj.setXssx(b++);
//显示顺序
aSafeRwfj.setXssx(xxsx++);
//记录状态
aSafeRwfj.setJlzt(1);
//入库人员
aSafeRwfj.setRkry(zgq.getAddUserName());
//入库时间
aSafeRwfj.setRksj(new Date());
String dateString = zgq.getAddDateTime();
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
Date date = format.parse(dateString);
aSafeRwfj.setRksj(date);
//更新时间
aSafeRwfj.setGxsj(new 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")
@ApiOperation(value = "自查")
public AjaxResult zicha(@RequestBody List<ACheckQuatzZichaRequest> list) {
public AjaxResult zicha(@RequestBody List<ACheckQuatzZichaRequest> list) throws ParseException {
for (ACheckQuatzZichaRequest a : list) {
String rwzqUuid = UUID.randomUUID().toString().replace("-", "").toLowerCase();
String zcrwUuid = UUID.randomUUID().toString().replace("-", "").toLowerCase();
/**
*a_safe_rwzq
*/
saveRwzq(a, rwzqUuid);
/**
* a_safe_zcrw
*/
String zcrwUuid = UUID.randomUUID().toString().replace("-", "").toLowerCase();
saveZcrw(a, zcrwUuid, rwzqUuid);
for (ACheckQuatzZichaEntity b : a.getList()) {
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_rwfj
*/
ASafeZcrwjl aSafeZcrwjl = new ASafeZcrwjl();
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);
//根据工单获取数据
JSONObject jsonObject = new JSONObject();
jsonObject.put("imageRelationID", b.getImgId());
String response = HttpRequest.post(zcUrl)
.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("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
*/
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);
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();
}
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("ZG");
//时间 todo时间必填
szsASafeZcyhxx.setSj(new Date());
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);
}
return success();
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);
}
}

@ -6,7 +6,7 @@ import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;
import java.time.LocalDateTime;
import java.util.Date;
/**
@ -16,19 +16,28 @@ import java.time.LocalDateTime;
@Data
@ApiModel("定时任务实体类")
public class ACheckQuatzEntity {
/**
* id
*/
@ApiModelProperty(value = "归属地")
private String locationName;
@ApiModelProperty(value = "工单id")
private String improvingNo;
/**
*
*
*/
@ApiModelProperty(value = "企业名称")
private String enterpriseName;
private String name;
/**
*
*/
@ApiModelProperty(value = "企业信用代码")
private String entCode;
/**
*
*/
@ApiModelProperty(value = "人员编号")
private String rybh;
/**
* (-2,-1,0,1)
@ -42,29 +51,70 @@ public class ACheckQuatzEntity {
@ApiModelProperty("上报时间(如果巡查一起提交,获取巡查的巡查日期")
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private LocalDateTime ReportDateTime;
private Date reportDateTime;
/**
*
*
*/
@ApiModelProperty(value = "上报人")
private String ReportPersonName;
@ApiModelProperty(value = "隐患内容")
private String description;
/**
*
* id
*/
@ApiModelProperty(value = "隐患内容")
private String Description;
@ApiModelProperty(value = "风险点id")
private String checkId;
/**
*
*/
@ApiModelProperty("整改完成日期")
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date FinalDateTime;
/**
*
*/
@ApiModelProperty("整改要求完成日期")
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date NeedFinalDateTime;
/**
*
*
*/
@ApiModelProperty(value = "现场图片")
private String RelativePath;
@ApiModelProperty("复查日期")
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date reviewDateTime;
/**
*
*/
@ApiModelProperty(value = "整改描述")
private String content;
/**
*
*/
@ApiModelProperty(value = "复查情况")
private String reviewContent;
/**
*
*/
@ApiModelProperty(value = "位置编号")
private String wzxxbh;
/**
*
*/
@ApiModelProperty(value = "位置名称")
private String wzmc;
}

@ -0,0 +1,119 @@
package com.mudu.entity;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;
import java.util.Date;
/**
* @author dong
* @since 2024/3/14 13:21
*/
@Data
@ApiModel("定时任务自查实体类")
public class ACheckQuatzZichaEntity {
/**
* id
*/
@ApiModelProperty(value = "企业id")
private String enterpriseID;
/**
* id
*/
@ApiModelProperty(value = "工单id")
private String taskId;
/**
* id
*/
@ApiModelProperty(value = "风险点id")
private String checkId;
/**
* id
*/
@ApiModelProperty(value = "人员id")
private String addUserID;
/**
*
*/
@ApiModelProperty(value = "企业风险点位置编号")
private String fxbh;
/**
*
*/
@ApiModelProperty(value = "市风险点位置编号")
private String sfxdbh;
/**
*
*/
@ApiModelProperty(value = "企业风险位置编号")
private String wzbh;
/**
*
*/
@ApiModelProperty(value = "设备数量")
private Integer sbsl;
/**
*
*/
@ApiModelProperty(value = "风险点编号")
private String fxdbh;
/**
*
*/
@ApiModelProperty(value = "内容")
private String content;
/**
* id
*/
@ApiModelProperty(value = "图片id")
private String imgId;
/**
*
*/
@ApiModelProperty("上报时间")
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date reportDateTime;
/**
*
*/
@ApiModelProperty("检查时间")
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date addDateTime;
/**
*
*/
@ApiModelProperty("结束时间")
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date endDateTime;
}

@ -5,7 +5,6 @@ import java.util.Date;
import java.io.Serializable;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.TableField;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.annotations.ApiModel;
import lombok.Data;

@ -1,37 +1,31 @@
package com.mudu.entity.dto.request;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.mudu.entity.ACheckQuatzEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;
import java.util.Date;
import java.util.List;
/**
* @author dong
* @since 2024/3/12 14:18
* @since 2024/3/18 14:23
*/
@Data
@ApiModel("定时任务请求类")
@ApiModel("定时任务巡查请求类")
public class ACheckQuatzRequest {
/**
*
* id
*/
@ApiModelProperty(value = "归属地")
private String locationName;
@ApiModelProperty(value = "工单id")
private String improvingNo;
/**
*
*/
@ApiModelProperty(value = "企业编号")
private String enterpriseID;
/**
*
*/
@ -39,10 +33,16 @@ public class ACheckQuatzRequest {
private String rybh;
/**
* (-2,-1,0,1)
*
*/
@ApiModelProperty(value = "企业名称")
private String name;
/**
*
*/
@ApiModelProperty(value = "整改是否完成(-2专家拒绝,-1是需要专家复查未完成,0未成,1全部完成)")
private String isFinal;
@ApiModelProperty(value = "企业信用代码")
private String entCode;
/**
*
@ -52,42 +52,16 @@ public class ACheckQuatzRequest {
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date reportDateTime;
/**
*
*/
@ApiModelProperty(value = "隐患内容")
private String description;
/**
*
*/
@ApiModelProperty(value = "现场图片")
private String relativePath;
/**
* id
*/
@ApiModelProperty(value = "风险点id")
private String checkId;
/**
*
*/
@ApiModelProperty("整改完成日期")
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date FinalDateTime;
private Date finalDateTime;
/**
*
*
*/
@ApiModelProperty("整改要求完成日期")
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date NeedFinalDateTime;
@ApiModelProperty(value = "定时任务巡查请求类")
List<ACheckQuatzEntity> list;
}

@ -1,23 +1,24 @@
package com.mudu.entity.dto.request;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.mudu.entity.ACheckQuatzZichaEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;
import java.util.Date;
import java.util.List;
/**
* @author dong
* @since 2024/3/14 13:21
* @since 2024/3/20 14:06
*/
@Data
@ApiModel("定时任务自查实体类")
@ApiModel("定时任务自查请求类")
public class ACheckQuatzZichaRequest {
/**
* id
*/
@ApiModelProperty(value = "企业id")
private String EnterpriseID;
/**
* id
@ -26,9 +27,36 @@ public class ACheckQuatzZichaRequest {
private String taskId;
/**
* id
*/
@ApiModelProperty(value = "企业id")
private String enterpriseID;
/**
* id
*/
@ApiModelProperty(value = "风险点id")
private String checkId;
@ApiModelProperty(value = "人员id")
private String addUserID;
/**
*
*/
@ApiModelProperty("上报时间")
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date reportDateTime;
/**
*
*/
@ApiModelProperty("结束时间")
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date endDateTime;
/**
*
*/
@ApiModelProperty(value = "定时任务自查实体类")
List<ACheckQuatzZichaEntity> list;
}

@ -0,0 +1,45 @@
package com.mudu.entity.dto.response;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.List;
/**
* @author dong
* @since 2024/3/20 16:53
*/
@Data
@ApiModel("巡查图片响应类")
public class ACheckQuatzXcTpResponse {
/**
*
*/
@ApiModelProperty(value = "整改前照片编号")
private String zgqzp;
/**
*
*/
@ApiModelProperty(value = "整改后照片编号")
private String zghzp;
/**
*
*/
@ApiModelProperty(value = "整改前照片集合")
List<ACheckXcTpResponse> zgqzpList;
/**
*
*/
@ApiModelProperty(value = "整改后照片集合")
List<ACheckXcTpResponse> zghzpList;
}

@ -24,4 +24,31 @@ public class ACheckResponse {
@ApiModelProperty(value = "信息编号")
private String xxbh;
/**
* VALUE
*/
@ApiModelProperty(value = "风险等级VALUE")
private String fxValue;
/**
*
*/
@ApiModelProperty(value = "附件信息编号")
private String fjXxbh;
/**
*
*/
@ApiModelProperty(value = "附件地址")
private String fjdz;
/**
*
*/
@ApiModelProperty(value = "位置名称")
private String wzmc;
}

@ -0,0 +1,49 @@
package com.mudu.entity.dto.response;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* @author dong
* @since 2024/3/20 18:09
*/
@Data
@ApiModel(value = "图片响应类")
public class ACheckXcTpResponse {
/**
*
*/
@ApiModelProperty(value = "文件名称")
private String fileName;
/**
*
*/
@ApiModelProperty(value = "文件类型")
private String contentType;
/**
*
*/
@ApiModelProperty(value = "文件地址")
private String relativePath;
/**
*
*/
@ApiModelProperty(value = "添加人")
private String addUserName;
/**
*
*/
@ApiModelProperty(value = "添加时间")
private String addDateTime;
}

@ -0,0 +1,45 @@
# DataSource Config
spring:
datasource:
url: jdbc:mysql://localhost:3306/mudu?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
username: root
password: adminadmin
#公司本地
# url: jdbc:mysql://localhost:3307/mudu?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
# username: root
# password: Admin123@
driverClassName: com.mysql.cj.jdbc.Driver
# 日志配置
logging:
level:
com.mudu: debug
org.springframework: warn
# MyBatis配置
mybatis-plus:
# 指定实体类所在包的路径MyBatis-Plus 会自动扫描该路径下的实体类
typeAliasesPackage: com.mudu.entity
# 指定 Mapper 接口所在包的路径MyBatis-Plus 会自动扫描该路径下的 Mapper 接口
mapperLocations: classpath*:mapper/mudu/*Mapper.xml
knife4j:
enable: true
openapi:
group:
test1:
group-name: 木渎
url: http://localhost:9028
#工单url
improveUrl: http://localhost:9028/mudu/quatz/xctp
#自查url
zcUrl: http://localhost:9028/mudu/quatz/zctp
#图片路径
api: http://221.229.220.83:8007/api/

@ -0,0 +1,45 @@
# DataSource Config
spring:
datasource:
url: jdbc:mysql://localhost:3306/mudu?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
username: root
password: adminadmin
#公司本地
# url: jdbc:mysql://localhost:3307/mudu?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
# username: root
# password: Admin123@
driverClassName: com.mysql.cj.jdbc.Driver
# 日志配置
logging:
level:
com.mudu: debug
org.springframework: warn
# MyBatis配置
mybatis-plus:
# 指定实体类所在包的路径MyBatis-Plus 会自动扫描该路径下的实体类
typeAliasesPackage: com.mudu.entity
# 指定 Mapper 接口所在包的路径MyBatis-Plus 会自动扫描该路径下的 Mapper 接口
mapperLocations: classpath*:mapper/mudu/*Mapper.xml
knife4j:
enable: true
openapi:
group:
test1:
group-name: 木渎
url: http://localhost:9028
#工单url
improveUrl: http://localhost:9028/mudu/quatz/xctp
#自查url
zcUrl: http://localhost:9028/mudu/quatz/zctp
#图片路径
api: http://221.229.220.83:8007/api/

@ -1,32 +1,7 @@
server:
port: 9998
# DataSource Config
spring:
datasource:
url: jdbc:mysql://localhost:3306/db_jiangning_umale?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
username: root
password: adminadmin
driverClassName: com.mysql.cj.jdbc.Driver
# 日志配置
logging:
level:
com.mudu: debug
org.springframework: warn
# MyBatis配置
mybatis-plus:
# 指定实体类所在包的路径MyBatis-Plus 会自动扫描该路径下的实体类
typeAliasesPackage: com.mudu.entity
# 指定 Mapper 接口所在包的路径MyBatis-Plus 会自动扫描该路径下的 Mapper 接口
mapperLocations: classpath*:mapper/mudu/*Mapper.xml
profiles:
active: prod
knife4j:
enable: true
openapi:
group:
test1:
group-name: 木渎
url: http://localhost:9028

@ -6,7 +6,19 @@
<select id="selectAll" resultType="com.mudu.entity.dto.response.ACheckResponse">
SELECT a.fxd,a.xxbh FROM `a_safe_fxd` a left join a_safe_qyjcxx b on a.QYBH=b.XXBH
SELECT
a.fxd,
a.xxbh,
a.FXDJVALUE as fxvalue,
c.XXBH as fjxxbh,
c.FJDZ as fjdz,
awz.WZMC as wzmc
FROM
`a_safe_fxd` a
LEFT JOIN a_safe_qyjcxx b ON a.QYBH = b.XXBH
left join a_safe_fxdwz af on af.QYFXDBH = a.xxbh
LEFT JOIN a_safe_fxdfj c on c.pid=af.XXBH
left join a_safe_qyfxwz awz on awz.xxbh=af.wzbh
<where>
<if test="req.qymc != null and req.qymc != ''">
b.qymc=#{req.qymc}

Loading…
Cancel
Save