|
|
|
@ -6,8 +6,22 @@
|
|
|
|
|
<select id="filterList" resultType="com.glxp.api.res.basic.SysWorkplaceFreightResponse">
|
|
|
|
|
select swf.*,
|
|
|
|
|
sw.workplaceName workPlaceName,
|
|
|
|
|
COUNT(swl.freightCode) as layerCount
|
|
|
|
|
COUNT(swl.freightCode) as layerCount,ccc.reCount
|
|
|
|
|
from sys_workplace_freight swf
|
|
|
|
|
left join (
|
|
|
|
|
select freightCode,count(freightCode), min(reCount) as reCount from
|
|
|
|
|
(
|
|
|
|
|
select swq.freightCode,(ifnull(a.reCodeCount,0) - ifnull(swq.remindCount,0) ) as reCount
|
|
|
|
|
from sys_workplace_queue swq
|
|
|
|
|
LEFT JOIn (
|
|
|
|
|
select sum(reCount) as reCodeCount,workPlaceQueueCode from io_split_fifo_inv isfi
|
|
|
|
|
group by workPlaceQueueCode
|
|
|
|
|
) as a on a.workPlaceQueueCode = swq.code
|
|
|
|
|
where swq.enableRemind = 1 and swq.relId is not null
|
|
|
|
|
ORDER BY reCodeCount
|
|
|
|
|
) as a
|
|
|
|
|
group by freightCode
|
|
|
|
|
) as ccc on ccc.freightCode = swf.code
|
|
|
|
|
left join sys_workplace sw on sw.workplaceId = swf.workPlaceIdFk
|
|
|
|
|
left join sys_workplace_layer swl on swl.freightCode = swf.code
|
|
|
|
|
<where>
|
|
|
|
|