|
|
|
@ -155,6 +155,18 @@
|
|
|
|
|
</where> |
|
|
|
|
|
|
|
|
|
</select> |
|
|
|
|
<select id="getLocationMarketSelectionOrder" resultType="com.logpm.distribution.vo.DistributionStockupTrayVO"> |
|
|
|
|
select DISTINCT lwug.position_code positionCode, |
|
|
|
|
lwug.allocation_id allocationId, |
|
|
|
|
lwug.allocation_title allocationTitle, |
|
|
|
|
lwug.num |
|
|
|
|
from logpm_distribution_reservation_stocklist ldrs |
|
|
|
|
LEFT JOIN logpm_distribution_stock_list ldsl on ldrs.stocklist_id = ldsl.id |
|
|
|
|
LEFT JOIN logpm_distribution_parcel_list ldpl on ldpl.order_code = ldsl.incoming_batch |
|
|
|
|
LEFT JOIN logpm_warehouse_updown_goods lwug |
|
|
|
|
on lwug.association_id = ldpl.id and lwug.association_type = '3' and ldsl.warehouse_id = lwug.warehouse_id |
|
|
|
|
where ldrs.id = #{param.deliveryDetailsId} and lwug.allocation_id is not null |
|
|
|
|
</select> |
|
|
|
|
|
|
|
|
|
<select id="getLocationMarketSelection" resultType="com.logpm.distribution.vo.DistributionStockupTrayVO"> |
|
|
|
|
select lwug.position_code positionCode, |
|
|
|
@ -167,7 +179,7 @@
|
|
|
|
|
on lwug.association_id = ldsl.material_id and lwug.association_type = '4' and |
|
|
|
|
ldsl.market_id = lwug.market_id |
|
|
|
|
and ldsl.incoming_batch = lwug.incoming_batch and ldsl.warehouse_id = lwug.warehouse_id |
|
|
|
|
where ldrs.id = #{param.deliveryDetailsId} |
|
|
|
|
where ldrs.id = #{param.deliveryDetailsId} and lwug.allocation_id is not null |
|
|
|
|
</select> |
|
|
|
|
<select id="getLocationSelection" resultType="com.logpm.distribution.vo.DistributionStockupTrayVO"> |
|
|
|
|
select lwug.position_code positionCode, |
|
|
|
@ -180,9 +192,24 @@
|
|
|
|
|
on lwug.association_id = ldsl.material_id and lwug.association_type = '4' and |
|
|
|
|
ldsl.market_id = lwug.market_id |
|
|
|
|
and ldsl.incoming_batch = lwug.incoming_batch and ldsl.warehouse_id = lwug.warehouse_id |
|
|
|
|
where lddd.id = #{param.deliveryDetailsId} |
|
|
|
|
where lddd.id = #{param.deliveryDetailsId} and lwug.allocation_id is not null |
|
|
|
|
GROUP BY lwug.position_code, lwug.allocation_id, lwug.allocation_title, lwug.num |
|
|
|
|
</select> |
|
|
|
|
<select id="getLocationSelectionOrder" resultType="com.logpm.distribution.vo.DistributionStockupTrayVO"> |
|
|
|
|
|
|
|
|
|
select DISTINCT lwug.position_code positionCode, |
|
|
|
|
lwug.allocation_id allocationId, |
|
|
|
|
lwug.allocation_title allocationTitle, |
|
|
|
|
lwug.num |
|
|
|
|
from logpm_distribution_delivery_details lddd |
|
|
|
|
LEFT JOIN logpm_distribution_stock_list ldsl on lddd.stock_list_id = ldsl.id |
|
|
|
|
LEFT JOIN logpm_distribution_parcel_list ldpl on ldpl.order_code = ldsl.incoming_batch |
|
|
|
|
LEFT JOIN logpm_warehouse_updown_goods lwug |
|
|
|
|
on lwug.association_id = ldpl.id and lwug.association_type = '3' and ldsl.warehouse_id = lwug.warehouse_id |
|
|
|
|
where lddd.id = #{param.deliveryDetailsId} and lwug.allocation_id is not null |
|
|
|
|
|
|
|
|
|
</select> |
|
|
|
|
|
|
|
|
|
<select id="stockupOffShelf" resultType="com.logpm.distribution.vo.DistributionStockupSelfVO"> |
|
|
|
|
select lwug.id lwugId,lds.id ldsId,ldrp.packet_bar_code orderPackageCode,lwug.allocation_id allocationId |
|
|
|
|
from logpm_distribution_reservation ldr |
|
|
|
@ -207,10 +234,12 @@
|
|
|
|
|
lds.loader_name loaderName, lds.forklift_id forkliftId,lds.loader_id loaderId,lds.fix_time |
|
|
|
|
fixTime,lds.assign_time assignTime, |
|
|
|
|
lds.type_service typeService,lds.outbound_date outboundDate,lds.stockup_code stockupCode, |
|
|
|
|
COALESCE(GROUP_CONCAT(DISTINCT lwug.position_code SEPARATOR ','), '') |
|
|
|
|
stockipAllocation,COALESCE(GROUP_CONCAT(DISTINCT lwtg.tray_code SEPARATOR ','), '') pallet |
|
|
|
|
COALESCE(GROUP_CONCAT(DISTINCT lwug.position_code SEPARATOR ','), '') stockipAllocation, |
|
|
|
|
COALESCE(GROUP_CONCAT(DISTINCT lwtg.tray_code SEPARATOR ','), '') pallet, |
|
|
|
|
COALESCE ( group_concat( DISTINCT ldr.consignee SEPARATOR ',' ), '' ) AS consignee |
|
|
|
|
from logpm_distribution_stockup lds |
|
|
|
|
LEFT JOIN logpm_distribution_stockup_info ldsi on ldsi.stockup_id =lds.id |
|
|
|
|
LEFT JOIN logpm_distribution_reservation ldr ON ldsi.reservation_id = ldr.id |
|
|
|
|
LEFT JOIN logpm_distribution_reservation_package ldrp on ldrp.reservation_id = ldsi.reservation_id |
|
|
|
|
LEFT JOIN logpm_warehouse_updown_goods lwug on lwug.association_id = ldrp.parce_list_id |
|
|
|
|
LEFT JOIN logpm_warehouse_tray_goods lwtg on lwtg.association_id = ldrp.parce_list_id |
|
|
|
@ -220,6 +249,10 @@
|
|
|
|
|
<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} |
|
|
|
|
</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> |
|
|
|
|
<if test="param.startDate != null ">and lds.stockup_date between #{param.startDate} and #{param.entDate} |
|
|
|
@ -298,10 +331,12 @@
|
|
|
|
|
lds.loader_name loaderName, lds.forklift_id forkliftId,lds.loader_id loaderId,lds.fix_time |
|
|
|
|
fixTime,lds.assign_time assignTime, |
|
|
|
|
lds.type_service typeService,lds.outbound_date outboundDate,lds.stockup_code stockupCode, |
|
|
|
|
COALESCE(GROUP_CONCAT(DISTINCT lwug.position_code SEPARATOR ','), '') |
|
|
|
|
stockipAllocation,COALESCE(GROUP_CONCAT(DISTINCT lwtg.tray_code SEPARATOR ','), '') pallet |
|
|
|
|
COALESCE(GROUP_CONCAT(DISTINCT lwug.position_code SEPARATOR ','), '')stockipAllocation, |
|
|
|
|
COALESCE(GROUP_CONCAT(DISTINCT lwtg.tray_code SEPARATOR ','), '') pallet, |
|
|
|
|
COALESCE(GROUP_CONCAT(DISTINCT ldr.consignee SEPARATOR ','), '') consignee |
|
|
|
|
from logpm_distribution_stockup lds |
|
|
|
|
LEFT JOIN logpm_distribution_stockup_info ldsi on ldsi.stockup_id = lds.id |
|
|
|
|
LEFT JOIN logpm_distribution_reservation ldr on ldsi.reservation_id = ldr.id |
|
|
|
|
LEFT JOIN logpm_distrilbution_bill_stock ldbs on ldbs.bill_lading_id = ldsi.reservation_id |
|
|
|
|
LEFT JOIN logpm_distribution_parcel_list ldpl on ldpl.stock_article_id = ldbs.stock_article_id |
|
|
|
|
LEFT JOIN logpm_warehouse_tray_goods lwtg on lwtg.association_id = ldpl.id |
|
|
|
@ -312,6 +347,10 @@
|
|
|
|
|
<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} |
|
|
|
|
</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> |
|
|
|
|
<if test="param.startDate != null ">and lds.stockup_date between #{param.startDate} and #{param.entDate} |
|
|
|
|