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

28 lines
1.2 KiB
XML
Raw Normal View History

2025-08-04 15:06:59 +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">
2025-09-09 18:09:21 +08:00
<mapper namespace="com.nflg.wms.repository.mapper.WmsOutPurchaseMapper">
<select id="search" resultType="com.nflg.wms.common.pojo.vo.OutPurchaseVO">
select op.*,us.supplier_name as "lifnr_name"
from wms_out_purchase op
left join user_supplier us on op.lifnr=us.supplier_code
<where>
<if test="request.startDate != null">
and op.create_time >= #{request.startDate}
</if>
<if test="request.endDate != null">
and op.create_time &lt;= #{request.endDate}
</if>
<if test="request.no!=null and request.no!=''">
and op."no" ilike concat('%', #{request.no}, '%')
</if>
<if test="request.ebeln!=null and request.ebeln!=''">
and op.ebeln ilike concat('%', #{request.ebeln}, '%')
</if>
<if test="request.lifnr!=null and request.lifnr!=''">
and op.lifnr ilike concat('%', #{request.lifnr}, '%')
</if>
</where>
</select>
2025-08-04 15:06:59 +08:00
</mapper>