43 lines
2.2 KiB
XML
43 lines
2.2 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.WmsTransferOrdersMapper">
|
||
|
|
|
||
|
|
<select id="search" resultType="com.nflg.wms.common.pojo.vo.TransferOrderVO">
|
||
|
|
select
|
||
|
|
a.id,a.barcode_code,a.transfer_num,a.create_time,a.create_user_name,a.material_code,
|
||
|
|
a.material_description,a.unit,a.batch_no,a.serial_no,a.factory_code,
|
||
|
|
b."name" as from_bin_location,c."name" as to_bin_location,d.name as storage_location
|
||
|
|
from wms_transfer_orders a
|
||
|
|
left join wms_bin b on a.from_bin_location=b."no"
|
||
|
|
left join wms_bin c on a.to_bin_location=c."no"
|
||
|
|
left join wms_warehouse d on a.storage_location=d."no"
|
||
|
|
<where>
|
||
|
|
<if test="request.barcodeCode !=null and request.barcodeCode !=''">
|
||
|
|
and a.package_code ilike concat('%', #{request.barcodeCode}, '%')
|
||
|
|
</if>
|
||
|
|
<if test="request.materialDescription !=null and request.materialDescription !=''">
|
||
|
|
and a.material_description ilike concat('%', #{request.materialDescription}, '%')
|
||
|
|
</if>
|
||
|
|
<if test="request.materialCode !=null and request.materialCode !=''">
|
||
|
|
and a.material_code ilike concat('%', #{request.materialCode}, '%')
|
||
|
|
</if>
|
||
|
|
<if test="request.fromBinLocation !=null and request.fromBinLocation !=''">
|
||
|
|
and a.from_bin_location = #{request.fromBinLocation}
|
||
|
|
</if>
|
||
|
|
<if test="request.toBinLocation !=null and request.toBinLocation !=''">
|
||
|
|
and a.to_bin_location = #{request.toBinLocation}
|
||
|
|
</if>
|
||
|
|
<if test="request.storageLocation !=null and request.storageLocation !=''">
|
||
|
|
and a.storage_location = #{request.storageLocation}
|
||
|
|
</if>
|
||
|
|
<if test="request.startDate !=null">
|
||
|
|
and a.create_time>= #{request.inStartDate}
|
||
|
|
</if>
|
||
|
|
<if test="request.endDate !=null">
|
||
|
|
and a.create_time <= #{request.inEndDate}
|
||
|
|
</if>
|
||
|
|
</where>
|
||
|
|
order by a.create_time DESC
|
||
|
|
</select>
|
||
|
|
</mapper>
|