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/IoCollectCodeBackMapper.xml

45 lines
1.9 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.IoCollectCodeBackMapper">
<select id="filterList" resultType="com.glxp.api.res.collect.IoCollectCodeResponse">
SELECT iccb.*,sw.workplaceName,
COALESCE(thr_bustype_origin.name, basic_bussiness_type.name) as busTypeName,
bp.nameCode,
bp.cpmctymc,
COALESCE(bp.ggxh, bp.bzgg) AS ggxh,
bp.zczbhhzbapzbh,
bp.ylqxzcrbarmc,
bp.manufactory,
icobb.batchNo,
icobb.productDate,
icobb.expireDate,
icobb.scanActCount
from io_collect_code_backup iccb
left join sys_workplace sw on sw.workplaceId = iccb.workPlaceCode
left join thr_bustype_origin on iccb.busType = thr_bustype_origin.action
left join basic_bussiness_type on iccb.busType = basic_bussiness_type.action
left join basic_udirel bu on iccb.relId = bu.id
left join basic_products bp on bu.uuid = bp.uuid
left join io_collect_order_biz_backup icobb on icobb.orderIdFk = iccb.billNo
<where>
<if test="workPlaceCode != '' and workPlaceCode != null">
AND iccb.workPlaceCode LIKE concat('%', #{workPlaceCode}, '%')
</if>
<if test="code != '' and code != null">
AND iccb.code LIKE concat('%', #{code}, '%')
</if>
<if test="billNo != null and billNo != ''">
AND iccb.billNo LIKE concat('%', #{billNo}, '%')
</if>
<if test="fromType != null and fromType != ''">
AND iccb.fromType LIKE concat('%', #{fromType}, '%')
</if>
<if test="fromCorp != null and fromCorp != ''">
AND iccb.fromCorp LIKE concat('%', #{fromCorp}, '%')
</if>
</where>
group by iccb.id
</select>
</mapper>