|
|
@@ -372,6 +372,31 @@
|
|
|
insert into tld_access (type, data, scrq, access_type)
|
|
|
values (#{names}, #{returnGsRemoval}, now(), #{accessType})
|
|
|
</insert>
|
|
|
+ <!--出库回传数据导入-->
|
|
|
+ <insert id="importExcel">
|
|
|
+ insert into tld_outgoing_return(ask_id,ask_code,entry_number,amount,amount_num,amount_number,move_type,
|
|
|
+ material_id,inventory_organization,warehouse,wbs)
|
|
|
+ values
|
|
|
+ <foreach collection="list" item="item" index="index" separator=",">
|
|
|
+ (#{item.askId},#{item.askCode},#{item.entryNumber},#{item.amount},#{item.amountNum},#{item.amountNumber},#{item.moveType},#{item.materialId},#{item.inventoryOrganization},#{item.warehouse}
|
|
|
+ ,#{item.wbs})
|
|
|
+ </foreach>
|
|
|
+ </insert>
|
|
|
+ <!--添加GS返回数据-->
|
|
|
+ <insert id="addReturnWarehousing">
|
|
|
+ insert into tld_return_gs_warehousing(storage_code,source_type,move_type,entry_number,wbs,material_id,warehousing_num,receive_goods_id,scrq,order_number,storage_location_code)
|
|
|
+ values(#{storageCode},#{sourceType},#{moveType},#{entryNumber},#{wbs},#{materialId},#{warehousingNum},#{receiveGoodsId},now(),#{orderNumber},#{storageLocationCode})
|
|
|
+ </insert>
|
|
|
+ <!--销售出库导入数据-->
|
|
|
+ <insert id="marketImport">
|
|
|
+ insert into tld_market_return(order_number,order_officer,supplier_name,material_code,material_name,num,arrival_time,
|
|
|
+ arrival_type,company,remark,delivery_order)
|
|
|
+ values
|
|
|
+ <foreach collection="list" item="item" index="index" separator=",">
|
|
|
+ (#{item.orderNumber},#{item.orderOfficer},#{item.supplierName},#{item.materialCode},#{item.materialName},#{item.num},#{item.arrivalTime},#{item.arrivalType},#{item.company},#{item.remark}
|
|
|
+ ,#{item.deliveryOrder})
|
|
|
+ </foreach>
|
|
|
+ </insert>
|
|
|
<!-- 查询当天出库数量 -->
|
|
|
<select id="getReturnRemovalCount" resultType="int">
|
|
|
select count(*)
|
|
|
@@ -1386,9 +1411,55 @@
|
|
|
<select id="test04" resultType="java.util.Map">
|
|
|
select storage_code as storageCode from tld_return_gs_warehousing where source_type <![CDATA[=]]> 'W'
|
|
|
</select>
|
|
|
- <!--查询库存-->
|
|
|
- <select id="getInventoryList" resultType="com.tld.model.Inventory">
|
|
|
- select id,storage_location_code,material_id,amount,account_sleeve,wbs from tld_inventory
|
|
|
+ <select id="getOutgoingReturnList" resultType="com.tld.model.OutgoingReturn">
|
|
|
+ select id,ask_id,ask_code,entry_number,amount,amount_num,amount_number,move_type,material_id,inventory_organization,warehouse,wbs from tld_outgoing_return
|
|
|
+ </select>
|
|
|
+ <!--查询storage_location_code库位编号-->
|
|
|
+ <select id="getLocationCode" resultType="java.lang.String">
|
|
|
+ select storage_location_code from tld_storage_location where warehouse_where = #{warehouse} limit 1
|
|
|
+ </select>
|
|
|
+ <!--查询单据id-->
|
|
|
+ <select id="getOutgoingReturn" resultType="com.tld.model.ReturRemoval">
|
|
|
+ select id,document_id,removal_code,source_type,move_type,scrq,delivery_type from tld_return_gs_removal
|
|
|
+ </select>
|
|
|
+ <!--查询父表信息-->
|
|
|
+ <select id="getReturnInStorageF" resultType="com.tld.model.ReceiveGoods">
|
|
|
+ select order_number,order_code,company_number,supplier_id,arrival_time,order_type,source_type,move_type from tld_receive_goods_f
|
|
|
+ </select>
|
|
|
+ <!--查询子表信息-->
|
|
|
+ <select id="getReturnInStorageZ" resultType="com.tld.model.ReceiveGoods">
|
|
|
+ select order_code,material_id,purchase_num,arrival_num,type,qualified_num,disqualification_num,wbs,arrival_time,measurement_id,supplier_id,entry_number,warehousing_num from tld_receive_goods where order_code = #{orderCode}
|
|
|
+ </select>
|
|
|
+ <!--查询物料类型-->
|
|
|
+ <select id="getMaterialPartType" resultType="java.lang.String">
|
|
|
+ select part_type from tld_material where tld_id = #{materialId}
|
|
|
+ </select>
|
|
|
+ <!--出库错误信息回调-->
|
|
|
+ <select id="getOutgoingReturnError" resultType="com.tld.model.Error">
|
|
|
+ select id,url,error_info,data_val,scrq,type,transmission_type from tld_error
|
|
|
+ where transmission_type = '1'
|
|
|
+ and type = '出库回传'
|
|
|
+ </select>
|
|
|
+ <!--查询销售出库导入数据-->
|
|
|
+ <select id="getMarketList" resultType="com.tld.model.MarketReturn">
|
|
|
+ select id,order_number,order_officer,supplier_name,material_code,material_name,num,arrival_time,arrival_type,company,remark,delivery_order,delivery_or_not from tld_market_return
|
|
|
+ </select>
|
|
|
+ <!--查询销售单父子表信息-->
|
|
|
+ <select id="getDeliveryF" resultType="com.tld.model.Delivery">
|
|
|
+ select
|
|
|
+ id,delivery_id,delivery_code,company_number,customer_code,bills_time,delivery_type,source_type,move_type,project_name,project_code
|
|
|
+ from tld_delivery_f
|
|
|
+ where company_number = '8130'
|
|
|
+ and delivery_code = #{deliveryOrder}
|
|
|
+ </select>
|
|
|
+ <!--查询销售单父子表信息-->
|
|
|
+ <select id="getDeliveryZ" resultType="com.tld.model.Delivery">
|
|
|
+ select
|
|
|
+ id,delivery_id,entry_number,material_id,wbs,measurement_id,gs_delivery_num,gs_cancel_num,out_num,status
|
|
|
+ from tld_delivery
|
|
|
+ where delivery_id = #{deliveryId}
|
|
|
+ and material_id = #{materialId}
|
|
|
+ and out_num <![CDATA[=]]> '0'
|
|
|
</select>
|
|
|
<!-- 修改数据传输状态 -->
|
|
|
<update id="updateRemoval">
|