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/IoCollectOrderBizBackupMapp...

55 lines
2.3 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.IoCollectOrderBizBackupMapper">
<select id="filterList" resultType="com.glxp.api.res.collect.CollectOrderBizResponse">
SELECT icobb.*,
bp.nameCode diCode,
bp.zczbhhzbapzbh,
bp.packUnit,
bp.manufactory,
COALESCE(bp.bzgg,bp.ggxh) AS spec
FROM io_collect_order_biz_backup icobb
left join basic_udirel bu on icobb.relId = bu.id
left join basic_products bp on bu.uuid = bp.uuid
<where>
<if test="thrCode != '' and thrCode != null">
AND icobb.thrCode LIKE concat('%', #{thrCode}, '%')
</if>
<if test="orderIdFk != null and orderIdFk != ''">
AND icobb.orderIdFk = #{orderIdFk}
</if>
<if test="relId != null">
AND icobb.relId = #{relId}
</if>
<if test="cpmctymc != null and cpmctymc != ''">
AND icobb.cpmctymc LIKE concat('%', #{cpmctymc}, '%')
</if>
<if test="unionCode != '' and unionCode != null">
and (
bp.nameCode LIKE concat('%', #{unionCode}, '%')
or bp.ybbm LIKE concat('%', #{unionCode}, '%')
or bp.sptm LIKE concat('%', #{unionCode}, '%'))
</if>
<if test="ggxh != '' and ggxh != null">
AND ggxh LIKE concat('%', #{ggxh}, '%')
</if>
</where>
group by icobb.id
</select>
<select id="getList" resultType="com.glxp.api.res.collect.CollectOrderBizResponse">
SELECT
biz_bac.* ,bac.busType,bac.uploadStatus,code_ba.fifoSplit,code_ba.relCodeCount
FROM
io_collect_code_backup code_ba LEFT JOIN io_collect_order_backup bac ON code_ba.billNo = bac.billNo
LEFT JOIN io_collect_order_biz_backup biz_bac ON biz_bac.orderIdFk = bac.billNo
<where>
<if test="startTime != '' and startTime != null and endTime != '' and endTime != null">
AND bac.updateTime BETWEEN #{startTime} AND #{endTime}
</if>
</where>
group by code_ba.id
</select>
</mapper>