diff --git a/blade-service/logpm-business/src/main/java/com/logpm/business/receiver/BusinessInOrderDataQueueHandler.java b/blade-service/logpm-business/src/main/java/com/logpm/business/receiver/BusinessInOrderDataQueueHandler.java index 7069eca34..28d11b525 100644 --- a/blade-service/logpm-business/src/main/java/com/logpm/business/receiver/BusinessInOrderDataQueueHandler.java +++ b/blade-service/logpm-business/src/main/java/com/logpm/business/receiver/BusinessInOrderDataQueueHandler.java @@ -49,23 +49,23 @@ public class BusinessInOrderDataQueueHandler { String tenantId = o.getString("tenantId"); //验证参数是否为null或者空串 - if (orderPackageCode == null || orderPackageCode.equals("")) { + if (orderPackageCode == null || orderPackageCode.isEmpty()) { log.error("orderPackageCode is null"); return; } - if (reservationCode == null || reservationCode.equals("")) { + if (reservationCode == null || reservationCode.isEmpty()) { log.error("reservationCode is null"); return; } - if (distrCarNumber == null || distrCarNumber.equals("")) { + if (distrCarNumber == null || distrCarNumber.isEmpty()) { log.error("distrCarNumber is null"); return; } - if (vehicleName == null || vehicleName.equals("")) { + if (vehicleName == null || vehicleName.isEmpty()) { log.error("vehicleName is null"); return; } - if (driverName == null || driverName.equals("")) { + if (driverName == null || driverName.isEmpty()) { log.error("driverName is null"); return; } diff --git a/blade-service/logpm-business/src/main/java/com/logpm/business/service/impl/BusinessPreOrderServiceImpl.java b/blade-service/logpm-business/src/main/java/com/logpm/business/service/impl/BusinessPreOrderServiceImpl.java index 839381ff1..8f5da58da 100644 --- a/blade-service/logpm-business/src/main/java/com/logpm/business/service/impl/BusinessPreOrderServiceImpl.java +++ b/blade-service/logpm-business/src/main/java/com/logpm/business/service/impl/BusinessPreOrderServiceImpl.java @@ -229,11 +229,15 @@ public class BusinessPreOrderServiceImpl extends BaseServiceImpl packageEntityList = new ArrayList<>(); - if (distributionAppAddvalueDTO.getAddvalueType().equals("2") || distributionAppAddvalueDTO.getAddvalueType().equals("6")) { + if ("2".equals(distributionAppAddvalueDTO.getAddvalueType()) || "6".equals(distributionAppAddvalueDTO.getAddvalueType())) { //专车和超区进行全部包件查询 Map addValueDTO = new HashMap<>(); addValueDTO.put("reservationId", distributionAppAddvalueDTO.getReservationId().toString()); diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionAsyncServiceImpl.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionAsyncServiceImpl.java index 3502f89cb..32b9d762e 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionAsyncServiceImpl.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionAsyncServiceImpl.java @@ -3183,7 +3183,7 @@ public class DistributionAsyncServiceImpl implements IDistributionAsyncService { Map> orderMap = orderList1.stream().collect(Collectors.groupingBy(DistributionStockArticleEntity::getBrand)); orderMap.forEach((k, v) -> { try { - if (k.equals("梦天")) { + if ("梦天".equals(k)) { MtReceiveDTO mtReceiveDTO = new MtReceiveDTO(); //目前处理梦天 @@ -3239,7 +3239,7 @@ public class DistributionAsyncServiceImpl implements IDistributionAsyncService { } - if (k.equals("欧派")) { + if ("欧派".equals(k)) { //查询此订单所有签收信息 List orderList3 = orderMap.get(k); @@ -3262,7 +3262,7 @@ public class DistributionAsyncServiceImpl implements IDistributionAsyncService { } - if (k.equals("皮阿诺")) { + if ("皮阿诺".equals(k)) { List orderList3 = orderMap.get(k); @@ -3289,7 +3289,7 @@ public class DistributionAsyncServiceImpl implements IDistributionAsyncService { } } - if (k.equals("我乐")) { + if ("我乐".equals(k)) { List orderList3 = orderMap.get(k); List ladingScanEntities = distributionBillLadingScanMapper.selectList(Wrappers.query().lambda() @@ -3319,7 +3319,7 @@ public class DistributionAsyncServiceImpl implements IDistributionAsyncService { } - if (k.equals("志邦")) { + if ("志邦".equals(k)) { List orderList3 = orderMap.get(k); List ladingScanEntities = distributionBillLadingScanMapper.selectList(Wrappers.query().lambda() diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryListServiceImpl.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryListServiceImpl.java index 52834ac45..337a7d3c3 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryListServiceImpl.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryListServiceImpl.java @@ -3675,7 +3675,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl consignee = new HashSet<>(); Map map = new HashMap<>(); + List packageEntityList = new ArrayList<>(); + List reservationZeroPackageEntityList = new ArrayList<>(); + v.forEach(s -> { List packageLockIds = new ArrayList<>(); DistributionStockArticleDTO stockArticleDTO = Func.copy(s, DistributionStockArticleDTO.class); @@ -2349,7 +2352,7 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl packageEntityList = new ArrayList<>(); + //存在勾选包件的操作 if (Func.isNotEmpty(s.getPackageListInfo())) { List packageListInfo = s.getPackageListInfo(); @@ -2411,15 +2414,11 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl reservationZeroPackageEntityList = new ArrayList<>(); List parcelNumberVOS = s.getParcelNumberVOS(); if (Func.isNotEmpty(parcelNumberVOS)) { //进行了零担订单 @@ -2491,9 +2490,7 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl f.getMaterialType().equals("2")).mapToInt(DistributionBillLadingScanEntity::getQuantity).sum(); + int sum = ladingScanEntities.stream().filter(f -> "2".equals(f.getMaterialType())).mapToInt(DistributionBillLadingScanEntity::getQuantity).sum(); // if (sum == 0){ // //未进行任何签收扫描的操作这里需要进行拦截 // throw new ServiceException("无签收数据"); diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/wrapper/DistributionDisStockListWrapper.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/wrapper/DistributionDisStockListWrapper.java index 1beb0afa0..ba6c58f3c 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/wrapper/DistributionDisStockListWrapper.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/wrapper/DistributionDisStockListWrapper.java @@ -1,9 +1,7 @@ package com.logpm.distribution.wrapper; import com.logpm.distribution.entity.DisStockListDetailEntity; -import com.logpm.distribution.entity.DistributionStockListEntity; import com.logpm.distribution.vo.DisStockListDetailVO; -import com.logpm.distribution.vo.DistributionStockListVO; import org.springblade.common.constant.DictBizConstant; import org.springblade.core.mp.support.BaseEntityWrapper; import org.springblade.core.tool.utils.BeanUtil; @@ -27,7 +25,7 @@ public class DistributionDisStockListWrapper extends BaseEntityWrapper audio = new AtomicReference<>(); diff --git a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/OpenOrderServiceImpl.java b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/OpenOrderServiceImpl.java index 043151f81..fa8175ec2 100644 --- a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/OpenOrderServiceImpl.java +++ b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/OpenOrderServiceImpl.java @@ -1552,7 +1552,7 @@ public class OpenOrderServiceImpl implements IOpenOrderService { } InputStream inputStream = file.getInputStream(); - long start = new Date().getTime(); + long start = System.currentTimeMillis(); List importCustomizedOuPaiDTOS = EasyExcel.read(inputStream).head(ImportCustomizedOuPaiDTO.class).sheet(0).headRowNumber(1).doReadSync(); @@ -1814,7 +1814,7 @@ public class OpenOrderServiceImpl implements IOpenOrderService { } - long end = new Date().getTime(); + long end = System.currentTimeMillis(); log.info("################本次耗时 " + (end - start) + "ms"); 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 2a771a1dd..04625ad58 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 @@ -1306,10 +1306,10 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl map = new HashMap<>(); map.put("messageId", CommonUtil.getUUID()); map.put("messageData", jsonObject); - map.put("createTime", new Date().getTime()); + map.put("createTime", System.currentTimeMillis()); map.put("flagType", "TrunklineUnloadConfirm"); rabbitTemplate.convertAndSend(RabbitConstant.TRUNKLINE_UNLOAD_CONFIRM_EXCHANGE, RabbitConstant.TRUNKLINE_UNLOAD_CONFIRM_ROUTING, map); @@ -2397,12 +2397,12 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl zeroDetailVOS = zeroDetailVOMap.get(packageId); Integer lNum = zeroDetailVOS.stream().mapToInt(t -> Objects.nonNull(t.getLoadingNum()) ? t.getLoadingNum() : 0).sum(); Integer uNum = zeroDetailVOS.stream().mapToInt(t -> Objects.nonNull(t.getUnloadNum()) ? t.getUnloadNum() : 0).sum(); - if(uNum != lNum){ + if(!uNum.equals(lNum)){ int diff = lNum - uNum; distributionParcelListClient.addZeroQuantity(packageId, diff); distributionParcelNumberClient.addHandleQuantity(packageId,diff); @@ -6728,7 +6728,7 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl loadingDetailExportVOS = trunklineCarsLoadScanService.loadingDetailExport(loadCarsDTO); //把records中type等于2的id放入一个集合 - List scanLoadIds = loadingDetailExportVOS.stream().filter(item -> item.getType().equals("零担")).map(LoadingDetailExportVO::getId).collect(Collectors.toList()); + List scanLoadIds = loadingDetailExportVOS.stream().filter(item -> "零担".equals(item.getType())).map(LoadingDetailExportVO::getId).collect(Collectors.toList()); if(CollUtil.isNotEmpty(scanLoadIds)){ List scanZeroDetailVOS = scanZeroDetailService.findListByCarsLoadScanIds(scanLoadIds); //把scanZeroDetailVOS通过scanId进行分组 @@ -7391,7 +7391,9 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl list = baseMapper.selectContrastDataInfo(questDetailDTO.getQuestNum(), questDetailDTO); //查询托盘名称 List trayEntityList = basicdataTrayClient.getTrayEntityList(); - list.stream().forEach(i -> { + list.forEach(i -> { String[] split = i.getQuestStatus().split(","); //盘点状态;0 待盘点 1. 已盘 2未盘点 3已排除 Integer yiPan = 0; for (String s : split) { - switch (s) { - case "1": - yiPan += 1; - i.setQuestStatusName("部分盘点"); - break; - } + if (s.equals("1")) { + yiPan += 1; + i.setQuestStatusName("部分盘点"); + } } if (ObjectUtils.isNotNull(i.getUpdateUser())) { StringBuffer buffer = new StringBuffer(); @@ -1250,15 +1250,13 @@ public class TaskQuestServiceImpl extends BaseServiceImpl yi = new AtomicReference<>(0); v.stream().forEach(i -> { - switch (i.getQuestStatus()) { - case 1: - yi.updateAndGet(v1 -> v1 + 1); - q.setQuestStatusName("部分盘点"); - User user = UserCache.getUser(i.getUpdateUser()); - q.setUpdateUser(user.getAccount()); - q.setUpdateTime(i.getUpdateTime()); - break; - } + if (i.getQuestStatus() == 1) { + yi.updateAndGet(v1 -> v1 + 1); + q.setQuestStatusName("部分盘点"); + User user = UserCache.getUser(i.getUpdateUser()); + q.setUpdateUser(user.getAccount()); + q.setUpdateTime(i.getUpdateTime()); + } //库位 if (ObjectUtils.isNull(buffer) && ObjectUtils.isNotNull(i.getPositionCode())) { buffer.append(i.getPositionCode()); @@ -1459,7 +1457,7 @@ public class TaskQuestServiceImpl extends BaseServiceImpl end) { diff --git a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseGoodsAllocationServiceImpl.java b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseGoodsAllocationServiceImpl.java index c13449014..5615d5ea5 100644 --- a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseGoodsAllocationServiceImpl.java +++ b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseGoodsAllocationServiceImpl.java @@ -197,6 +197,9 @@ public class WarehouseGoodsAllocationServiceImpl extends BaseServiceImpl implements IWarehouseSettingService { + @Override public boolean isMandatoryLoading(Long WarehouseId){ WarehouseSettingEntity setting = getSetting(WarehouseId); int noLimit = 0; diff --git a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseTrayTypeServiceImpl.java b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseTrayTypeServiceImpl.java index c91d62f67..7eba42f7f 100644 --- a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseTrayTypeServiceImpl.java +++ b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseTrayTypeServiceImpl.java @@ -736,6 +736,7 @@ public class WarehouseTrayTypeServiceImpl extends BaseServiceImpl parcelListEntityList,Long warehouseId,String remark) { String tt = trayTypeEntity.getTrayType(); diff --git a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseUpdownStockupAreaServiceImpl.java b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseUpdownStockupAreaServiceImpl.java index ec568dbc5..785f357ad 100644 --- a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseUpdownStockupAreaServiceImpl.java +++ b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseUpdownStockupAreaServiceImpl.java @@ -267,7 +267,7 @@ public class WarehouseUpdownStockupAreaServiceImpl extends BaseServiceImpl 1) { - boolean flag = warehouseUpdownStockupAreaEntityList.stream().anyMatch(item -> !item.getAssociationType().equals("3")); + boolean flag = warehouseUpdownStockupAreaEntityList.stream().anyMatch(item -> !"3".equals(item.getAssociationType())); if (flag) { log.warn(method + "多条上架记录AssociationValue:{},warehouseId:{}", code, warehouseId); throw new CustomerException("多条上架记录"); diff --git a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseWarehousingEntryServiceImpl.java b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseWarehousingEntryServiceImpl.java index 23808ad9a..97721e8b3 100644 --- a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseWarehousingEntryServiceImpl.java +++ b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseWarehousingEntryServiceImpl.java @@ -139,7 +139,7 @@ public class WarehouseWarehousingEntryServiceImpl extends BaseServiceImpl