|
|
|
@ -838,39 +838,43 @@
|
|
|
|
|
ldsa.order_delivery_status, |
|
|
|
|
group_concat(DISTINCT lwt.pallet_name) as trays, |
|
|
|
|
group_concat(DISTINCT lwug.position_code) as allocation |
|
|
|
|
from logpm_platform.logpm_distribution_stock_article ldsa |
|
|
|
|
left join logpm_platform.logpm_distribution_parcel_list ldpl on ldsa.id = ldpl.stock_article_id |
|
|
|
|
left join logpm_platform.logpm_warehouse_tray_goods lwtg on lwtg.association_id = ldpl.id |
|
|
|
|
left join logpm_platform.logpm_warehouse_updown_goods lwug on lwug.association_id = ldpl.id |
|
|
|
|
|
|
|
|
|
from logpm_distribution_stock_article ldsa |
|
|
|
|
left join logpm_distribution_parcel_list ldpl on ldsa.id = ldpl.stock_article_id |
|
|
|
|
left join logpm_warehouse_tray_goods lwtg on lwtg.association_id = ldpl.id |
|
|
|
|
left join logpm_warehouse_updown_goods lwug on lwug.association_id = ldpl.id |
|
|
|
|
left JOIN logpm_warehouse_tray lwt on lwtg.tray_id= lwt.id |
|
|
|
|
<where> |
|
|
|
|
ldsa.is_deleted = 0 and ldsa.order_status IN ( 10, 20, 30, 40, 50, 60, 70 ) |
|
|
|
|
and ldsa.hand_quantity > 0 |
|
|
|
|
and ldsa.genre = 1 |
|
|
|
|
<if test="paramMap.warehouseId != null and paramMap.warehouseId != ''"> |
|
|
|
|
and ldsa.warehouse_id = #{paramMap.warehouseId} |
|
|
|
|
<if test="param.warehouseId != null and param.warehouseId != ''"> |
|
|
|
|
and ldsa.warehouse_id = #{param.warehouseId} |
|
|
|
|
</if> |
|
|
|
|
|
|
|
|
|
<if test="paramMap.waybillNumber != null and paramMap.waybillNumber != ''"> and ldpl.waybill_number = #{paramMap.waybillNumber} </if> |
|
|
|
|
<if test="paramMap.orderCode != null and paramMap.orderCode != ''"> and ldsa.order_code = #{paramMap.orderCode} </if> |
|
|
|
|
<if test="paramMap.mallName != null and paramMap.mallName != ''"> and ldsa.mall_name = #{paramMap.mallName} </if> |
|
|
|
|
<if test="paramMap.typeService != null and paramMap.typeService != ''"> and ldsa.type_service = #{paramMap.typeService} </if> |
|
|
|
|
<if test="paramMap.consigneeUnit != null and paramMap.consigneeUnit != ''"> and ldsa.consignee_unit = #{paramMap.consigneeUnit} </if> |
|
|
|
|
<if test="paramMap.trainNumber != null and paramMap.trainNumber != ''"> and ldsa.train_number = #{paramMap.trainNumber} </if> |
|
|
|
|
<if test="paramMap.acceptWarehouseName != null and paramMap.acceptWarehouseName != ''"> and ldsa.accept_warehouse_name = #{paramMap.acceptWarehouseName} </if> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<if test="paramMap.serviceNumber != null and paramMap.serviceNumber != ''"> |
|
|
|
|
and ldsa.servic_nNumber = #{paramMap.serviceNumber} |
|
|
|
|
<if test="param.warehouseIds != null "> |
|
|
|
|
and ldsa.warehouse_id in |
|
|
|
|
<foreach collection="param.warehouseIds" item="wIitem" index="index" open="(" close=")" separator=","> |
|
|
|
|
#{wIitem} |
|
|
|
|
</foreach> |
|
|
|
|
</if> |
|
|
|
|
<if test="idArr != null and idArr != ''"> |
|
|
|
|
<if test="param.waybillNumber != null and param.waybillNumber != ''"> and ldpl.waybill_number = #{param.waybillNumber} </if> |
|
|
|
|
<if test="param.orderCode != null and param.orderCode != ''"> and ldsa.order_code = #{param.orderCode} </if> |
|
|
|
|
<if test="param.mallName != null and param.mallName != ''"> and ldsa.mall_name = #{param.mallName} </if> |
|
|
|
|
<if test="param.typeService != null and param.typeService != ''"> and ldsa.type_service = #{param.typeService} </if> |
|
|
|
|
<if test="param.consigneeUnit != null and param.consigneeUnit != ''"> and ldsa.consignee_unit = #{param.consigneeUnit} </if> |
|
|
|
|
<if test="param.trainNumber != null and param.trainNumber != ''"> and ldsa.train_number = #{param.trainNumber} </if> |
|
|
|
|
<if test="param.acceptWarehouseName != null and param.acceptWarehouseName != ''"> and ldsa.accept_warehouse_name = #{param.acceptWarehouseName} </if> |
|
|
|
|
<if test="param.serviceNumber != null and param.serviceNumber != ''"> |
|
|
|
|
and ldsa.service_number = #{param.serviceNumber} |
|
|
|
|
</if> |
|
|
|
|
<if test="param.orderIds != null "> |
|
|
|
|
and ldsa.id in |
|
|
|
|
<foreach collection="idArr" item="item" open="(" close=")" separator=","> |
|
|
|
|
#{item} |
|
|
|
|
<foreach collection="param.orderIds" item="wIitem" index="index" open="(" close=")" separator=","> |
|
|
|
|
#{wIitem} |
|
|
|
|
</foreach> |
|
|
|
|
</if> |
|
|
|
|
</where> |
|
|
|
|
group by ldsa.id; |
|
|
|
|
group by ldsa.id |
|
|
|
|
</select> |
|
|
|
|
<!-- <select id="selectAllDistributionOrder"--> |
|
|
|
|
<!-- resultType="com.logpm.distribution.entity.DistributionStockArticleEntity">--> |
|
|
|
|