99 lines
4.8 KiB
XML
99 lines
4.8 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.mhd.wms.domain.stockInTaskOrder.repository.mapper.StockInTaskOrderMapper">
|
|
|
|
<resultMap type="com.mhd.wms.domain.stockInTaskOrder.repository.po.StockInTaskOrderPO" id="StockInTaskOrderResult">
|
|
<result property="inTaskOrderId" column="in_task_order_id" />
|
|
<result property="organizationId" column="organization_id" />
|
|
<result property="organizationName" column="organization_name" />
|
|
<result property="topOrganizationId" column="top_organization_id" />
|
|
<result property="serialNumber" column="serial_number" />
|
|
<result property="type" column="type" />
|
|
<result property="taskNumber" column="task_number" />
|
|
<result property="actualQuantity" column="actual_quantity" />
|
|
<result property="operatorsBy" column="operators_by" />
|
|
<result property="operatorsName" column="operators_name" />
|
|
<result property="operatorsEndTime" column="operators_end_time" />
|
|
<result property="remark" column="remark" />
|
|
<result property="createTime" column="create_time" />
|
|
<result property="createBy" column="create_by" />
|
|
<result property="createByName" column="create_by_name" />
|
|
<result property="updateTime" column="update_time" />
|
|
<result property="updateBy" column="update_by" />
|
|
<result property="updateByName" column="update_by_name" />
|
|
<result property="delFlag" column="del_flag" />
|
|
</resultMap>
|
|
|
|
|
|
<sql id="selectStockInTaskOrderPo">
|
|
a.in_task_order_id, a.organization_id, a.organization_name, a.top_organization_id, a.serial_number, a.type, a.task_number, a.warehouse_id, a.warehouse_code,
|
|
a.warehouse_name, a.shipper_id, a.shipper_name, a.in_order_number, a.receipt_order_number, a.shelf_order_number, a.actual_quantity, a.operators_by,
|
|
a.operators_name, a.operators_end_time, a.remark, a.create_time, a.create_by,
|
|
a.create_by_name, a.update_time, a.update_by, a.update_by_name, a.del_flag
|
|
</sql>
|
|
|
|
<sql id="selectStockInTaskOrderPo1">
|
|
<if test="organizationId != null ">
|
|
and a.organization_id = #{organizationId}
|
|
</if>
|
|
<if test="organizationName != null and organizationName != ''">
|
|
and a.organization_name like concat('%', #{organizationName}, '%')
|
|
</if>
|
|
<if test="topOrganizationId != null ">
|
|
and a.top_organization_id = #{topOrganizationId}
|
|
</if>
|
|
<if test="warehouseId != null ">
|
|
and a.warehouse_id = #{warehouseId}
|
|
</if>
|
|
<if test="warehouseCode != null and warehouseCode != ''">
|
|
and a.warehouse_code = #{warehouseCode}
|
|
</if>
|
|
<if test="warehouseName != null and warehouseName != ''">
|
|
and a.warehouse_name like concat('%', #{warehouseName}, '%')
|
|
</if>
|
|
<if test="serialNumber != null and serialNumber != ''">
|
|
and a.serial_number = #{serialNumber}
|
|
</if>
|
|
<if test="type != null ">
|
|
and a.type = #{type}
|
|
</if>
|
|
<if test="taskNumber != null and taskNumber != ''">
|
|
and a.task_number = #{taskNumber}
|
|
</if>
|
|
<if test="actualQuantity != null ">
|
|
and a.actual_quantity = #{actualQuantity}
|
|
</if>
|
|
<if test="operatorsBy != null ">
|
|
and a.operators_by = #{operatorsBy}
|
|
</if>
|
|
<if test="operatorsName != null and operatorsName != ''">
|
|
and a.operators_name like concat('%', #{operatorsName}, '%')
|
|
</if>
|
|
<if test="operatorsEndTime != null ">
|
|
and a.operators_end_time = #{operatorsEndTime}
|
|
</if>
|
|
<if test="createByName != null and createByName != ''">
|
|
and a.create_by_name like concat('%', #{createByName}, '%')
|
|
</if>
|
|
<if test="updateByName != null and updateByName != ''">
|
|
and a.update_by_name like concat('%', #{updateByName}, '%')
|
|
</if>
|
|
<choose>
|
|
<when test="delFlag != null"> and a.del_flag = #{delFlag} </when>
|
|
<otherwise> and a.del_flag = 1 </otherwise>
|
|
</choose>
|
|
</sql>
|
|
|
|
<select id="queryList" parameterType="com.mhd.wms.domain.stockInTaskOrder.repository.todo.StockInTaskOrderDO" resultMap="StockInTaskOrderResult">
|
|
select
|
|
<include refid="selectStockInTaskOrderPo"/>
|
|
from stock_in_task_order a
|
|
<where>
|
|
<include refid="selectStockInTaskOrderPo1"/>
|
|
</where>
|
|
-- 创建时间为空的排最后
|
|
order by a.create_time is null, a.create_time desc
|
|
</select>
|
|
</mapper> |