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

47 lines
1.9 KiB
XML
Raw Normal View History

2025-08-19 18:22:15 +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.WmsTransferCompanyMapper">
<select id="search" resultType="com.nflg.wms.repository.entity.WmsTransferCompany">
select *
from wms_transfer_company
<where>
<if test="request.startDate!=null">
and create_time >= #{request.startDate}
</if>
<if test="request.endDate!=null">
and create_time &lt;= #{request.endDate}
</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-19 18:22:15 +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-19 18:22:15 +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-19 18:22:15 +08:00
</if>
<if test="request.reswk!=null and request.reswk!=''">
2025-09-22 17:47:51 +08:00
and reswk ilike concat('%',#{request.reswk},'%')
2025-08-19 18:22:15 +08:00
</if>
<if test="request.lgfsb1!=null and request.lgfsb1!=''">
2025-09-22 17:47:51 +08:00
and lgfsb1 ilike concat('%',#{request.lgfsb1},'%')
2025-08-19 18:22:15 +08:00
</if>
2025-10-17 17:45:21 +08:00
<if test="request.ebeln!=null and request.ebeln!=''">
and ebeln ilike concat('%',#{request.ebeln},'%')
</if>
2025-08-19 18:22:15 +08:00
</where>
2025-09-05 18:57:17 +08:00
order by id desc
2025-08-19 18:22:15 +08:00
</select>
2025-10-17 17:45:21 +08:00
<select id="getProhibitDelete" resultType="java.lang.String">
SELECT tc."no"
FROM wms_transfer_company tc
INNER JOIN wms_transfer_company_ticket tct ON tct.order_id=tc."id"
WHERE tc.id IN
<foreach item="item" collection="ids" separator="," open="(" close=")">
#{item}
</foreach>
</select>
2025-08-19 18:22:15 +08:00
</mapper>