|
|
|
@ -703,6 +703,10 @@ create_by,create_date,update_by,update_date |
|
|
|
ecss_CoDelNotifyDetail a left join part b on a.site=b.site and a.part_no=b.part_no |
|
|
|
where a.site =#{site} and a.delNo=#{delNo} and a.qty>0 and a.bu_no=#{buNo} |
|
|
|
GROUP BY b.hsCodeDesc,b.hsCode,b.brand,LEFT(a.currency,3) |
|
|
|
ORDER BY |
|
|
|
CASE WHEN MIN(TRY_CONVERT(BIGINT, a.item_no)) IS NULL THEN 1 ELSE 0 END, |
|
|
|
MIN(TRY_CONVERT(BIGINT, a.item_no)), |
|
|
|
MIN(a.item_no) |
|
|
|
</select> |
|
|
|
|
|
|
|
<select id="getDefaultEcssDeclarationDetailDataTX" resultType="EcssDeclarationDetailData"> |
|
|
|
@ -758,6 +762,10 @@ create_by,create_date,update_by,update_date |
|
|
|
ecss_CoDelNotifyDetail a left join part b on a.site=b.site and a.part_no=b.part_no |
|
|
|
where a.site =#{site} and a.delNo=#{delNo} and a.qty>0 and a.bu_no=#{buNo} |
|
|
|
GROUP BY b.hsCodeDesc,b.hsCode,b.brand,b.ecss_umid,LEFT(a.currency,3) |
|
|
|
ORDER BY |
|
|
|
CASE WHEN MIN(TRY_CONVERT(BIGINT, a.item_no)) IS NULL THEN 1 ELSE 0 END, |
|
|
|
MIN(TRY_CONVERT(BIGINT, a.item_no)), |
|
|
|
MIN(a.item_no) |
|
|
|
</select> |
|
|
|
|
|
|
|
|
|
|
|
@ -954,10 +962,14 @@ create_by,create_date,update_by,update_date |
|
|
|
</select> |
|
|
|
|
|
|
|
<select id="getDeclarationElements" resultType="java.util.Map"> |
|
|
|
select part_no as partNo,bu_no as buNo |
|
|
|
select part_no as partNo,bu_no as buNo,MIN(item_no) as itemNo |
|
|
|
from ecss_CoDelNotifyDetail |
|
|
|
where site=#{site} and delNo=#{delNo} and qty>0 |
|
|
|
GROUP BY part_no,bu_no |
|
|
|
ORDER BY |
|
|
|
CASE WHEN MIN(TRY_CONVERT(BIGINT, item_no)) IS NULL THEN 1 ELSE 0 END, |
|
|
|
MIN(TRY_CONVERT(BIGINT, item_no)), |
|
|
|
MIN(item_no) |
|
|
|
</select> |
|
|
|
|
|
|
|
<select id="getHsCodeByPartNo" resultType="java.util.Map"> |
|
|
|
|