diff --git a/src/main/java/com/zhgd/xmgl/modules/quality/controller/QualityInspectionRecordController.java b/src/main/java/com/zhgd/xmgl/modules/quality/controller/QualityInspectionRecordController.java index c129d9dac..5b535557a 100644 --- a/src/main/java/com/zhgd/xmgl/modules/quality/controller/QualityInspectionRecordController.java +++ b/src/main/java/com/zhgd/xmgl/modules/quality/controller/QualityInspectionRecordController.java @@ -80,7 +80,8 @@ public class QualityInspectionRecordController { @ApiImplicitParam(name = "isNotQualified", value = "是否未销项", paramType = "body", required = false, dataType = "Integer"), @ApiImplicitParam(name = "isOverdueRectification", value = "是否超期未整改1是", paramType = "body", required = false, dataType = "Integer"), @ApiImplicitParam(name = "enterpriseId", value = "合作单位id", paramType = "body", required = false, dataType = "String"), - + @ApiImplicitParam(name = "dangerInfoId", value = "隐患库信息id", paramType = "body", required = false, dataType = "String"), + @ApiImplicitParam(name = "dangerInfoLevel", value = "隐患库层数", paramType = "body", required = false, dataType = "String"), }) @PostMapping(value = {"/list", "/page"}) public Result queryPageList(@RequestBody Map map) { diff --git a/src/main/java/com/zhgd/xmgl/modules/quality/mapper/xml/QualityInspectionRecordMapper.xml b/src/main/java/com/zhgd/xmgl/modules/quality/mapper/xml/QualityInspectionRecordMapper.xml index 67831daa4..ca7b2fdb0 100644 --- a/src/main/java/com/zhgd/xmgl/modules/quality/mapper/xml/QualityInspectionRecordMapper.xml +++ b/src/main/java/com/zhgd/xmgl/modules/quality/mapper/xml/QualityInspectionRecordMapper.xml @@ -2,6 +2,15 @@ + + and t.danger_type_id = #{param.dangerInfoId} + + + and t.danger_item_id in (select id from danger_item_record where danger_type_id = #{param.dangerInfoId}) + + + and t.danger_item_id = #{param.dangerInfoId} + and t.inspect_time =]]> #{param.inspectTime_begin} @@ -183,6 +192,15 @@ and t.status != 6 + + and t.danger_type_id = #{param.dangerInfoId} + + + and t.danger_item_id in (select id from danger_item_record where danger_type_id = #{param.dangerInfoId}) + + + and t.danger_item_id = #{param.dangerInfoId} + and t.inspect_time =]]> concat(date_format(current_date,'%Y-%m'),'-01 00:00:00') @@ -262,6 +280,15 @@ LEFT join subdivision_project subsection on subsection.id = a.subsection_id LEFT join subdivision_project subentry on subentry.id = a.subentry_id WHERE a.project_sn = #{param.projectSn} + + and a.danger_type_id = #{param.dangerInfoId} + + + and a.danger_item_id in (select id from danger_item_record where danger_type_id = #{param.dangerInfoId}) + + + and a.danger_item_id = #{param.dangerInfoId} + and a.status != 6 diff --git a/src/main/java/com/zhgd/xmgl/modules/xz/security/controller/XzSecurityQualityInspectionRecordController.java b/src/main/java/com/zhgd/xmgl/modules/xz/security/controller/XzSecurityQualityInspectionRecordController.java index cdf13b3d1..de380c702 100644 --- a/src/main/java/com/zhgd/xmgl/modules/xz/security/controller/XzSecurityQualityInspectionRecordController.java +++ b/src/main/java/com/zhgd/xmgl/modules/xz/security/controller/XzSecurityQualityInspectionRecordController.java @@ -89,6 +89,8 @@ public class XzSecurityQualityInspectionRecordController { @ApiImplicitParam(name = "enterpriseId", value = "合作单位id", paramType = "body", required = false, dataType = "String"), @ApiImplicitParam(name = "type", value = "1危大2动火3受限空间4盲板抽堵5高出6吊装7临时用电8动土9断路", paramType = "body", required = false, dataType = "Integer"), @ApiImplicitParam(name = "orderBy", value = "1整改时间倒序(默认)2按照每条记录的状态的时间倒序", paramType = "body", required = false, dataType = "Integer"), + @ApiImplicitParam(name = "dangerInfoId", value = "隐患库信息id", paramType = "body", required = false, dataType = "String"), + @ApiImplicitParam(name = "dangerInfoLevel", value = "隐患库层数", paramType = "body", required = false, dataType = "String"), }) @PostMapping(value = {"/list", "/page"}) public Result queryPageList(@RequestBody Map map) { diff --git a/src/main/java/com/zhgd/xmgl/modules/xz/security/mapper/xml/XzSecurityQualityInspectionRecordMapper.xml b/src/main/java/com/zhgd/xmgl/modules/xz/security/mapper/xml/XzSecurityQualityInspectionRecordMapper.xml index 65e7bb725..9f3c0583a 100644 --- a/src/main/java/com/zhgd/xmgl/modules/xz/security/mapper/xml/XzSecurityQualityInspectionRecordMapper.xml +++ b/src/main/java/com/zhgd/xmgl/modules/xz/security/mapper/xml/XzSecurityQualityInspectionRecordMapper.xml @@ -2,6 +2,15 @@ + + and t.danger_type_id = #{param.dangerInfoId} + + + and t.danger_item_id in (select id from xz_security_danger_item_record where danger_type_id = #{param.dangerInfoId}) + + + and t.danger_item_id = #{param.dangerInfoId} + and t.type = #{param.type} @@ -185,6 +194,15 @@ and t.status != 6 + + and t.danger_type_id = #{param.dangerInfoId} + + + and t.danger_item_id in (select id from xz_security_danger_item_record where danger_type_id = #{param.dangerInfoId}) + + + and t.danger_item_id = #{param.dangerInfoId} + and t.inspect_time =]]> concat(date_format(current_date,'%Y-%m'),'-01 00:00:00') @@ -273,6 +291,15 @@ LEFT JOIN (SELECT quality_id,MAX(rectify_time) as rectify_time FROM xz_security_quality_rectify_record GROUP BY quality_id) r ON r.quality_id = t.id WHERE t.project_sn = #{param.projectSn} + + and t.danger_type_id = #{param.dangerInfoId} + + + and t.danger_item_id in (select id from xz_security_danger_item_record where danger_type_id = #{param.dangerInfoId}) + + + and t.danger_item_id = #{param.dangerInfoId} + and t.inspect_time <= concat(#{param.endMonth},'-31 23:59:59')