大批按照接收时间排序
This commit is contained in:
@@ -7,11 +7,12 @@
|
||||
<DynSentence name="QryBatLst">
|
||||
<Sentence>
|
||||
select DSK_NAM from capdskinf where DSK_NAM in
|
||||
(select DSK_NAM from (select DSK_NAM, row_number() over (order by RCV_DT||RCV_TM asc) tm from capdskinf where DSK_NAM in
|
||||
(select DSK_NAM from capdskinf a where dsk_sts = '1' and ord_dt >= ? and (dsk_nam,0) in
|
||||
(select dsk_nam,sum(case when bat_sts not in ('4', '2') then 1 else 0 end) notfinal from capbatinf
|
||||
where ord_dt = a.ord_dt and dsk_nam = a.DSK_NAM group by dsk_nam having sum(case when bat_sts not in ('4', '2') then 1 else 0 end) = 0)
|
||||
union all select DSK_NAM from CAPDSKINF a where a.dsk_sts = '9' and ORD_DT >= ?)
|
||||
and rownum = 1 for update skip locked
|
||||
union all select DSK_NAM from CAPDSKINF a where a.dsk_sts = '9' and ORD_DT >= ?)) where tm = 1)
|
||||
for update skip locked
|
||||
</Sentence>
|
||||
<Fields>DT_BEFER|DT_BEFER|</Fields>
|
||||
</DynSentence>
|
||||
|
||||
Reference in New Issue
Block a user