Browse Source

北尚诉办-审批列表优化

feature/dangjian
Jackwang 3 years ago
parent
commit
83bd68a8f4
  1. 24
      esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/resources/mapper/item/ItemDao.xml

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

@ -1402,23 +1402,15 @@
i.LAST_HANDLE_TIME,
i.CREATED_TIME
from epdc_item i
left join (
select b.ID,b.ITEM_ID,b.CREATED_TIME,b.state,b.CLOSE_CHECK_ID
from epdc_item_handle_process b where b.CREATED_TIME = (
SELECT max(CREATED_TIME) from epdc_item_handle_process where b.ITEM_ID = ITEM_ID
)
) process on process.ITEM_ID = i.ID
where i.DEL_FLAG='0'
and i.id in (
SELECT
temp.ITEM_ID
FROM
( select it.*
from epdc_item_handle_process it
inner join (select *,max(CREATED_TIME) as maxTime
from epdc_item_handle_process
where DEL_FLAG='0'
group by ITEM_ID
)max_it on it.ITEM_ID=max_it.ITEM_ID
and it.CREATED_TIME=max_it.maxTime
where it.DEL_FLAG='0'
and it.CLOSE_CHECK_ID=#{deptId}
and it.STATE=11
) temp)
and process.STATE=11
and process.CLOSE_CHECK_ID=#{deptId}
<if test="itemContent != null and itemContent != ''">
and i.ITEM_CONTENT like '%${itemContent}%'
</if>

Loading…
Cancel
Save