wms/nflg-wms-repository/src/main/resources/mapper/WmsOutProduceMapper.xml

48 lines
1.8 KiB
XML
Raw Normal View History

2025-08-12 15:57:33 +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.WmsOutProduceMapper">
<update id="releaseNum">
UPDATE wms_out_produce_item
SET lock_num=0
WHERE order_id IN
<foreach item="item" collection="ids" separator="," close=")" open="(">
#{item}
</foreach>
</update>
<select id="search" resultType="com.nflg.wms.common.pojo.vo.OutProduceVO">
SELECT *
FROM wms_out_produce
where "type"=#{request.type}
<if test="request.dataType!=null and request.type==0">
and data_type = #{request.dataType}
</if>
2025-08-12 15:57:33 +08:00
<if test="request.no!=null and request.no!=''">
2025-09-22 17:47:51 +08:00
and "no" ilike concat('%', #{request.no}, '%')
2025-08-12 15:57:33 +08:00
</if>
<if test="request.aufnr!=null and request.aufnr!=''">
2025-09-22 17:47:51 +08:00
and aufnr ilike concat('%', #{request.aufnr}, '%')
2025-08-12 15:57:33 +08:00
</if>
<if test="request.dwerk!=null and request.dwerk!=''">
2025-09-22 17:47:51 +08:00
and dwerk ilike concat('%', #{request.dwerk}, '%')
2025-08-12 15:57:33 +08:00
</if>
<if test="request.ktext!=null and request.ktext!=''">
2025-09-22 17:47:51 +08:00
and ktext ilike concat('%', #{request.ktext}, '%')
2025-08-12 15:57:33 +08:00
</if>
<if test="request.plnbez!=null and request.plnbez!=''">
2025-09-22 17:47:51 +08:00
and plnbez ilike concat('%', #{request.plnbez}, '%')
2025-08-12 15:57:33 +08:00
</if>
<if test="request.lgort2!=null and request.lgort2!=''">
and lgort2 ilike concat('%', #{request.lgort2}, '%')
2025-08-12 15:57:33 +08:00
</if>
<if test="request.startDate!=null">
and create_time >= #{request.startDate}
</if>
<if test="request.endDate!=null">
and create_time &lt;= #{request.endDate}
</if>
2025-09-04 20:09:52 +08:00
order by id desc
2025-08-12 15:57:33 +08:00
</select>
</mapper>