Browse Source

问题类项目列表sql修改

feature/dangjian
wanggongfeng 4 years ago
parent
commit
dd9dedd2ec
  1. 16
      esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/resources/mapper/item/ItemDao.xml

16
esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/resources/mapper/item/ItemDao.xml

@ -159,17 +159,10 @@
FROM FROM
( (
SELECT DISTINCT SELECT DISTINCT
d.ITEM_ID it.id
FROM FROM
epdc_item_dept d epdc_item it
LEFT JOIN epdc_item it ON d.ITEM_ID = it.ID WHERE it.DEL_FLAG = '0'
WHERE
d.DEL_FLAG = '0'
AND it.DEL_FLAG = '0'
AND d.DEPT_ID IN
<foreach item="deptIdItem" collection="deptIdList" open="(" separator="," close=")">
#{deptIdItem}
</foreach>
<if test="formDto.itemIdList != null and formDto.itemIdList.size() > 0"> <if test="formDto.itemIdList != null and formDto.itemIdList.size() > 0">
AND it.id IN AND it.id IN
<foreach collection="formDto.itemIdList" index="index" item="itemId" open="(" separator="," close=")"> <foreach collection="formDto.itemIdList" index="index" item="itemId" open="(" separator="," close=")">
@ -182,9 +175,6 @@
<if test='formDto.itemState != null '> <if test='formDto.itemState != null '>
AND it.ITEM_STATE = #{formDto.itemState} AND it.ITEM_STATE = #{formDto.itemState}
</if> </if>
<if test='formDto.deptId != null and formDto.deptId != ""'>
AND d.DEPT_ID = #{formDto.deptId}
</if>
ORDER BY ORDER BY
it.CREATED_TIME DESC it.CREATED_TIME DESC
LIMIT #{formDto.pageIndex},#{formDto.pageSize} LIMIT #{formDto.pageIndex},#{formDto.pageSize}

Loading…
Cancel
Save