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

43 lines
2.1 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.WmsComponentOutboundMapper">
<select id="search" resultType="com.nflg.wms.common.pojo.vo.ComponentOutboundVO">
select id,packing_no,
outbound_no,matnr,name1,uname,vbeln,maktx,datum,xnum,cnum,bname,zjshz,zchep,tel_number,sernr,huodh,vbelv,
p_name,l_bezei,l_name,g_streen,g_str_suppl2,wbstk,create_name,create_time,factory_no,create_id,
create_name,create_time,packing_id,is_reverse,finish,audit_state,audit_by,audit_msg,audit_time
from wms_component_outbound
<where>
<if test="request.packingNo !=null and request.packingNo !=''">
and packing_no ilike concat('%', #{request.packingNo}, '%')
</if>
<if test="request.name1 !=null and request.name1 !=''">
and name1 ilike concat('%', #{request.name1}, '%')
</if>
<if test="request.pName !=null and request.pName !=''">
and p_name ilike concat('%', #{request.pName}, '%')
</if>
<if test="request.factoryNo !=null and request.factoryNo !=''">
and factory_no = #{request.factoryNo}
</if>
<if test="request.huodh !=null and request.huodh !=''">
and vbelv ilike concat('%', #{request.huodh}, '%')
</if>
<if test="request.vbeln !=null and request.vbeln !=''">
and vbeln like concat('%', #{request.vbeln}, '%')
</if>
<if test="request.outboundNo !=null and request.outboundNo !=''">
and outbound_no like concat('%', #{request.outboundNo}, '%')
</if>
<if test="request.startDate !=null">
and datum >= #{request.startDate}
</if>
<if test="request.endDate !=null">
and datum &lt;= #{request.endDate}
</if>
</where>
order by create_time desc
</select>
</mapper>