Browse Source

【pc端- 项目管理-超时项目 】-【超时项目列表查询】-(魏凯)-2020/06/15

feature/dangjian
weikai 5 years ago
parent
commit
a2d0c16e87
  1. 34
      esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/resources/mapper/item/ItemTimeoutDao.xml

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

@ -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>

Loading…
Cancel
Save