|
|
|
@ -17,6 +17,7 @@
|
|
|
|
|
sys_workplace_queue.name queueName
|
|
|
|
|
|
|
|
|
|
FROM io_collect_order_biz icob
|
|
|
|
|
left join io_collect_order ico on ico.billNo = icob.orderIdFk
|
|
|
|
|
left join basic_udirel bu on icob.relId = bu.id
|
|
|
|
|
left join basic_products bp on bu.uuid = bp.uuid
|
|
|
|
|
left join sys_workplace_queue on sys_workplace_queue.relId = bu.id
|
|
|
|
@ -24,27 +25,40 @@
|
|
|
|
|
left join sys_workplace_freight swf on swf.code = sys_workplace_queue.freightCode
|
|
|
|
|
left join sys_workplace_region swr on swr.regionCode = swf.freightRow
|
|
|
|
|
<where>
|
|
|
|
|
<if test="thrCode != '' and thrCode != null">
|
|
|
|
|
AND icob.thrCode LIKE concat('%', #{thrCode}, '%')
|
|
|
|
|
</if>
|
|
|
|
|
<if test="orderIdFk != null and orderIdFk != ''">
|
|
|
|
|
AND icob.orderIdFk = #{orderIdFk}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="relId != null">
|
|
|
|
|
AND icob.relId = #{relId}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="cpmctymc != null and cpmctymc != ''">
|
|
|
|
|
AND icob.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>
|
|
|
|
|
<!-- 当汇总单号存在时,仅用汇总单号查询 -->
|
|
|
|
|
<choose>
|
|
|
|
|
<when test="summaryNo != null and summaryNo != ''">
|
|
|
|
|
AND ico.summaryNo = #{summaryNo}
|
|
|
|
|
</when>
|
|
|
|
|
<otherwise>
|
|
|
|
|
<!-- 无汇总单号时,组合查询条件 -->
|
|
|
|
|
<trim prefixOverrides="AND">
|
|
|
|
|
<if test="thrCode != null and thrCode != ''">
|
|
|
|
|
AND icob.thrCode LIKE CONCAT('%', #{thrCode}, '%')
|
|
|
|
|
</if>
|
|
|
|
|
<if test="orderIdFk != null and orderIdFk != ''">
|
|
|
|
|
AND icob.orderIdFk = #{orderIdFk}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="relId != null">
|
|
|
|
|
AND icob.relId = #{relId}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="cpmctymc != null and cpmctymc != ''">
|
|
|
|
|
AND icob.cpmctymc LIKE CONCAT('%', #{cpmctymc}, '%')
|
|
|
|
|
</if>
|
|
|
|
|
<!-- 联合编码查询 -->
|
|
|
|
|
<if test="unionCode != null and unionCode != ''">
|
|
|
|
|
AND (
|
|
|
|
|
bp.nameCode LIKE CONCAT(#{unionCode}, '%')
|
|
|
|
|
OR bp.ybbm LIKE CONCAT(#{unionCode}, '%')
|
|
|
|
|
OR bp.sptm LIKE CONCAT(#{unionCode}, '%')
|
|
|
|
|
)
|
|
|
|
|
</if>
|
|
|
|
|
<if test="ggxh != null and ggxh != ''">
|
|
|
|
|
AND ggxh LIKE CONCAT(#{ggxh}, '%')
|
|
|
|
|
</if>
|
|
|
|
|
</trim>
|
|
|
|
|
</otherwise>
|
|
|
|
|
</choose>
|
|
|
|
|
</where>
|
|
|
|
|
group by icob.id
|
|
|
|
|
ORDER BY icob.getConfirm, icob.id desc
|
|
|
|
|