提交检查定时任务

main
dongdingding 11 months ago
parent 4d00fbae5f
commit eb59277354

@ -2,9 +2,11 @@ package com.mudu.controller;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.ruoyi.common.core.controller.BaseController;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ruoyi.common.core.domain.AjaxResult;
import com.mudu.base.controller.BaseController;
import com.mudu.base.domain.AjaxResult;
import com.mudu.entity.ASafeRwfj; import com.mudu.entity.ASafeRwfj;
import com.mudu.service.ASafeRwfjService; import com.mudu.service.ASafeRwfjService;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;

@ -2,9 +2,11 @@ package com.mudu.controller;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.ruoyi.common.core.controller.BaseController;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ruoyi.common.core.domain.AjaxResult;
import com.mudu.base.controller.BaseController;
import com.mudu.base.domain.AjaxResult;
import com.mudu.entity.ASafeXcrwwz; import com.mudu.entity.ASafeXcrwwz;
import com.mudu.service.ASafeXcrwwzService; import com.mudu.service.ASafeXcrwwzService;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;

@ -2,9 +2,11 @@ package com.mudu.controller;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.ruoyi.common.core.controller.BaseController;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ruoyi.common.core.domain.AjaxResult;
import com.mudu.base.controller.BaseController;
import com.mudu.base.domain.AjaxResult;
import com.mudu.entity.ASafeZcrwwz; import com.mudu.entity.ASafeZcrwwz;
import com.mudu.service.ASafeZcrwwzService; import com.mudu.service.ASafeZcrwwzService;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;

@ -56,10 +56,26 @@ public class AcheckTaskController {
@Resource @Resource
private ASafeZcrwjlService aSafeZcrwjlService; private ASafeZcrwjlService aSafeZcrwjlService;
@Resource
private ASafeRwfjService aSafeRwfjService;
@Resource
private ASafeZcrwwzService aSafeZcrwwzService;
@Resource
private SzsASafeZcyhxxService szsASafeZcyhxxService;
@Resource
private ASafeXcrwwzService aSafeXcrwwzService;
/** /**
* *
* *
* @param list * @param list todo
* @Param qymc * @Param qymc
*/ */
@PostMapping("/insert") @PostMapping("/insert")
@ -71,7 +87,7 @@ public class AcheckTaskController {
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();
String rwfjUuid = UUID.randomUUID().toString().replace("-", "").toLowerCase();
//获取企业编号 //获取企业编号
String enterPriseId = a.getEnterpriseID(); String enterPriseId = a.getEnterpriseID();
//获取人员编号 //获取人员编号
@ -98,6 +114,7 @@ public class AcheckTaskController {
} else { } else {
aSafeXcrw.setJcsj(null); aSafeXcrw.setJcsj(null);
} }
//完成状态 //完成状态
aSafeXcrw.setWczt(1); aSafeXcrw.setWczt(1);
//入库人员 //入库人员
@ -142,26 +159,27 @@ public class AcheckTaskController {
} else { } else {
aSafeXcrwjcx.setJcsj(null); aSafeXcrwjcx.setJcsj(null);
} }
//整改时间 //整改时间 todo 整改完成时间
if (a.getReportDateTime() != null) { if (a.getReportDateTime() != null) {
aSafeXcrwjcx.setZgsj(a.getReportDateTime()); aSafeXcrwjcx.setZgsj(a.getReportDateTime());
} else { } else {
aSafeXcrwjcx.setZgsj(null); aSafeXcrwjcx.setZgsj(null);
} }
//整改描述 todo
//整改期限 //整改期限
aSafeXcrwjcx.setZgqx(a.getNeedFinalDateTime()); aSafeXcrwjcx.setZgqx(a.getNeedFinalDateTime());
//整改状态 //整改状态
aSafeXcrwjcx.setZgzt(1); aSafeXcrwjcx.setZgzt(1);
//整改逾期 //整改逾期
Date currentTime = new Date(); // 获取当前时间 Date currentTime = new Date(); // 获取当前时间
if (currentTime.after(a.getNeedFinalDateTime())) { if (a.getNeedFinalDateTime() != null && currentTime.after(a.getNeedFinalDateTime())) {
// 超过截止时间, // 超过截止时间,
aSafeXcrwjcx.setZgyq(1); aSafeXcrwjcx.setZgyq(1);
} else { } else {
// 未超过截止时间, // 未超过截止时间,
aSafeXcrwjcx.setZgyq(0); aSafeXcrwjcx.setZgyq(0);
} }
//市风险点编号 todo
//任务类型 //任务类型
aSafeXcrwjcx.setRwlx(3); aSafeXcrwjcx.setRwlx(3);
//入库人员 //入库人员
@ -184,6 +202,7 @@ public class AcheckTaskController {
aSafeXcrwjcxzgxx.setXxbh(xcrwjcxzgxxUuid); aSafeXcrwjcxzgxx.setXxbh(xcrwjcxzgxxUuid);
//任务编号对应a_safe_xcrw的信息编号 //任务编号对应a_safe_xcrw的信息编号
aSafeXcrwjcx.setRwbh(xcrwuuid); aSafeXcrwjcx.setRwbh(xcrwuuid);
//描述 content todo
//巡查检查项编号 a_safe_xcrwjcx的XXBH //巡查检查项编号 a_safe_xcrwjcx的XXBH
aSafeXcrwjcxzgxx.setXcjcxbh(xcrwjcxUuid); aSafeXcrwjcxzgxx.setXcjcxbh(xcrwjcxUuid);
//时间 //时间
@ -208,9 +227,20 @@ public class AcheckTaskController {
/** /**
* a_safe_xcrwwz * a_safe_xcrwwz
*/ */
ASafeXcrwwz aSafeXcrwwz = new ASafeXcrwwz();
//xxbh //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_yhzgxx
*/ */
@ -238,7 +268,8 @@ public class AcheckTaskController {
//整改期限 //整改期限
aSafeYhzgxx.setZgqx(a.getNeedFinalDateTime()); aSafeYhzgxx.setZgqx(a.getNeedFinalDateTime());
//不合格检查项a_safe_xcrwjcx中JCXJG=1的数量 //不合格检查项a_safe_xcrwjcx中JCXJG=1的数量
aSafeYhzgxx.setBhgjcx(list.size()); aSafeYhzgxx.setBhgjcx(0);
//整改时间 todo 隐患描述
//整改状态 //整改状态
aSafeYhzgxx.setZgzt(1); aSafeYhzgxx.setZgzt(1);
//入库人员 //入库人员
@ -253,9 +284,29 @@ public class AcheckTaskController {
aSafeYhzgxx.setJlzt(1); aSafeYhzgxx.setJlzt(1);
aSafeYhzgxxService.save(aSafeYhzgxx); aSafeYhzgxxService.save(aSafeYhzgxx);
/** /**
* a_safe_rwfj * a_safe_rwfj todo
*/ */
//todo 少实体类 ASafeRwfj aSafeRwfj = new ASafeRwfj();
String api = "http://221.229.220.83:8007/api/";
aSafeRwfj.setXxbh(rwfjUuid);
//附件地址
if (a.getRelativePath() != null) {
aSafeRwfj.setFjdz(api + a.getRelativePath());
}
//文件类型
aSafeRwfj.setWjlx("ZGQTP");
//关联父级编号 自查巡查任务主表的XXBH
aSafeRwfj.setPid(xcrwuuid);
//显示顺序 todo
int b = 0;
aSafeRwfj.setXssx(b++);
//记录状态
aSafeRwfj.setJlzt(1);
//入库时间
aSafeRwfj.setRksj(new Date());
//更新时间
aSafeRwfj.setGxsj(new Date());
aSafeRwfjService.save(aSafeRwfj);
} }
@ -272,11 +323,13 @@ public class AcheckTaskController {
*/ */
String zcrwUuid = UUID.randomUUID().toString().replace("-", "").toLowerCase(); String zcrwUuid = UUID.randomUUID().toString().replace("-", "").toLowerCase();
String zcrwjlUuid = 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 aSafeZcrw = new ASafeZcrw();
aSafeZcrw.setXxbh(zcrwUuid); aSafeZcrw.setXxbh(zcrwUuid);
//企业编号 //企业编号
aSafeZcrw.setQybh(a.getEnterpriseID()); aSafeZcrw.setQybh(a.getEnterpriseID());
//自查项 //自查项 小的listsize
aSafeZcrw.setZcx(list.size()); aSafeZcrw.setZcx(list.size());
//完成项 //完成项
aSafeZcrw.setWcx(list.size()); aSafeZcrw.setWcx(list.size());
@ -303,14 +356,51 @@ public class AcheckTaskController {
//入库时间 //入库时间
aSafeZcrwjl.setRksj(new Date()); aSafeZcrwjl.setRksj(new Date());
//更新时间 //更新时间
aSafeZcrwjl.setGxsj(new Date()); aSafeZcrwjl.setGxsj(new Date());//todo 完成状态
//是否发现隐患 todo
//AddDateTime 检查时间
//检查时间
// AddUserNamere人员
//市风险点编号 todo
//content 隐患描述
aSafeZcrwjlService.save(aSafeZcrwjl); aSafeZcrwjlService.save(aSafeZcrwjl);
/** /**
*a_safe_zcrwwz *a_safe_zcrwwz
*/ */
// 少表 todo 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();
//信息编号
szsASafeZcyhxx.setXxbh(zcyhxxUuid);
//任务编号对应a_safe_xcrw的信息编号
szsASafeZcyhxx.setRwbh(zcrwUuid);
//巡查检查项编号 a_safe_xcrwjcx的XXBH
szsASafeZcyhxx.setXcjcxbh(zcrwjlUuid);
//类型
szsASafeZcyhxx.setSjlx("ZG");
//时间 todo时间必填
szsASafeZcyhxx.setSj(new Date());
//是否合格
szsASafeZcyhxx.setSfhg(1);
//入库时间
szsASafeZcyhxx.setRksj(new Date());
//更新时间
szsASafeZcyhxx.setGxsj(new Date());
//记录状态
szsASafeZcyhxx.setJlzt(1);
szsASafeZcyhxxService.save(szsASafeZcyhxx);
} }
return success(); return success();
} }

@ -2,23 +2,15 @@ package com.mudu.controller;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.ruoyi.common.core.controller.BaseController;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ruoyi.common.core.domain.AjaxResult; import com.mudu.base.controller.BaseController;
import com.mudu.base.domain.AjaxResult;
import com.mudu.entity.SzsASafeZcyhxx; import com.mudu.entity.SzsASafeZcyhxx;
import com.mudu.service.SzsASafeZcyhxxService; import com.mudu.service.SzsASafeZcyhxxService;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.DeleteMapping; import org.springframework.web.bind.annotation.*;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource; import javax.annotation.Resource;
import java.io.Serializable; import java.io.Serializable;

@ -18,11 +18,6 @@ import java.util.Date;
public class ACheckQuatzRequest { public class ACheckQuatzRequest {
/**
* id
*/
@ApiModelProperty(value = "工单id")
private String id;
/** /**
* *
@ -30,12 +25,6 @@ public class ACheckQuatzRequest {
@ApiModelProperty(value = "归属地") @ApiModelProperty(value = "归属地")
private String locationName; private String locationName;
/**
*
*/
@ApiModelProperty(value = "企业名称")
private String enterpriseName;
/** /**
* *
@ -61,27 +50,22 @@ public class ACheckQuatzRequest {
@ApiModelProperty("上报时间(如果巡查一起提交,获取巡查的巡查日期") @ApiModelProperty("上报时间(如果巡查一起提交,获取巡查的巡查日期")
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date ReportDateTime; private Date reportDateTime;
/**
*
*/
@ApiModelProperty(value = "上报人")
private String ReportPersonName;
/** /**
* *
*/ */
@ApiModelProperty(value = "隐患内容") @ApiModelProperty(value = "隐患内容")
private String Description; private String description;
/** /**
* *
*/ */
@ApiModelProperty(value = "现场图片") @ApiModelProperty(value = "现场图片")
private String RelativePath; private String relativePath;
/** /**
* id * id

Loading…
Cancel
Save