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

34 lines
1.4 KiB
XML

<?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.WmsOutCostcenterMapper">
<select id="search" resultType="com.nflg.wms.common.pojo.vo.OutCostcenterVO">
select *
from wms_out_costcenter
<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!=''">
and "no" ilike concat('%', #{request.no}, '%')
</if>
<if test="request.aufnr != null and request.aufnr!=''">
and aufnr ilike concat('%', #{request.aufnr}, '%')
</if>
<if test="request.werks != null and request.werks!=''">
and werks ilike concat('%', #{request.werks}, '%')
</if>
<if test="request.rsnum != null and request.rsnum!=''">
and rsnum ilike concat('%', #{request.rsnum}, '%')
</if>
<if test="request.kostl != null and request.kostl!=''">
and kostl ilike concat('%', #{request.kostl}, '%')
</if>
</where>
order by id desc
</select>
</mapper>