|
|
@ -165,7 +165,7 @@ |
|
|
|
LEFT JOIN logpm_distribution_parcel_list ldpl on ldpl.order_code = ldsl.incoming_batch |
|
|
|
LEFT JOIN logpm_distribution_parcel_list ldpl on ldpl.order_code = ldsl.incoming_batch |
|
|
|
LEFT JOIN logpm_warehouse_updown_goods lwug |
|
|
|
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 |
|
|
|
on lwug.association_id = ldpl.id and lwug.association_type = '3' 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> |
|
|
|
|
|
|
|
|
|
|
|
<select id="getLocationMarketSelection" resultType="com.logpm.distribution.vo.DistributionStockupTrayVO"> |
|
|
|
<select id="getLocationMarketSelection" resultType="com.logpm.distribution.vo.DistributionStockupTrayVO"> |
|
|
@ -179,7 +179,7 @@ |
|
|
|
on lwug.association_id = ldsl.material_id and lwug.association_type = '4' and |
|
|
|
on lwug.association_id = ldsl.material_id and lwug.association_type = '4' and |
|
|
|
ldsl.market_id = lwug.market_id |
|
|
|
ldsl.market_id = lwug.market_id |
|
|
|
and ldsl.incoming_batch = lwug.incoming_batch and ldsl.warehouse_id = lwug.warehouse_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> |
|
|
|
<select id="getLocationSelection" resultType="com.logpm.distribution.vo.DistributionStockupTrayVO"> |
|
|
|
<select id="getLocationSelection" resultType="com.logpm.distribution.vo.DistributionStockupTrayVO"> |
|
|
|
select lwug.position_code positionCode, |
|
|
|
select lwug.position_code positionCode, |
|
|
@ -192,7 +192,7 @@ |
|
|
|
on lwug.association_id = ldsl.material_id and lwug.association_type = '4' and |
|
|
|
on lwug.association_id = ldsl.material_id and lwug.association_type = '4' and |
|
|
|
ldsl.market_id = lwug.market_id |
|
|
|
ldsl.market_id = lwug.market_id |
|
|
|
and ldsl.incoming_batch = lwug.incoming_batch and ldsl.warehouse_id = lwug.warehouse_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 |
|
|
|
GROUP BY lwug.position_code, lwug.allocation_id, lwug.allocation_title, lwug.num |
|
|
|
</select> |
|
|
|
</select> |
|
|
|
<select id="getLocationSelectionOrder" resultType="com.logpm.distribution.vo.DistributionStockupTrayVO"> |
|
|
|
<select id="getLocationSelectionOrder" resultType="com.logpm.distribution.vo.DistributionStockupTrayVO"> |
|
|
@ -206,7 +206,7 @@ |
|
|
|
LEFT JOIN logpm_distribution_parcel_list ldpl on ldpl.order_code = ldsl.incoming_batch |
|
|
|
LEFT JOIN logpm_distribution_parcel_list ldpl on ldpl.order_code = ldsl.incoming_batch |
|
|
|
LEFT JOIN logpm_warehouse_updown_goods lwug |
|
|
|
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 |
|
|
|
on lwug.association_id = ldpl.id and lwug.association_type = '3' and ldsl.warehouse_id = lwug.warehouse_id |
|
|
|
where lddd.id = #{param.deliveryDetailsId} |
|
|
|
where lddd.id = #{param.deliveryDetailsId} and lwug.allocation_id is not null |
|
|
|
|
|
|
|
|
|
|
|
</select> |
|
|
|
</select> |
|
|
|
|
|
|
|
|
|
|
@ -234,10 +234,12 @@ |
|
|
|
lds.loader_name loaderName, lds.forklift_id forkliftId,lds.loader_id loaderId,lds.fix_time |
|
|
|
lds.loader_name loaderName, lds.forklift_id forkliftId,lds.loader_id loaderId,lds.fix_time |
|
|
|
fixTime,lds.assign_time assignTime, |
|
|
|
fixTime,lds.assign_time assignTime, |
|
|
|
lds.type_service typeService,lds.outbound_date outboundDate,lds.stockup_code stockupCode, |
|
|
|
lds.type_service typeService,lds.outbound_date outboundDate,lds.stockup_code stockupCode, |
|
|
|
COALESCE(GROUP_CONCAT(DISTINCT lwug.position_code SEPARATOR ','), '') |
|
|
|
COALESCE(GROUP_CONCAT(DISTINCT lwug.position_code SEPARATOR ','), '') stockipAllocation, |
|
|
|
stockipAllocation,COALESCE(GROUP_CONCAT(DISTINCT lwtg.tray_code SEPARATOR ','), '') pallet |
|
|
|
COALESCE(GROUP_CONCAT(DISTINCT lwtg.tray_code SEPARATOR ','), '') pallet, |
|
|
|
|
|
|
|
COALESCE ( group_concat( DISTINCT ldr.consignee SEPARATOR ',' ), '' ) AS consignee |
|
|
|
from logpm_distribution_stockup lds |
|
|
|
from logpm_distribution_stockup lds |
|
|
|
LEFT JOIN logpm_distribution_stockup_info ldsi on ldsi.stockup_id =lds.id |
|
|
|
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_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_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 |
|
|
|
LEFT JOIN logpm_warehouse_tray_goods lwtg on lwtg.association_id = ldrp.parce_list_id |
|
|
@ -247,6 +249,10 @@ |
|
|
|
<if test="param.typeService != null and param.typeService != '' ">and lds.type_service = |
|
|
|
<if test="param.typeService != null and param.typeService != '' ">and lds.type_service = |
|
|
|
#{param.typeService} |
|
|
|
#{param.typeService} |
|
|
|
</if> |
|
|
|
</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.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.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} |
|
|
|
<if test="param.startDate != null ">and lds.stockup_date between #{param.startDate} and #{param.entDate} |
|
|
@ -325,10 +331,12 @@ |
|
|
|
lds.loader_name loaderName, lds.forklift_id forkliftId,lds.loader_id loaderId,lds.fix_time |
|
|
|
lds.loader_name loaderName, lds.forklift_id forkliftId,lds.loader_id loaderId,lds.fix_time |
|
|
|
fixTime,lds.assign_time assignTime, |
|
|
|
fixTime,lds.assign_time assignTime, |
|
|
|
lds.type_service typeService,lds.outbound_date outboundDate,lds.stockup_code stockupCode, |
|
|
|
lds.type_service typeService,lds.outbound_date outboundDate,lds.stockup_code stockupCode, |
|
|
|
COALESCE(GROUP_CONCAT(DISTINCT lwug.position_code SEPARATOR ','), '') |
|
|
|
COALESCE(GROUP_CONCAT(DISTINCT lwug.position_code SEPARATOR ','), '')stockipAllocation, |
|
|
|
stockipAllocation,COALESCE(GROUP_CONCAT(DISTINCT lwtg.tray_code SEPARATOR ','), '') pallet |
|
|
|
COALESCE(GROUP_CONCAT(DISTINCT lwtg.tray_code SEPARATOR ','), '') pallet, |
|
|
|
|
|
|
|
COALESCE(GROUP_CONCAT(DISTINCT ldr.consignee SEPARATOR ','), '') consignee |
|
|
|
from logpm_distribution_stockup lds |
|
|
|
from logpm_distribution_stockup lds |
|
|
|
LEFT JOIN logpm_distribution_stockup_info ldsi on ldsi.stockup_id = lds.id |
|
|
|
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_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_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 |
|
|
|
LEFT JOIN logpm_warehouse_tray_goods lwtg on lwtg.association_id = ldpl.id |
|
|
@ -339,6 +347,10 @@ |
|
|
|
<if test="param.typeService != null and param.typeService != '' ">and lds.type_service = |
|
|
|
<if test="param.typeService != null and param.typeService != '' ">and lds.type_service = |
|
|
|
#{param.typeService} |
|
|
|
#{param.typeService} |
|
|
|
</if> |
|
|
|
</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.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.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} |
|
|
|
<if test="param.startDate != null ">and lds.stockup_date between #{param.startDate} and #{param.entDate} |
|
|
|