123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393 |
- <?xml version="1.0" encoding="UTF-8" ?>
- <!DOCTYPE mapper
- PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
- "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
- <mapper namespace="com.ruoyi.ams.order.mapper.WmsDocOrderHeaderMapper">
- <resultMap type="WmsDocOrderHeader" id="WmsDocOrderHeaderResult">
- <result property="orderNo" column="order_no" />
- <result property="customerId" column="customer_id" />
- <result property="orderStatus" column="order_status" />
- <result property="orderType" column="order_type" />
- <result property="soReference1" column="so_reference1" />
- <result property="soReference2" column="so_reference2" />
- <result property="soReference3" column="so_reference3" />
- <result property="priority" column="priority" />
- <result property="consigneeId" column="consignee_id" />
- <result property="consigneeName" column="consignee_name" />
- <result property="cusCountry" column="cus_country" />
- <result property="cusProvince" column="cus_province" />
- <result property="cusCity" column="cus_city" />
- <result property="cusDistrict" column="cus_district" />
- <result property="cusAddress" column="cus_address" />
- <result property="cusContact" column="cus_contact" />
- <result property="cusPostcode" column="cus_postcode" />
- <result property="cusEmail" column="cus_email" />
- <result property="carrierId" column="carrier_id" />
- <result property="shipmentTime" column="shipment_time" />
- <result property="carrierName" column="carrier_name" />
- <result property="deliveryNo" column="delivery_no" />
- <result property="ediSendFlag" column="edi_send_flag" />
- <result property="remark" column="remark" />
- <result property="warehouseId" column="warehouse_id" />
- <result property="userdefine1" column="userdefine1" />
- <result property="userdefine2" column="userdefine2" />
- <result property="userdefine3" column="userdefine3" />
- <result property="userdefine4" column="userdefine4" />
- <result property="userdefine5" column="userdefine5" />
- <result property="userdefine6" column="userdefine6" />
- <result property="createTime" column="create_time" />
- <result property="createBy" column="create_by" />
- <result property="updateTime" column="update_time" />
- <result property="updateBy" column="update_by" />
- <result property="hEdi01" column="h_edi_01" />
- <result property="hEdi02" column="h_edi_02" />
- <result property="hEdi03" column="h_edi_03" />
- <result property="hEdi04" column="h_edi_04" />
- <result property="hEdi05" column="h_edi_05" />
- <result property="hEdi06" column="h_edi_06" />
- <result property="hEdi07" column="h_edi_07" />
- <result property="hEdi08" column="h_edi_08" />
- <result property="hEdi09" column="h_edi_09" />
- <result property="hEdi10" column="h_edi_10" />
- <result property="hEdi11" column="h_edi_11" />
- <result property="hEdi12" column="h_edi_12" />
- <result property="hEdi13" column="h_edi_13" />
- <result property="hEdi14" column="h_edi_14" />
- <result property="hEdi15" column="h_edi_15" />
- </resultMap>
- <resultMap id="WmsDocOrderHeaderWmsDocOrderDetailsResult" type="WmsDocOrderHeader" extends="WmsDocOrderHeaderResult">
- <collection property="wmsDocOrderDetailsList" notNullColumn="sub_order_no" javaType="java.util.List" resultMap="WmsDocOrderDetailsResult" />
- </resultMap>
- <resultMap type="WmsDocOrderDetails" id="WmsDocOrderDetailsResult">
- <result property="orderNo" column="sub_order_no" />
- <result property="orderLineNo" column="sub_order_line_no" />
- <result property="customerId" column="sub_customer_id" />
- <result property="sku" column="sub_sku" />
- <result property="lineStatus" column="sub_line_status" />
- <result property="qtyOrdered" column="sub_qty_ordered" />
- <result property="qtyOrderedEach" column="sub_qty_ordered_each" />
- <result property="qtySoftAllocated" column="sub_qty_soft_allocated" />
- <result property="qtySoftallocatedEach" column="sub_qty_softallocated_each" />
- <result property="qtyAllocated" column="sub_qty_allocated" />
- <result property="qtyAllocatedEach" column="sub_qty_allocated_each" />
- <result property="qtyPicked" column="sub_qty_picked" />
- <result property="qtyPickedEach" column="sub_qty_picked_each" />
- <result property="qtyPacked" column="sub_qty_packed" />
- <result property="qtyPackedEach" column="sub_qty_packed_each" />
- <result property="qtyShipped" column="sub_qty_shipped" />
- <result property="qtyShippedEach" column="sub_qty_shipped_each" />
- <result property="uom" column="sub_uom" />
- <result property="lotatt01" column="sub_lotatt01" />
- <result property="lotatt02" column="sub_lotatt02" />
- <result property="lotatt03" column="sub_lotatt03" />
- <result property="lotatt04" column="sub_lotatt04" />
- <result property="lotatt05" column="sub_lotatt05" />
- <result property="lotatt06" column="sub_lotatt06" />
- <result property="lotatt07" column="sub_lotatt07" />
- <result property="lotatt08" column="sub_lotatt08" />
- <result property="lotatt09" column="sub_lotatt09" />
- <result property="lotatt10" column="sub_lotatt10" />
- <result property="lotatt11" column="sub_lotatt11" />
- <result property="lotatt12" column="sub_lotatt12" />
- <result property="lotatt13" column="sub_lotatt13" />
- <result property="lotatt14" column="sub_lotatt14" />
- <result property="lotatt15" column="sub_lotatt15" />
- <result property="lotatt16" column="sub_lotatt16" />
- <result property="lotatt17" column="sub_lotatt17" />
- <result property="lotatt18" column="sub_lotatt18" />
- <result property="packId" column="sub_pack_id" />
- <result property="pickZone" column="sub_pick_zone" />
- <result property="location" column="sub_location" />
- <result property="lotnum" column="sub_lotnum" />
- <result property="remark" column="sub_remark" />
- <result property="createTime" column="sub_create_time" />
- <result property="createBy" column="sub_create_by" />
- <result property="updateTime" column="sub_update_time" />
- <result property="updateBy" column="sub_update_by" />
- <result property="netWeight" column="sub_net_weight" />
- <result property="grossWeight" column="sub_gross_weight" />
- <result property="cubic" column="sub_cubic" />
- <result property="dEdi01" column="sub_d_edi_01" />
- <result property="dEdi02" column="sub_d_edi_02" />
- <result property="dEdi03" column="sub_d_edi_03" />
- <result property="dEdi04" column="sub_d_edi_04" />
- <result property="dEdi05" column="sub_d_edi_05" />
- <result property="dEdi06" column="sub_d_edi_06" />
- <result property="dEdi07" column="sub_d_edi_07" />
- <result property="dEdi08" column="sub_d_edi_08" />
- <result property="dEdi09" column="sub_d_edi_09" />
- <result property="dEdi10" column="sub_d_edi_10" />
- <result property="dEdi11" column="sub_d_edi_11" />
- <result property="dEdi12" column="sub_d_edi_12" />
- <result property="dEdi13" column="sub_d_edi_13" />
- <result property="dEdi14" column="sub_d_edi_14" />
- <result property="dEdi15" column="sub_d_edi_15" />
- <result property="dEdi16" column="sub_d_edi_16" />
- <result property="dEdi17" column="sub_d_edi_17" />
- <result property="dEdi18" column="sub_d_edi_18" />
- <result property="dEdi19" column="sub_d_edi_19" />
- <result property="dEdi20" column="sub_d_edi_20" />
- <result property="traceId" column="sub_trace_id" />
- <result property="softAllocationRule" column="sub_soft_allocation_rule" />
- <result property="allocationRule" column="sub_allocation_rule" />
- <result property="userdefine1" column="sub_userdefine1" />
- <result property="userdefine2" column="sub_userdefine2" />
- <result property="userdefine3" column="sub_userdefine3" />
- <result property="userdefine4" column="sub_userdefine4" />
- <result property="userdefine5" column="sub_userdefine5" />
- </resultMap>
- <resultMap type="com.ruoyi.ams.order.vo.CheckOutVO" id="CheckOutVOResult">
- <result property="orderNo" column="order_no" />
- <result property="palletNo" column="palletNo" />
- <result property="locationNo" column="location_no" />
- </resultMap>
- <sql id="selectWmsDocOrderHeaderVo">
- select order_no, customer_id, order_status, order_type, so_reference1, so_reference2, so_reference3, priority, consignee_id, consignee_name, cus_country, cus_province, cus_city, cus_district, cus_address, cus_contact, cus_postcode, cus_email, carrier_id, shipment_time, carrier_name, delivery_no, edi_send_flag, remark, warehouse_id, userdefine1, userdefine2, userdefine3, userdefine4, userdefine5, userdefine6, create_time, create_by, update_time, update_by, h_edi_01, h_edi_02, h_edi_03, h_edi_04, h_edi_05, h_edi_06, h_edi_07, h_edi_08, h_edi_09, h_edi_10, h_edi_11, h_edi_12, h_edi_13, h_edi_14, h_edi_15 from wms_doc_order_header
- </sql>
- <select id="selectWmsDocOrderHeaderList" parameterType="WmsDocOrderHeader" resultMap="WmsDocOrderHeaderResult">
- <include refid="selectWmsDocOrderHeaderVo"/>
- <where>
- <if test="orderNo != null and orderNo != ''"> and order_no like concat('%', #{orderNo}, '%')</if>
- <if test="consigneeName != null and consigneeName != ''"> and consignee_name like concat('%', #{consigneeName}, '%')</if>
- <if test="carrierName != null and carrierName != ''"> and carrier_name like concat('%', #{carrierName}, '%')</if>
- <if test="soReference1 != null and soReference1 != ''"> and so_reference1 like concat('%', #{soReference1}, '%')</if>
- </where>
- order by create_time desc
- </select>
- <select id="selectWmsDocOrderHeaderByOrderNo" parameterType="String" resultMap="WmsDocOrderHeaderWmsDocOrderDetailsResult">
- select a.order_no, a.customer_id, a.order_status, a.order_type, a.so_reference1, a.so_reference2, a.so_reference3, a.priority, a.consignee_id, a.consignee_name, a.cus_country, a.cus_province, a.cus_city, a.cus_district, a.cus_address, a.cus_contact, a.cus_postcode, a.cus_email, a.carrier_id, a.shipment_time, a.carrier_name, a.delivery_no, a.edi_send_flag, a.remark, a.warehouse_id, a.userdefine1, a.userdefine2, a.userdefine3, a.userdefine4, a.userdefine5, a.userdefine6, a.create_time, a.create_by, a.update_time, a.update_by, a.h_edi_01, a.h_edi_02, a.h_edi_03, a.h_edi_04, a.h_edi_05, a.h_edi_06, a.h_edi_07, a.h_edi_08, a.h_edi_09, a.h_edi_10, a.h_edi_11, a.h_edi_12, a.h_edi_13, a.h_edi_14, a.h_edi_15,
- b.order_no as sub_order_no, b.order_line_no as sub_order_line_no, b.customer_id as sub_customer_id, b.sku as sub_sku, b.line_status as sub_line_status, b.qty_ordered as sub_qty_ordered, b.qty_ordered_each as sub_qty_ordered_each, b.qty_soft_allocated as sub_qty_soft_allocated, b.qty_softallocated_each as sub_qty_softallocated_each, b.qty_allocated as sub_qty_allocated, b.qty_allocated_each as sub_qty_allocated_each, b.qty_picked as sub_qty_picked, b.qty_picked_each as sub_qty_picked_each, b.qty_packed as sub_qty_packed, b.qty_packed_each as sub_qty_packed_each, b.qty_shipped as sub_qty_shipped, b.qty_shipped_each as sub_qty_shipped_each, b.uom as sub_uom, b.lotatt01 as sub_lotatt01, b.lotatt02 as sub_lotatt02, b.lotatt03 as sub_lotatt03, b.lotatt04 as sub_lotatt04, b.lotatt05 as sub_lotatt05, b.lotatt06 as sub_lotatt06, b.lotatt07 as sub_lotatt07, b.lotatt08 as sub_lotatt08, b.lotatt09 as sub_lotatt09, b.lotatt10 as sub_lotatt10, b.lotatt11 as sub_lotatt11, b.lotatt12 as sub_lotatt12, b.lotatt13 as sub_lotatt13, b.lotatt14 as sub_lotatt14, b.lotatt15 as sub_lotatt15, b.lotatt16 as sub_lotatt16, b.lotatt17 as sub_lotatt17, b.lotatt18 as sub_lotatt18, b.pack_id as sub_pack_id, b.pick_zone as sub_pick_zone, b.location as sub_location, b.lotnum as sub_lotnum, b.remark as sub_remark, b.create_time as sub_create_time, b.create_by as sub_create_by, b.update_time as sub_update_time, b.update_by as sub_update_by, b.net_weight as sub_net_weight, b.gross_weight as sub_gross_weight, b.cubic as sub_cubic, b.d_edi_01 as sub_d_edi_01, b.d_edi_02 as sub_d_edi_02, b.d_edi_03 as sub_d_edi_03, b.d_edi_04 as sub_d_edi_04, b.d_edi_05 as sub_d_edi_05, b.d_edi_06 as sub_d_edi_06, b.d_edi_07 as sub_d_edi_07, b.d_edi_08 as sub_d_edi_08, b.d_edi_09 as sub_d_edi_09, b.d_edi_10 as sub_d_edi_10, b.d_edi_11 as sub_d_edi_11, b.d_edi_12 as sub_d_edi_12, b.d_edi_13 as sub_d_edi_13, b.d_edi_14 as sub_d_edi_14, b.d_edi_15 as sub_d_edi_15, b.d_edi_16 as sub_d_edi_16, b.d_edi_17 as sub_d_edi_17, b.d_edi_18 as sub_d_edi_18, b.d_edi_19 as sub_d_edi_19, b.d_edi_20 as sub_d_edi_20, b.trace_id as sub_trace_id, b.soft_allocation_rule as sub_soft_allocation_rule, b.allocation_rule as sub_allocation_rule, b.userdefine1 as sub_userdefine1, b.userdefine2 as sub_userdefine2, b.userdefine3 as sub_userdefine3, b.userdefine4 as sub_userdefine4, b.userdefine5 as sub_userdefine5
- from wms_doc_order_header a
- left join wms_doc_order_details b on b.order_no = a.order_no
- where a.order_no = #{orderNo}
- </select>
- <select id="selectWmsDocOrderHeaderByErpNo" parameterType="String" resultMap="WmsDocOrderHeaderResult">
- select *
- from wms_doc_order_header
- where so_reference1= #{erpNo}
- order by create_time desc
- limit 1
- </select>
- <insert id="insertWmsDocOrderHeader" parameterType="WmsDocOrderHeader">
- insert into wms_doc_order_header
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <if test="orderNo != null">order_no,</if>
- <if test="customerId != null and customerId != ''">customer_id,</if>
- <if test="orderStatus != null and orderStatus != ''">order_status,</if>
- <if test="orderType != null">order_type,</if>
- <if test="soReference1 != null">so_reference1,</if>
- <if test="soReference2 != null">so_reference2,</if>
- <if test="soReference3 != null">so_reference3,</if>
- <if test="priority != null">priority,</if>
- <if test="consigneeId != null">consignee_id,</if>
- <if test="consigneeName != null">consignee_name,</if>
- <if test="cusCountry != null">cus_country,</if>
- <if test="cusProvince != null">cus_province,</if>
- <if test="cusCity != null">cus_city,</if>
- <if test="cusDistrict != null">cus_district,</if>
- <if test="cusAddress != null">cus_address,</if>
- <if test="cusContact != null">cus_contact,</if>
- <if test="cusPostcode != null">cus_postcode,</if>
- <if test="cusEmail != null">cus_email,</if>
- <if test="carrierId != null">carrier_id,</if>
- <if test="shipmentTime != null">shipment_time,</if>
- <if test="carrierName != null">carrier_name,</if>
- <if test="deliveryNo != null">delivery_no,</if>
- <if test="ediSendFlag != null">edi_send_flag,</if>
- <if test="remark != null">remark,</if>
- <if test="warehouseId != null">warehouse_id,</if>
- <if test="userdefine1 != null">userdefine1,</if>
- <if test="userdefine2 != null">userdefine2,</if>
- <if test="userdefine3 != null">userdefine3,</if>
- <if test="userdefine4 != null">userdefine4,</if>
- <if test="userdefine5 != null">userdefine5,</if>
- <if test="userdefine6 != null">userdefine6,</if>
- <if test="createTime != null">create_time,</if>
- <if test="createBy != null">create_by,</if>
- <if test="updateTime != null">update_time,</if>
- <if test="updateBy != null">update_by,</if>
- <if test="hEdi01 != null">h_edi_01,</if>
- <if test="hEdi02 != null">h_edi_02,</if>
- <if test="hEdi03 != null">h_edi_03,</if>
- <if test="hEdi04 != null">h_edi_04,</if>
- <if test="hEdi05 != null">h_edi_05,</if>
- <if test="hEdi06 != null">h_edi_06,</if>
- <if test="hEdi07 != null">h_edi_07,</if>
- <if test="hEdi08 != null">h_edi_08,</if>
- <if test="hEdi09 != null">h_edi_09,</if>
- <if test="hEdi10 != null">h_edi_10,</if>
- <if test="hEdi11 != null">h_edi_11,</if>
- <if test="hEdi12 != null">h_edi_12,</if>
- <if test="hEdi13 != null">h_edi_13,</if>
- <if test="hEdi14 != null">h_edi_14,</if>
- <if test="hEdi15 != null">h_edi_15,</if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides=",">
- <if test="orderNo != null">#{orderNo},</if>
- <if test="customerId != null and customerId != ''">#{customerId},</if>
- <if test="orderStatus != null and orderStatus != ''">#{orderStatus},</if>
- <if test="orderType != null">#{orderType},</if>
- <if test="soReference1 != null">#{soReference1},</if>
- <if test="soReference2 != null">#{soReference2},</if>
- <if test="soReference3 != null">#{soReference3},</if>
- <if test="priority != null">#{priority},</if>
- <if test="consigneeId != null">#{consigneeId},</if>
- <if test="consigneeName != null">#{consigneeName},</if>
- <if test="cusCountry != null">#{cusCountry},</if>
- <if test="cusProvince != null">#{cusProvince},</if>
- <if test="cusCity != null">#{cusCity},</if>
- <if test="cusDistrict != null">#{cusDistrict},</if>
- <if test="cusAddress != null">#{cusAddress},</if>
- <if test="cusContact != null">#{cusContact},</if>
- <if test="cusPostcode != null">#{cusPostcode},</if>
- <if test="cusEmail != null">#{cusEmail},</if>
- <if test="carrierId != null">#{carrierId},</if>
- <if test="shipmentTime != null">#{shipmentTime},</if>
- <if test="carrierName != null">#{carrierName},</if>
- <if test="deliveryNo != null">#{deliveryNo},</if>
- <if test="ediSendFlag != null">#{ediSendFlag},</if>
- <if test="remark != null">#{remark},</if>
- <if test="warehouseId != null">#{warehouseId},</if>
- <if test="userdefine1 != null">#{userdefine1},</if>
- <if test="userdefine2 != null">#{userdefine2},</if>
- <if test="userdefine3 != null">#{userdefine3},</if>
- <if test="userdefine4 != null">#{userdefine4},</if>
- <if test="userdefine5 != null">#{userdefine5},</if>
- <if test="userdefine6 != null">#{userdefine6},</if>
- <if test="createTime != null">#{createTime},</if>
- <if test="createBy != null">#{createBy},</if>
- <if test="updateTime != null">#{updateTime},</if>
- <if test="updateBy != null">#{updateBy},</if>
- <if test="hEdi01 != null">#{hEdi01},</if>
- <if test="hEdi02 != null">#{hEdi02},</if>
- <if test="hEdi03 != null">#{hEdi03},</if>
- <if test="hEdi04 != null">#{hEdi04},</if>
- <if test="hEdi05 != null">#{hEdi05},</if>
- <if test="hEdi06 != null">#{hEdi06},</if>
- <if test="hEdi07 != null">#{hEdi07},</if>
- <if test="hEdi08 != null">#{hEdi08},</if>
- <if test="hEdi09 != null">#{hEdi09},</if>
- <if test="hEdi10 != null">#{hEdi10},</if>
- <if test="hEdi11 != null">#{hEdi11},</if>
- <if test="hEdi12 != null">#{hEdi12},</if>
- <if test="hEdi13 != null">#{hEdi13},</if>
- <if test="hEdi14 != null">#{hEdi14},</if>
- <if test="hEdi15 != null">#{hEdi15},</if>
- </trim>
- </insert>
- <update id="updateWmsDocOrderHeader" parameterType="WmsDocOrderHeader">
- update wms_doc_order_header
- <trim prefix="SET" suffixOverrides=",">
- <if test="customerId != null and customerId != ''">customer_id = #{customerId},</if>
- <if test="orderStatus != null and orderStatus != ''">order_status = #{orderStatus},</if>
- <if test="orderType != null">order_type = #{orderType},</if>
- <if test="soReference1 != null">so_reference1 = #{soReference1},</if>
- <if test="soReference2 != null">so_reference2 = #{soReference2},</if>
- <if test="soReference3 != null">so_reference3 = #{soReference3},</if>
- <if test="priority != null">priority = #{priority},</if>
- <if test="consigneeId != null">consignee_id = #{consigneeId},</if>
- <if test="consigneeName != null">consignee_name = #{consigneeName},</if>
- <if test="cusCountry != null">cus_country = #{cusCountry},</if>
- <if test="cusProvince != null">cus_province = #{cusProvince},</if>
- <if test="cusCity != null">cus_city = #{cusCity},</if>
- <if test="cusDistrict != null">cus_district = #{cusDistrict},</if>
- <if test="cusAddress != null">cus_address = #{cusAddress},</if>
- <if test="cusContact != null">cus_contact = #{cusContact},</if>
- <if test="cusPostcode != null">cus_postcode = #{cusPostcode},</if>
- <if test="cusEmail != null">cus_email = #{cusEmail},</if>
- <if test="carrierId != null">carrier_id = #{carrierId},</if>
- <if test="shipmentTime != null">shipment_time = #{shipmentTime},</if>
- <if test="carrierName != null">carrier_name = #{carrierName},</if>
- <if test="deliveryNo != null">delivery_no = #{deliveryNo},</if>
- <if test="ediSendFlag != null">edi_send_flag = #{ediSendFlag},</if>
- <if test="remark != null">remark = #{remark},</if>
- <if test="warehouseId != null">warehouse_id = #{warehouseId},</if>
- <if test="userdefine1 != null">userdefine1 = #{userdefine1},</if>
- <if test="userdefine2 != null">userdefine2 = #{userdefine2},</if>
- <if test="userdefine3 != null">userdefine3 = #{userdefine3},</if>
- <if test="userdefine4 != null">userdefine4 = #{userdefine4},</if>
- <if test="userdefine5 != null">userdefine5 = #{userdefine5},</if>
- <if test="userdefine6 != null">userdefine6 = #{userdefine6},</if>
- <if test="createTime != null">create_time = #{createTime},</if>
- <if test="createBy != null">create_by = #{createBy},</if>
- <if test="updateTime != null">update_time = #{updateTime},</if>
- <if test="updateBy != null">update_by = #{updateBy},</if>
- <if test="hEdi01 != null">h_edi_01 = #{hEdi01},</if>
- <if test="hEdi02 != null">h_edi_02 = #{hEdi02},</if>
- <if test="hEdi03 != null">h_edi_03 = #{hEdi03},</if>
- <if test="hEdi04 != null">h_edi_04 = #{hEdi04},</if>
- <if test="hEdi05 != null">h_edi_05 = #{hEdi05},</if>
- <if test="hEdi06 != null">h_edi_06 = #{hEdi06},</if>
- <if test="hEdi07 != null">h_edi_07 = #{hEdi07},</if>
- <if test="hEdi08 != null">h_edi_08 = #{hEdi08},</if>
- <if test="hEdi09 != null">h_edi_09 = #{hEdi09},</if>
- <if test="hEdi10 != null">h_edi_10 = #{hEdi10},</if>
- <if test="hEdi11 != null">h_edi_11 = #{hEdi11},</if>
- <if test="hEdi12 != null">h_edi_12 = #{hEdi12},</if>
- <if test="hEdi13 != null">h_edi_13 = #{hEdi13},</if>
- <if test="hEdi14 != null">h_edi_14 = #{hEdi14},</if>
- <if test="hEdi15 != null">h_edi_15 = #{hEdi15},</if>
- </trim>
- where order_no = #{orderNo}
- </update>
- <delete id="deleteWmsDocOrderHeaderByOrderNo" parameterType="String">
- delete from wms_doc_order_header where order_no = #{orderNo}
- </delete>
- <delete id="deleteWmsDocOrderHeaderByOrderNos" parameterType="String">
- delete from wms_doc_order_header where order_no in
- <foreach item="orderNo" collection="array" open="(" separator="," close=")">
- #{orderNo}
- </foreach>
- </delete>
- <delete id="deleteWmsDocOrderDetailsByOrderNos" parameterType="String">
- delete from wms_doc_order_details where order_no in
- <foreach item="orderNo" collection="array" open="(" separator="," close=")">
- #{orderNo}
- </foreach>
- </delete>
- <delete id="deleteWmsDocOrderDetailsByOrderNo" parameterType="String">
- delete from wms_doc_order_details where order_no = #{orderNo}
- </delete>
- <insert id="batchWmsDocOrderDetails">
- insert into wms_doc_order_details( order_no, order_line_no, customer_id, sku, line_status, qty_ordered, qty_ordered_each, qty_soft_allocated, qty_softallocated_each, qty_allocated, qty_allocated_each, qty_picked, qty_picked_each, qty_packed, qty_packed_each, qty_shipped, qty_shipped_each, uom, lotatt01, lotatt02, lotatt03, lotatt04, lotatt05, lotatt06, lotatt07, lotatt08, lotatt09, lotatt10, lotatt11, lotatt12, lotatt13, lotatt14, lotatt15, lotatt16, lotatt17, lotatt18, pack_id, pick_zone, location, lotnum, remark, create_time, create_by, update_time, update_by, net_weight, gross_weight, cubic, d_edi_01, d_edi_02, d_edi_03, d_edi_04, d_edi_05, d_edi_06, d_edi_07, d_edi_08, d_edi_09, d_edi_10, d_edi_11, d_edi_12, d_edi_13, d_edi_14, d_edi_15, d_edi_16, d_edi_17, d_edi_18, d_edi_19, d_edi_20, trace_id, soft_allocation_rule, allocation_rule, userdefine1, userdefine2, userdefine3, userdefine4, userdefine5) values
- <foreach item="item" index="index" collection="list" separator=",">
- ( #{item.orderNo}, #{item.orderLineNo}, #{item.customerId}, #{item.sku}, #{item.lineStatus}, #{item.qtyOrdered}, #{item.qtyOrderedEach}, #{item.qtySoftAllocated}, #{item.qtySoftallocatedEach}, #{item.qtyAllocated}, #{item.qtyAllocatedEach}, #{item.qtyPicked}, #{item.qtyPickedEach}, #{item.qtyPacked}, #{item.qtyPackedEach}, #{item.qtyShipped}, #{item.qtyShippedEach}, #{item.uom}, #{item.lotatt01}, #{item.lotatt02}, #{item.lotatt03}, #{item.lotatt04}, #{item.lotatt05}, #{item.lotatt06}, #{item.lotatt07}, #{item.lotatt08}, #{item.lotatt09}, #{item.lotatt10}, #{item.lotatt11}, #{item.lotatt12}, #{item.lotatt13}, #{item.lotatt14}, #{item.lotatt15}, #{item.lotatt16}, #{item.lotatt17}, #{item.lotatt18}, #{item.packId}, #{item.pickZone}, #{item.location}, #{item.lotnum}, #{item.remark}, #{item.createTime}, #{item.createBy}, #{item.updateTime}, #{item.updateBy}, #{item.netWeight}, #{item.grossWeight}, #{item.cubic}, #{item.dEdi01}, #{item.dEdi02}, #{item.dEdi03}, #{item.dEdi04}, #{item.dEdi05}, #{item.dEdi06}, #{item.dEdi07}, #{item.dEdi08}, #{item.dEdi09}, #{item.dEdi10}, #{item.dEdi11}, #{item.dEdi12}, #{item.dEdi13}, #{item.dEdi14}, #{item.dEdi15}, #{item.dEdi16}, #{item.dEdi17}, #{item.dEdi18}, #{item.dEdi19}, #{item.dEdi20}, #{item.traceId}, #{item.softAllocationRule}, #{item.allocationRule}, #{item.userdefine1}, #{item.userdefine2}, #{item.userdefine3}, #{item.userdefine4}, #{item.userdefine5})
- </foreach>
- </insert>
- <select id="selectLineNo" parameterType="String" resultType="long">
- select ifnull(max(order_line_no),0) from wms_doc_order_details where order_no = #{orderNo}
- </select>
- <select id="selectCheckOutList" parameterType="java.util.List" resultMap="CheckOutVOResult">
- select
- de.order_no,b.location_no,att.lotatt07 palletNo
- from wms_doc_order_details de
- left join base_sku sk on de.sku = sk.sku
- left join act_allocation_details act on de.order_no = act.order_no and de.order_line_no = act.line_no
- right join inv_lot_loc_id lotinv on lotinv.sku = de.sku and lotinv.lotnum = act.lotnum and lotinv.location_id = act.location_id
- left join inv_lot_att att on act.lotnum = att.lotnum
- left join base_location_info b on b.id = act.location_id
- where de.order_no in
- <foreach item="orderNo" collection="list" open="(" separator="," close=")">
- #{orderNo}
- </foreach>
- and act.`status` = '20' and b.stock_status = '00' and b.is_empty = 'N'
- group by de.order_no,b.location_no,att.lotatt07
- </select>
- </mapper>
|