|
|
@@ -521,12 +521,10 @@ open class DoReplenishmentService( |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
val dopoIds = entities.mapNotNull { it.deliveryOrderPickOrderId }.distinct() |
|
|
val dopoIds = entities.mapNotNull { it.deliveryOrderPickOrderId }.distinct() |
|
|
val targetDoRequiredDateByDopoId = if (dopoIds.isEmpty()) { |
|
|
|
|
|
|
|
|
val dopoById = if (dopoIds.isEmpty()) { |
|
|
emptyMap() |
|
|
emptyMap() |
|
|
} else { |
|
|
} else { |
|
|
deliveryOrderPickOrderRepository.findAllById(dopoIds).associate { dopo -> |
|
|
|
|
|
dopo.id!! to dopo.requiredDeliveryDate |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
deliveryOrderPickOrderRepository.findAllById(dopoIds).associateBy { it.id!! } |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
val sourceKeys = entities.map { it.sourceDoId!! to it.itemId!! }.distinct() |
|
|
val sourceKeys = entities.map { it.sourceDoId!! to it.itemId!! }.distinct() |
|
|
@@ -572,9 +570,10 @@ open class DoReplenishmentService( |
|
|
truckLaneCode = row.truckLaneCode, |
|
|
truckLaneCode = row.truckLaneCode, |
|
|
targetDoId = row.targetDoId, |
|
|
targetDoId = row.targetDoId, |
|
|
targetDoCode = row.targetDoCode, |
|
|
targetDoCode = row.targetDoCode, |
|
|
targetDoEstimatedArrivalDate = row.deliveryOrderPickOrderId?.let { targetDoRequiredDateByDopoId[it] }, |
|
|
|
|
|
|
|
|
targetDoEstimatedArrivalDate = row.deliveryOrderPickOrderId?.let { dopoById[it]?.requiredDeliveryDate }, |
|
|
pickOrderLineId = row.pickOrderLineId, |
|
|
pickOrderLineId = row.pickOrderLineId, |
|
|
deliveryOrderPickOrderId = row.deliveryOrderPickOrderId, |
|
|
deliveryOrderPickOrderId = row.deliveryOrderPickOrderId, |
|
|
|
|
|
relateTicketNo = row.deliveryOrderPickOrderId?.let { dopoById[it]?.ticketNo }, |
|
|
status = row.status, |
|
|
status = row.status, |
|
|
reason = row.reason, |
|
|
reason = row.reason, |
|
|
created = row.created, |
|
|
created = row.created, |
|
|
|