|
|
|
@ -1194,9 +1194,84 @@
|
|
|
|
|
LEFT JOIN |
|
|
|
|
logpm_distribution_signfor As lds ON lds.reservation_id = ldr.id |
|
|
|
|
LEFT JOIN logpm_distribution_delivery_list AS lddl ON lds.delivery_id = lddl.id |
|
|
|
|
) AS m ON ldsa.id = m.stock_article_id |
|
|
|
|
WHERE |
|
|
|
|
ldsa.id = '1749602880861630465' |
|
|
|
|
) AS m ON ldsa.id = m.stock_article_id AND t.reservation_id = m.reservation_id |
|
|
|
|
<where> |
|
|
|
|
ldsa.order_status in ('70','80') |
|
|
|
|
<if test="param.waybillNumber != null and param.waybillNumber != ''"> |
|
|
|
|
AND ldsa.waybill_number like concat("%",#{param.waybillNumber},"%"}) |
|
|
|
|
</if> |
|
|
|
|
<if test="param.serviceNumber != null and param.serviceNumber != ''"> |
|
|
|
|
AND ldsa.service_umber like concat("%",#{param.serviceNumber},"%"}) |
|
|
|
|
</if> |
|
|
|
|
<if test="param.orderCode != null and param.orderCode != ''"> |
|
|
|
|
AND ldsa.order_code like concat("%",#{param.orderCode},"%"}) |
|
|
|
|
</if> |
|
|
|
|
<if test="param.warehouseName != null and param.warehouseName != ''"> |
|
|
|
|
AND ldsa.warehouse like concat("%",#{param.warehouseName},"%"}) |
|
|
|
|
</if> |
|
|
|
|
<if test="param.mallName != null and param.mallName != ''"> |
|
|
|
|
AND ldsa.mall_mame like concat("%",#{param.mallName},"%"}) |
|
|
|
|
</if> |
|
|
|
|
<if test="param.brand != null and param.brand != ''"> |
|
|
|
|
AND ldsa.brand like concat("%",#{param.brand},"%"}) |
|
|
|
|
</if> |
|
|
|
|
<if test="param.consigneePerson != null and param.consigneePerson != ''"> |
|
|
|
|
AND ldsa.consignee_person like concat("%",#{param.consigneePerson},"%"}) |
|
|
|
|
</if> |
|
|
|
|
<if test="param.consigneeUnit != null and param.consigneeUnit != ''"> |
|
|
|
|
AND ldsa.consignee_unit like concat("%",#{param.consigneeUnit},"%"}) |
|
|
|
|
</if> |
|
|
|
|
<if test="param.deliveryListInfo != null and param.deliveryListInfo != ''"> |
|
|
|
|
AND m.mssg like concat("%",#{param.deliveryListInfo},"%"}) |
|
|
|
|
</if> |
|
|
|
|
<if test="param.driverName != null and param.driverName != ''"> |
|
|
|
|
AND m.driverName like concat("%",#{param.driverName},"%"}) |
|
|
|
|
</if> |
|
|
|
|
<if test="param.examineUserNames != null and param.examineUserNames != ''"> |
|
|
|
|
AND m.examine_user_name like concat("%",#{param.examineUserNames},"%"}) |
|
|
|
|
</if> |
|
|
|
|
|
|
|
|
|
<if test="param.reservationInfo != null and param.reservationInfo != ''"> |
|
|
|
|
AND t.msg like concat("%",#{param.reservationInfo},"%"}) |
|
|
|
|
</if> |
|
|
|
|
<if test="param.warehouseId != null and param.warehouseId != ''"> |
|
|
|
|
AND ldsa.warehouse_id = #{param.warehouseId} |
|
|
|
|
</if> |
|
|
|
|
<if test="param.warehouseIdList != null and param.warehouseId != ''"> |
|
|
|
|
AND ldsa.warehouse_id IN |
|
|
|
|
<foreach collection="param.warehouseIdList" item="item" index="index" open="AND ldsa.warehouse_id in (" close=")" separator=","> |
|
|
|
|
#{item} |
|
|
|
|
</foreach> |
|
|
|
|
</if> |
|
|
|
|
<if test="param.orderCodeNumList != null and param.orderCodeNumList != ''"> |
|
|
|
|
AND ldsa.order_code in |
|
|
|
|
<foreach collection="param.orderCodeNumList" item="item" index="index" open="AND ldsa.warehouse_id in (" close=")" separator=","> |
|
|
|
|
#{item} |
|
|
|
|
</foreach> |
|
|
|
|
</if> |
|
|
|
|
<if test="param.waybillNumList != null and param.waybillNumList != ''"> |
|
|
|
|
AND ldsa.waybill_number in |
|
|
|
|
<foreach collection="param.waybillNumList" item="item" index="index" open="AND ldsa.warehouse_id in (" close=")" separator=","> |
|
|
|
|
#{item} |
|
|
|
|
</foreach> |
|
|
|
|
</if> |
|
|
|
|
<if test=" param.startDate != null ">and ldsa.warehouse_entry_time between #{param.startDate} and |
|
|
|
|
#{param.entDate} |
|
|
|
|
</if> |
|
|
|
|
<if test=" param.warehouseEntryTime != null ">and DATE(ldsa.warehouse_entry_time) = |
|
|
|
|
#{param.warehouseEntryTime} |
|
|
|
|
</if> |
|
|
|
|
<if test=" param.createTime != null ">and DATE(ldsa.create_time) = |
|
|
|
|
#{param.createTime} |
|
|
|
|
</if> |
|
|
|
|
<if test=" param.signinTime != null ">and DATE(m.signing_time) = |
|
|
|
|
#{param.signinTime} |
|
|
|
|
</if> |
|
|
|
|
<!-- <if test=" param.warehouseEntryTimeEnd != null ">and DATE(ldsa.warehouse_entry_time) =--> |
|
|
|
|
<!-- #{param.warehouseEntryTimeEnd}--> |
|
|
|
|
<!-- </if>--> |
|
|
|
|
|
|
|
|
|
</where> |
|
|
|
|
GROUP BY |
|
|
|
|
ldsa.id |
|
|
|
|
</select> |
|
|
|
|