|
|
|
@ -247,12 +247,10 @@
|
|
|
|
|
<where> |
|
|
|
|
lds.is_deleted = 0 |
|
|
|
|
<!-- lds.tenant_id = #{param.tenantId} --> |
|
|
|
|
<if test="param.typeService != null and param.typeService != '' ">and lds.type_service = |
|
|
|
|
#{param.typeService} |
|
|
|
|
<if test="param.typeService != null and param.typeService != '' ">and lds.type_service = #{param.typeService} |
|
|
|
|
</if> |
|
|
|
|
<if test="param.consignee != null and param.consignee != '' ">and |
|
|
|
|
ldr.consignee = |
|
|
|
|
#{param.consignee} |
|
|
|
|
ldr.consignee = #{param.consignee} |
|
|
|
|
</if> |
|
|
|
|
<if test="param.stockupDate != null ">and TO_DAYS(lds.stockup_date)=TO_DAYS( #{param.stockupDate})</if> |
|
|
|
|
<if test="param.outboundDate != null ">and TO_DAYS(lds.outbound_date)=TO_DAYS( #{param.outboundDate})</if> |
|
|
|
@ -296,6 +294,8 @@
|
|
|
|
|
|
|
|
|
|
</where> |
|
|
|
|
GROUP BY lds.id |
|
|
|
|
ORDER By lds.create_time Desc |
|
|
|
|
|
|
|
|
|
</select> |
|
|
|
|
<select id="getInventoryOwnSelf" resultType="com.logpm.distribution.vo.DistributionStockupVO"> |
|
|
|
|
select DISTINCT ldsii.sku,ldsii.cargo_unit cargoUnit,lds.stockup_status stockupStatus,lds.stockup_date |
|
|
|
@ -851,7 +851,13 @@
|
|
|
|
|
select DISTINCT ldr.consignee ,ldr.delivery_address deliveryAddress,ldr.delivery_phone |
|
|
|
|
deliveryPhone,ldr.mall_name mallName, |
|
|
|
|
ldr.stock_article_id stockArticleId,ldr.stockup_status stockupStatus,ldr.reserve_quantity reserveQuantity,ldr.end_time_stocking endTimeStocking, |
|
|
|
|
ldr.start_time_stocking startTimeStocking,ldr.stock_order_quantity stockOrderQuantity |
|
|
|
|
ldr.start_time_stocking startTimeStocking,ldr.stock_order_quantity stockOrderQuantity, |
|
|
|
|
( |
|
|
|
|
select GROUP_CONCAT(DISTINCT lwug.position_code) goodsAllocation |
|
|
|
|
from logpm_distribution_reservation_package ldrp |
|
|
|
|
LEFT JOIN logpm_warehouse_updown_goods lwug on lwug.association_id = ldrp.parce_list_id |
|
|
|
|
where ldrp.reservation_id = ldsi.reservation_id |
|
|
|
|
) goodsAllocation |
|
|
|
|
from logpm_distribution_reservation ldr |
|
|
|
|
LEFT JOIN logpm_distribution_stockup_info ldsi on ldr.id = ldsi.reservation_id |
|
|
|
|
<where> |
|
|
|
@ -861,6 +867,7 @@
|
|
|
|
|
and ldr.is_deleted = 0 |
|
|
|
|
<if test="param.stockupStatus != null and param.stockupStatus !=''"> and ldr.stockup_status = #{param.stockupStatus} </if> |
|
|
|
|
<if test="param.mallName != null and param.mallName !=''"> and ldr.mall_name = #{param.mallName} </if> |
|
|
|
|
<if test="param.goodsAllocation != null and param.goodsAllocation !=''"> and lwug.position_code like concat('%', #{param.goodsAllocation},'%' )</if> |
|
|
|
|
<if test="param.startTimeStocking != null and param.startTimeStocking != '' ">and date_format(from_unixtime( ldr.start_time_stocking),'%Y-%m-%d') = date_format(#{param.startTimeStocking },'%Y-%m-%d') </if> |
|
|
|
|
<if test="param.endTimeStocking != null and param.endTimeStocking != '' ">and date_format(from_unixtime( ldr.end_time_stocking),'%Y-%m-%d') = date_format(#{param.endTimeStocking },'%Y-%m-%d') </if> |
|
|
|
|
</where> |
|
|
|
@ -875,8 +882,9 @@
|
|
|
|
|
lds.stockup_area AS stockupArea, |
|
|
|
|
ldsa.id stockArticleId, |
|
|
|
|
( |
|
|
|
|
SELECT GROUP_CONCAT(NULLIF(dpl.goods_allocation, '') SEPARATOR ', ') |
|
|
|
|
SELECT GROUP_CONCAT(DISTINCT lwug.position_code) |
|
|
|
|
FROM logpm_distribution_parcel_list dpl |
|
|
|
|
left join logpm_warehouse_updown_goods lwug on dpl.id = lwug.association_id |
|
|
|
|
WHERE dpl.stock_article_id = ldrs.stock_article_id |
|
|
|
|
) AS goodsAllocation |
|
|
|
|
FROM logpm_distribution_stockup_info ldsi |
|
|
|
|