Browse Source

Merge remote-tracking branch 'origin/dev' into pre-production

pre-production
zhenghaoyu 1 week ago
parent
commit
88552f7881
  1. 14
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsLoadServiceImpl.java

14
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsLoadServiceImpl.java

@ -13327,7 +13327,10 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
} }
int i= 0;
List<TrunklineCarsLoadScanEntity> carsLoadScanEntities = trunklineCarsLoadScanService.findUnloadNoDataList(loadId,warehouseId); List<TrunklineCarsLoadScanEntity> carsLoadScanEntities = trunklineCarsLoadScanService.findUnloadNoDataList(loadId,warehouseId);
if(CollUtil.isNotEmpty(carsLoadScanEntities)){
//把carsLoadScanEntities中所有元素的scanCode放入一个Set集合 //把carsLoadScanEntities中所有元素的scanCode放入一个Set集合
Set<String> scanCodeSet = carsLoadScanEntities.stream().map(TrunklineCarsLoadScanEntity::getScanCode).collect(Collectors.toSet()); Set<String> scanCodeSet = carsLoadScanEntities.stream().map(TrunklineCarsLoadScanEntity::getScanCode).collect(Collectors.toSet());
@ -13340,9 +13343,9 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
int packageBatchSize = 500; int packageBatchSize = 500;
List<List<String>> orderPackageCodeGroups = new ArrayList<>(); List<List<String>> orderPackageCodeGroups = new ArrayList<>();
for (int i = 0; i < scanCodeList.size(); i += packageBatchSize) { for (int m = 0; m < scanCodeList.size(); m += packageBatchSize) {
int endIndex = Math.min(i + packageBatchSize, scanCodeList.size()); int endIndex = Math.min(m + packageBatchSize, scanCodeList.size());
orderPackageCodeGroups.add(scanCodeList.subList(i, endIndex)); orderPackageCodeGroups.add(scanCodeList.subList(m, endIndex));
} }
orderPackageCodeGroups.forEach(orderPackageCodeGroup -> { orderPackageCodeGroups.forEach(orderPackageCodeGroup -> {
@ -13511,8 +13514,6 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
// trunklineCarsLoadScanService.updateBatchById(updateScanList); // trunklineCarsLoadScanService.updateBatchById(updateScanList);
int i= 0;
//完结所有包件异常列表 //完结所有包件异常列表
if(CollUtil.isNotEmpty(orderPackageCodeSet)){ if(CollUtil.isNotEmpty(orderPackageCodeSet)){
i = orderPackageCodeSet.size(); i = orderPackageCodeSet.size();
@ -13532,6 +13533,9 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
packageTrackLogAsyncService.addPackageTrackLog(AuthUtil.getTenantId(), AuthUtil.getUserId(), Func.firstLong(AuthUtil.getDeptId()), AuthUtil.getNickName(), orderPackageCodes, warehouseId, warehouseName, WorkNodeEnums.UNLOAD_INCOMING_WAREHOUSE.getCode(), content); packageTrackLogAsyncService.addPackageTrackLog(AuthUtil.getTenantId(), AuthUtil.getUserId(), Func.firstLong(AuthUtil.getDeptId()), AuthUtil.getNickName(), orderPackageCodes, warehouseId, warehouseName, WorkNodeEnums.UNLOAD_INCOMING_WAREHOUSE.getCode(), content);
} }
}
bladeRedis.del(key); bladeRedis.del(key);
return R.success("同步成功"+i+"条"); return R.success("同步成功"+i+"条");

Loading…
Cancel
Save