272 lines
20 KiB
XML
272 lines
20 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.emis.mapper.EmisWarehouseInBatchMapper">
|
|
|
|
<resultMap type="EmisWarehouseInBatch" id="EmisWarehouseInBatchResult" extends="com.xdadan.erp.emis.mapper.EmisBaseMapper.EmisBaseResult">
|
|
<result property="id" column="id" />
|
|
<result property="serialNo" column="serial_no" />
|
|
<result property="inNo" column="in_no" />
|
|
<result property="inBatchNo" column="in_batch_no" />
|
|
<result property="customerCode" column="customer_code" />
|
|
<result property="customerName" column="customer_name" />
|
|
<result property="orderSn" column="order_sn" />
|
|
<result property="billCode" column="bill_code" />
|
|
<result property="transCarNo" column="trans_car_no" />
|
|
<result property="entryDate" column="entry_date" />
|
|
<result property="confirmStatus" column="confirm_status" />
|
|
<result property="confirmDate" column="confirm_date" />
|
|
<result property="blAbnormal" column="bl_abnormal" />
|
|
<result property="abnormalDate" column="abnormal_date" />
|
|
<result property="abnormalDesc" column="abnormal_desc" />
|
|
<result property="status" column="status" />
|
|
<result property="blPrepareInFreight" column="bl_prepare_in_freight" />
|
|
<result property="prepareInEstFee" column="prepare_in_est_fee" />
|
|
<result property="prepareInRealFee" column="prepare_in_real_fee" />
|
|
<result property="prepareInExpress" column="prepare_in_express" />
|
|
<result property="prepareInBillCode" column="prepare_in_bill_code" />
|
|
<result property="prepareInRemark" column="prepare_in_remark" />
|
|
<result property="prepareInSupplier" column="prepare_in_supplier" />
|
|
<result property="packType" column="pack_type" />
|
|
<result property="totalParcelQty" column="parcel_qty" />
|
|
<result property="totalVolume" column="total_volume" />
|
|
<result property="totalWeight" column="bill_weight" />
|
|
<result property="parcelQty" column="parcel_qty" />
|
|
<result property="billWeight" column="bill_weight" />
|
|
<result property="realValue" column="real_value" />
|
|
<result property="picUrl" column="pic_url" />
|
|
|
|
<association property="cargoList"
|
|
column="serial_no"
|
|
select="com.xdadan.erp.emis.mapper.EmisWarehouseInDtlMapper.selectWarehouseInDtlListBySerialNo"
|
|
fetchType="lazy"
|
|
/>
|
|
|
|
</resultMap>
|
|
|
|
<sql id="selectEmisWarehouseInBatchVo">
|
|
select id, serial_no, in_no, in_batch_no, customer_code, customer_name, order_sn, bill_code, trans_car_no, entry_date, confirm_status, confirm_date, bl_abnormal, abnormal_date, abnormal_desc, status, bl_prepare_in_freight, prepare_in_est_fee, prepare_in_real_fee, prepare_in_express, prepare_in_bill_code, prepare_in_remark, prepare_in_supplier, pack_type, total_parcel_qty, total_volume, total_weight, parcel_qty, bill_weight, real_value, pic_url, remark, tenant_id, del_flag, create_by, create_time, update_by, update_time, create_site, update_site from emis_warehouse_in_batch
|
|
</sql>
|
|
|
|
<select id="selectEmisWarehouseInBatchList" parameterType="EmisWarehouseInBatch" resultMap="EmisWarehouseInBatchResult">
|
|
<include refid="selectEmisWarehouseInBatchVo"/>
|
|
<where>
|
|
del_flag='0'
|
|
<if test="id != null "> and id = #{id}</if>
|
|
<if test="serialNo != null and serialNo != ''"> and serial_no=#{serialNo}</if>
|
|
<if test="inNo != null and inNo != ''"> and in_no=#{inNo}</if>
|
|
<if test="inBatchNo != null and inBatchNo != ''"> and in_batch_no like concat('%', #{inBatchNo}, '%')</if>
|
|
<if test="customerCode != null and customerCode != ''"> and customer_code=#{customerCode}</if>
|
|
<if test="customerName != null and customerName != ''"> and customer_name like concat('%', #{customerName}, '%')</if>
|
|
<if test="orderSn != null and orderSn != ''"> and order_sn like concat('%', #{orderSn}, '%')</if>
|
|
<if test="billCode != null and billCode != ''"> and bill_code like concat('%', #{billCode}, '%')</if>
|
|
<if test="transCarNo != null and transCarNo != ''"> and trans_car_no like concat('%', #{transCarNo}, '%')</if>
|
|
<if test="entryDate != null "> and entry_date = #{entryDate}</if>
|
|
<if test="confirmStatus != null and confirmStatus != ''"> and confirm_status like concat('%', #{confirmStatus}, '%')</if>
|
|
<if test="confirmDate != null "> and confirm_date = #{confirmDate}</if>
|
|
<if test="status != null and status != ''"> and status like concat('%', #{status}, '%')</if>
|
|
<if test="blPrepareInFreight != null and blPrepareInFreight != ''"> and bl_prepare_in_freight like concat('%', #{blPrepareInFreight}, '%')</if>
|
|
<if test="prepareInEstFee != null "> and prepare_in_est_fee = #{prepareInEstFee}</if>
|
|
<if test="prepareInRealFee != null "> and prepare_in_real_fee = #{prepareInRealFee}</if>
|
|
<if test="prepareInExpress != null and prepareInExpress != ''"> and prepare_in_express like concat('%', #{prepareInExpress}, '%')</if>
|
|
<if test="prepareInBillCode != null and prepareInBillCode != ''"> and prepare_in_bill_code like concat('%', #{prepareInBillCode}, '%')</if>
|
|
<if test="prepareInRemark != null and prepareInRemark != ''"> and prepare_in_remark like concat('%', #{prepareInRemark}, '%')</if>
|
|
<if test="prepareInSupplier != null and prepareInSupplier != ''"> and prepare_in_supplier like concat('%', #{prepareInSupplier}, '%')</if>
|
|
<if test="packType != null and packType != ''"> and pack_type like concat('%', #{packType}, '%')</if>
|
|
<if test="totalParcelQty != null "> and total_parcel_qty = #{totalParcelQty}</if>
|
|
<if test="totalVolume != null "> and total_volume = #{totalVolume}</if>
|
|
<if test="totalWeight != null "> and total_weight = #{totalWeight}</if>
|
|
<if test="picUrl != null and picUrl != ''"> and pic_url like concat('%', #{picUrl}, '%')</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>
|
|
<if test="createSite != null and createSite != ''"> and create_site like concat('%', #{createSite}, '%')</if>
|
|
<if test="updateSite != null and updateSite != ''"> and update_site like concat('%', #{updateSite}, '%')</if>
|
|
|
|
<if test="blAbnormal != null and blAbnormal != ''"> and bl_abnormal like concat('%', #{blAbnormal}, '%')</if>
|
|
<if test="abnormalDate != null "> and abnormal_date = #{abnormalDate}</if>
|
|
<if test="abnormalDesc != null and abnormalDesc != ''"> and abnormal_desc like concat('%', #{abnormalDesc}, '%')</if>
|
|
</where>
|
|
order by create_time desc
|
|
</select>
|
|
|
|
<select id="selectEmisWarehouseInBatchById" parameterType="Long" resultMap="EmisWarehouseInBatchResult">
|
|
select id, serial_no, in_no, in_batch_no, customer_code, customer_name, order_sn, bill_code, trans_car_no, entry_date, confirm_status, confirm_date, bl_abnormal, abnormal_date, abnormal_desc, status, bl_prepare_in_freight, prepare_in_est_fee, prepare_in_real_fee, prepare_in_express, prepare_in_bill_code, prepare_in_remark, prepare_in_supplier, pack_type, total_parcel_qty, total_volume, total_weight, parcel_qty, bill_weight, real_value, pic_url, remark, tenant_id, del_flag, create_by, create_time, update_by, update_time, create_site, update_site
|
|
from emis_warehouse_in_batch a
|
|
where a.id = #{id}
|
|
</select>
|
|
|
|
<select id="selectInBatchListByInNo" parameterType="String" resultMap="EmisWarehouseInBatchResult">
|
|
select id, serial_no, in_no, in_batch_no, customer_code, customer_name, order_sn, bill_code, trans_car_no, entry_date, confirm_status, confirm_date, bl_abnormal, abnormal_date, abnormal_desc, status, bl_prepare_in_freight, prepare_in_est_fee, prepare_in_real_fee, prepare_in_express, prepare_in_bill_code, prepare_in_remark, prepare_in_supplier, pack_type, total_parcel_qty, total_volume, total_weight, parcel_qty, bill_weight, real_value, pic_url, remark, tenant_id, del_flag, create_by, create_time, update_by, update_time, create_site, update_site
|
|
from emis_warehouse_in_batch a
|
|
where del_flag='0' and a.in_no = #{inNo}
|
|
</select>
|
|
|
|
<insert id="insertEmisWarehouseInBatch" parameterType="EmisWarehouseInBatch" useGeneratedKeys="true" keyProperty="id">
|
|
insert into emis_warehouse_in_batch
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
<if test="serialNo != null and serialNo != ''">serial_no,</if>
|
|
<if test="inNo != null and inNo != ''">in_no,</if>
|
|
<if test="inBatchNo != null and inBatchNo != ''">in_batch_no,</if>
|
|
<if test="customerCode != null and customerCode != ''">customer_code,</if>
|
|
<if test="customerName != null and customerName != ''">customer_name,</if>
|
|
<if test="orderSn != null and orderSn != ''">order_sn,</if>
|
|
<if test="billCode != null and billCode != ''">bill_code,</if>
|
|
<if test="transCarNo != null and transCarNo != ''">trans_car_no,</if>
|
|
<if test="entryDate != null">entry_date,</if>
|
|
<if test="confirmStatus != null and confirmStatus != ''">confirm_status,</if>
|
|
<if test="confirmDate != null">confirm_date,</if>
|
|
<if test="blAbnormal != null and blAbnormal != ''">bl_abnormal,</if>
|
|
<if test="abnormalDate != null">abnormal_date,</if>
|
|
<if test="abnormalDesc != null and abnormalDesc != ''">abnormal_desc,</if>
|
|
<if test="status != null and status != ''">status,</if>
|
|
<if test="blPrepareInFreight != null and blPrepareInFreight != ''">bl_prepare_in_freight,</if>
|
|
<if test="prepareInEstFee != null">prepare_in_est_fee,</if>
|
|
<if test="prepareInRealFee != null">prepare_in_real_fee,</if>
|
|
<if test="prepareInExpress != null and prepareInExpress != ''">prepare_in_express,</if>
|
|
<if test="prepareInBillCode != null and prepareInBillCode != ''">prepare_in_bill_code,</if>
|
|
<if test="prepareInRemark != null and prepareInRemark != ''">prepare_in_remark,</if>
|
|
<if test="prepareInSupplier != null and prepareInSupplier != ''">prepare_in_supplier,</if>
|
|
<if test="packType != null and packType != ''">pack_type,</if>
|
|
<if test="totalParcelQty != null">total_parcel_qty,</if>
|
|
<if test="totalVolume != null">total_volume,</if>
|
|
<if test="totalWeight != null">total_weight,</if>
|
|
<if test="parcelQty != null">parcel_qty,</if>
|
|
<if test="billWeight != null">bill_weight,</if>
|
|
<if test="realValue != null and realValue != ''">real_value,</if>
|
|
<if test="picUrl != null and picUrl != ''">pic_url,</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>
|
|
<if test="createSite != null and createSite != ''">create_site,</if>
|
|
<if test="updateSite != null and updateSite != ''">update_site,</if>
|
|
</trim>
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
<if test="serialNo != null and serialNo != ''">#{serialNo},</if>
|
|
<if test="inNo != null and inNo != ''">#{inNo},</if>
|
|
<if test="inBatchNo != null and inBatchNo != ''">#{inBatchNo},</if>
|
|
<if test="customerCode != null and customerCode != ''">#{customerCode},</if>
|
|
<if test="customerName != null and customerName != ''">#{customerName},</if>
|
|
<if test="orderSn != null and orderSn != ''">#{orderSn},</if>
|
|
<if test="billCode != null and billCode != ''">#{billCode},</if>
|
|
<if test="transCarNo != null and transCarNo != ''">#{transCarNo},</if>
|
|
<if test="entryDate != null">#{entryDate},</if>
|
|
<if test="confirmStatus != null and confirmStatus != ''">#{confirmStatus},</if>
|
|
<if test="confirmDate != null">#{confirmDate},</if>
|
|
<if test="blAbnormal != null and blAbnormal != ''">#{blAbnormal},</if>
|
|
<if test="abnormalDate != null">#{abnormalDate},</if>
|
|
<if test="abnormalDesc != null and abnormalDesc != ''">#{abnormalDesc},</if>
|
|
<if test="status != null and status != ''">#{status},</if>
|
|
<if test="blPrepareInFreight != null and blPrepareInFreight != ''">#{blPrepareInFreight},</if>
|
|
<if test="prepareInEstFee != null">#{prepareInEstFee},</if>
|
|
<if test="prepareInRealFee != null">#{prepareInRealFee},</if>
|
|
<if test="prepareInExpress != null and prepareInExpress != ''">#{prepareInExpress},</if>
|
|
<if test="prepareInBillCode != null and prepareInBillCode != ''">#{prepareInBillCode},</if>
|
|
<if test="prepareInRemark != null and prepareInRemark != ''">#{prepareInRemark},</if>
|
|
<if test="prepareInSupplier != null and prepareInSupplier != ''">#{prepareInSupplier},</if>
|
|
<if test="packType != null and packType != ''">#{packType},</if>
|
|
<if test="totalParcelQty != null">#{totalParcelQty},</if>
|
|
<if test="totalVolume != null">#{totalVolume},</if>
|
|
<if test="totalWeight != null">#{totalWeight},</if>
|
|
<if test="parcelQty != null">#{parcelQty},</if>
|
|
<if test="billWeight != null">#{billWeight},</if>
|
|
<if test="realValue != null and realValue != ''">#{realValue},</if>
|
|
<if test="picUrl != null and picUrl != ''">#{picUrl},</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>
|
|
<if test="createSite != null and createSite != ''">#{createSite},</if>
|
|
<if test="updateSite != null and updateSite != ''">#{updateSite},</if>
|
|
</trim>
|
|
</insert>
|
|
|
|
<update id="updateEmisWarehouseInBatch" parameterType="EmisWarehouseInBatch">
|
|
update emis_warehouse_in_batch
|
|
<trim prefix="SET" suffixOverrides=",">
|
|
<if test="serialNo != null and serialNo != ''">serial_no = #{serialNo},</if>
|
|
<if test="inNo != null and inNo != ''">in_no = #{inNo},</if>
|
|
<if test="inBatchNo != null and inBatchNo != ''">in_batch_no = #{inBatchNo},</if>
|
|
<if test="customerCode != null and customerCode != ''">customer_code = #{customerCode},</if>
|
|
<if test="customerName != null and customerName != ''">customer_name = #{customerName},</if>
|
|
<if test="orderSn != null and orderSn != ''">order_sn = #{orderSn},</if>
|
|
<if test="billCode != null and billCode != ''">bill_code = #{billCode},</if>
|
|
<if test="transCarNo != null and transCarNo != ''">trans_car_no = #{transCarNo},</if>
|
|
<if test="entryDate != null">entry_date = #{entryDate},</if>
|
|
<if test="confirmStatus != null and confirmStatus != ''">confirm_status = #{confirmStatus},</if>
|
|
<if test="confirmDate != null">confirm_date = #{confirmDate},</if>
|
|
<if test="blAbnormal != null and blAbnormal != ''">bl_abnormal = #{blAbnormal},</if>
|
|
<if test="abnormalDate != null">abnormal_date = #{abnormalDate},</if>
|
|
<if test="abnormalDesc != null and abnormalDesc != ''">abnormal_desc = #{abnormalDesc},</if>
|
|
<if test="status != null and status != ''">status = #{status},</if>
|
|
<if test="blPrepareInFreight != null and blPrepareInFreight != ''">bl_prepare_in_freight = #{blPrepareInFreight},</if>
|
|
<if test="prepareInEstFee != null">prepare_in_est_fee = #{prepareInEstFee},</if>
|
|
<if test="prepareInRealFee != null">prepare_in_real_fee = #{prepareInRealFee},</if>
|
|
<if test="prepareInExpress != null and prepareInExpress != ''">prepare_in_express = #{prepareInExpress},</if>
|
|
<if test="prepareInBillCode != null and prepareInBillCode != ''">prepare_in_bill_code = #{prepareInBillCode},</if>
|
|
<if test="prepareInRemark != null and prepareInRemark != ''">prepare_in_remark = #{prepareInRemark},</if>
|
|
<if test="prepareInSupplier != null and prepareInSupplier != ''">prepare_in_supplier = #{prepareInSupplier},</if>
|
|
<if test="packType != null and packType != ''">pack_type = #{packType},</if>
|
|
<if test="totalParcelQty != null">total_parcel_qty = #{totalParcelQty},</if>
|
|
<if test="totalVolume != null">total_volume = #{totalVolume},</if>
|
|
<if test="totalWeight != null">total_weight = #{totalWeight},</if>
|
|
<if test="parcelQty != null">parcel_qty = #{parcelQty},</if>
|
|
<if test="billWeight != null">bill_weight = #{billWeight},</if>
|
|
<if test="realValue != null and realValue != ''">real_value = #{realValue},</if>
|
|
<if test="picUrl != null and picUrl != ''">pic_url = #{picUrl},</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>
|
|
<if test="createSite != null and createSite != ''">create_site = #{createSite},</if>
|
|
<if test="updateSite != null and updateSite != ''">update_site = #{updateSite},</if>
|
|
</trim>
|
|
where id = #{id}
|
|
</update>
|
|
|
|
<update id="updateAbnormalByOms" parameterType="EmisWarehouseInBatch">
|
|
update emis_warehouse_in_batch set bl_abnormal = '1',abnormal_date=now(),abnormal_desc = #{abnormalDesc}
|
|
where serial_no = #{serialNo}
|
|
</update>
|
|
|
|
<!-- 单次入库确认 -->
|
|
<update id="cusConfirmBatchWsInByOms" parameterType="EmisWarehouseIn">
|
|
update emis_warehouse_in_batch set confirm_status=#{confirmStatus},confirm_date=now()
|
|
where in_no = #{inNo} and serial_no = #{serialNo} and customer_code = #{customerCode}
|
|
</update>
|
|
|
|
<!-- 全部入库确认 -->
|
|
<update id="cusConfirmAllWsInByOms" parameterType="EmisWarehouseIn">
|
|
update emis_warehouse_in set confirm_status=#{confirmStatus},confirm_date=now()
|
|
where in_no = #{inNo} and customer_code = #{customerCode}
|
|
</update>
|
|
|
|
|
|
<delete id="deleteEmisWarehouseInBatchById" parameterType="Long">
|
|
update emis_warehouse_in_batch set del_flag='1' where id = #{id}
|
|
</delete>
|
|
|
|
<delete id="deleteEmisWarehouseInBatchByIds" parameterType="String">
|
|
update emis_warehouse_in_batch set del_flag='1' where id in
|
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
|
#{id}
|
|
</foreach>
|
|
</delete>
|
|
|
|
|
|
</mapper> |