@ -685,9 +685,9 @@ create_by,create_date,update_by,update_date
</insert>
<insert id= "saveEcssDeclarationDetail" >
insert into ecss_declaration_detail(site,declaration_no,item_no,hs_code,hs_code_desc,qty,net_weight,unit_price,total_price,currency,made_area,destination,
insert into ecss_declaration_detail(site,declaration_no,item_no,hs_code,hs_code_desc,brand, qty,net_weight,unit_price,total_price,currency,made_area,destination,
source_area,levy)
values(#{site},#{declarationNo},#{itemNo,jdbcType=INTEGER},#{hsCode},#{hsCodeDesc},#{qty,jdbcType=DECIMAL},#{netWeight,jdbcType=DECIMAL},#{unitPrice,jdbcType=DECIMAL},#{totalPrice,jdbcType=DECIMAL},#{currency},#{madeArea},#{destination},
values(#{site},#{declarationNo},#{itemNo,jdbcType=INTEGER},#{hsCode},#{hsCodeDesc},#{brand,jdbcType=NVARCHAR},#{ qty,jdbcType=DECIMAL},#{netWeight,jdbcType=DECIMAL},#{unitPrice,jdbcType=DECIMAL},#{totalPrice,jdbcType=DECIMAL},#{currency},#{madeArea},#{destination},
#{sourceArea},#{levy})
</insert>
<select id= "searchDeclarationHeader" resultType= "EcssDeclarationHeaderData" >
@ -730,8 +730,8 @@ left join ecss_CoDelNotifyHeader noHeader on a.site=noHeader.site and a.delNo=no
</select>
<select id= "searchDeclarationDetail" resultType= "EcssDeclarationDetailData" >
select site,declaration_no,item_no,hs_code,hs_code_desc,qty,net_weight,unit_price,total_price,currency,made_area,destination,
source_area,levy
select site,declaration_no,item_no,hs_code,hs_code_desc,brand, qty,net_weight,unit_price,total_price,currency,made_area,destination,
source_area,levy,brand
from ecss_declaration_detail
where site=#{site} and declaration_no=#{declarationNo}
</select>
@ -1079,6 +1079,15 @@ left join ecss_CoDelNotifyHeader noHeader on a.site=noHeader.site and a.delNo=no
group by b.hsCodeDesc
</select>
<select id= "getNotifyDetailGroupTX" resultType= "java.util.Map" >
select b.hsCodeDesc,CONVERT(DECIMAL(20, 2),sum(a.qty)) as total_qty,
CONVERT(DECIMAL(20, 2),sum(a.ttl_amount)) as ttl_amount
from 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
group by b.hsCodeDesc,b.brand
</select>
<!-- 根据notifyDetailItemNo获取发货通知单明细 -->
<select id= "getEcssCoDelNotifyDetailByItemNo" resultType= "EcssCoDelNotifyDetailData" >
select a.site,a.bu_no,a.delNo,a.item_no,a.salesOrder,a.salesOrder_item_no,a.customerPO,a.line,a.version,a.status,a.family,