|
|
@ -67,7 +67,7 @@ |
|
|
|
WHERE |
|
|
|
a.DEL_FLAG = '0' |
|
|
|
<if test="itemState != null and itemState != ''"> |
|
|
|
AND a.ITEM_STATE = #{itemState} |
|
|
|
AND item.ITEM_STATE = #{itemState} |
|
|
|
</if> |
|
|
|
<if test="associatedType != null and associatedType != ''"> |
|
|
|
AND a.ITEM_STATE in (0,10) |
|
|
@ -75,22 +75,22 @@ |
|
|
|
<if test="keyword != null and keyword != ''"> |
|
|
|
AND a.ITEM_CONTENT like concat('%', trim(#{keyword}), '%') |
|
|
|
</if> |
|
|
|
<!-- AND a.ID IN (--> |
|
|
|
<!-- SELECT--> |
|
|
|
<!-- temp.ITEM_ID--> |
|
|
|
<!-- FROM--> |
|
|
|
<!-- ( SELECT dept.ITEM_ID FROM epdc_item_dept dept WHERE dept.DEL_FLAG = '0'--> |
|
|
|
<!-- <if test="deptIdList != null">--> |
|
|
|
<!-- AND dept.DEPT_ID IN--> |
|
|
|
<!-- <foreach item="deptId" collection="deptIdList" open="(" separator="," close=")">--> |
|
|
|
<!-- #{deptId}--> |
|
|
|
<!-- </foreach>--> |
|
|
|
<!-- </if>--> |
|
|
|
<!-- <if test="districtDeptId != null and districtDeptId != ''">--> |
|
|
|
<!-- AND dept.DEPT_ID = #{districtDeptId}--> |
|
|
|
<!-- </if>--> |
|
|
|
<!-- ) temp--> |
|
|
|
<!-- )--> |
|
|
|
AND a.ID IN ( |
|
|
|
SELECT |
|
|
|
temp.ITEM_ID |
|
|
|
FROM |
|
|
|
( SELECT dept.ITEM_ID FROM epdc_item_dept dept WHERE dept.DEL_FLAG = '0' |
|
|
|
<if test="deptIdList != null"> |
|
|
|
AND dept.DEPT_ID IN |
|
|
|
<foreach item="deptId" collection="deptIdList" open="(" separator="," close=")"> |
|
|
|
#{deptId} |
|
|
|
</foreach> |
|
|
|
</if> |
|
|
|
<if test="districtDeptId != null and districtDeptId != ''"> |
|
|
|
AND dept.DEPT_ID = #{districtDeptId} |
|
|
|
</if> |
|
|
|
) temp |
|
|
|
) |
|
|
|
<if test="startTime != null and startTime != '' and endTime != null and endTime != ''"> |
|
|
|
AND DATE_FORMAT( a.ITEM_CREATED_TIME, '%Y-%m-%d' ) BETWEEN #{startTime} AND #{endTime} |
|
|
|
</if> |
|
|
|