From eec5fb27f98465c2347b98fed9611b111787d0d2 Mon Sep 17 00:00:00 2001 From: zhenghaoyu Date: Tue, 30 Apr 2024 10:16:17 +0800 Subject: [PATCH] =?UTF-8?q?1.=E5=B9=B2=E7=BA=BF-=E6=89=B9=E9=87=8F?= =?UTF-8?q?=E5=8D=B8=E8=BD=A6bug=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/ICarsLoadAsyncService.java | 5 ++ .../ITrunklineCarsUnloadLogService.java | 2 +- .../impl/CarsLoadAsyncServiceImpl.java | 8 ++ .../impl/TrunklineCarsLoadServiceImpl.java | 84 ++++++++++++++++++- .../TrunklineCarsUnloadLogServiceImpl.java | 7 ++ 5 files changed, 103 insertions(+), 3 deletions(-) diff --git a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/ICarsLoadAsyncService.java b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/ICarsLoadAsyncService.java index 12e54e571..c8a5d3ee4 100644 --- a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/ICarsLoadAsyncService.java +++ b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/ICarsLoadAsyncService.java @@ -2,6 +2,9 @@ package com.logpm.trunkline.service; import com.logpm.trunkline.entity.TrunklineCarsLoadEntity; import com.logpm.trunkline.entity.TrunklineCarsLoadLineEntity; +import com.logpm.trunkline.entity.TrunklineCarsUnloadLogEntity; + +import java.util.List; public interface ICarsLoadAsyncService { @@ -18,4 +21,6 @@ public interface ICarsLoadAsyncService { void abnormalListUnloadCheckByLoadIdAndWarehouseId(Long loadId, Long warehouseId, String nodeName, String tenantId, Long userId, String nickName, Long firstLong); void dealwithAfterAbnormalPackage(String orderPackageCode, Long warehouseId, String warehouseName, String carsNo, Long userId, Long aLong, String nickName); + + void savaUnloadLogBatch(List unloadLogList); } diff --git a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/ITrunklineCarsUnloadLogService.java b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/ITrunklineCarsUnloadLogService.java index 1b66ee6be..65d56eb5d 100644 --- a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/ITrunklineCarsUnloadLogService.java +++ b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/ITrunklineCarsUnloadLogService.java @@ -1,7 +1,6 @@ package com.logpm.trunkline.service; import com.logpm.trunkline.entity.TrunklineCarsUnloadLogEntity; -import com.logpm.trunkline.vo.UnloadScanOrderVO; import org.springblade.core.mp.base.BaseService; import java.util.List; @@ -21,4 +20,5 @@ public interface ITrunklineCarsUnloadLogService extends BaseService unloadLogList); } diff --git a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/CarsLoadAsyncServiceImpl.java b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/CarsLoadAsyncServiceImpl.java index 68f1007d2..28b2bb2b4 100644 --- a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/CarsLoadAsyncServiceImpl.java +++ b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/CarsLoadAsyncServiceImpl.java @@ -53,6 +53,8 @@ public class CarsLoadAsyncServiceImpl implements ICarsLoadAsyncService { private IAftersalesAbnormalRecordClient abnormalRecordClient; @Autowired private IAftersalesWorkOrderClient aftersalesWorkOrderClient; + @Autowired + private ITrunklineCarsUnloadLogService trunklineCarsUnloadLogService; @Async @Override @@ -510,4 +512,10 @@ public class CarsLoadAsyncServiceImpl implements ICarsLoadAsyncService { } + @Async + @Override + public void savaUnloadLogBatch(List unloadLogList) { + trunklineCarsUnloadLogService.savaUnloadLogBatch(unloadLogList); + } + } diff --git a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsLoadServiceImpl.java b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsLoadServiceImpl.java index 0d76ee70a..26c29acb5 100644 --- a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsLoadServiceImpl.java +++ b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsLoadServiceImpl.java @@ -3440,6 +3440,7 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl loadScanEntityList = trunklineCarsLoadScanService.findListByIdsNoPackage(carsLoadScanIds,warehouseId); List parcelListEntities = trunklineCarsLoadScanService.findParceListByCarsLoadScanIds(carsLoadScanIds); //把parcelListEntities转成orderPackageCode为键值的map @@ -3483,6 +3484,7 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl trayCodes = new ArrayList<>(); List orderPackageCodes = new ArrayList<>(); + List unloadLogList = new ArrayList<>(); @@ -3505,6 +3507,8 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl { List list = unbingTrayAndDelAllocationPackages.get(w); diff --git a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsUnloadLogServiceImpl.java b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsUnloadLogServiceImpl.java index 18e0ca55f..26c6bc6c9 100644 --- a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsUnloadLogServiceImpl.java +++ b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsUnloadLogServiceImpl.java @@ -8,6 +8,8 @@ import lombok.extern.slf4j.Slf4j; import org.springblade.core.mp.base.BaseServiceImpl; import org.springframework.stereotype.Service; +import java.util.List; + @Slf4j @AllArgsConstructor @Service @@ -62,4 +64,9 @@ public class TrunklineCarsUnloadLogServiceImpl extends BaseServiceImpl unloadLogList) { + saveBatch(unloadLogList); + } }