高危作业申请提交后,下一步的操作人员账号中在主界面和高危作业界面中都没有相应的提示。

liujun0703-新项目开发^2^2
WenShiJun 2024-06-05 15:03:47 +08:00
parent 95f225bb9f
commit dc537a8a15
6 changed files with 95 additions and 24 deletions

View File

@ -450,6 +450,23 @@ public class HotworkCfdServiceImpl implements HotworkCfdService {
condition.put("TYPE", "2");
// 安全项检查人需处理数
info.put("safetyNum", busHotworkCfdExamineMapper.findByCondition(condition).size());
int sumCount = 0;
sumCount += Integer.parseInt(info.getString("COUNTBACK", "0"));
sumCount += Integer.parseInt(info.getString("COUNTLEADER", "0"));
sumCount += Integer.parseInt(info.getString("COUNTMONITOR", "0"));
sumCount += Integer.parseInt(info.getString("COUNTACCEPT", "0"));
sumCount += Integer.parseInt(info.getString("COUNTAPPROVE", "0"));
sumCount += Integer.parseInt(info.getString("COUNTANALYZE", "0"));
sumCount += Integer.parseInt(info.getString("safetyNum", "0"));
sumCount += Integer.parseInt(info.getString("belongingNum", "0"));
sumCount += Integer.parseInt(info.getString("COUNTGUARDIAN", "0"));
sumCount += Integer.parseInt(info.getString("confessNum", "0"));
sumCount += Integer.parseInt(info.getString("COUNTACCEPTCONFESS", "0"));
sumCount += Integer.parseInt(info.getString("COUNTCONFIRM", "0"));
sumCount += Integer.parseInt(info.getString("COUNTCONFESS", "0"));
sumCount += Integer.parseInt(info.getString("COUNTAUDIT", "0"));
info.put("SUMCOUNT", sumCount);
// 气体分析人需处理数
return info;
}

View File

@ -1350,20 +1350,29 @@
<!-- 待办作业数 -->
<select id="countCheck" parameterType="pd" resultType="pd">
SELECT
COUNT(CASE WHEN (f.APPLY_STATUS+0) &lt; 1 AND f.CREATOR = #{USER_ID} THEN f.BLINDBOARD_ID END) COUNTBACK,
COUNT(CASE WHEN (f.APPLY_STATUS + 0) &lt; 1 AND f.CREATOR = #{USER_ID} THEN f.BLINDBOARD_ID END) COUNTBACK,
COUNT(CASE WHEN f.APPLY_STATUS = '1' AND f.CONSTRUCTION_USER_ID = #{USER_ID} THEN f.BLINDBOARD_ID END) COUNTCONSTRUCTION,
COUNT(CASE WHEN f.APPLY_STATUS = '2' AND f.PRODUCTION_USER_ID = #{USER_ID} THEN f.BLINDBOARD_ID END) COUNTPRODUCTION,
COUNT(CASE WHEN f.APPLY_STATUS = '3' AND f.SAFETY_USER_ID = #{USER_ID} THEN f.BLINDBOARD_ID END) COUNTSAFETY,
COUNT(CASE WHEN f.APPLY_STATUS = '4' AND f.LEADER_USER_ID = #{USER_ID} THEN f.BLINDBOARD_ID END) COUNTLEADER,
COUNT(CASE WHEN f.APPLY_STATUS = '5' AND f.ACCEPT_USER_ID = #{USER_ID} THEN f.BLINDBOARD_ID END) COUNTACCEPT,
COUNT(CASE WHEN f.APPLY_STATUS &lt; '6' AND f.APPLY_STATUS &gt; 0 AND f.GUARDIAN_USER_ID = #{USER_ID} and f.GUARDIAN_USER_SIGNER_TIME is null THEN f.BLINDBOARD_ID END) COUNTGUARDIAN,
COUNT(CASE WHEN f.APPLY_STATUS &lt; '6' AND f.APPLY_STATUS &gt; 0 AND f.CONFESS_USER_ID = #{USER_ID} and f.CONFESS_USER_SIGNER_TIME is null THEN f.BLINDBOARD_ID END) COUNTCONFESS,
COUNT(CASE WHEN f.APPLY_STATUS &lt; '6' AND f.APPLY_STATUS &gt; 0 AND f.ACCEPT_CONFESS_USER_ID = #{USER_ID} and not exists(select 1 from GF_BLINDBOARD_ACCEPTUSER m where m.BLINDBOARD_ID = f.BLINDBOARD_ID and m.CORPINFO_ID = f.CORPINFO_ID and f.ACCEPT_CONFESS_USER_ID = m.ACCEPT_CONFESS_USER_ID) THEN f.BLINDBOARD_ID END) COUNTACCEPTCONFESS
COUNT(CASE WHEN f.APPLY_STATUS &lt; '6' AND f.APPLY_STATUS > 0 AND f.GUARDIAN_USER_ID = #{USER_ID} AND f.GUARDIAN_USER_SIGNER_TIME IS NULL THEN f.BLINDBOARD_ID END) COUNTGUARDIAN,
COUNT(CASE WHEN f.APPLY_STATUS &lt; '6' AND f.APPLY_STATUS > 0 AND f.CONFESS_USER_ID = #{USER_ID} AND f.CONFESS_USER_SIGNER_TIME IS NULL THEN f.BLINDBOARD_ID END) COUNTCONFESS,
COUNT(CASE WHEN f.APPLY_STATUS &lt; '6' AND f.APPLY_STATUS > 0 AND f.ACCEPT_CONFESS_USER_ID = #{USER_ID} AND NOT EXISTS (SELECT 1 FROM GF_BLINDBOARD_ACCEPTUSER m WHERE m.BLINDBOARD_ID = f.BLINDBOARD_ID AND m.CORPINFO_ID = f.CORPINFO_ID AND f.ACCEPT_CONFESS_USER_ID = m.ACCEPT_CONFESS_USER_ID) THEN f.BLINDBOARD_ID END) COUNTACCEPTCONFESS,
(
COUNT(CASE WHEN (f.APPLY_STATUS + 0) &lt; 1 AND f.CREATOR = #{USER_ID} THEN f.BLINDBOARD_ID END) +
COUNT(CASE WHEN f.APPLY_STATUS = '1' AND f.CONSTRUCTION_USER_ID = #{USER_ID} THEN f.BLINDBOARD_ID END) +
COUNT(CASE WHEN f.APPLY_STATUS = '2' AND f.PRODUCTION_USER_ID = #{USER_ID} THEN f.BLINDBOARD_ID END) +
COUNT(CASE WHEN f.APPLY_STATUS = '3' AND f.SAFETY_USER_ID = #{USER_ID} THEN f.BLINDBOARD_ID END) +
COUNT(CASE WHEN f.APPLY_STATUS = '4' AND f.LEADER_USER_ID = #{USER_ID} THEN f.BLINDBOARD_ID END) +
COUNT(CASE WHEN f.APPLY_STATUS = '5' AND f.ACCEPT_USER_ID = #{USER_ID} THEN f.BLINDBOARD_ID END) +
COUNT(CASE WHEN f.APPLY_STATUS &lt;'6' AND f.APPLY_STATUS > 0 AND f.GUARDIAN_USER_ID = #{USER_ID} AND f.GUARDIAN_USER_SIGNER_TIME IS NULL THEN f.BLINDBOARD_ID END) +
COUNT(CASE WHEN f.APPLY_STATUS &lt;'6' AND f.APPLY_STATUS > 0 AND f.CONFESS_USER_ID = #{USER_ID} AND f.CONFESS_USER_SIGNER_TIME IS NULL THEN f.BLINDBOARD_ID END) +
COUNT(CASE WHEN f.APPLY_STATUS &lt;'6' AND f.APPLY_STATUS > 0 AND f.ACCEPT_CONFESS_USER_ID = #{USER_ID} AND NOT EXISTS (SELECT 1 FROM GF_BLINDBOARD_ACCEPTUSER m WHERE m.BLINDBOARD_ID = f.BLINDBOARD_ID AND m.CORPINFO_ID = f.CORPINFO_ID AND f.ACCEPT_CONFESS_USER_ID = m.ACCEPT_CONFESS_USER_ID) THEN f.BLINDBOARD_ID END)
) AS SUMCOUNT
FROM <include refid="tableName"></include> f
WHERE f.ISDELETE = '0' AND f.CORPINFO_ID = #{CORPINFO_ID}
</select>
<!-- 获取编码 -->
<select id="getCode" parameterType="pd" resultType="pd">
SELECT

View File

@ -1453,9 +1453,22 @@
COUNT(CASE WHEN f.APPLY_STATUS = '3' AND f.AUDIT_USER_ID = #{USER_ID} THEN f.CONFINEDSPACE_ID END) COUNTAUDIT,
COUNT(CASE WHEN f.APPLY_STATUS = '4' AND f.APPROVE_USER_ID = #{USER_ID} THEN f.CONFINEDSPACE_ID END) COUNTAPPROVE,
COUNT(CASE WHEN f.APPLY_STATUS = '5' AND f.ACCEPT_USER_ID = #{USER_ID} THEN f.CONFINEDSPACE_ID END) COUNTACCEPT,
COUNT(CASE WHEN f.APPLY_STATUS &lt; '6' AND f.APPLY_STATUS &gt; 0 AND f.ANALYZE_USER_ID = #{USER_ID} THEN f.CONFINEDSPACE_ID END) COUNTANALYZE,
COUNT(CASE WHEN f.APPLY_STATUS &lt; '6' AND f.APPLY_STATUS &gt; 0 AND f.CONFESS_USER_ID = #{USER_ID} and f.CONFESS_USER_SIGNER_TIME is null THEN f.CONFINEDSPACE_ID END) COUNTCONFESS,
COUNT(CASE WHEN f.APPLY_STATUS &lt; '6' AND f.APPLY_STATUS &gt; 0 AND f.ACCEPT_CONFESS_USER_ID = #{USER_ID} and not exists(select 1 from GF_CONFINEDSPACE_ACCEPTUSER m where m.CONFINEDSPACE_ID = f.CONFINEDSPACE_ID and m.CORPINFO_ID = f.CORPINFO_ID and f.ACCEPT_CONFESS_USER_ID = m.ACCEPT_CONFESS_USER_ID) THEN f.CONFINEDSPACE_ID END) COUNTACCEPTCONFESS
COUNT(CASE WHEN f.APPLY_STATUS &lt; '6' AND f.APPLY_STATUS > 0 AND f.ANALYZE_USER_ID = #{USER_ID} THEN f.CONFINEDSPACE_ID END) COUNTANALYZE,
COUNT(CASE WHEN f.APPLY_STATUS &lt; '6' AND f.APPLY_STATUS > 0 AND f.CONFESS_USER_ID = #{USER_ID} and f.CONFESS_USER_SIGNER_TIME is null THEN f.CONFINEDSPACE_ID END) COUNTCONFESS,
COUNT(CASE WHEN f.APPLY_STATUS &lt; '6' AND f.APPLY_STATUS > 0 AND f.ACCEPT_CONFESS_USER_ID = #{USER_ID} and not exists(select 1 from GF_CONFINEDSPACE_ACCEPTUSER m where m.CONFINEDSPACE_ID = f.CONFINEDSPACE_ID and m.CORPINFO_ID = f.CORPINFO_ID and f.ACCEPT_CONFESS_USER_ID = m.ACCEPT_CONFESS_USER_ID) THEN f.CONFINEDSPACE_ID END) COUNTACCEPTCONFESS,
(
COUNT(CASE WHEN (f.APPLY_STATUS+0) &lt; 1 AND f.CREATOR = #{USER_ID} THEN f.CONFINEDSPACE_ID END) +
COUNT(CASE WHEN f.APPLY_STATUS = '1' AND f.CONFIRM_USER_ID = #{USER_ID} THEN f.CONFINEDSPACE_ID END) +
COUNT(CASE WHEN f.APPLY_STATUS = '5' AND f.GUARDIAN_USER_ID = #{USER_ID} and f.GUARDIAN_USER_SIGNER_TIME is null THEN f.CONFINEDSPACE_ID END) +
COUNT(CASE WHEN f.APPLY_STATUS = '3' AND f.AUDIT_USER_ID = #{USER_ID} THEN f.CONFINEDSPACE_ID END) +
COUNT(CASE WHEN f.APPLY_STATUS = '4' AND f.APPROVE_USER_ID = #{USER_ID} THEN f.CONFINEDSPACE_ID END) +
COUNT(CASE WHEN f.APPLY_STATUS = '5' AND f.ACCEPT_USER_ID = #{USER_ID} THEN f.CONFINEDSPACE_ID END) +
COUNT(CASE WHEN f.APPLY_STATUS &lt; '6' AND f.APPLY_STATUS > 0 AND f.ANALYZE_USER_ID = #{USER_ID} THEN f.CONFINEDSPACE_ID END) +
COUNT(CASE WHEN f.APPLY_STATUS &lt; '6' AND f.APPLY_STATUS > 0 AND f.CONFESS_USER_ID = #{USER_ID} and f.CONFESS_USER_SIGNER_TIME is null THEN f.CONFINEDSPACE_ID END) +
COUNT(CASE WHEN f.APPLY_STATUS &lt; '6' AND f.APPLY_STATUS > 0 AND f.ACCEPT_CONFESS_USER_ID = #{USER_ID} and not exists(select 1 from GF_CONFINEDSPACE_ACCEPTUSER m where m.CONFINEDSPACE_ID = f.CONFINEDSPACE_ID and m.CORPINFO_ID = f.CORPINFO_ID and f.ACCEPT_CONFESS_USER_ID = m.ACCEPT_CONFESS_USER_ID) THEN f.CONFINEDSPACE_ID END)
) AS SUMCOUNT
FROM <include refid="tableName"></include> f
WHERE f.ISDELETE = '0' AND f.CORPINFO_ID = #{CORPINFO_ID}
</select>

View File

@ -1517,16 +1517,25 @@
COUNT(CASE WHEN f.APPLY_STATUS = '3' AND f.APPROVE_USER_ID = #{USER_ID} THEN f.ELECTRICITY_ID END) COUNTAPPROVE,
COUNT(CASE WHEN f.APPLY_STATUS = '4' AND f.ACCEPT_USER_ID = #{USER_ID} THEN f.ELECTRICITY_ID END) COUNTACCEPT,
COUNT(CASE WHEN f.APPLY_STATUS = '1' AND f.ANALYZE_USER_ID = #{USER_ID} THEN f.ELECTRICITY_ID END) COUNTANALYZE,
COUNT(CASE WHEN f.APPLY_STATUS &lt; '5' AND f.APPLY_STATUS &gt; 0 AND f.GUARDIAN_USER_ID = #{USER_ID} and f.GUARDIAN_USER_SIGNER_TIME is null THEN f.ELECTRICITY_ID END) COUNTGUARDIAN,
COUNT(CASE WHEN f.APPLY_STATUS &lt; '5' AND f.APPLY_STATUS &gt; 0 AND f.CONFESS_USER_ID = #{USER_ID} and f.CONFESS_USER_SIGNER_TIME is null THEN f.ELECTRICITY_ID END) COUNTCONFESS,
COUNT(CASE WHEN f.APPLY_STATUS &lt; '5' AND f.APPLY_STATUS &gt; 0 AND f.ACCEPT_CONFESS_USER_ID = #{USER_ID} and
not exists(select 1 from GF_ELECTRICITY_ACCEPTUSER m where m.ELECTRICITY_ID = f.ELECTRICITY_ID and m.CORPINFO_ID = f.CORPINFO_ID and f.ACCEPT_CONFESS_USER_ID = m.ACCEPT_CONFESS_USER_ID)
THEN f.ELECTRICITY_ID END) COUNTACCEPTCONFESS
COUNT(CASE WHEN f.APPLY_STATUS &lt; '5' AND f.APPLY_STATUS > 0 AND f.GUARDIAN_USER_ID = #{USER_ID} and f.GUARDIAN_USER_SIGNER_TIME is null THEN f.ELECTRICITY_ID END) COUNTGUARDIAN,
COUNT(CASE WHEN f.APPLY_STATUS &lt; '5' AND f.APPLY_STATUS > 0 AND f.CONFESS_USER_ID = #{USER_ID} and f.CONFESS_USER_SIGNER_TIME is null THEN f.ELECTRICITY_ID END) COUNTCONFESS,
COUNT(CASE WHEN f.APPLY_STATUS &lt; '5' AND f.APPLY_STATUS > 0 AND f.ACCEPT_CONFESS_USER_ID = #{USER_ID} and not exists(select 1 from GF_ELECTRICITY_ACCEPTUSER m where m.ELECTRICITY_ID = f.ELECTRICITY_ID and m.CORPINFO_ID = f.CORPINFO_ID and f.ACCEPT_CONFESS_USER_ID = m.ACCEPT_CONFESS_USER_ID) THEN f.ELECTRICITY_ID END) COUNTACCEPTCONFESS,
(
COUNT(CASE WHEN (f.APPLY_STATUS+0) &lt; 1 AND f.CREATOR = #{USER_ID} THEN f.ELECTRICITY_ID END) +
COUNT(CASE WHEN f.APPLY_STATUS = '1' AND f.CONFIRM_USER_ID = #{USER_ID} THEN f.ELECTRICITY_ID END) +
COUNT(CASE WHEN f.APPLY_STATUS = '2' AND f.AUDIT_USER_ID = #{USER_ID} THEN f.ELECTRICITY_ID END) +
COUNT(CASE WHEN f.APPLY_STATUS = '3' AND f.APPROVE_USER_ID = #{USER_ID} THEN f.ELECTRICITY_ID END) +
COUNT(CASE WHEN f.APPLY_STATUS = '4' AND f.ACCEPT_USER_ID = #{USER_ID} THEN f.ELECTRICITY_ID END) +
COUNT(CASE WHEN f.APPLY_STATUS = '1' AND f.ANALYZE_USER_ID = #{USER_ID} THEN f.ELECTRICITY_ID END) +
COUNT(CASE WHEN f.APPLY_STATUS &lt; '5' AND f.APPLY_STATUS > 0 AND f.GUARDIAN_USER_ID = #{USER_ID} and f.GUARDIAN_USER_SIGNER_TIME is null THEN f.ELECTRICITY_ID END) +
COUNT(CASE WHEN f.APPLY_STATUS &lt; '5' AND f.APPLY_STATUS > 0 AND f.CONFESS_USER_ID = #{USER_ID} and f.CONFESS_USER_SIGNER_TIME is null THEN f.ELECTRICITY_ID END) +
COUNT(CASE WHEN f.APPLY_STATUS &lt; '5' AND f.APPLY_STATUS > 0 AND f.ACCEPT_CONFESS_USER_ID = #{USER_ID} and not exists(select 1 from GF_ELECTRICITY_ACCEPTUSER m where m.ELECTRICITY_ID = f.ELECTRICITY_ID and m.CORPINFO_ID = f.CORPINFO_ID and f.ACCEPT_CONFESS_USER_ID = m.ACCEPT_CONFESS_USER_ID) THEN f.ELECTRICITY_ID END)
) AS SUMCOUNT
FROM <include refid="tableName"></include> f
WHERE f.ISDELETE = '0' AND f.CORPINFO_ID = #{CORPINFO_ID}
</select>
<!-- 获取编码 -->
<select id="getCode" parameterType="pd" resultType="pd">
SELECT

View File

@ -1354,19 +1354,30 @@
<!-- 待办作业数 -->
<select id="countCheck" parameterType="pd" resultType="pd">
SELECT
COUNT(CASE WHEN (f.APPLY_STATUS+0) &lt; 1 AND f.CREATOR = #{USER_ID} THEN f.HIGHWORK_ID END) COUNTBACK,
COUNT(CASE WHEN (f.APPLY_STATUS + 0) &lt; 1 AND f.CREATOR = #{USER_ID} THEN f.HIGHWORK_ID END) COUNTBACK,
COUNT(CASE WHEN f.APPLY_STATUS = '1' AND f.CONSTRUCTION_USER_ID = #{USER_ID} THEN f.HIGHWORK_ID END) COUNTCONSTRUCTION,
COUNT(CASE WHEN f.APPLY_STATUS = '2' AND f.LEADER_USER_ID = #{USER_ID} THEN f.HIGHWORK_ID END) COUNTLEADER,
COUNT(CASE WHEN f.APPLY_STATUS = '3' AND f.AUDIT_USER_ID = #{USER_ID} THEN f.HIGHWORK_ID END) COUNTAUDIT,
COUNT(CASE WHEN f.APPLY_STATUS = '4' AND f.APPROVE_USER_ID = #{USER_ID} THEN f.HIGHWORK_ID END) COUNTAPPROVE,
COUNT(CASE WHEN f.APPLY_STATUS = '5' AND f.ACCEPT_USER_ID = #{USER_ID} THEN f.HIGHWORK_ID END) COUNTACCEPT,
COUNT(CASE WHEN f.APPLY_STATUS &lt; '6' AND f.APPLY_STATUS &gt; 0 AND f.GUARDIAN_USER_ID = #{USER_ID} and f.GUARDIAN_USER_SIGNER_TIME is null THEN f.HIGHWORK_ID END) COUNTGUARDIAN,
COUNT(CASE WHEN f.APPLY_STATUS &lt; '6' AND f.APPLY_STATUS &gt; 0 AND f.CONFESS_USER_ID = #{USER_ID} and f.CONFESS_USER_SIGNER_TIME is null THEN f.HIGHWORK_ID END) COUNTCONFESS,
COUNT(CASE WHEN f.APPLY_STATUS &lt; '6' AND f.APPLY_STATUS &gt; 0 AND f.ACCEPT_CONFESS_USER_ID = #{USER_ID} and not exists(select 1 from GF_HIGHWORK_ACCEPTUSER m where m.HIGHWORK_ID = f.HIGHWORK_ID and m.CORPINFO_ID = f.CORPINFO_ID and f.ACCEPT_CONFESS_USER_ID = m.ACCEPT_CONFESS_USER_ID) THEN f.HIGHWORK_ID END) COUNTACCEPTCONFESS
COUNT(CASE WHEN f.APPLY_STATUS &lt; '6' AND f.APPLY_STATUS > 0 AND f.GUARDIAN_USER_ID = #{USER_ID} AND f.GUARDIAN_USER_SIGNER_TIME IS NULL THEN f.HIGHWORK_ID END) COUNTGUARDIAN,
COUNT(CASE WHEN f.APPLY_STATUS &lt; '6' AND f.APPLY_STATUS > 0 AND f.CONFESS_USER_ID = #{USER_ID} AND f.CONFESS_USER_SIGNER_TIME IS NULL THEN f.HIGHWORK_ID END) COUNTCONFESS,
COUNT(CASE WHEN f.APPLY_STATUS &lt; '6' AND f.APPLY_STATUS > 0 AND f.ACCEPT_CONFESS_USER_ID = #{USER_ID} AND NOT EXISTS (SELECT 1 FROM GF_HIGHWORK_ACCEPTUSER m WHERE m.HIGHWORK_ID = f.HIGHWORK_ID AND m.CORPINFO_ID = f.CORPINFO_ID AND f.ACCEPT_CONFESS_USER_ID = m.ACCEPT_CONFESS_USER_ID) THEN f.HIGHWORK_ID END) COUNTACCEPTCONFESS,
-- 求和所有计数项
(
COUNT(CASE WHEN (f.APPLY_STATUS + 0) &lt; 1 AND f.CREATOR = #{USER_ID} THEN f.HIGHWORK_ID END) +
COUNT(CASE WHEN f.APPLY_STATUS = '1' AND f.CONSTRUCTION_USER_ID = #{USER_ID} THEN f.HIGHWORK_ID END) +
COUNT(CASE WHEN f.APPLY_STATUS = '2' AND f.LEADER_USER_ID = #{USER_ID} THEN f.HIGHWORK_ID END) +
COUNT(CASE WHEN f.APPLY_STATUS = '3' AND f.AUDIT_USER_ID = #{USER_ID} THEN f.HIGHWORK_ID END) +
COUNT(CASE WHEN f.APPLY_STATUS = '4' AND f.APPROVE_USER_ID = #{USER_ID} THEN f.HIGHWORK_ID END) +
COUNT(CASE WHEN f.APPLY_STATUS = '5' AND f.ACCEPT_USER_ID = #{USER_ID} THEN f.HIGHWORK_ID END) +
COUNT(CASE WHEN f.APPLY_STATUS &lt; '6' AND f.APPLY_STATUS > 0 AND f.GUARDIAN_USER_ID = #{USER_ID} AND f.GUARDIAN_USER_SIGNER_TIME IS NULL THEN f.HIGHWORK_ID END) +
COUNT(CASE WHEN f.APPLY_STATUS &lt; '6' AND f.APPLY_STATUS > 0 AND f.CONFESS_USER_ID = #{USER_ID} AND f.CONFESS_USER_SIGNER_TIME IS NULL THEN f.HIGHWORK_ID END) +
COUNT(CASE WHEN f.APPLY_STATUS &lt; '6' AND f.APPLY_STATUS > 0 AND f.ACCEPT_CONFESS_USER_ID = #{USER_ID} AND NOT EXISTS (SELECT 1 FROM GF_HIGHWORK_ACCEPTUSER m WHERE m.HIGHWORK_ID = f.HIGHWORK_ID AND m.CORPINFO_ID = f.CORPINFO_ID AND f.ACCEPT_CONFESS_USER_ID = m.ACCEPT_CONFESS_USER_ID) THEN f.HIGHWORK_ID END)
) AS SUMCOUNT
FROM <include refid="tableName"></include> f
WHERE f.ISDELETE = '0' AND f.CORPINFO_ID = #{CORPINFO_ID}
</select>
<!-- 获取编码 -->
<select id="getCode" parameterType="pd" resultType="pd">
SELECT

View File

@ -1361,13 +1361,25 @@
COUNT(CASE WHEN f.APPLY_STATUS = '3' AND f.AUDIT_USER_ID = #{USER_ID} THEN f.HOISTING_ID END) COUNTAUDIT,
COUNT(CASE WHEN f.APPLY_STATUS = '4' AND f.APPROVE_USER_ID = #{USER_ID} THEN f.HOISTING_ID END) COUNTAPPROVE,
COUNT(CASE WHEN f.APPLY_STATUS = '5' AND f.ACCEPT_USER_ID = #{USER_ID} THEN f.HOISTING_ID END) COUNTACCEPT,
COUNT(CASE WHEN f.APPLY_STATUS &lt; '6' AND f.APPLY_STATUS &gt; 0 AND f.GUARDIAN_USER_ID = #{USER_ID} and f.GUARDIAN_USER_SIGNER_TIME is null THEN f.HOISTING_ID END) COUNTGUARDIAN,
COUNT(CASE WHEN f.APPLY_STATUS &lt; '6' AND f.APPLY_STATUS &gt; 0 AND f.CONFESS_USER_ID = #{USER_ID} and f.CONFESS_USER_SIGNER_TIME is null THEN f.HOISTING_ID END) COUNTCONFESS,
COUNT(CASE WHEN f.APPLY_STATUS &lt; '6' AND f.APPLY_STATUS &gt; 0 AND f.ACCEPT_CONFESS_USER_ID = #{USER_ID} and not exists(select 1 from GF_HOISTING_ACCEPTUSER m where m.HOISTING_ID = f.HOISTING_ID and m.CORPINFO_ID = f.CORPINFO_ID and f.ACCEPT_CONFESS_USER_ID = m.ACCEPT_CONFESS_USER_ID) THEN f.HOISTING_ID END) COUNTACCEPTCONFESS
COUNT(CASE WHEN f.APPLY_STATUS &lt; '6' AND f.APPLY_STATUS > 0 AND f.GUARDIAN_USER_ID = #{USER_ID} and f.GUARDIAN_USER_SIGNER_TIME is null THEN f.HOISTING_ID END) COUNTGUARDIAN,
COUNT(CASE WHEN f.APPLY_STATUS &lt; '6' AND f.APPLY_STATUS > 0 AND f.CONFESS_USER_ID = #{USER_ID} and f.CONFESS_USER_SIGNER_TIME is null THEN f.HOISTING_ID END) COUNTCONFESS,
COUNT(CASE WHEN f.APPLY_STATUS &lt; '6' AND f.APPLY_STATUS > 0 AND f.ACCEPT_CONFESS_USER_ID = #{USER_ID} and not exists(select 1 from GF_HOISTING_ACCEPTUSER m where m.HOISTING_ID = f.HOISTING_ID and m.CORPINFO_ID = f.CORPINFO_ID and f.ACCEPT_CONFESS_USER_ID = m.ACCEPT_CONFESS_USER_ID) THEN f.HOISTING_ID END) COUNTACCEPTCONFESS,
(
COUNT(CASE WHEN (f.APPLY_STATUS+0) &lt; 1 AND f.CREATOR = #{USER_ID} THEN f.HOISTING_ID END) +
COUNT(CASE WHEN f.APPLY_STATUS = '1' AND f.LEADER_USER_ID = #{USER_ID} THEN f.HOISTING_ID END) +
COUNT(CASE WHEN f.APPLY_STATUS = '2' AND f.CONSTRUCTION_USER_ID = #{USER_ID} THEN f.HOISTING_ID END) +
COUNT(CASE WHEN f.APPLY_STATUS = '3' AND f.AUDIT_USER_ID = #{USER_ID} THEN f.HOISTING_ID END) +
COUNT(CASE WHEN f.APPLY_STATUS = '4' AND f.APPROVE_USER_ID = #{USER_ID} THEN f.HOISTING_ID END) +
COUNT(CASE WHEN f.APPLY_STATUS = '5' AND f.ACCEPT_USER_ID = #{USER_ID} THEN f.HOISTING_ID END) +
COUNT(CASE WHEN f.APPLY_STATUS &lt; '6' AND f.APPLY_STATUS > 0 AND f.GUARDIAN_USER_ID = #{USER_ID} and f.GUARDIAN_USER_SIGNER_TIME is null THEN f.HOISTING_ID END) +
COUNT(CASE WHEN f.APPLY_STATUS &lt; '6' AND f.APPLY_STATUS > 0 AND f.CONFESS_USER_ID = #{USER_ID} and f.CONFESS_USER_SIGNER_TIME is null THEN f.HOISTING_ID END) +
COUNT(CASE WHEN f.APPLY_STATUS &lt; '6' AND f.APPLY_STATUS > 0 AND f.ACCEPT_CONFESS_USER_ID = #{USER_ID} and not exists(select 1 from GF_HOISTING_ACCEPTUSER m where m.HOISTING_ID = f.HOISTING_ID and m.CORPINFO_ID = f.CORPINFO_ID and f.ACCEPT_CONFESS_USER_ID = m.ACCEPT_CONFESS_USER_ID) THEN f.HOISTING_ID END)
) AS SUMCOUNT
FROM <include refid="tableName"></include> f
WHERE f.ISDELETE = '0' AND f.CORPINFO_ID = #{CORPINFO_ID}
</select>
<!-- 获取编码 -->
<select id="getCode" parameterType="pd" resultType="pd">
SELECT