|
@ -655,6 +655,8 @@ |
|
|
p.back_ground, |
|
|
p.back_ground, |
|
|
( CASE WHEN p.`STATUS` = 'pending' THEN '处理中' WHEN p.`STATUS` = 'closed' THEN '已结案' ELSE '' END ) AS status, |
|
|
( CASE WHEN p.`STATUS` = 'pending' THEN '处理中' WHEN p.`STATUS` = 'closed' THEN '已结案' ELSE '' END ) AS status, |
|
|
p.`status` AS statusValue, |
|
|
p.`status` AS statusValue, |
|
|
|
|
|
( CASE WHEN p.CLOSED_STATUS = 'resolved' THEN '已解决' WHEN p.CLOSED_STATUS = 'unresolved' THEN '无需解决' ELSE '' END ) AS closedStatus, |
|
|
|
|
|
p.CLOSED_STATUS AS closedStatusValue, |
|
|
pc.category_pids, |
|
|
pc.category_pids, |
|
|
pc.category_id, |
|
|
pc.category_id, |
|
|
pp.public_reply, |
|
|
pp.public_reply, |
|
@ -671,16 +673,24 @@ |
|
|
group by project_id |
|
|
group by project_id |
|
|
ORDER BY created_time desc |
|
|
ORDER BY created_time desc |
|
|
)pc ON p.id = pc.project_id |
|
|
)pc ON p.id = pc.project_id |
|
|
<if test="firstIdList != null and firstIdList.size() > 0"><!-- 一类查询条件 --> |
|
|
<if test="(firstIdList != null and firstIdList.size() > 0) and (secondIdList == null or secondIdList.size() == 0)"><!-- 一类查询条件 --> |
|
|
<foreach collection="firstIdList" item="firstId" open="AND pc.category_pids IN (" separator="," close=")"> |
|
|
<foreach collection="firstIdList" item="firstId" open="AND pc.category_pids IN (" separator="," close=")"> |
|
|
#{firstId} |
|
|
#{firstId} |
|
|
</foreach> |
|
|
</foreach> |
|
|
</if> |
|
|
</if> |
|
|
<if test="secondIdList != null and secondIdList.size() > 0"><!-- 二类查询条件 --> |
|
|
<if test="(secondIdList != null and secondIdList.size() > 0) and (firstIdList == null or firstIdList.size() == 0)"><!-- 二类查询条件 --> |
|
|
<foreach collection="secondIdList" item="secondId" open="AND pc.category_id IN (" separator="," close=")"> |
|
|
<foreach collection="secondIdList" item="secondId" open="AND pc.category_id IN (" separator="," close=")"> |
|
|
#{secondId} |
|
|
#{secondId} |
|
|
</foreach> |
|
|
</foreach> |
|
|
</if> |
|
|
</if> |
|
|
|
|
|
<if test="(secondIdList != null and secondIdList.size() > 0) and (firstIdList != null and firstIdList.size() > 0)"><!-- 二类查询条件 --> |
|
|
|
|
|
<foreach collection="firstIdList" item="firstId" open="AND (pc.CATEGORY_PIDS IN (" separator="," close=")"> |
|
|
|
|
|
#{firstId} |
|
|
|
|
|
</foreach> |
|
|
|
|
|
<foreach collection="secondIdList" item="secondId" open="OR pc.CATEGORY_ID IN (" separator="," close="))"> |
|
|
|
|
|
#{secondId} |
|
|
|
|
|
</foreach> |
|
|
|
|
|
</if> |
|
|
LEFT JOIN project_process pp ON p.id = pp.project_id AND pp.operation = 'close' |
|
|
LEFT JOIN project_process pp ON p.id = pp.project_id AND pp.operation = 'close' |
|
|
INNER JOIN project_process ppc ON p.id = ppc.project_id AND ppc.operation = 'created' |
|
|
INNER JOIN project_process ppc ON p.id = ppc.project_id AND ppc.operation = 'created' |
|
|
<if test="staffName != null and staffName != ''"><!-- 上报人姓名对应查询条件,上报人就是对应的创建节点的人 --> |
|
|
<if test="staffName != null and staffName != ''"><!-- 上报人姓名对应查询条件,上报人就是对应的创建节点的人 --> |
|
@ -722,6 +732,9 @@ |
|
|
<if test="null != endTime and endTime != '' "> |
|
|
<if test="null != endTime and endTime != '' "> |
|
|
AND p.created_time <![CDATA[ <= ]]> #{endTime} |
|
|
AND p.created_time <![CDATA[ <= ]]> #{endTime} |
|
|
</if> |
|
|
</if> |
|
|
|
|
|
<if test="closedStatus != null and closedStatus != ''"> |
|
|
|
|
|
AND p.CLOSED_STATUS = #{closedStatus} |
|
|
|
|
|
</if> |
|
|
</select> |
|
|
</select> |
|
|
<select id="getIndexExplainTreeByPid" resultType="com.epmet.dto.form.FileDTO"><!-- 项目创建节点的图片附件 --> |
|
|
<select id="getIndexExplainTreeByPid" resultType="com.epmet.dto.form.FileDTO"><!-- 项目创建节点的图片附件 --> |
|
|
SELECT |
|
|
SELECT |
|
|