You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
udi-wms-java/src/main/resources/mybatis/mapper/collect/IoCollectOrderMapper.xml

47 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.glxp.api.dao.collect.IoCollectOrderMapper">
<select id="filterList" parameterType="com.glxp.api.req.collect.CollectOrderRequest"
resultType="com.glxp.api.res.collect.IoCollectOrderResponse">
SELECT ico.*,
bcb.name busTypeName,
bcb.fromType fromTypeName,
bc.name fromCorpName,
sw.workplaceName
FROM io_collect_order ico
left join basic_collect_bustype bcb on ico.busType = bcb.code
left join basic_corp bc on ico.fromCorp = bc.erpId
left join sys_workplace sw on ico.workPlaceCode = sw.workplaceId
<where>
<if test="billNo != '' and billNo != null">
AND billNo LIKE concat('%', #{billNo}, '%')
</if>
<if test="busType != null and busType != ''">
AND busType = #{busType}
</if>
<if test="fromType != null and fromType != ''">
AND fromType = #{fromType}
</if>
<if test="fromCorp != '' and fromCorp != null">
AND fromCorp LIKE concat('%', #{fromCorp}, '%')
</if>
<if test="collectCode != null and collectCode != ''">
AND collectCode = #{collectCode}
</if>
<if test="busType != null and busType != ''">
AND busType = #{busType}
</if>
<if test="workPlaceCode != null and workPlaceCode != ''">
AND workPlaceCode = #{workPlaceCode}
</if>
<if test="tagStatusList != null and tagStatusList.size() > 0">
and tagStatus in
<foreach collection="tagStatusList" item="item" index="index" separator="," open="(" close=")">
#{item}
</foreach>
</if>
</where>
order by collectTime desc
</select>
</mapper>