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

44 lines
1.8 KiB
XML
Raw Normal View History

2025-08-17 15:11:56 +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.WmsTransferFactoryMapper">
<select id="search" resultType="com.nflg.wms.repository.entity.WmsTransferFactory">
select *
from wms_transfer_factory
<where>
<if test="request.startDate!=null">
2025-09-08 18:32:45 +08:00
and bdter::date >= #{request.startDate}
2025-08-17 15:11:56 +08:00
</if>
<if test="request.endDate!=null">
2025-09-08 18:32:45 +08:00
and bdter::date &lt;= #{request.endDate}
2025-08-17 15:11:56 +08:00
</if>
<if test="request.no != null and request.no!=''">
2025-09-22 17:47:51 +08:00
and "no" ilike concat('%',#{request.no},'%')
2025-08-17 15:11:56 +08:00
</if>
<if test="request.rsnum != null and request.rsnum!=''">
2025-09-22 17:47:51 +08:00
and rsnum ilike concat('%',#{request.rsnum},'%')
2025-08-17 15:11:56 +08:00
</if>
<if test="request.lgort != null and request.lgort!=''">
2025-09-22 17:47:51 +08:00
and lgort ilike concat('%',#{request.lgort},'%')
2025-08-17 15:11:56 +08:00
</if>
<if test="request.umlgo != null and request.umlgo!=''">
2025-09-22 17:47:51 +08:00
and umlgo ilike concat('%',#{request.umlgo},'%')
2025-08-17 15:11:56 +08:00
</if>
<if test="request.werks != null and request.werks!=''">
2025-09-22 17:47:51 +08:00
and werks ilike concat('%',#{request.werks},'%')
2025-08-17 15:11:56 +08:00
</if>
</where>
2025-09-05 18:57:17 +08:00
order by id desc
2025-08-17 15:11:56 +08:00
</select>
2025-10-17 17:45:21 +08:00
<select id="getProhibitDelete" resultType="java.lang.String">
SELECT tf."no"
FROM wms_transfer_factory tf
INNER JOIN wms_transfer_factory_ticket tft ON tft.order_id=tf."id"
WHERE tf.id IN
<foreach item="item" collection="ids" separator="," open="(" close=")">
#{item}
</foreach>
</select>
2025-08-17 15:11:56 +08:00
</mapper>