feat(): 隐患列表查询条件维护、暂存不做校验

dev
lishiwei 2026-07-07 17:01:05 +08:00
parent 6b4ab1e961
commit 60d99fc026
5 changed files with 40 additions and 6 deletions

View File

@ -79,8 +79,10 @@ public class KeyProjectAddExe {
// } // }
// 流程一(手动创建):处罚人员必填 // 流程一(手动创建):处罚人员必填
if (CreateSourceEnum.MANUAL.getCode().equals(cmd.getCreateSource()) && CollUtil.isEmpty(penaltyPersonnelAddCmdList)) { if (!cmd.getApplyStatus().equals(KeyProjectApplyStatusEnum.TEMPORARY_SAVE.getCode())) {
throw new BizException("处罚人员为必填项"); if (CreateSourceEnum.MANUAL.getCode().equals(cmd.getCreateSource()) && CollUtil.isEmpty(penaltyPersonnelAddCmdList)) {
throw new BizException("处罚人员为必填项");
}
} }
KeyProjectE keyProjectE = new KeyProjectE(); KeyProjectE keyProjectE = new KeyProjectE();

View File

@ -14,18 +14,21 @@ import java.util.stream.Collectors;
public enum MenuEnum { public enum MenuEnum {
// 重点作业情况统计 // 重点作业情况统计
jgdzdzyqktj("/keyProject/container/supervision/keyStats/list", "jgd-zdzyqktj"), jgdzdzyqktj("/keyProject/container/supervision/keyStats/list", "jgd-zdzyqktj"),
jgdzdzyqktjHiddenList("/keyProject/container/supervision/keyStats/HiddenList", "jgd-zdzyqktj"),
// 重点作业管理 // 重点作业管理
jgdzdzygl("/keyProject/container/supervision/keyProjectManage/keyProjectManage/list", "jgd-zdzygl"), jgdzdzygl("/keyProject/container/supervision/keyProjectManage/keyProjectManage/list", "jgd-zdzygl"),
// 重点作业确认 // 重点作业确认
jgdzdzyqr("/keyProject/container/supervision/keyProjectManage/keyProjectConfirm/list", "jgd-zdzyqr"), jgdzdzyqr("/keyProject/container/supervision/keyProjectManage/keyProjectConfirm/list", "jgd-zdzyqr"),
// 重点作业情况统计 // 重点作业情况统计
qydzdzyqktj("/keyProject/container/branchCompany/keyStats/list", "qyd-zdzyqktj"), qydzdzyqktj("/keyProject/container/branchCompany/keyStats/list", "qyd-zdzyqktj"),
qydzdzyqktjHiddenList("/keyProject/container/branchCompany/keyStats/HiddenList", "qyd-zdzyqktj"),
// 重点作业管理 // 重点作业管理
qydzdzygl("/keyProject/container/branchCompany/keyProjectManage/keyProjectManage/list", "qyd-zdzygl"), qydzdzygl("/keyProject/container/branchCompany/keyProjectManage/keyProjectManage/list", "qyd-zdzygl"),
// 重点作业确认 // 重点作业确认
qydzdzyqr("/keyProject/container/branchCompany/keyProjectManage/keyProjectConfirm/list", "qyd-zdzyqr"), qydzdzyqr("/keyProject/container/branchCompany/keyProjectManage/keyProjectConfirm/list", "qyd-zdzyqr"),
// 重点作业情况统计 // 重点作业情况统计
xgfzdzyqktj("/keyProject/container/stakeholder/keyStats/list", "xgf-zdzyqktj"), xgfzdzyqktj("/keyProject/container/stakeholder/keyStats/list", "xgf-zdzyqktj"),
xgfzdzyqktjHiddenList("/keyProject/container/stakeholder/keyStats/HiddenList", "xgf-zdzyqktj"),
// 重点作业申请 // 重点作业申请
xgfzdzysq("/keyProject/container/stakeholder/keyProjectApple/list", "xgf-zdzysq"), xgfzdzysq("/keyProject/container/stakeholder/keyProjectApple/list", "xgf-zdzysq"),
// 检查发起 // 检查发起

View File

@ -80,6 +80,10 @@ public class HiddenPenaltyDO extends BaseDO {
@TableField(exist = false) @TableField(exist = false)
private String xgfMasterUserName; private String xgfMasterUserName;
@ApiModelProperty(value = "项目负责人ID")
@TableField(exist = false)
private Long xgfMasterUserId;
@ApiModelProperty(value = "隐患来源") @ApiModelProperty(value = "隐患来源")
@TableField(exist = false) @TableField(exist = false)
private Integer hiddenSource; private Integer hiddenSource;

View File

@ -43,8 +43,12 @@
<if test="params.endTime != null and params.endTime != ''"> <if test="params.endTime != null and params.endTime != ''">
and h.create_time &lt;= CONCAT(#{params.endTime}, ' 23:59:59') and h.create_time &lt;= CONCAT(#{params.endTime}, ' 23:59:59')
</if> </if>
<if test="params.keyProjectId != null and params.keyProjectId != ''"> <if test="params.keyProjectId != null and params.keyProjectId != '' and params.keyProjectId != 'undefined' and params.keyProjectId != 'null'">
and i.key_project_id = #{params.keyProjectId} and (
i.key_project_id = #{params.keyProjectId}
OR
kp2.key_project_id = #{params.keyProjectId}
)
</if> </if>
<if test="params.projectName != null and params.projectName != ''"> <if test="params.projectName != null and params.projectName != ''">
and ( and (
@ -84,6 +88,13 @@
AND hf_sub.find_corp_id = #{params.findCorpinfoId} AND hf_sub.find_corp_id = #{params.findCorpinfoId}
) )
</if> </if>
<if test="params.menuPath == '/keyProject/container/supervision/keyStats/HiddenList'
or params.menuPath == '/keyProject/container/stakeholder/keyStats/HiddenList'">
AND (
h.source NOT IN (2, 3)
OR i.status IN (3, 5)
)
</if>
<if test="params.rectificationCorpId != null"> <if test="params.rectificationCorpId != null">
and h.rectification_corp_id = #{params.rectificationCorpId} and h.rectification_corp_id = #{params.rectificationCorpId}
</if> </if>
@ -107,6 +118,9 @@
select select
h.*, h.*,
IFNULL(kp.project_name, kp2.project_name) AS project_name, IFNULL(kp.project_name, kp2.project_name) AS project_name,
h.is_related AS is_related,
h.program_id AS program_id,
h.program_name AS program_name,
rci.corp_name as rectification_corp_name, rci.corp_name as rectification_corp_name,
ru.name as rectification_user_name, ru.name as rectification_user_name,
rd.name as rectification_department_name, rd.name as rectification_department_name,

View File

@ -10,6 +10,7 @@
pu.name AS penalized_user_name, pu.name AS penalized_user_name,
xci.corp_name AS xgf_corpinfo_name, xci.corp_name AS xgf_corpinfo_name,
IFNULL(kp.project_name, kp2.project_name) AS project_name, IFNULL(kp.project_name, kp2.project_name) AS project_name,
IFNULL(kp.xgf_master_user_id, kp2.xgf_master_user_id) AS xgf_master_user_id,
IFNULL(xmu.name, xmu2.name) AS xgf_master_user_name, IFNULL(xmu.name, xmu2.name) AS xgf_master_user_name,
h.id AS hidden_table_id, h.id AS hidden_table_id,
h.foreign_key AS foreign_key, h.foreign_key AS foreign_key,
@ -121,7 +122,9 @@
pu.name AS penalized_user_name, pu.name AS penalized_user_name,
xci.corp_name AS xgf_corpinfo_name, xci.corp_name AS xgf_corpinfo_name,
IFNULL(kp.project_name, kp2.project_name) AS project_name, IFNULL(kp.project_name, kp2.project_name) AS project_name,
IFNULL(kp.xgf_master_user_id, kp2.xgf_master_user_id) AS xgf_master_user_id,
IFNULL(xmu.name, xmu2.name) AS xgf_master_user_name, IFNULL(xmu.name, xmu2.name) AS xgf_master_user_name,
h.id AS hidden_table_id,
h.source AS hidden_source, h.source AS hidden_source,
h.hidden_desc AS hidden_desc, h.hidden_desc AS hidden_desc,
h.create_name AS find_user_name h.create_name AS find_user_name
@ -148,6 +151,7 @@
pu.name AS penalized_user_name, pu.name AS penalized_user_name,
xci.corp_name AS xgf_corpinfo_name, xci.corp_name AS xgf_corpinfo_name,
IFNULL(kp.project_name, kp2.project_name) AS project_name, IFNULL(kp.project_name, kp2.project_name) AS project_name,
IFNULL(kp.xgf_master_user_id, kp2.xgf_master_user_id) AS xgf_master_user_id,
IFNULL(xmu.name, xmu2.name) AS xgf_master_user_name, IFNULL(xmu.name, xmu2.name) AS xgf_master_user_name,
h.source AS hidden_source, h.source AS hidden_source,
h.hidden_desc AS hidden_desc, h.hidden_desc AS hidden_desc,
@ -242,7 +246,10 @@
</if> </if>
</where> </where>
GROUP BY hp.id GROUP BY hp.id
ORDER BY hpf.feedback_time DESC, hp.create_time DESC, hpf.id DESC ORDER BY hp.feedback_status ASC,
IFNULL(hpf.feedback_time, hp.penalty_time) DESC,
hp.create_time DESC,
hp.id DESC
</select> </select>
<select id="getFeedbackByPenaltyId" resultType="com.zcloud.key.project.persistence.dataobject.hidden.HiddenPenaltyFeedbackDO"> <select id="getFeedbackByPenaltyId" resultType="com.zcloud.key.project.persistence.dataobject.hidden.HiddenPenaltyFeedbackDO">
@ -285,10 +292,14 @@
<select id="countFeedbackByUserId" resultType="java.lang.Long"> <select id="countFeedbackByUserId" resultType="java.lang.Long">
SELECT COUNT(DISTINCT hp.id) SELECT COUNT(DISTINCT hp.id)
FROM hidden_penalty hp FROM hidden_penalty hp
LEFT JOIN key_project kp ON kp.key_project_id = hp.key_project_id AND kp.delete_enum = 'FALSE'
WHERE hp.delete_enum = 'FALSE' WHERE hp.delete_enum = 'FALSE'
AND hp.fine_flag = 1 AND hp.fine_flag = 1
AND hp.feedback_status = 0 AND hp.feedback_status = 0
AND hp.penalized_user_id = #{userId} AND (
hp.penalized_user_id = #{userId}
OR kp.xgf_master_user_id = #{userId}
)
</select> </select>
</mapper> </mapper>