|
|
@ -577,7 +577,7 @@ |
|
|
|
<select id="selectOneItemStatistics" resultType="com.elink.esua.epdc.dto.item.result.ItemStatisticsResultDTO"> |
|
|
|
SELECT |
|
|
|
pendingTable.pendingHandleNum, |
|
|
|
closingTable.closeingCaseNum, |
|
|
|
closingTable.closingCaseNum, |
|
|
|
closedTable.closedNum |
|
|
|
FROM |
|
|
|
( |
|
|
@ -591,20 +591,19 @@ |
|
|
|
WHERE |
|
|
|
item.DEL_FLAG = '0' |
|
|
|
AND item.ITEM_STATE = '0' |
|
|
|
AND dept.DEPT_ID IN |
|
|
|
<foreach item="deptId" collection="formDto.deptIdList" open="(" separator="," close=")"> |
|
|
|
#{deptId} |
|
|
|
</foreach> |
|
|
|
|
|
|
|
<if test='formDto.deptId != null and formDto.deptId != ""'> |
|
|
|
AND dept.DEPT_ID = #{formDto.deptId} |
|
|
|
AND dept.DEPT_ID IN |
|
|
|
<foreach item="deptIdItem" collection="deptIdList" open="(" separator="," close=")"> |
|
|
|
#{deptIdItem} |
|
|
|
</foreach> |
|
|
|
<if test='deptId != null and deptId != ""'> |
|
|
|
AND dept.DEPT_ID = #{deptId} |
|
|
|
</if> |
|
|
|
|
|
|
|
) pendingTable |
|
|
|
INNER JOIN ( |
|
|
|
SELECT |
|
|
|
'ITEM_COUNT' AS keystr, |
|
|
|
COUNT( * ) AS closeingCaseNum |
|
|
|
COUNT( * ) AS closingCaseNum |
|
|
|
FROM |
|
|
|
epdc_item item |
|
|
|
LEFT JOIN epdc_item_dept dept ON item.id = dept.ITEM_ID |
|
|
@ -612,12 +611,12 @@ |
|
|
|
WHERE |
|
|
|
item.DEL_FLAG = '0' |
|
|
|
AND item.ITEM_STATE = '10' |
|
|
|
AND dept.DEPT_ID IN |
|
|
|
<foreach item="deptId" collection="formDto.deptIdList" open="(" separator="," close=")"> |
|
|
|
#{deptId} |
|
|
|
</foreach> |
|
|
|
<if test='formDto.deptId != null and formDto.deptId != ""'> |
|
|
|
AND dept.DEPT_ID = #{formDto.deptId} |
|
|
|
AND dept.DEPT_ID IN |
|
|
|
<foreach item="deptIdItem" collection="deptIdList" open="(" separator="," close=")"> |
|
|
|
#{deptIdItem} |
|
|
|
</foreach> |
|
|
|
<if test='deptId != null and deptId != ""'> |
|
|
|
AND dept.DEPT_ID = #{deptId} |
|
|
|
</if> |
|
|
|
) closingTable ON pendingTable.keystr = closingTable.keystr |
|
|
|
INNER JOIN ( |
|
|
@ -633,11 +632,11 @@ |
|
|
|
AND item.ITEM_STATE = '5' |
|
|
|
|
|
|
|
AND dept.DEPT_ID IN |
|
|
|
<foreach item="deptId" collection="formDto.deptIdList" open="(" separator="," close=")"> |
|
|
|
#{deptId} |
|
|
|
<foreach item="deptIdItem" collection="deptIdList" open="(" separator="," close=")"> |
|
|
|
#{deptIdItem} |
|
|
|
</foreach> |
|
|
|
<if test='formDto.deptId != null and formDto.deptId != ""'> |
|
|
|
AND dept.DEPT_ID = #{formDto.deptId} |
|
|
|
<if test='deptId != null and deptId != ""'> |
|
|
|
AND dept.DEPT_ID = #{deptId} |
|
|
|
</if> |
|
|
|
) closedTable ON pendingTable.keystr = closedTable.keystr |
|
|
|
</select> |
|
|
|