Browse Source

【pc端- 项目管理 -已超时 】-【sql修改】-(魏凯)-2020/06/17

feature/dangjian
weikai 6 years ago
parent
commit
e5e649e274
  1. 32
      esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/resources/mapper/item/ItemTimeoutDao.xml

32
esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/resources/mapper/item/ItemTimeoutDao.xml

@ -76,22 +76,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>

Loading…
Cancel
Save