2025-09-30 17:00:12 +08:00
|
|
|
<?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.WmsInventoryBarcodePrintingMapper">
|
|
|
|
|
|
|
|
|
|
<select id="search" resultType="com.nflg.wms.common.pojo.vo.BarcodePrintingVO">
|
2026-03-17 18:07:05 +08:00
|
|
|
SELECT bp.id,bp.material_no,bp.material_des,bp.unit,bp.qty,bp.batch_number,bp.serial_numbers,bp.packing_num
|
|
|
|
|
,bp.create_by,bp.create_time,bp.update_by,bp.update_time,di.name as "factory_code",w.no as "warehouse_no"
|
|
|
|
|
,b.no as "bin_no"
|
|
|
|
|
FROM wms_inventory_barcode_printing bp
|
|
|
|
|
left join dictionary_item di on bp.factory_id=di.id
|
|
|
|
|
left join wms_warehouse w on bp.warehouse_id=w.id
|
|
|
|
|
left join wms_bin b on bp.bin_id=b.id
|
2025-09-30 17:00:12 +08:00
|
|
|
<where>
|
2025-10-10 10:13:15 +08:00
|
|
|
<if test="request.materialNos != null and request.materialNos != ''">
|
2026-03-17 18:07:05 +08:00
|
|
|
AND bp.material_no IN
|
2025-09-30 17:00:12 +08:00
|
|
|
<foreach item="materialNo" index="index" collection="request.materialNos.split(',')"
|
|
|
|
|
open="(" separator="," close=")">
|
|
|
|
|
#{materialNo}
|
|
|
|
|
</foreach>
|
|
|
|
|
</if>
|
2025-10-10 10:13:15 +08:00
|
|
|
<if test="request.batchNumbers != null and request.batchNumbers != ''">
|
2026-03-17 18:07:05 +08:00
|
|
|
AND bp.batch_number IN
|
2025-09-30 17:00:12 +08:00
|
|
|
<foreach item="batchNo" index="index" collection="request.batchNumbers.split(',')"
|
|
|
|
|
open="(" separator="," close=")">
|
|
|
|
|
#{batchNo}
|
|
|
|
|
</foreach>
|
|
|
|
|
</if>
|
2025-10-10 10:13:15 +08:00
|
|
|
<if test="request.serialNumber != null and request.serialNumber != ''">
|
2026-03-17 18:07:05 +08:00
|
|
|
AND bp.serial_numbers ilike CONCAT('%', #{request.serialNumber}, '%')
|
2025-09-30 17:00:12 +08:00
|
|
|
</if>
|
|
|
|
|
<if test="request != null and request.materialDes != null and request.materialDes != ''">
|
2026-03-17 18:07:05 +08:00
|
|
|
AND bp.material_des ilike CONCAT('%', #{request.materialDes}, '%')
|
2025-09-30 17:00:12 +08:00
|
|
|
</if>
|
|
|
|
|
<if test="request != null and request.startDate != null">
|
2026-03-17 18:07:05 +08:00
|
|
|
AND bp.create_time >= #{request.startDate}
|
2025-09-30 17:00:12 +08:00
|
|
|
</if>
|
|
|
|
|
<if test="request != null and request.endDate != null">
|
2026-03-17 18:07:05 +08:00
|
|
|
AND bp.create_time <= #{request.endDate}
|
2025-09-30 17:00:12 +08:00
|
|
|
</if>
|
|
|
|
|
</where>
|
|
|
|
|
order by
|
|
|
|
|
id desc
|
|
|
|
|
</select>
|
2026-03-17 18:07:05 +08:00
|
|
|
|
|
|
|
|
<select id="getVOList" resultType="com.nflg.wms.common.pojo.vo.BarcodePrintingVO">
|
|
|
|
|
SELECT bp.id,bp.material_no,bp.material_des,bp.unit,bp.qty,bp.batch_number,bp.serial_numbers,bp.packing_num
|
|
|
|
|
,bp.create_by,bp.create_time,bp.update_by,bp.update_time,di.name as "factory_code",w.no as "warehouse_no"
|
|
|
|
|
,b.no as "bin_no"
|
|
|
|
|
FROM wms_inventory_barcode_printing bp
|
|
|
|
|
left join dictionary_item di on bp.factory_id=di.id
|
|
|
|
|
left join wms_warehouse w on bp.warehouse_id=w.id
|
|
|
|
|
left join wms_bin b on bp.bin_id=b.id
|
|
|
|
|
where bp.id in
|
|
|
|
|
<foreach item="id" index="index" collection="ids" open="(" separator="," close=")">
|
|
|
|
|
#{id}
|
|
|
|
|
</foreach>
|
|
|
|
|
</select>
|
2025-09-30 17:00:12 +08:00
|
|
|
</mapper>
|