全部整改记录中通过安全问题库进行筛选隐患
This commit is contained in:
parent
ad3b547aeb
commit
5549fe4386
@ -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<RecordVo> queryPageList(@RequestBody Map<String, Object> map) {
|
||||
|
||||
@ -2,6 +2,15 @@
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.zhgd.xmgl.modules.quality.mapper.QualityInspectionRecordMapper">
|
||||
<sql id="whereCondition">
|
||||
<if test="param.dangerInfoLevel == '1'.toString() and param.dangerInfoId != null and param.dangerInfoId != ''">
|
||||
and t.danger_type_id = #{param.dangerInfoId}
|
||||
</if>
|
||||
<if test="param.dangerInfoLevel == '2'.toString() and param.dangerInfoId != null and param.dangerInfoId != ''">
|
||||
and t.danger_item_id in (select id from danger_item_record where danger_type_id = #{param.dangerInfoId})
|
||||
</if>
|
||||
<if test="param.dangerInfoLevel == '3'.toString() and param.dangerInfoId != null and param.dangerInfoId != ''">
|
||||
and t.danger_item_id = #{param.dangerInfoId}
|
||||
</if>
|
||||
<if test="param.inspectTime_begin != null and param.inspectTime_begin != ''">
|
||||
and t.inspect_time <![CDATA[>=]]> #{param.inspectTime_begin}
|
||||
</if>
|
||||
@ -183,6 +192,15 @@
|
||||
and t.status != 6
|
||||
<include refid="whereCondition">
|
||||
</include>
|
||||
<if test="param.dangerInfoLevel == '1'.toString() and param.dangerInfoId != null and param.dangerInfoId != ''">
|
||||
and t.danger_type_id = #{param.dangerInfoId}
|
||||
</if>
|
||||
<if test="param.dangerInfoLevel == '2'.toString() and param.dangerInfoId != null and param.dangerInfoId != ''">
|
||||
and t.danger_item_id in (select id from danger_item_record where danger_type_id = #{param.dangerInfoId})
|
||||
</if>
|
||||
<if test="param.dangerInfoLevel == '3'.toString() and param.dangerInfoId != null and param.dangerInfoId != ''">
|
||||
and t.danger_item_id = #{param.dangerInfoId}
|
||||
</if>
|
||||
<if test="param.isStatsByWeek == '1'.toString()">
|
||||
and t.inspect_time <![CDATA[>=]]> concat(date_format(current_date,'%Y-%m'),'-01 00:00:00')
|
||||
</if>
|
||||
@ -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}
|
||||
<if test="param.dangerInfoLevel == '1'.toString() and param.dangerInfoId != null and param.dangerInfoId != ''">
|
||||
and a.danger_type_id = #{param.dangerInfoId}
|
||||
</if>
|
||||
<if test="param.dangerInfoLevel == '2'.toString() and param.dangerInfoId != null and param.dangerInfoId != ''">
|
||||
and a.danger_item_id in (select id from danger_item_record where danger_type_id = #{param.dangerInfoId})
|
||||
</if>
|
||||
<if test="param.dangerInfoLevel == '3'.toString() and param.dangerInfoId != null and param.dangerInfoId != ''">
|
||||
and a.danger_item_id = #{param.dangerInfoId}
|
||||
</if>
|
||||
<if test="param.recordStatus == '8'.toString() ">
|
||||
and a.status != 6
|
||||
</if>
|
||||
|
||||
@ -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<XzSecurityRecordVo> queryPageList(@RequestBody Map<String, Object> map) {
|
||||
|
||||
@ -2,6 +2,15 @@
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.zhgd.xmgl.modules.xz.security.mapper.XzSecurityQualityInspectionRecordMapper">
|
||||
<sql id="whereCondition">
|
||||
<if test="param.dangerInfoLevel == '1'.toString() and param.dangerInfoId != null and param.dangerInfoId != ''">
|
||||
and t.danger_type_id = #{param.dangerInfoId}
|
||||
</if>
|
||||
<if test="param.dangerInfoLevel == '2'.toString() and param.dangerInfoId != null and param.dangerInfoId != ''">
|
||||
and t.danger_item_id in (select id from xz_security_danger_item_record where danger_type_id = #{param.dangerInfoId})
|
||||
</if>
|
||||
<if test="param.dangerInfoLevel == '3'.toString() and param.dangerInfoId != null and param.dangerInfoId != ''">
|
||||
and t.danger_item_id = #{param.dangerInfoId}
|
||||
</if>
|
||||
<if test="param.type != null and param.type != ''">
|
||||
and t.type = #{param.type}
|
||||
</if>
|
||||
@ -185,6 +194,15 @@
|
||||
and t.status != 6
|
||||
<include refid="whereCondition">
|
||||
</include>
|
||||
<if test="param.dangerInfoLevel == '1'.toString() and param.dangerInfoId != null and param.dangerInfoId != ''">
|
||||
and t.danger_type_id = #{param.dangerInfoId}
|
||||
</if>
|
||||
<if test="param.dangerInfoLevel == '2'.toString() and param.dangerInfoId != null and param.dangerInfoId != ''">
|
||||
and t.danger_item_id in (select id from xz_security_danger_item_record where danger_type_id = #{param.dangerInfoId})
|
||||
</if>
|
||||
<if test="param.dangerInfoLevel == '3'.toString() and param.dangerInfoId != null and param.dangerInfoId != ''">
|
||||
and t.danger_item_id = #{param.dangerInfoId}
|
||||
</if>
|
||||
<if test="param.isStatsByWeek == '1'.toString()">
|
||||
and t.inspect_time <![CDATA[>=]]> concat(date_format(current_date,'%Y-%m'),'-01 00:00:00')
|
||||
</if>
|
||||
@ -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}
|
||||
<if test="param.dangerInfoLevel == '1'.toString() and param.dangerInfoId != null and param.dangerInfoId != ''">
|
||||
and t.danger_type_id = #{param.dangerInfoId}
|
||||
</if>
|
||||
<if test="param.dangerInfoLevel == '2'.toString() and param.dangerInfoId != null and param.dangerInfoId != ''">
|
||||
and t.danger_item_id in (select id from xz_security_danger_item_record where danger_type_id = #{param.dangerInfoId})
|
||||
</if>
|
||||
<if test="param.dangerInfoLevel == '3'.toString() and param.dangerInfoId != null and param.dangerInfoId != ''">
|
||||
and t.danger_item_id = #{param.dangerInfoId}
|
||||
</if>
|
||||
<if test="param.endMonth != null and param.endMonth != '' ">
|
||||
and t.inspect_time <= concat(#{param.endMonth},'-31 23:59:59')
|
||||
</if>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user