38 lines
1.6 KiB
XML
38 lines
1.6 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.nflg.wms.repository.mapper.WmsStructuralPackageDeliverOrderMapper">
|
||
|
|
|
||
|
|
<select id="search" resultType="com.nflg.wms.common.pojo.vo.StructuralPackageDeliverOrderVO">
|
||
|
|
select pdo.*, us.supplier_code, us.supplier_name
|
||
|
|
from wms_structural_package_deliver_order pdo
|
||
|
|
inner join user_supplier us on pdo.id=us.user_id
|
||
|
|
<where>
|
||
|
|
<if test="externalOrderIds!=null">
|
||
|
|
and pdo.id in
|
||
|
|
<foreach item="item" collection="externalOrderIds" separator="," open="(" close=")">
|
||
|
|
#{item}
|
||
|
|
</foreach>
|
||
|
|
</if>
|
||
|
|
<if test="request.supplierId!=null">
|
||
|
|
and pdo.supplier_id=#{request.supplierId}
|
||
|
|
</if>
|
||
|
|
<if test="request.no!=null and request.no!=''">
|
||
|
|
and pdo.no like concat('%',#{request.no},'%')
|
||
|
|
</if>
|
||
|
|
<if test="request.startDate!=null">
|
||
|
|
and pdo.create_time >= #{request.startDate}
|
||
|
|
</if>
|
||
|
|
<if test="request.endDate!=null">
|
||
|
|
and pdo.create_time <= #{request.endDate}
|
||
|
|
</if>
|
||
|
|
</where>
|
||
|
|
</select>
|
||
|
|
|
||
|
|
<select id="getIdsByExternalOrderNo" resultType="java.lang.Long">
|
||
|
|
select om.deliver_id
|
||
|
|
from wms_structural_package_order o
|
||
|
|
inner join wms_structural_package_deliver_order_map om on o.id=om.order_id
|
||
|
|
where o.external_order_no like concat('%',#{externalOrderNo},'%')
|
||
|
|
</select>
|
||
|
|
</mapper>
|