wms/nflg-wms-repository/src/main/resources/mapper/WmsInProduceBackTicketMappe...

33 lines
1.5 KiB
XML
Raw Normal View History

2025-08-13 18:18:47 +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.WmsInProduceBackTicketMapper">
<select id="search" resultType="com.nflg.wms.common.pojo.vo.OutProduceTicketVO">
SELECT ipbt.id,ipbt."no" as "ticketNo",ipbt.create_by,ipbt.create_time,ipb.*
FROM wms_in_produce_back_ticket ipbt
INNER JOIN wms_in_produce_back ipb ON ipbt.produce_back_id=ipb."id"
<where>
<if test="request.no != null and request.no!=''">
2025-10-21 11:26:08 +08:00
AND ipb."no" ilike CONCAT('%',#{request.no},'%')
2025-08-13 18:18:47 +08:00
</if>
<if test="request.aufnr != null and request.aufnr!=''">
2025-10-21 11:26:08 +08:00
AND ipb."aufnr" ilike CONCAT('%',#{request.aufnr},'%')
2025-08-13 18:18:47 +08:00
</if>
<if test="request.startDate!=null">
and ipbt.create_time >= #{request.startDate}
</if>
<if test="request.endDate!=null">
and ipbt.create_time &lt;= #{request.endDate}
</if>
</where>
2025-09-26 18:04:00 +08:00
ORDER BY ipbt.id DESC
2025-08-13 18:18:47 +08:00
</select>
<select id="getInfo" resultType="com.nflg.wms.common.pojo.vo.InProduceBackTicketVO">
SELECT ipbt.id,ipbt."no" as "ticketNo",ipbt.create_by,ipbt.create_time,ipb.*
FROM wms_in_produce_back_ticket ipbt
INNER JOIN wms_in_produce_back ipb ON ipbt.produce_back_id=ipb."id"
where ipbt."id"=#{id}
</select>
</mapper>