改低风险、一般风险、较大风险、重大风险

This commit is contained in:
guoshengxiong 2025-11-28 15:35:55 +08:00
parent ef725e0d24
commit 0f59a1c03f
3 changed files with 20 additions and 16 deletions

View File

@ -785,22 +785,26 @@ public class ParamEnum {
} }
/** /**
* 紧急程度1一般2严重3紧要 *
*/ */
@JsonFormat(shape = JsonFormat.Shape.OBJECT) @JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum QualityInspectionRecordUrgentLevelEnum implements BaseEnum { public enum QualityInspectionRecordUrgentLevelEnum implements BaseEnum {
/** /**
* 一般 * 低风险
*/ */
GENERAL(1, "一般"), YB(4, "低风险"),
/** /**
* 严重 * 一般风险
*/ */
SERIOUS(2, "严重"), JD(3, "一般风险"),
/** /**
* 紧要 * 较大风险
*/ */
CRITICAL(3, "紧要"), ZD(2, "较大风险"),
/**
* 重大风险
*/
TBZD(1, "重大风险"),
; ;
private Integer value; private Integer value;

View File

@ -348,7 +348,7 @@ public class WorkerInfoServiceImpl extends ServiceImpl<WorkerInfoMapper, WorkerI
map.put("workerInfos", collect); map.put("workerInfos", collect);
} }
int pageNo = Integer.parseInt(map.getOrDefault("pageNo", 1).toString()); int pageNo = Integer.parseInt(map.getOrDefault("pageNo", 1).toString());
int pageSize = Integer.parseInt(map.getOrDefault("pageSize", 10000).toString()); int pageSize = Integer.parseInt(map.getOrDefault("pageSize", 50000).toString());
map.put("workerInfoGreenScore", PropertiesUtil.getWorkerInfoGreenScore()); map.put("workerInfoGreenScore", PropertiesUtil.getWorkerInfoGreenScore());
map.put("workerInfoRedScore", PropertiesUtil.getWorkerInfoRedScore()); map.put("workerInfoRedScore", PropertiesUtil.getWorkerInfoRedScore());
if (SecurityUtils.getUser() != null) { if (SecurityUtils.getUser() != null) {

View File

@ -24,7 +24,7 @@
#{param.inspectTime_end}) #{param.inspectTime_end})
</if> </if>
<if test="param.enumType != null and param.enumType != ''"> <if test="param.enumType != null and param.enumType != ''">
and t.level = #{param.enumType} and t.priority_name_dic = #{param.enumType}
</if> </if>
<if test="param.isOverdueRectification == '1'.toString()"> <if test="param.isOverdueRectification == '1'.toString()">
and (t.status = 2 AND now() > t.change_limit_time) and (t.status = 2 AND now() > t.change_limit_time)
@ -179,10 +179,10 @@
IFNULL(SUM((CASE WHEN t.urgent_level = 2 THEN 1 ELSE 0 END)), 0) yzUrgentLevelNum, IFNULL(SUM((CASE WHEN t.urgent_level = 2 THEN 1 ELSE 0 END)), 0) yzUrgentLevelNum,
IFNULL(SUM((CASE WHEN t.urgent_level = 3 THEN 1 ELSE 0 END)), 0) jyUrgentLevelNum, IFNULL(SUM((CASE WHEN t.urgent_level = 3 THEN 1 ELSE 0 END)), 0) jyUrgentLevelNum,
IFNULL(SUM((CASE WHEN t.record_type = 1 THEN 1 ELSE 0 END)), 0) dangerNum, IFNULL(SUM((CASE WHEN t.record_type = 1 THEN 1 ELSE 0 END)), 0) dangerNum,
IFNULL(SUM((CASE WHEN t.level = 1 THEN 1 ELSE 0 END)), 0) greatFaultLevelNum, IFNULL(SUM((CASE WHEN t.priority_name_dic = 1 THEN 1 ELSE 0 END)), 0) greatFaultLevelNum,
IFNULL(SUM((CASE WHEN t.level = 2 THEN 1 ELSE 0 END)), 0) largerRiskNum, IFNULL(SUM((CASE WHEN t.priority_name_dic = 2 THEN 1 ELSE 0 END)), 0) largerRiskNum,
IFNULL(SUM((CASE WHEN t.level = 3 THEN 1 ELSE 0 END)), 0) generalRiskNum, IFNULL(SUM((CASE WHEN t.priority_name_dic = 3 THEN 1 ELSE 0 END)), 0) generalRiskNum,
IFNULL(SUM((CASE WHEN t.level = 4 THEN 1 ELSE 0 END)), 0) lowRiskNum, IFNULL(SUM((CASE WHEN t.priority_name_dic = 4 THEN 1 ELSE 0 END)), 0) lowRiskNum,
if(FLOOR((DAYOFMONTH(t.inspect_time) - 1) / 7) > 3, 3, if(FLOOR((DAYOFMONTH(t.inspect_time) - 1) / 7) > 3, 3,
FLOOR((DAYOFMONTH(t.inspect_time) - 1) / 7)) as whichWeekOfMonth, FLOOR((DAYOFMONTH(t.inspect_time) - 1) / 7)) as whichWeekOfMonth,
date_format(t.inspect_time, '%Y-%m') as yearMonth, date_format(t.inspect_time, '%Y-%m') as yearMonth,
@ -635,7 +635,7 @@
</select> </select>
<select id="countQualityInspectionRecordUrgentLevel" resultType="com.zhgd.xmgl.base.entity.vo.SectorOneVo"> <select id="countQualityInspectionRecordUrgentLevel" resultType="com.zhgd.xmgl.base.entity.vo.SectorOneVo">
select urgent_level enumType, count(*) count select priority_name_dic enumType, count(*) count
from xz_security_quality_inspection_record from xz_security_quality_inspection_record
where 1 = 1 where 1 = 1
and project_sn = #{projectSn} and project_sn = #{projectSn}
@ -651,7 +651,7 @@
'%Y-%m-%d'), ' 23:59:59'), '%Y-%m-%d'), ' 23:59:59'),
#{createTime_end}) #{createTime_end})
</if> </if>
group by urgent_level group by priority_name_dic
</select> </select>
<select id="countQualityInspectionRecordRegion" resultType="com.zhgd.xmgl.base.entity.vo.TrendOneVo"> <select id="countQualityInspectionRecordRegion" resultType="com.zhgd.xmgl.base.entity.vo.TrendOneVo">
@ -691,7 +691,7 @@
</select> </select>
<select id="countDangerLevel" resultType="com.zhgd.xmgl.base.entity.vo.SectorOneVo"> <select id="countDangerLevel" resultType="com.zhgd.xmgl.base.entity.vo.SectorOneVo">
select count(*) count, t.level as enumType select count(*) count, t.priority_name_dic as enumType
from xz_security_quality_inspection_record t from xz_security_quality_inspection_record t
where project_sn = #{param.projectSn} where project_sn = #{param.projectSn}
and t.record_type = 1 and t.record_type = 1