From a31acebb1787e33a1f7d6338e67f7aa4e7759074 Mon Sep 17 00:00:00 2001 From: guo Date: Wed, 12 Jul 2023 09:08:10 +0800 Subject: [PATCH] =?UTF-8?q?bug=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../HiddenDangerInspectRecordController.java | 9 +- .../entity/HiddenDangerInspectRecord.java | 225 ++++++++++------ .../vo/ProjectInspectRecordCountVo.java | 38 +++ .../HiddenDangerInspectRecordMapper.java | 7 +- .../xml/HiddenDangerInspectRecordMapper.xml | 95 +++---- .../IHiddenDangerInspectRecordService.java | 7 +- .../HiddenDangerInspectRecordServiceImpl.java | 15 +- .../controller/SecurityManageController.java | 255 +++++++++--------- .../mapper/xml/DepartmentInfoMapper.xml | 6 +- .../mapper/xml/WorkerWagesPaymentMapper.xml | 2 + .../service/impl/WorkerInfoServiceImpl.java | 11 +- .../java/com/zhgd/xmgl/util/ExcelUtils.java | 24 +- .../java/com/zhgd/xmgl/util/HikVideoUtil.java | 2 +- 13 files changed, 403 insertions(+), 293 deletions(-) create mode 100644 src/main/java/com/zhgd/xmgl/modules/dangerous/entity/vo/ProjectInspectRecordCountVo.java diff --git a/src/main/java/com/zhgd/xmgl/modules/dangerous/controller/HiddenDangerInspectRecordController.java b/src/main/java/com/zhgd/xmgl/modules/dangerous/controller/HiddenDangerInspectRecordController.java index 8b024d134..de622c59d 100644 --- a/src/main/java/com/zhgd/xmgl/modules/dangerous/controller/HiddenDangerInspectRecordController.java +++ b/src/main/java/com/zhgd/xmgl/modules/dangerous/controller/HiddenDangerInspectRecordController.java @@ -7,6 +7,7 @@ import com.zhgd.xmgl.modules.dangerous.entity.HiddenDangerInspectRecord; import com.zhgd.xmgl.modules.dangerous.entity.HiddenDangerInspectionStatistics; import com.zhgd.xmgl.modules.dangerous.entity.vo.AllTodayDataHdirVO; import com.zhgd.xmgl.modules.dangerous.entity.vo.AllWeekDataHdirVO; +import com.zhgd.xmgl.modules.dangerous.entity.vo.ProjectInspectRecordCountVo; import com.zhgd.xmgl.modules.dangerous.entity.vo.TotalAndWeekHiddenDanger; import com.zhgd.xmgl.modules.dangerous.service.IHiddenDangerInspectRecordService; import io.swagger.annotations.Api; @@ -61,7 +62,7 @@ public class HiddenDangerInspectRecordController { @ApiImplicitParam(name = "pageSize", value = "每页显示条数", paramType = "query", required = true, dataType = "Integer"), }) @PostMapping(value = "/list") - public Result> queryPageList(@RequestBody Map map) { + public Result> queryPageList(@RequestBody Map map) { return Result.success(hiddenDangerInspectRecordService.selectHiddenDangerInspectPage(map)); } @@ -74,7 +75,7 @@ public class HiddenDangerInspectRecordController { @ApiImplicitParam(name = "projectSn", value = "项目SN", paramType = "query", required = true, dataType = "String") }) @PostMapping(value = "/getList") - public Result> getList(@RequestBody Map map) { + public Result> getList(@RequestBody Map map) { return Result.success(hiddenDangerInspectRecordService.selectHiddenDangerInspectPage(map)); } @@ -93,7 +94,7 @@ public class HiddenDangerInspectRecordController { @ApiImplicitParam(name = "inspectEndTime", value = "检查结束时间", paramType = "query", required = false, dataType = "String"), }) @PostMapping(value = "/getProjectInspectRecordCount") - public Result> getProjectInspectRecordCount(@RequestBody Map map) { + public Result getProjectInspectRecordCount(@RequestBody Map map) { return Result.success(hiddenDangerInspectRecordService.getProjectInspectRecordCount(map)); } @@ -210,7 +211,7 @@ public class HiddenDangerInspectRecordController { @ApiImplicitParam(name = "projectSn", value = "项目SN", paramType = "query", required = true, dataType = "String"), }) @PostMapping(value = "/selectRectifiedHiddenDangerList") - public Result> selectRectifiedHiddenDangerList(@RequestBody Map map) { + public Result> selectRectifiedHiddenDangerList(@RequestBody Map map) { return Result.success(hiddenDangerInspectRecordService.selectRectifiedHiddenDangerList(map)); } diff --git a/src/main/java/com/zhgd/xmgl/modules/dangerous/entity/HiddenDangerInspectRecord.java b/src/main/java/com/zhgd/xmgl/modules/dangerous/entity/HiddenDangerInspectRecord.java index 718c9a819..04d6675c9 100644 --- a/src/main/java/com/zhgd/xmgl/modules/dangerous/entity/HiddenDangerInspectRecord.java +++ b/src/main/java/com/zhgd/xmgl/modules/dangerous/entity/HiddenDangerInspectRecord.java @@ -25,20 +25,26 @@ import io.swagger.annotations.ApiModelProperty; @ApiModel(value="HiddenDangerInspectRecord实体类",description="HiddenDangerInspectRecord") public class HiddenDangerInspectRecord implements Serializable { private static final long serialVersionUID = 1L; - - /**id*/ + + /** + * id + */ @TableId(type = IdType.ASSIGN_ID) - @ApiModelProperty(value="id") - private java.lang.Long id ; - /**检查类型ID*/ - @Excel(name = "检查类型ID", width = 15) - @ApiModelProperty(value="检查类型ID") - - private java.lang.Long inspectTypeId ; - /**责任区域*/ - @Excel(name = "责任区域", width = 15) - @ApiModelProperty(value="责任区域") - private java.lang.String dutyRegion ; + @ApiModelProperty(value = "id") + private java.lang.Long id; + /** + * 检查类型ID + */ + @Excel(name = "检查类型ID", width = 15) + @ApiModelProperty(value = "检查类型ID") + + private java.lang.Long inspectTypeId; + /** + * 责任区域 + */ + @Excel(name = "责任区域", width = 15) + @ApiModelProperty(value = "责任区域") + private java.lang.String dutyRegion; /**隐患级别*/ @Excel(name = "隐患级别", width = 15) @ApiModelProperty(value="隐患级别") @@ -62,19 +68,25 @@ public class HiddenDangerInspectRecord implements Serializable { /**补充说明*/ @Excel(name = "补充说明", width = 15) @ApiModelProperty(value="补充说明") - private java.lang.String dangerDesc ; - /**事故隐患等级,1一般,2重大*/ - @Excel(name = "事故隐患等级,1一般,2重大", width = 15) - @ApiModelProperty(value="事故隐患等级,1一般,2重大") - private java.lang.String faultLevel ; - /**创建人*/ - @Excel(name = "创建人", width = 15) - @ApiModelProperty(value="创建人") - - private java.lang.Long createUser ; - /**创建时间*/ - @Excel(name = "创建时间", width = 15) - @ApiModelProperty(value="创建时间") + private java.lang.String dangerDesc; + /** + * 事故隐患等级,1一般,2重大 + */ + @Excel(name = "事故隐患等级,1一般,2重大", width = 15) + @ApiModelProperty(value = "事故隐患等级,1一般,2重大") + private java.lang.String faultLevel; + /** + * 创建人 + */ + @Excel(name = "创建人", width = 15) + @ApiModelProperty(value = "创建人") + + private java.lang.Long createUser; + /** + * 创建时间 + */ + @Excel(name = "创建时间", width = 15) + @ApiModelProperty(value = "创建时间") private java.lang.String createTime ; @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") @@ -86,70 +98,115 @@ public class HiddenDangerInspectRecord implements Serializable { private java.lang.String inspectTime ; /**整改时限*/ @Excel(name = "整改时限", width = 15) - @ApiModelProperty(value="整改时限") - private java.lang.String changeLimitTime ; - /**现场图片*/ - @Excel(name = "现场图片", width = 15) - @ApiModelProperty(value="现场图片") - private java.lang.String imageUrl ; - /**整改人*/ - @Excel(name = "整改人", width = 15) - @ApiModelProperty(value="整改人") - - private java.lang.Long changeUser ; - /**类型,1质量问题,2排查记录*/ - @Excel(name = "类型,1质量问题,2排查记录", width = 15) - @ApiModelProperty(value="类型,1隐患问题,2排查记录") - private java.lang.Integer recordType ; - /**项目唯一标识*/ - @Excel(name = "项目唯一标识", width = 15) - @ApiModelProperty(value="项目唯一标识") - private java.lang.String projectSn ; - /**复查人*/ - @Excel(name = "复查人", width = 15) - @ApiModelProperty(value="复查人") - - private java.lang.Long reviewId ; - /**任务ID*/ - @Excel(name = "任务ID", width = 15) - @ApiModelProperty(value="任务ID") - - private java.lang.Long taskId ; - /**子任务ID*/ - @Excel(name = "子任务ID", width = 15) - @ApiModelProperty(value="子任务ID") - - private java.lang.Long itemId ; - /**危大工程记录ID*/ - @Excel(name = "危大工程记录ID", width = 15) - @ApiModelProperty(value="危大工程记录ID") - - private java.lang.Long engineeringId ; - /**状态,1无需整改,2待整改,3待复查,4合格,5不合格*/ - @Excel(name = "状态,1无需整改,2待整改,3待复查,4合格,5不合格", width = 15) - @ApiModelProperty(value="状态,1无需整改,2待整改,3待复查,4合格,5不合格") - private java.lang.Integer status ; - /**分包单位SN*/ - @Excel(name = "分包单位SN", width = 15) - @ApiModelProperty(value="分包单位SN") - private java.lang.String enterpriseSn ; + @ApiModelProperty(value = "整改时限") + private java.lang.String changeLimitTime; + /** + * 现场图片 + */ + @Excel(name = "现场图片", width = 15) + @ApiModelProperty(value = "现场图片") + private java.lang.String imageUrl; + /** + * 整改人 + */ + @Excel(name = "整改人", width = 15) + @ApiModelProperty(value = "整改人") - /**是否有复查不合格的,0否,1是*/ + private java.lang.Long changeUser; + /** + * 类型,1质量问题,2排查记录 + */ + @Excel(name = "类型,1质量问题,2排查记录", width = 15) + @ApiModelProperty(value = "类型,1隐患问题,2排查记录") + private java.lang.Integer recordType; + /** + * 项目唯一标识 + */ + @Excel(name = "项目唯一标识", width = 15) + @ApiModelProperty(value = "项目唯一标识") + private java.lang.String projectSn; + /** + * 复查人 + */ + @Excel(name = "复查人", width = 15) + @ApiModelProperty(value = "复查人") + + private java.lang.Long reviewId; + /** + * 任务ID + */ + @Excel(name = "任务ID", width = 15) + @ApiModelProperty(value = "任务ID") + + private java.lang.Long taskId; + /** + * 子任务ID + */ + @Excel(name = "子任务ID", width = 15) + @ApiModelProperty(value = "子任务ID") + + private java.lang.Long itemId; + /** + * 危大工程记录ID + */ + @Excel(name = "危大工程记录ID", width = 15) + @ApiModelProperty(value = "危大工程记录ID") + + private java.lang.Long engineeringId; + /** + * 状态,1无需整改,2待整改,3待复查,4合格,5不合格 + */ + @Excel(name = "状态,1无需整改,2待整改,3待复查,4合格,5不合格", width = 15) + @ApiModelProperty(value = "状态,1无需整改,2待整改,3待复查,4合格,5不合格") + private java.lang.Integer status; + /** + * 分包单位SN + */ + @Excel(name = "分包单位SN", width = 15) + @ApiModelProperty(value = "分包单位SN") + private java.lang.String enterpriseSn; + + /** + * 是否有复查不合格的,0否,1是 + */ @Excel(name = "是否有复查不合格的,0否,1是", width = 15) - @ApiModelProperty(value="是否有复查不合格的,0否,1是") - private java.lang.Integer reviewFailType ; + @ApiModelProperty(value = "是否有复查不合格的,0否,1是") + private java.lang.Integer reviewFailType; - /**是否有整改不合格的,0否,1是*/ + /** + * 是否有整改不合格的,0否,1是 + */ @Excel(name = "是否有整改不合格的,0否,1是", width = 15) - @ApiModelProperty(value="是否有整改不合格的,0否,1是") - private java.lang.Integer rectifyFailType ; + @ApiModelProperty(value = "是否有整改不合格的,0否,1是") + private java.lang.Integer rectifyFailType; - /**是否是超期关闭,0否,1是*/ + /** + * 是否是超期关闭,0否,1是 + */ @Excel(name = "是否是超期关闭,0否,1是", width = 15) - @ApiModelProperty(value="是否是超期关闭,0否,1是") - private java.lang.Integer overdueCloseType ; + @ApiModelProperty(value = "是否是超期关闭,0否,1是") + private java.lang.Integer overdueCloseType; @TableField(exist = false) - @ApiModelProperty(value="验收表验收任务-验收结果ID") - private String checkItemResultId; + @ApiModelProperty(value = "验收表验收任务-验收结果ID") + private String checkItemResultId; + + @TableField(exist = false) + private String enterpriseName; + @TableField(exist = false) + private String createEnterpriseName; + @TableField(exist = false) + @ApiModelProperty(value = "发起人") + private String createUserName; + @TableField(exist = false) + @ApiModelProperty(value = "整改人") + private String changeUserName; + @TableField(exist = false) + @ApiModelProperty(value = "复查人") + private String reviewUserName; + @TableField(exist = false) + private String inspectTypeName; + @TableField(exist = false) + private Integer overdueType; + } diff --git a/src/main/java/com/zhgd/xmgl/modules/dangerous/entity/vo/ProjectInspectRecordCountVo.java b/src/main/java/com/zhgd/xmgl/modules/dangerous/entity/vo/ProjectInspectRecordCountVo.java new file mode 100644 index 000000000..cc13bce08 --- /dev/null +++ b/src/main/java/com/zhgd/xmgl/modules/dangerous/entity/vo/ProjectInspectRecordCountVo.java @@ -0,0 +1,38 @@ +package com.zhgd.xmgl.modules.dangerous.entity.vo; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +@Data +public class ProjectInspectRecordCountVo { + @ApiModelProperty(value = "其他数量,就是除了月、周的检查数量") + private Integer otherInspectNum; + @ApiModelProperty(value = "") + private Integer closeNum; + @ApiModelProperty(value = "合格,就是已整改数量") + private Integer rectifyCompleteNum; + @ApiModelProperty(value = "待复查,待审核数量") + private Integer reviewNum; + @ApiModelProperty(value = "") + private Integer investigateNum; + @ApiModelProperty(value = "") + private Integer overdueNotCloseNum; + @ApiModelProperty(value = "待整改问题") + private Integer rectificationNum; + @ApiModelProperty(value = "问题总数") + private String totalNum; + @ApiModelProperty(value = "周检查数量") + private Integer weekInspectNum; + @ApiModelProperty(value = "月检查数量") + private Integer monthInspectNum; + @ApiModelProperty(value = "及时整改率") + private Double closeRatio; + @ApiModelProperty(value = "") + private Double completeRatio; + @ApiModelProperty(value = "") + private Integer inspectNum; + @ApiModelProperty(value = "") + private Integer overdueRectificationNum; + @ApiModelProperty(value = "未整改") + private Integer notCloseNum; +} diff --git a/src/main/java/com/zhgd/xmgl/modules/dangerous/mapper/HiddenDangerInspectRecordMapper.java b/src/main/java/com/zhgd/xmgl/modules/dangerous/mapper/HiddenDangerInspectRecordMapper.java index c7b274af0..1a0e2f8fd 100644 --- a/src/main/java/com/zhgd/xmgl/modules/dangerous/mapper/HiddenDangerInspectRecordMapper.java +++ b/src/main/java/com/zhgd/xmgl/modules/dangerous/mapper/HiddenDangerInspectRecordMapper.java @@ -8,6 +8,7 @@ import com.zhgd.xmgl.modules.dangerous.entity.HiddenDangerInspectRecord; import com.zhgd.xmgl.modules.dangerous.entity.HiddenDangerInspectionStatistics; import com.zhgd.xmgl.modules.dangerous.entity.vo.AllTodayDataHdirVO; import com.zhgd.xmgl.modules.dangerous.entity.vo.AllWeekDataHdirVO; +import com.zhgd.xmgl.modules.dangerous.entity.vo.ProjectInspectRecordCountVo; import com.zhgd.xmgl.modules.dangerous.entity.vo.TotalAndWeekHiddenDanger; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; @@ -24,7 +25,7 @@ import java.util.Map; @Mapper public interface HiddenDangerInspectRecordMapper extends BaseMapper { - List selectHiddenDangerInspectPage(Page page, @Param("param") Map map); + List selectHiddenDangerInspectPage(Page page, @Param("param") Map map); EntityMap selectHiddenDangerInspectRecordById(Map map); @@ -36,13 +37,13 @@ public interface HiddenDangerInspectRecordMapper extends BaseMapper selectUserInspectRecordCount(Map map); - Map getProjectInspectRecordCount(Map map); + ProjectInspectRecordCountVo getProjectInspectRecordCount(Map map); Map selectHiddenDangerSecurityManageTotal(Map map); List> selectHiddenDangerSecurityManageCountByDay(Map map); - List selectRectifiedHiddenDangerList(Map map); + List selectRectifiedHiddenDangerList(Map map); List getNewestHiddenDangerDataList(Map map); diff --git a/src/main/java/com/zhgd/xmgl/modules/dangerous/mapper/xml/HiddenDangerInspectRecordMapper.xml b/src/main/java/com/zhgd/xmgl/modules/dangerous/mapper/xml/HiddenDangerInspectRecordMapper.xml index 0405860c4..3e332c85d 100644 --- a/src/main/java/com/zhgd/xmgl/modules/dangerous/mapper/xml/HiddenDangerInspectRecordMapper.xml +++ b/src/main/java/com/zhgd/xmgl/modules/dangerous/mapper/xml/HiddenDangerInspectRecordMapper.xml @@ -7,36 +7,37 @@ d.real_name create_user_name, e.real_name change_user_name, f.real_name review_user_name, - t.inspect_type_name + t.inspect_type_name from hidden_danger_inspection_record a - LEFT JOIN enterprise_info b ON a.enterprise_sn = b.enterprise_sn - LEFT JOIN system_user d ON a.create_user = d.user_id - LEFT JOIN system_user e ON a.change_user = e.user_id - LEFT JOIN system_user f ON a.review_id = f.user_id - LEFT JOIN inspect_type t ON a.inspect_type_id = t.id + LEFT JOIN enterprise_info b ON a.enterprise_sn = b.enterprise_sn + LEFT JOIN system_user d ON a.create_user = d.user_id + LEFT JOIN system_user e ON a.change_user = e.user_id + LEFT JOIN system_user f ON a.review_id = f.user_id + LEFT JOIN inspect_type t ON a.inspect_type_id = t.id WHERE a.id = #{id} - SELECT a.*, - b.enterprise_name, - d.real_name create_user_name, - e.real_name change_user_name, - f.real_name review_user_name, - t.inspect_type_name, - en.enterprise_name create_enterprise_name, - (case - when a.change_limit_time < DATE_FORMAT(now(), "%Y-%m-%d") and (status = 2 or status = 3) - then 1 - else 0 end) overdue_type + b.enterprise_name, + d.real_name create_user_name, + e.real_name change_user_name, + f.real_name review_user_name, + t.inspect_type_name, + en.enterprise_name create_enterprise_name, + (case + when a.change_limit_time < DATE_FORMAT(now(), "%Y-%m-%d") and (status = 2 or status = 3) + then 1 + else 0 end) overdue_type from hidden_danger_inspection_record a - LEFT JOIN enterprise_info b ON a.enterprise_sn = b.enterprise_sn - LEFT JOIN system_user d ON a.create_user = d.user_id - LEFT JOIN system_user e ON a.change_user = e.user_id - LEFT JOIN system_user f ON a.review_id = f.user_id - LEFT JOIN inspect_type t ON a.inspect_type_id = t.id - LEFT JOIN worker_info wk ON wk.id = d.worker_id - LEFT JOIN enterprise_info en ON en.id = wk.enterprise_id + LEFT JOIN enterprise_info b ON a.enterprise_sn = b.enterprise_sn + LEFT JOIN system_user d ON a.create_user = d.user_id + LEFT JOIN system_user e ON a.change_user = e.user_id + LEFT JOIN system_user f ON a.review_id = f.user_id + LEFT JOIN inspect_type t ON a.inspect_type_id = t.id + LEFT JOIN worker_info wk ON wk.id = d.worker_id + LEFT JOIN enterprise_info en ON en.id = wk.enterprise_id WHERE a.project_sn = #{param.projectSn} and a.create_user = #{param.createUser} @@ -109,18 +110,19 @@ - select tp.*, round(IFNULL(TRUNCATE(IFNULL(rectifyCompleteNum, 0) / IFNULL(inspectNum, 0), 4), 0) * 100, - 2) completeRatio, + 2) completeRatio, round(IFNULL(TRUNCATE(IFNULL(closeNum, 0) / IFNULL(totalNum, 0), 4), 0) * 100, 2) closeRatio, tp.totalNum-tp.weekInspectNum-tp.monthInspectNum AS otherInspectNum from ( @@ -202,31 +204,32 @@ IFNULL(SUM((CASE WHEN a.status = 2 THEN 1 ELSE 0 END)), 0) rectificationNum, IFNULL(SUM((CASE WHEN a.status = 3 THEN 1 ELSE 0 END)), 0) reviewNum from hidden_danger_inspection_record a - WHERE a.project_sn = #{projectSn} - ) tp + WHERE a.project_sn = #{projectSn} + ) tp - SELECT a.*, - b.enterprise_name, - d.real_name create_user_name, - e.real_name change_user_name, - f.real_name review_user_name, - t.inspect_type_name + b.enterprise_name, + d.real_name create_user_name, + e.real_name change_user_name, + f.real_name review_user_name, + t.inspect_type_name from hidden_danger_inspection_record a - LEFT JOIN enterprise_info b ON a.enterprise_sn = b.enterprise_sn - LEFT JOIN system_user d ON a.create_user = d.user_id - LEFT JOIN system_user e ON a.change_user = e.user_id - LEFT JOIN system_user f ON a.review_id = f.user_id - LEFT JOIN inspect_type t ON a.inspect_type_id = t.id + LEFT JOIN enterprise_info b ON a.enterprise_sn = b.enterprise_sn + LEFT JOIN system_user d ON a.create_user = d.user_id + LEFT JOIN system_user e ON a.change_user = e.user_id + LEFT JOIN system_user f ON a.review_id = f.user_id + LEFT JOIN inspect_type t ON a.inspect_type_id = t.id where a.project_sn = #{projectSn} - and a.status in (2, 3, 4, 5) + and a.status in (2, 3, 4, 5) order by a.update_time desc LIMIT 20 diff --git a/src/main/java/com/zhgd/xmgl/modules/dangerous/service/IHiddenDangerInspectRecordService.java b/src/main/java/com/zhgd/xmgl/modules/dangerous/service/IHiddenDangerInspectRecordService.java index 86738a4f0..f6c3abda1 100644 --- a/src/main/java/com/zhgd/xmgl/modules/dangerous/service/IHiddenDangerInspectRecordService.java +++ b/src/main/java/com/zhgd/xmgl/modules/dangerous/service/IHiddenDangerInspectRecordService.java @@ -8,6 +8,7 @@ import com.zhgd.xmgl.modules.dangerous.entity.HiddenDangerInspectRecord; import com.zhgd.xmgl.modules.dangerous.entity.HiddenDangerInspectionStatistics; import com.zhgd.xmgl.modules.dangerous.entity.vo.AllTodayDataHdirVO; import com.zhgd.xmgl.modules.dangerous.entity.vo.AllWeekDataHdirVO; +import com.zhgd.xmgl.modules.dangerous.entity.vo.ProjectInspectRecordCountVo; import com.zhgd.xmgl.modules.dangerous.entity.vo.TotalAndWeekHiddenDanger; import javax.servlet.http.HttpServletResponse; @@ -26,7 +27,7 @@ public interface IHiddenDangerInspectRecordService extends IService map); - IPage selectHiddenDangerInspectPage(Map map); + IPage selectHiddenDangerInspectPage(Map map); Map selectDangerInspectCountByTask(Long taskId); @@ -36,13 +37,13 @@ public interface IHiddenDangerInspectRecordService extends IService selectUserInspectRecordCount(Map map); - Map getProjectInspectRecordCount(Map map); + ProjectInspectRecordCountVo getProjectInspectRecordCount(Map map); void saveHiddenDangerInspectRecord(HiddenDangerInspectRecord hiddenDangerInspectRecord); Map selectHiddenDangerSecurityManageStatistics(Map map); - List selectRectifiedHiddenDangerList(Map map); + List selectRectifiedHiddenDangerList(Map map); List getNewestHiddenDangerDataList(Map map); diff --git a/src/main/java/com/zhgd/xmgl/modules/dangerous/service/impl/HiddenDangerInspectRecordServiceImpl.java b/src/main/java/com/zhgd/xmgl/modules/dangerous/service/impl/HiddenDangerInspectRecordServiceImpl.java index f864fb606..67883681f 100644 --- a/src/main/java/com/zhgd/xmgl/modules/dangerous/service/impl/HiddenDangerInspectRecordServiceImpl.java +++ b/src/main/java/com/zhgd/xmgl/modules/dangerous/service/impl/HiddenDangerInspectRecordServiceImpl.java @@ -19,10 +19,7 @@ import com.zhgd.xmgl.modules.dangerous.entity.DangerInspectionAcceptanceTableRes import com.zhgd.xmgl.modules.dangerous.entity.HiddenDangerInspectRecord; import com.zhgd.xmgl.modules.dangerous.entity.HiddenDangerInspectionStatistics; import com.zhgd.xmgl.modules.dangerous.entity.HiddenDangerRectifyRecord; -import com.zhgd.xmgl.modules.dangerous.entity.vo.AllDataHdirVO; -import com.zhgd.xmgl.modules.dangerous.entity.vo.AllTodayDataHdirVO; -import com.zhgd.xmgl.modules.dangerous.entity.vo.AllWeekDataHdirVO; -import com.zhgd.xmgl.modules.dangerous.entity.vo.TotalAndWeekHiddenDanger; +import com.zhgd.xmgl.modules.dangerous.entity.vo.*; import com.zhgd.xmgl.modules.dangerous.mapper.DangerInspectionAcceptanceTableResultMapper; import com.zhgd.xmgl.modules.dangerous.mapper.HiddenDangerInspectRecordMapper; import com.zhgd.xmgl.modules.dangerous.mapper.HiddenDangerInspectionStatisticsMapper; @@ -95,11 +92,11 @@ public class HiddenDangerInspectRecordServiceImpl extends ServiceImpl selectHiddenDangerInspectPage(Map map) { + public IPage selectHiddenDangerInspectPage(Map map) { int pageNo = Integer.parseInt(map.getOrDefault("pageNo", 1).toString()); int pageSize = Integer.parseInt(map.getOrDefault("pageSize", 10).toString()); - Page page = new Page<>(pageNo, pageSize); - List list = hiddenDangerInspectRecordMapper.selectHiddenDangerInspectPage(page, map); + Page page = new Page<>(pageNo, pageSize); + List list = hiddenDangerInspectRecordMapper.selectHiddenDangerInspectPage(page, map); return page.setRecords(list); } @@ -124,7 +121,7 @@ public class HiddenDangerInspectRecordServiceImpl extends ServiceImpl getProjectInspectRecordCount(Map map) { + public ProjectInspectRecordCountVo getProjectInspectRecordCount(Map map) { return hiddenDangerInspectRecordMapper.getProjectInspectRecordCount(map); } @@ -198,7 +195,7 @@ public class HiddenDangerInspectRecordServiceImpl extends ServiceImpl selectRectifiedHiddenDangerList(Map map) { + public List selectRectifiedHiddenDangerList(Map map) { return hiddenDangerInspectRecordMapper.selectRectifiedHiddenDangerList(map); } diff --git a/src/main/java/com/zhgd/xmgl/modules/security/controller/SecurityManageController.java b/src/main/java/com/zhgd/xmgl/modules/security/controller/SecurityManageController.java index 87529f93d..d3e4db78f 100644 --- a/src/main/java/com/zhgd/xmgl/modules/security/controller/SecurityManageController.java +++ b/src/main/java/com/zhgd/xmgl/modules/security/controller/SecurityManageController.java @@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage; import com.zhgd.annotation.OperLog; import com.zhgd.jeecg.common.api.vo.Result; import com.zhgd.jeecg.common.mybatis.EntityMap; +import com.zhgd.xmgl.modules.dangerous.service.IHiddenDangerInspectRecordService; import com.zhgd.xmgl.modules.security.entity.SecurityManage; import com.zhgd.xmgl.modules.security.service.ISecurityManageService; import com.zhgd.xmgl.util.MessageUtil; @@ -23,11 +24,11 @@ import java.util.List; import java.util.Map; - /** +/** * @Title: Controller * @Description: 安全管理 * @author: pds - * @date: 2020-12-28 + * @date: 2020-12-28 * @version: V1.0 */ @RestController @@ -35,142 +36,148 @@ import java.util.Map; @Slf4j @Api(tags = "安全管理") public class SecurityManageController { - @Autowired - private ISecurityManageService securityManageService; - - /** - * 分页列表查询 - * @return - */ - @ApiOperation(value = " 分页列表查询安全管理信息", notes = "分页列表查询安全管理信息", httpMethod="POST") + @Autowired + private ISecurityManageService securityManageService; + @Autowired + private IHiddenDangerInspectRecordService hiddenDangerInspectRecordService; + + /** + * 分页列表查询 + * + * @return + */ + @ApiOperation(value = " 分页列表查询安全管理信息", notes = "分页列表查询安全管理信息", httpMethod = "POST") @ApiImplicitParams({ - @ApiImplicitParam(name="state",value="状态,1待整改,2待审核,3已闭合,4无需整改",dataType = "String",paramType = "query",required =false), - @ApiImplicitParam(name="rectifyPeople",value="整改人",dataType = "String",paramType = "query",required =false), - @ApiImplicitParam(name="inspector",value="检查人",dataType = "String",paramType = "query",required =false), - @ApiImplicitParam(name="notifier",value="通知人",dataType = "String",paramType = "query",required =false), - @ApiImplicitParam(name="startTime",value="开始时间,格式2020-08-16",dataType = "String",paramType = "query",required =false), - @ApiImplicitParam(name="endTime",value="结束时间,格式2020-08-16",dataType = "String",paramType = "query",required =false), + @ApiImplicitParam(name = "state", value = "状态,1待整改,2待审核,3已闭合,4无需整改", dataType = "String", paramType = "query", required = false), + @ApiImplicitParam(name = "rectifyPeople", value = "整改人", dataType = "String", paramType = "query", required = false), + @ApiImplicitParam(name = "inspector", value = "检查人", dataType = "String", paramType = "query", required = false), + @ApiImplicitParam(name = "notifier", value = "通知人", dataType = "String", paramType = "query", required = false), + @ApiImplicitParam(name = "startTime", value = "开始时间,格式2020-08-16", dataType = "String", paramType = "query", required = false), + @ApiImplicitParam(name = "endTime", value = "结束时间,格式2020-08-16", dataType = "String", paramType = "query", required = false), @ApiImplicitParam(name = "projectSn", value = "项目SN", paramType = "query", required = true, dataType = "String"), @ApiImplicitParam(name = "pageNo", value = "第几页", paramType = "query", required = true, dataType = "Integer"), @ApiImplicitParam(name = "pageSize", value = "每页显示条数", paramType = "query", required = true, dataType = "Integer"), }) @PostMapping(value = "/list") - public Result> selectSecurityManagePageList(@RequestBody Map map) { - return Result.success(securityManageService.selectSecurityManagePageList(map)); - } - - /** - * 添加 - * @param securityManage - * @return - */ - @OperLog(operModul = "安全管理",operType = "添加安全管理记录",operDesc = "添加安全管理记录") - @ApiOperation(value = " 添加安全管理信息", notes = "添加安全管理信息" , httpMethod="POST") - @PostMapping(value = "/add") - public Result add(@RequestBody SecurityManage securityManage) { + public Result> selectSecurityManagePageList(@RequestBody Map map) { + return Result.success(securityManageService.selectSecurityManagePageList(map)); + } + + /** + * 添加 + * + * @param securityManage + * @return + */ + @OperLog(operModul = "安全管理", operType = "添加安全管理记录", operDesc = "添加安全管理记录") + @ApiOperation(value = " 添加安全管理信息", notes = "添加安全管理信息", httpMethod = "POST") + @PostMapping(value = "/add") + public Result add(@RequestBody SecurityManage securityManage) { securityManageService.addSecurityManage(securityManage); - return Result.ok(); - } - - /** - * 编辑 - * @param securityManage - * @return - */ - @OperLog(operModul = "安全管理",operType = "编辑安全管理记录",operDesc = "编辑安全管理记录") - @ApiOperation(value = "编辑安全管理信息", notes = "编辑安全管理信息" , httpMethod="PUT") - @PostMapping(value = "/edit") - public Result edit(@RequestBody SecurityManage securityManage) { - Result result = new Result(); - SecurityManage securityManageEntity = securityManageService.getById(securityManage.getId()); - if(securityManageEntity==null) { - result.error500("未找到对应实体"); - }else { - boolean ok = securityManageService.updateById(securityManage); - //TODO 返回false说明什么? - if(ok) { - result.successMsg("修改成功!"); - } - } - - return result; - } - - /** - * 通过id删除 - * @param - * @return - */ - @OperLog(operModul = "安全管理",operType = "删除安全管理记录",operDesc = "删除安全管理记录") - @ApiOperation(value = "删除安全管理信息", notes = "删除安全管理信息" , httpMethod="POST") - @ApiImplicitParam(name = "id", value = "安全管理ID", paramType = "query", required = true, dataType = "Integer") - @PostMapping(value = "/delete") - public Result delete(@RequestBody Map map) { - securityManageService.deleteSecurityManage(MapUtils.getString(map,"id")); - return Result.ok(); - } - + return Result.ok(); + } - - /** - * 通过id查询 - * @param - * @return - */ - @ApiOperation(value = "通过id查询安全管理信息", notes = "通过id查询安全管理信息" , httpMethod="POST") - @ApiImplicitParam(name = "id", value = "安全管理ID", paramType = "query", required = true, dataType = "Integer") - @PostMapping(value = "/queryById") - public Result queryById(@RequestBody Map map) { - Result result = new Result(); - SecurityManage securityManage = securityManageService.getById(MapUtils.getString(map,"id")); - if(securityManage==null) { + /** + * 编辑 + * + * @param securityManage + * @return + */ + @OperLog(operModul = "安全管理", operType = "编辑安全管理记录", operDesc = "编辑安全管理记录") + @ApiOperation(value = "编辑安全管理信息", notes = "编辑安全管理信息", httpMethod = "PUT") + @PostMapping(value = "/edit") + public Result edit(@RequestBody SecurityManage securityManage) { + Result result = new Result(); + SecurityManage securityManageEntity = securityManageService.getById(securityManage.getId()); + if (securityManageEntity == null) { + result.error500("未找到对应实体"); + } else { + boolean ok = securityManageService.updateById(securityManage); + if (ok) { + result.successMsg("修改成功!"); + } + } + + return result; + } + + /** + * 通过id删除 + * + * @param + * @return + */ + @OperLog(operModul = "安全管理", operType = "删除安全管理记录", operDesc = "删除安全管理记录") + @ApiOperation(value = "删除安全管理信息", notes = "删除安全管理信息", httpMethod = "POST") + @ApiImplicitParam(name = "id", value = "安全管理ID", paramType = "query", required = true, dataType = "Integer") + @PostMapping(value = "/delete") + public Result delete(@RequestBody Map map) { + securityManageService.deleteSecurityManage(MapUtils.getString(map, "id")); + return Result.ok(); + } + + + /** + * 通过id查询 + * + * @param + * @return + */ + @ApiOperation(value = "通过id查询安全管理信息", notes = "通过id查询安全管理信息", httpMethod = "POST") + @ApiImplicitParam(name = "id", value = "安全管理ID", paramType = "query", required = true, dataType = "Integer") + @PostMapping(value = "/queryById") + public Result queryById(@RequestBody Map map) { + Result result = new Result(); + SecurityManage securityManage = securityManageService.getById(MapUtils.getString(map, "id")); + if (securityManage == null) { result.error500(MessageUtil.get("notFindErr")); - }else { - result.setResult(securityManage); - result.setSuccess(true); - } - return result; - } + } else { + result.setResult(securityManage); + result.setSuccess(true); + } + return result; + } - /** - * 通过id查询 - * @param - * @return - */ - @ApiOperation(value = "通过id查询安全管理信息", notes = "通过id查询安全管理信息" , httpMethod="POST") - @ApiImplicitParam(name = "id", value = "安全管理ID", paramType = "query", required = true, dataType = "Integer") - @PostMapping(value = "/getSecurityManageDetails") - public Result getSecurityManageDetails(@RequestBody Map map) { - return Result.success(securityManageService.getSecurityManageDetails(map)); - } + /** + * 通过id查询 + * + * @param + * @return + */ + @ApiOperation(value = "通过id查询安全管理信息", notes = "通过id查询安全管理信息", httpMethod = "POST") + @ApiImplicitParam(name = "id", value = "安全管理ID", paramType = "query", required = true, dataType = "Integer") + @PostMapping(value = "/getSecurityManageDetails") + public Result getSecurityManageDetails(@RequestBody Map map) { + return Result.success(securityManageService.getSecurityManageDetails(map)); + } - @ApiOperation(value = "安全管理统计", notes = "安全管理统计", httpMethod="POST") - @ApiImplicitParams({ - @ApiImplicitParam(name = "projectSn", value = "项目SN", paramType = "query", required = true, dataType = "String"), - }) - @PostMapping(value = "/selectSecurityManageStatistics") - public Result> selectSecurityManageStatistics(@RequestBody Map map) { - return Result.success(securityManageService.selectSecurityManageStatistics(map)); - } + @ApiOperation(value = "安全管理统计", notes = "安全管理统计", httpMethod = "POST") + @ApiImplicitParams({ + @ApiImplicitParam(name = "projectSn", value = "项目SN", paramType = "query", required = true, dataType = "String"), + }) + @PostMapping(value = "/selectSecurityManageStatistics") + public Result> selectSecurityManageStatistics(@RequestBody Map map) { + return Result.success(securityManageService.selectSecurityManageStatistics(map)); + } - @ApiOperation(value = "查询最新20条有操作的数据", notes = "查询最新20条有操作的数据", httpMethod="POST") - @ApiImplicitParams({ - @ApiImplicitParam(name = "projectSn", value = "项目SN", paramType = "query", required = true, dataType = "String"), - }) - @PostMapping(value = "/selectRectifiedSecurityManageList") - public Result> selectRectifiedSecurityManageList(@RequestBody Map map) { - return Result.success(securityManageService.selectRectifiedSecurityManageList(map)); - } + @ApiOperation(value = "查询最新20条有操作的数据", notes = "查询最新20条有操作的数据", httpMethod = "POST") + @ApiImplicitParams({ + @ApiImplicitParam(name = "projectSn", value = "项目SN", paramType = "query", required = true, dataType = "String"), + }) + @PostMapping(value = "/selectRectifiedSecurityManageList") + public Result> selectRectifiedSecurityManageList(@RequestBody Map map) { + return Result.success(securityManageService.selectRectifiedSecurityManageList(map)); + } - @ApiOperation(value = "查询待整改的安全管理数据", httpMethod="POST") - @ApiImplicitParams({ - @ApiImplicitParam(name = "projectSn", value = "项目SN", paramType = "query", required = true, dataType = "String"), - }) - @PostMapping(value = "/getNewestSecurityManageDataList") - public Result> getNewestSecurityManageDataList(@RequestBody Map map) { - return Result.success(securityManageService.getNewestSecurityManageDataList(map)); - } + @ApiOperation(value = "查询待整改的安全管理数据", httpMethod = "POST") + @ApiImplicitParams({ + @ApiImplicitParam(name = "projectSn", value = "项目SN", paramType = "query", required = true, dataType = "String"), + }) + @PostMapping(value = "/getNewestSecurityManageDataList") + public Result> getNewestSecurityManageDataList(@RequestBody Map map) { + return Result.success(securityManageService.getNewestSecurityManageDataList(map)); + } } diff --git a/src/main/java/com/zhgd/xmgl/modules/worker/mapper/xml/DepartmentInfoMapper.xml b/src/main/java/com/zhgd/xmgl/modules/worker/mapper/xml/DepartmentInfoMapper.xml index 88df26fa1..dc3a64458 100644 --- a/src/main/java/com/zhgd/xmgl/modules/worker/mapper/xml/DepartmentInfoMapper.xml +++ b/src/main/java/com/zhgd/xmgl/modules/worker/mapper/xml/DepartmentInfoMapper.xml @@ -41,9 +41,11 @@