Ver código fonte

補貨 search fix

production
CANCERYS\kw093 1 dia atrás
pai
commit
fd3a0f00fa
2 arquivos alterados com 5 adições e 5 exclusões
  1. +4
    -5
      src/main/java/com/ffii/fpsms/modules/deliveryOrder/service/DoReplenishmentService.kt
  2. +1
    -0
      src/main/java/com/ffii/fpsms/modules/deliveryOrder/web/models/DoReplenishmentModels.kt

+ 4
- 5
src/main/java/com/ffii/fpsms/modules/deliveryOrder/service/DoReplenishmentService.kt Ver arquivo

@@ -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,


+ 1
- 0
src/main/java/com/ffii/fpsms/modules/deliveryOrder/web/models/DoReplenishmentModels.kt Ver arquivo

@@ -54,6 +54,7 @@ data class DoReplenishmentResponse(
val targetDoEstimatedArrivalDate: LocalDate?, val targetDoEstimatedArrivalDate: LocalDate?,
val pickOrderLineId: Long?, val pickOrderLineId: Long?,
val deliveryOrderPickOrderId: Long?, val deliveryOrderPickOrderId: Long?,
val relateTicketNo: String?,
val status: String, val status: String,
val reason: String?, val reason: String?,
@JsonFormat(pattern = "yyyy-MM-dd'T'HH:mm:ss") @JsonFormat(pattern = "yyyy-MM-dd'T'HH:mm:ss")


Carregando…
Cancelar
Salvar