Commit 1531f3e1 authored by chew's avatar chew

增加追溯码客户商品信息

parent 1e9f8228
......@@ -48,28 +48,41 @@
<select id="selectOrderCount" resultType="java.lang.Integer">
SELECT count(0)
FROM T_DOC_outbound_scan_HEADER
FROM T_DOC_outbound_scan_HEADER h
INNER JOIN T_DOC_OUTBOUND_SCAN_ORDERTYPE o
ON o.SCAN_USER = h.SCAN_USER
-- 偏好 (orderType, reference5, temperatureclass) 三元组过滤:每个字段空时不过滤该字段
-- 空场景包括:1) 偏好 o.X 为 NULL/空 2) SCAN_HEADER h.X 为 NULL/空(未分类订单也应匹配任何偏好)
AND (o.ORDERTYPE IS NULL
OR h.ORDERTYPE IS NULL
OR INSTR(',' || o.ORDERTYPE || ',', ',' || h.ORDERTYPE || ',') > 0)
AND (o.REFERENCE5 IS NULL
OR h.REFERENCE5 IS NULL
OR INSTR(',' || o.REFERENCE5 || ',', ',' || h.REFERENCE5 || ',') > 0)
AND (o.TEMPERATURECLASS IS NULL
OR h.TEMPERATURECLASS IS NULL
OR INSTR(',' || o.TEMPERATURECLASS || ',', ',' || h.TEMPERATURECLASS || ',') > 0)
WHERE 1=1
<if test="customerName != null and customerName != ''">
AND customer_name LIKE CONCAT(CONCAT('%', #{customerName}), '%')
AND h.customer_name LIKE CONCAT(CONCAT('%', #{customerName}), '%')
</if>
<if test="orderNo != null and orderNo != ''">
AND order_no = #{orderNo}
AND h.order_no = #{orderNo}
</if>
<if test="statusList != null and statusList != ''">
AND status in
AND h.status in
<foreach collection="statusList" item="status" open="(" separator="," close=")">
#{status}
</foreach>
</if>
<if test="scanUser != null and scanUser != ''">
and scan_user= #{scanUser}
and h.scan_user= #{scanUser}
</if>
<if test="startTime != null">
AND create_time >= #{startTime}
AND h.create_time >= #{startTime}
</if>
<if test="endTime != null">
AND create_time <![CDATA[ <= ]]> #{endTime}
AND h.create_time <![CDATA[ <= ]]> #{endTime}
</if>
</select>
<select id="selectCustomerProductSummary"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment