|
|
@ -1254,11 +1254,11 @@ left join ecss_CoDelNotifyHeader noHeader on a.site=noHeader.site and a.delNo=no |
|
|
CONVERT(DECIMAL(20, 3),w.num_value) as boxWeight |
|
|
CONVERT(DECIMAL(20, 3),w.num_value) as boxWeight |
|
|
from ecss_CoDelBoxList a |
|
|
from ecss_CoDelBoxList a |
|
|
left join ( |
|
|
left join ( |
|
|
select top 1 b.site, b.bu_no, b.delNo, b.seq_no, b.part_no |
|
|
|
|
|
|
|
|
select b.site, b.bu_no, b.delNo, b.seq_no, b.part_no, |
|
|
|
|
|
ROW_NUMBER() OVER (PARTITION BY b.site, b.bu_no, b.delNo, b.seq_no ORDER BY b.part_no) as rn |
|
|
from ecss_CoDelPalletDetail b |
|
|
from ecss_CoDelPalletDetail b |
|
|
where b.site = #{site} and b.bu_no = #{buNo} and b.delNo = #{delNo} |
|
|
where b.site = #{site} and b.bu_no = #{buNo} and b.delNo = #{delNo} |
|
|
group by b.site, b.bu_no, b.delNo, b.seq_no, b.part_no |
|
|
|
|
|
) d on a.site = d.site and a.bu_no = d.bu_no and a.delNo = d.delNo and a.item_no = d.seq_no |
|
|
|
|
|
|
|
|
) d on a.site = d.site and a.bu_no = d.bu_no and a.delNo = d.delNo and a.item_no = d.seq_no and d.rn = 1 |
|
|
left join part_sub_properties_value w on d.part_no = w.part_no and w.site = d.site and w.bu_no = d.bu_no |
|
|
left join part_sub_properties_value w on d.part_no = w.part_no and w.site = d.site and w.bu_no = d.bu_no |
|
|
and w.record_type='ECSSPART' and w.code_no='BG001' and w.properties_item_no='BOXWEIGHT' |
|
|
and w.record_type='ECSSPART' and w.code_no='BG001' and w.properties_item_no='BOXWEIGHT' |
|
|
where a.site = #{site} and a.bu_no = #{buNo} and a.delNo = #{delNo} |
|
|
where a.site = #{site} and a.bu_no = #{buNo} and a.delNo = #{delNo} |
|
|
|