271 lines
19 KiB
XML
271 lines
19 KiB
XML
|
|
<?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.xdadan.erp.wms.mapper.WmsOrderMapper">
|
||
|
|
|
||
|
|
<resultMap type="WmsOrder" id="WmsOrderResult">
|
||
|
|
<result property="id" column="id" />
|
||
|
|
<result property="sysNo" column="sys_no" />
|
||
|
|
<result property="cusOrderSn" column="cus_order_sn" />
|
||
|
|
<result property="orderType" column="order_type" />
|
||
|
|
<result property="cusNo" column="cus_no" />
|
||
|
|
<result property="consignee" column="consignee" />
|
||
|
|
<result property="mobile" column="mobile" />
|
||
|
|
<result property="country" column="country" />
|
||
|
|
<result property="province" column="province" />
|
||
|
|
<result property="city" column="city" />
|
||
|
|
<result property="district" column="district" />
|
||
|
|
<result property="address" column="address" />
|
||
|
|
<result property="zipCode" column="zip_code" />
|
||
|
|
<result property="message" column="message" />
|
||
|
|
<result property="shipChannel" column="ship_channel" />
|
||
|
|
<result property="shipNo" column="ship_no" />
|
||
|
|
<result property="shipTime" column="ship_time" />
|
||
|
|
<result property="shipStatus" column="ship_status" />
|
||
|
|
<result property="orderStatus" column="order_status" />
|
||
|
|
<result property="orderTime" column="order_time" />
|
||
|
|
<result property="confirmStatus" column="confirm_status" />
|
||
|
|
<result property="confirmBy" column="confirm_by" />
|
||
|
|
<result property="confirmMsg" column="confirm_msg" />
|
||
|
|
<result property="confirmTime" column="confirm_time" />
|
||
|
|
<result property="grossWeight" column="gross_weight" />
|
||
|
|
<result property="netWeight" column="net_weight" />
|
||
|
|
<result property="weightTime" column="weight_time" />
|
||
|
|
<result property="packStatus" column="pack_status" />
|
||
|
|
<result property="packTime" column="pack_time" />
|
||
|
|
<result property="transportStatus" column="transport_status" />
|
||
|
|
<result property="transportTime" column="transport_time" />
|
||
|
|
<result property="transportMainNo" column="transport_main_no" />
|
||
|
|
<result property="hangStatus" column="hang_status" />
|
||
|
|
<result property="hangTime" column="hang_time" />
|
||
|
|
<result property="hangMsg" column="hang_msg" />
|
||
|
|
<result property="parentId" column="parent_id" />
|
||
|
|
<result property="isSplit" column="is_split" />
|
||
|
|
<result property="remark" column="remark" />
|
||
|
|
<result property="tenantId" column="tenant_id" />
|
||
|
|
<result property="delFlag" column="del_flag" />
|
||
|
|
<result property="createBy" column="create_by" />
|
||
|
|
<result property="createTime" column="create_time" />
|
||
|
|
<result property="updateBy" column="update_by" />
|
||
|
|
<result property="updateTime" column="update_time" />
|
||
|
|
</resultMap>
|
||
|
|
|
||
|
|
<sql id="selectWmsOrderVo">
|
||
|
|
select id, sys_no, cus_order_sn, order_type, cus_no, consignee, mobile, country, province, city, district, address, zip_code, message, ship_channel, ship_no, ship_time, ship_status, order_status, order_time, confirm_status, confirm_by, confirm_msg, confirm_time, gross_weight, net_weight, weight_time, pack_status, pack_time, transport_status, transport_time, transport_main_no, hang_status, hang_time, hang_msg, parent_id, is_split, remark, tenant_id, del_flag, create_by, create_time, update_by, update_time from wms_order
|
||
|
|
</sql>
|
||
|
|
|
||
|
|
<select id="selectWmsOrderList" parameterType="WmsOrder" resultMap="WmsOrderResult">
|
||
|
|
<include refid="selectWmsOrderVo"/>
|
||
|
|
<where>
|
||
|
|
<if test="id != null "> and id = #{id}</if>
|
||
|
|
<if test="sysNo != null and sysNo != ''"> and sys_no like concat('%', #{sysNo}, '%')</if>
|
||
|
|
<if test="cusOrderSn != null and cusOrderSn != ''"> and cus_order_sn like concat('%', #{cusOrderSn}, '%')</if>
|
||
|
|
<if test="orderType != null "> and order_type = #{orderType}</if>
|
||
|
|
<if test="cusNo != null and cusNo != ''"> and cus_no like concat('%', #{cusNo}, '%')</if>
|
||
|
|
<if test="consignee != null and consignee != ''"> and consignee like concat('%', #{consignee}, '%')</if>
|
||
|
|
<if test="mobile != null and mobile != ''"> and mobile like concat('%', #{mobile}, '%')</if>
|
||
|
|
<if test="country != null and country != ''"> and country like concat('%', #{country}, '%')</if>
|
||
|
|
<if test="province != null and province != ''"> and province like concat('%', #{province}, '%')</if>
|
||
|
|
<if test="city != null and city != ''"> and city like concat('%', #{city}, '%')</if>
|
||
|
|
<if test="district != null and district != ''"> and district like concat('%', #{district}, '%')</if>
|
||
|
|
<if test="address != null and address != ''"> and address like concat('%', #{address}, '%')</if>
|
||
|
|
<if test="zipCode != null and zipCode != ''"> and zip_code like concat('%', #{zipCode}, '%')</if>
|
||
|
|
<if test="message != null and message != ''"> and message like concat('%', #{message}, '%')</if>
|
||
|
|
<if test="shipChannel != null and shipChannel != ''"> and ship_channel like concat('%', #{shipChannel}, '%')</if>
|
||
|
|
<if test="shipNo != null and shipNo != ''"> and ship_no like concat('%', #{shipNo}, '%')</if>
|
||
|
|
<if test="shipTime != null "> and ship_time = #{shipTime}</if>
|
||
|
|
<if test="shipStatus != null "> and ship_status = #{shipStatus}</if>
|
||
|
|
<if test="orderStatus != null "> and order_status = #{orderStatus}</if>
|
||
|
|
<if test="orderTime != null "> and order_time = #{orderTime}</if>
|
||
|
|
<if test="confirmStatus != null "> and confirm_status = #{confirmStatus}</if>
|
||
|
|
<if test="confirmBy != null and confirmBy != ''"> and confirm_by like concat('%', #{confirmBy}, '%')</if>
|
||
|
|
<if test="confirmMsg != null and confirmMsg != ''"> and confirm_msg like concat('%', #{confirmMsg}, '%')</if>
|
||
|
|
<if test="confirmTime != null "> and confirm_time = #{confirmTime}</if>
|
||
|
|
<if test="grossWeight != null "> and gross_weight = #{grossWeight}</if>
|
||
|
|
<if test="netWeight != null "> and net_weight = #{netWeight}</if>
|
||
|
|
<if test="weightTime != null "> and weight_time = #{weightTime}</if>
|
||
|
|
<if test="packStatus != null "> and pack_status = #{packStatus}</if>
|
||
|
|
<if test="packTime != null "> and pack_time = #{packTime}</if>
|
||
|
|
<if test="transportStatus != null "> and transport_status = #{transportStatus}</if>
|
||
|
|
<if test="transportTime != null "> and transport_time = #{transportTime}</if>
|
||
|
|
<if test="transportMainNo != null and transportMainNo != ''"> and transport_main_no like concat('%', #{transportMainNo}, '%')</if>
|
||
|
|
<if test="hangStatus != null "> and hang_status = #{hangStatus}</if>
|
||
|
|
<if test="hangTime != null "> and hang_time = #{hangTime}</if>
|
||
|
|
<if test="hangMsg != null and hangMsg != ''"> and hang_msg like concat('%', #{hangMsg}, '%')</if>
|
||
|
|
<if test="parentId != null "> and parent_id = #{parentId}</if>
|
||
|
|
<if test="isSplit != null "> and is_split = #{isSplit}</if>
|
||
|
|
<if test="remark != null and remark != ''"> and remark like concat('%', #{remark}, '%')</if>
|
||
|
|
<if test="tenantId != null and tenantId != ''"> and tenant_id like concat('%', #{tenantId}, '%')</if>
|
||
|
|
<if test="delFlag != null and delFlag != ''"> and del_flag like concat('%', #{delFlag}, '%')</if>
|
||
|
|
<if test="createBy != null and createBy != ''"> and create_by like concat('%', #{createBy}, '%')</if>
|
||
|
|
<if test="createTime != null "> and create_time = #{createTime}</if>
|
||
|
|
<if test="updateBy != null and updateBy != ''"> and update_by like concat('%', #{updateBy}, '%')</if>
|
||
|
|
<if test="updateTime != null "> and update_time = #{updateTime}</if>
|
||
|
|
</where>
|
||
|
|
order by create_time desc
|
||
|
|
</select>
|
||
|
|
|
||
|
|
<select id="selectWmsOrderById" parameterType="Long" resultMap="WmsOrderResult">
|
||
|
|
select id, sys_no, cus_order_sn, order_type, cus_no, consignee, mobile, country, province, city, district, address, zip_code, message, ship_channel, ship_no, ship_time, ship_status, order_status, order_time, confirm_status, confirm_by, confirm_msg, confirm_time, gross_weight, net_weight, weight_time, pack_status, pack_time, transport_status, transport_time, transport_main_no, hang_status, hang_time, hang_msg, parent_id, is_split, remark, tenant_id, del_flag, create_by, create_time, update_by, update_time
|
||
|
|
from wms_order a
|
||
|
|
where a.id = #{id}
|
||
|
|
</select>
|
||
|
|
|
||
|
|
<insert id="insertWmsOrder" parameterType="WmsOrder">
|
||
|
|
insert into wms_order
|
||
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||
|
|
<if test="id != null">id,</if>
|
||
|
|
<if test="sysNo != null and sysNo != ''">sys_no,</if>
|
||
|
|
<if test="cusOrderSn != null and cusOrderSn != ''">cus_order_sn,</if>
|
||
|
|
<if test="orderType != null">order_type,</if>
|
||
|
|
<if test="cusNo != null and cusNo != ''">cus_no,</if>
|
||
|
|
<if test="consignee != null and consignee != ''">consignee,</if>
|
||
|
|
<if test="mobile != null and mobile != ''">mobile,</if>
|
||
|
|
<if test="country != null and country != ''">country,</if>
|
||
|
|
<if test="province != null and province != ''">province,</if>
|
||
|
|
<if test="city != null and city != ''">city,</if>
|
||
|
|
<if test="district != null and district != ''">district,</if>
|
||
|
|
<if test="address != null and address != ''">address,</if>
|
||
|
|
<if test="zipCode != null and zipCode != ''">zip_code,</if>
|
||
|
|
<if test="message != null and message != ''">message,</if>
|
||
|
|
<if test="shipChannel != null and shipChannel != ''">ship_channel,</if>
|
||
|
|
<if test="shipNo != null and shipNo != ''">ship_no,</if>
|
||
|
|
<if test="shipTime != null">ship_time,</if>
|
||
|
|
<if test="shipStatus != null">ship_status,</if>
|
||
|
|
<if test="orderStatus != null">order_status,</if>
|
||
|
|
<if test="orderTime != null">order_time,</if>
|
||
|
|
<if test="confirmStatus != null">confirm_status,</if>
|
||
|
|
<if test="confirmBy != null and confirmBy != ''">confirm_by,</if>
|
||
|
|
<if test="confirmMsg != null and confirmMsg != ''">confirm_msg,</if>
|
||
|
|
<if test="confirmTime != null">confirm_time,</if>
|
||
|
|
<if test="grossWeight != null">gross_weight,</if>
|
||
|
|
<if test="netWeight != null">net_weight,</if>
|
||
|
|
<if test="weightTime != null">weight_time,</if>
|
||
|
|
<if test="packStatus != null">pack_status,</if>
|
||
|
|
<if test="packTime != null">pack_time,</if>
|
||
|
|
<if test="transportStatus != null">transport_status,</if>
|
||
|
|
<if test="transportTime != null">transport_time,</if>
|
||
|
|
<if test="transportMainNo != null and transportMainNo != ''">transport_main_no,</if>
|
||
|
|
<if test="hangStatus != null">hang_status,</if>
|
||
|
|
<if test="hangTime != null">hang_time,</if>
|
||
|
|
<if test="hangMsg != null and hangMsg != ''">hang_msg,</if>
|
||
|
|
<if test="parentId != null">parent_id,</if>
|
||
|
|
<if test="isSplit != null">is_split,</if>
|
||
|
|
<if test="remark != null and remark != ''">remark,</if>
|
||
|
|
<if test="tenantId != null and tenantId != ''">tenant_id,</if>
|
||
|
|
<if test="delFlag != null and delFlag != ''">del_flag,</if>
|
||
|
|
<if test="createBy != null and createBy != ''">create_by,</if>
|
||
|
|
<if test="createTime != null">create_time,</if>
|
||
|
|
<if test="updateBy != null and updateBy != ''">update_by,</if>
|
||
|
|
<if test="updateTime != null">update_time,</if>
|
||
|
|
</trim>
|
||
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||
|
|
<if test="id != null">#{id},</if>
|
||
|
|
<if test="sysNo != null and sysNo != ''">#{sysNo},</if>
|
||
|
|
<if test="cusOrderSn != null and cusOrderSn != ''">#{cusOrderSn},</if>
|
||
|
|
<if test="orderType != null">#{orderType},</if>
|
||
|
|
<if test="cusNo != null and cusNo != ''">#{cusNo},</if>
|
||
|
|
<if test="consignee != null and consignee != ''">#{consignee},</if>
|
||
|
|
<if test="mobile != null and mobile != ''">#{mobile},</if>
|
||
|
|
<if test="country != null and country != ''">#{country},</if>
|
||
|
|
<if test="province != null and province != ''">#{province},</if>
|
||
|
|
<if test="city != null and city != ''">#{city},</if>
|
||
|
|
<if test="district != null and district != ''">#{district},</if>
|
||
|
|
<if test="address != null and address != ''">#{address},</if>
|
||
|
|
<if test="zipCode != null and zipCode != ''">#{zipCode},</if>
|
||
|
|
<if test="message != null and message != ''">#{message},</if>
|
||
|
|
<if test="shipChannel != null and shipChannel != ''">#{shipChannel},</if>
|
||
|
|
<if test="shipNo != null and shipNo != ''">#{shipNo},</if>
|
||
|
|
<if test="shipTime != null">#{shipTime},</if>
|
||
|
|
<if test="shipStatus != null">#{shipStatus},</if>
|
||
|
|
<if test="orderStatus != null">#{orderStatus},</if>
|
||
|
|
<if test="orderTime != null">#{orderTime},</if>
|
||
|
|
<if test="confirmStatus != null">#{confirmStatus},</if>
|
||
|
|
<if test="confirmBy != null and confirmBy != ''">#{confirmBy},</if>
|
||
|
|
<if test="confirmMsg != null and confirmMsg != ''">#{confirmMsg},</if>
|
||
|
|
<if test="confirmTime != null">#{confirmTime},</if>
|
||
|
|
<if test="grossWeight != null">#{grossWeight},</if>
|
||
|
|
<if test="netWeight != null">#{netWeight},</if>
|
||
|
|
<if test="weightTime != null">#{weightTime},</if>
|
||
|
|
<if test="packStatus != null">#{packStatus},</if>
|
||
|
|
<if test="packTime != null">#{packTime},</if>
|
||
|
|
<if test="transportStatus != null">#{transportStatus},</if>
|
||
|
|
<if test="transportTime != null">#{transportTime},</if>
|
||
|
|
<if test="transportMainNo != null and transportMainNo != ''">#{transportMainNo},</if>
|
||
|
|
<if test="hangStatus != null">#{hangStatus},</if>
|
||
|
|
<if test="hangTime != null">#{hangTime},</if>
|
||
|
|
<if test="hangMsg != null and hangMsg != ''">#{hangMsg},</if>
|
||
|
|
<if test="parentId != null">#{parentId},</if>
|
||
|
|
<if test="isSplit != null">#{isSplit},</if>
|
||
|
|
<if test="remark != null and remark != ''">#{remark},</if>
|
||
|
|
<if test="tenantId != null and tenantId != ''">#{tenantId},</if>
|
||
|
|
<if test="delFlag != null and delFlag != ''">#{delFlag},</if>
|
||
|
|
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
||
|
|
<if test="createTime != null">#{createTime},</if>
|
||
|
|
<if test="updateBy != null and updateBy != ''">#{updateBy},</if>
|
||
|
|
<if test="updateTime != null">#{updateTime},</if>
|
||
|
|
</trim>
|
||
|
|
</insert>
|
||
|
|
|
||
|
|
<update id="updateWmsOrder" parameterType="WmsOrder">
|
||
|
|
update wms_order
|
||
|
|
<trim prefix="SET" suffixOverrides=",">
|
||
|
|
<if test="sysNo != null and sysNo != ''">sys_no = #{sysNo},</if>
|
||
|
|
<if test="cusOrderSn != null and cusOrderSn != ''">cus_order_sn = #{cusOrderSn},</if>
|
||
|
|
<if test="orderType != null">order_type = #{orderType},</if>
|
||
|
|
<if test="cusNo != null and cusNo != ''">cus_no = #{cusNo},</if>
|
||
|
|
<if test="consignee != null and consignee != ''">consignee = #{consignee},</if>
|
||
|
|
<if test="mobile != null and mobile != ''">mobile = #{mobile},</if>
|
||
|
|
<if test="country != null and country != ''">country = #{country},</if>
|
||
|
|
<if test="province != null and province != ''">province = #{province},</if>
|
||
|
|
<if test="city != null and city != ''">city = #{city},</if>
|
||
|
|
<if test="district != null and district != ''">district = #{district},</if>
|
||
|
|
<if test="address != null and address != ''">address = #{address},</if>
|
||
|
|
<if test="zipCode != null and zipCode != ''">zip_code = #{zipCode},</if>
|
||
|
|
<if test="message != null and message != ''">message = #{message},</if>
|
||
|
|
<if test="shipChannel != null and shipChannel != ''">ship_channel = #{shipChannel},</if>
|
||
|
|
<if test="shipNo != null and shipNo != ''">ship_no = #{shipNo},</if>
|
||
|
|
<if test="shipTime != null">ship_time = #{shipTime},</if>
|
||
|
|
<if test="shipStatus != null">ship_status = #{shipStatus},</if>
|
||
|
|
<if test="orderStatus != null">order_status = #{orderStatus},</if>
|
||
|
|
<if test="orderTime != null">order_time = #{orderTime},</if>
|
||
|
|
<if test="confirmStatus != null">confirm_status = #{confirmStatus},</if>
|
||
|
|
<if test="confirmBy != null and confirmBy != ''">confirm_by = #{confirmBy},</if>
|
||
|
|
<if test="confirmMsg != null and confirmMsg != ''">confirm_msg = #{confirmMsg},</if>
|
||
|
|
<if test="confirmTime != null">confirm_time = #{confirmTime},</if>
|
||
|
|
<if test="grossWeight != null">gross_weight = #{grossWeight},</if>
|
||
|
|
<if test="netWeight != null">net_weight = #{netWeight},</if>
|
||
|
|
<if test="weightTime != null">weight_time = #{weightTime},</if>
|
||
|
|
<if test="packStatus != null">pack_status = #{packStatus},</if>
|
||
|
|
<if test="packTime != null">pack_time = #{packTime},</if>
|
||
|
|
<if test="transportStatus != null">transport_status = #{transportStatus},</if>
|
||
|
|
<if test="transportTime != null">transport_time = #{transportTime},</if>
|
||
|
|
<if test="transportMainNo != null and transportMainNo != ''">transport_main_no = #{transportMainNo},</if>
|
||
|
|
<if test="hangStatus != null">hang_status = #{hangStatus},</if>
|
||
|
|
<if test="hangTime != null">hang_time = #{hangTime},</if>
|
||
|
|
<if test="hangMsg != null and hangMsg != ''">hang_msg = #{hangMsg},</if>
|
||
|
|
<if test="parentId != null">parent_id = #{parentId},</if>
|
||
|
|
<if test="isSplit != null">is_split = #{isSplit},</if>
|
||
|
|
<if test="remark != null and remark != ''">remark = #{remark},</if>
|
||
|
|
<if test="tenantId != null and tenantId != ''">tenant_id = #{tenantId},</if>
|
||
|
|
<if test="delFlag != null and delFlag != ''">del_flag = #{delFlag},</if>
|
||
|
|
<if test="createBy != null and createBy != ''">create_by = #{createBy},</if>
|
||
|
|
<if test="createTime != null">create_time = #{createTime},</if>
|
||
|
|
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
|
||
|
|
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||
|
|
</trim>
|
||
|
|
where id = #{id}
|
||
|
|
</update>
|
||
|
|
|
||
|
|
<delete id="deleteWmsOrderById" parameterType="Long">
|
||
|
|
delete from wms_order where id = #{id}
|
||
|
|
</delete>
|
||
|
|
|
||
|
|
<delete id="deleteWmsOrderByIds" parameterType="String">
|
||
|
|
delete from wms_order where id in
|
||
|
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||
|
|
#{id}
|
||
|
|
</foreach>
|
||
|
|
</delete>
|
||
|
|
</mapper>
|