diff --git a/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionStockEntity.java b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionStockEntity.java index de240adbb..9a518ce1c 100644 --- a/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionStockEntity.java +++ b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionStockEntity.java @@ -87,9 +87,9 @@ public class DistributionStockEntity extends TenantEntity { @ApiModelProperty(value = "包条码") private String coding; /** - * 状态 + * 扫码类型 1包件 2库存品 3 订单零担 */ - @ApiModelProperty(value = "状态") + @ApiModelProperty(value = " 扫码类型 1包件 2库存品 3 订单零担") private String conditions; /** * 货物名称 diff --git a/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/impl/AftersalesWorkOrderServiceImpl.java b/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/impl/AftersalesWorkOrderServiceImpl.java index 6946b04f0..18d0c7b2c 100644 --- a/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/impl/AftersalesWorkOrderServiceImpl.java +++ b/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/impl/AftersalesWorkOrderServiceImpl.java @@ -1159,7 +1159,7 @@ public class AftersalesWorkOrderServiceImpl extends BaseServiceImpl userList = new ArrayList<>(); if (!listR.getData().isEmpty()) { listR.getData().forEach(i -> { - long time = new Date().getTime() / 1000; + long time = System.currentTimeMillis() / 1000; if (ObjectUtils.isNotNull(i.getDownTime())) { long l = i.getDownTime().getTime() / 1000; if (l > time) { diff --git a/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataTripartiteMallServiceImpl.java b/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataTripartiteMallServiceImpl.java index e33ad97b8..323fe4da7 100644 --- a/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataTripartiteMallServiceImpl.java +++ b/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataTripartiteMallServiceImpl.java @@ -20,7 +20,6 @@ import com.baomidou.mybatisplus.core.conditions.Wrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.logpm.basicdata.entity.BasicdataClientEntity; import com.logpm.basicdata.entity.BasicdataClientLogEntity; -import com.logpm.basicdata.entity.BasicdataStorageServicesEntity; import com.logpm.basicdata.entity.BasicdataTripartiteMallEntity; import com.logpm.basicdata.excel.BasicdataTripartiteMallExcel; import com.logpm.basicdata.mapper.BasicdataTripartiteMallMapper; @@ -34,6 +33,7 @@ import org.springblade.core.mp.base.BaseServiceImpl; import org.springblade.core.secure.utils.AuthUtil; import org.springblade.core.tool.api.R; import org.springblade.core.tool.utils.Func; +import org.springblade.core.tool.utils.StringUtil; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @@ -139,8 +139,8 @@ public class BasicdataTripartiteMallServiceImpl extends BaseServiceImpl 0; } diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSignforServiceImpl.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSignforServiceImpl.java index fbba66df0..30b4177c5 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSignforServiceImpl.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSignforServiceImpl.java @@ -372,7 +372,9 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl> zeroPackageMap, DistributionSignforVO d) { - if (!zeroPackageMap.containsKey(d.getReservationId())) return 0; + if (!zeroPackageMap.containsKey(d.getReservationId())){ + return 0; + } List entities = zeroPackageMap.get(d.getReservationId()); List zeroPackageIds = entities.stream().map(DistributionReservationZeroPackageEntity::getParcelListId).collect(Collectors.toList()); @@ -406,7 +408,9 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl> zeroPackageMap, DistributionSignforVO d) { - if (!zeroPackageMap.containsKey(d.getReservationId())) return 0; + if (!zeroPackageMap.containsKey(d.getReservationId())){ + return 0; + } List entities = zeroPackageMap.get(d.getReservationId()); List zeroPackageIds = entities.stream().map(DistributionReservationZeroPackageEntity::getParcelListId).collect(Collectors.toList()); diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockListServiceImpl.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockListServiceImpl.java index 564830dee..a93a2a2b0 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockListServiceImpl.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockListServiceImpl.java @@ -635,7 +635,7 @@ public class DistributionStockListServiceImpl extends BaseServiceImpl expireTimeLong){ logger.error("#########verifyToken: token验证不通过 已过期 token={},corpId={}",token,corpId); diff --git a/blade-service/logpm-factory/src/main/java/com/logpm/factory/feign/OldSystemWaybillClient.java b/blade-service/logpm-factory/src/main/java/com/logpm/factory/feign/OldSystemWaybillClient.java index 5eeac31fe..d29c21dc8 100644 --- a/blade-service/logpm-factory/src/main/java/com/logpm/factory/feign/OldSystemWaybillClient.java +++ b/blade-service/logpm-factory/src/main/java/com/logpm/factory/feign/OldSystemWaybillClient.java @@ -55,7 +55,7 @@ public class OldSystemWaybillClient implements IOldSystemWaybillClient{ map.put("messageId", CommonUtil.getUUID()); map.put("logId", orderStatusLog.getId()); map.put("messageData", orderStatusDTO); - map.put("createTime", new Date().getTime()); + map.put("createTime", System.currentTimeMillis()); map.put("type", "DealWith"); rabbitTemplate.convertAndSend(RabbitConstant.DEAL_WITH_EXCHANGE, RabbitConstant.DEAL_WITH_ROUTING, map); diff --git a/blade-service/logpm-factory/src/main/java/com/logpm/factory/jp/jobhandler/TestJob.java b/blade-service/logpm-factory/src/main/java/com/logpm/factory/jp/jobhandler/TestJob.java index 5b1b3bf33..60523b9c4 100644 --- a/blade-service/logpm-factory/src/main/java/com/logpm/factory/jp/jobhandler/TestJob.java +++ b/blade-service/logpm-factory/src/main/java/com/logpm/factory/jp/jobhandler/TestJob.java @@ -27,7 +27,7 @@ public class TestJob { map.put("messageId", CommonUtil.getUUID()); map.put("logId", CommonUtil.getUUID()); map.put("messageData", "body{[aaaaaaaaaaaaaaaaaaaa]}"); - map.put("createTime", new Date().getTime()); + map.put("createTime", System.currentTimeMillis()); map.put("flagType", "OrderStatusLog"); log.info("###############TestData11111111111{}", CommonUtil.dateToStringGeneral(new Date())); //将消息携带绑定键值 diff --git a/blade-service/logpm-factory/src/main/java/com/logpm/factory/mt/service/impl/MtFactoryDataServiceImpl.java b/blade-service/logpm-factory/src/main/java/com/logpm/factory/mt/service/impl/MtFactoryDataServiceImpl.java index 3acf31613..949eb9d61 100644 --- a/blade-service/logpm-factory/src/main/java/com/logpm/factory/mt/service/impl/MtFactoryDataServiceImpl.java +++ b/blade-service/logpm-factory/src/main/java/com/logpm/factory/mt/service/impl/MtFactoryDataServiceImpl.java @@ -245,7 +245,7 @@ public class MtFactoryDataServiceImpl implements IMtFactoryDataService { String appsecret = mtFactoryProperties.getAppsecret(); String userid = mtFactoryProperties.getUserid(); String userpwd = mtFactoryProperties.getUserpwd(); - long time = new Date().getTime(); + long time = System.currentTimeMillis(); String sign = MD5Utils.md5Hex((appkey + appsecret + time).getBytes(StandardCharsets.UTF_8)); String pwd = MD5Utils.md5Hex(userpwd.getBytes(StandardCharsets.UTF_8)); diff --git a/blade-service/logpm-factory/src/main/java/com/logpm/factory/oupai/service/impl/OuPaiFactoryServiceImpl.java b/blade-service/logpm-factory/src/main/java/com/logpm/factory/oupai/service/impl/OuPaiFactoryServiceImpl.java index 0d46ae308..0cfe68e2b 100644 --- a/blade-service/logpm-factory/src/main/java/com/logpm/factory/oupai/service/impl/OuPaiFactoryServiceImpl.java +++ b/blade-service/logpm-factory/src/main/java/com/logpm/factory/oupai/service/impl/OuPaiFactoryServiceImpl.java @@ -207,7 +207,7 @@ public class OuPaiFactoryServiceImpl implements IOuPaiFactoryService { map.put("messageId", CommonUtil.getUUID()); map.put("type", "Push"); map.put("messageData", jo.toJSONString()); - map.put("createTime", new Date().getTime()); + map.put("createTime", System.currentTimeMillis()); try { log.info(">>>############ 处理到新系统"); rabbitTemplate.convertAndSend(RabbitConstant.OUPAI_RECEIVING_EXCHANGE, RabbitConstant.OUPAI_RECEIVING_ROUTING, map); @@ -342,7 +342,7 @@ public class OuPaiFactoryServiceImpl implements IOuPaiFactoryService { map.put("messageId", CommonUtil.getUUID()); map.put("type", "Push"); map.put("messageData", jo.toJSONString()); - map.put("createTime", new Date().getTime()); + map.put("createTime", System.currentTimeMillis()); try { log.info(">>>############ 处理到老系统"); rabbitTemplate.convertAndSend(RabbitConstant.OUPAI_OLD_RECEIVING_EXCHANGE, RabbitConstant.OUPAI_OLD_RECEIVING_ROUTING, map); @@ -833,7 +833,7 @@ public class OuPaiFactoryServiceImpl implements IOuPaiFactoryService { map.put("messageId", CommonUtil.getUUID()); map.put("type", "Push"); map.put("messageData", opOrderStatusLogEntity); - map.put("createTime", new Date().getTime()); + map.put("createTime", System.currentTimeMillis()); try { rabbitTemplate.convertAndSend(RabbitConstant.OUPAI_SIGN_EXCHANGE, RabbitConstant.OUPAI_SIGN_ROUTING, map); } catch (Exception e) { @@ -873,7 +873,7 @@ public class OuPaiFactoryServiceImpl implements IOuPaiFactoryService { map.put("messageId", CommonUtil.getUUID()); map.put("type", "Push"); map.put("messageData", opOrderStatusLogEntity); - map.put("createTime", new Date().getTime()); + map.put("createTime", System.currentTimeMillis()); try { rabbitTemplate.convertAndSend(RabbitConstant.OUPAI_RECEIVING_EXCHANGE, RabbitConstant.OUPAI_RECEIVING_ROUTING, map); } catch (Exception e) { diff --git a/blade-service/logpm-factory/src/test/java/com/logpm/factory/TestService.java b/blade-service/logpm-factory/src/test/java/com/logpm/factory/TestService.java index 0384b569b..b80b7bfa4 100644 --- a/blade-service/logpm-factory/src/test/java/com/logpm/factory/TestService.java +++ b/blade-service/logpm-factory/src/test/java/com/logpm/factory/TestService.java @@ -397,7 +397,7 @@ public class TestService { String appsecret = "HT20230822140820"; String userid = "5003"; String userpwd = "mt123456*"; - long time = new Date().getTime(); + long time = System.currentTimeMillis(); String sign = MD5Utils.md5Hex((appkey + appsecret + time).getBytes(StandardCharsets.UTF_8)); String pwd = MD5Utils.md5Hex(userpwd.getBytes(StandardCharsets.UTF_8)); diff --git a/blade-service/logpm-patch/src/main/java/com/logpm/patch/service/impl/SyncOrderInfoServiceImpl.java b/blade-service/logpm-patch/src/main/java/com/logpm/patch/service/impl/SyncOrderInfoServiceImpl.java index f0c1203fc..c6887dc27 100644 --- a/blade-service/logpm-patch/src/main/java/com/logpm/patch/service/impl/SyncOrderInfoServiceImpl.java +++ b/blade-service/logpm-patch/src/main/java/com/logpm/patch/service/impl/SyncOrderInfoServiceImpl.java @@ -202,7 +202,7 @@ public class SyncOrderInfoServiceImpl implements ISyncOrderInfoService { map.put("locationId", locationId); map.put("warehouseId", newWarehouseId); map.put("type", type); - map.put("createTime", new Date().getTime()); + map.put("createTime", System.currentTimeMillis()); map.put("flagType", "OrderStatusLog"); //将消息携带绑定键值 rabbitTemplate.convertAndSend(RabbitConstant.SYNC_OLD_UPDOWN_DATA_EXCHANGE, RabbitConstant.SYNC_OLD_UPDOWN_DATA_ROUTING, map, new CorrelationData(String.valueOf(orderLocationId))); diff --git a/blade-service/logpm-statisticsdata/src/main/java/com/logpm/statistics/listener/mq/WaybillCheckListener.java b/blade-service/logpm-statisticsdata/src/main/java/com/logpm/statistics/listener/mq/WaybillCheckListener.java index fd6ba3e19..0d905ffca 100644 --- a/blade-service/logpm-statisticsdata/src/main/java/com/logpm/statistics/listener/mq/WaybillCheckListener.java +++ b/blade-service/logpm-statisticsdata/src/main/java/com/logpm/statistics/listener/mq/WaybillCheckListener.java @@ -103,7 +103,7 @@ public class WaybillCheckListener { StatisticsPackageFeeInfoVO trunklinePackageFeeVO = statisticsOrderInfoService.findPackageListByOrderIds(orderInfoIdsList); - String balanceOrderCode = "JSD"+new Date().getTime(); + String balanceOrderCode = "JSD"+System.currentTimeMillis(); BigDecimal freightPrice = trunklinePackageFeeVO.getFreightPrice(); BigDecimal pickupPrice = trunklinePackageFeeVO.getPickupPrice(); diff --git a/blade-service/logpm-statisticsdata/src/main/java/com/logpm/statistics/service/impl/StatisticsOrderInfoServiceImpl.java b/blade-service/logpm-statisticsdata/src/main/java/com/logpm/statistics/service/impl/StatisticsOrderInfoServiceImpl.java index 55b20dc31..ab9eb1c1e 100644 --- a/blade-service/logpm-statisticsdata/src/main/java/com/logpm/statistics/service/impl/StatisticsOrderInfoServiceImpl.java +++ b/blade-service/logpm-statisticsdata/src/main/java/com/logpm/statistics/service/impl/StatisticsOrderInfoServiceImpl.java @@ -247,7 +247,7 @@ public class StatisticsOrderInfoServiceImpl extends BaseServiceImpl list = trunklineCostShareRecordService.findListByLoadId(loadId); @@ -321,28 +321,28 @@ public class CarsLoadAsyncServiceImpl implements ICarsLoadAsyncService { //收入 String waybillNo = trunklineCostShareRecordEntity.getWaybillNo(); WarehouseWaybillEntity waybillEntity = warehouseWaybillClient.findByWaybillNo(waybillNo); - if(!Objects.isNull(waybillEntity)){ + if (!Objects.isNull(waybillEntity)) { BigDecimal totalFreight = waybillEntity.getTotalFreight();//运单运费 - if(waybillStartWarehouseId.equals(loadingWarehouseId)){ + if (waybillStartWarehouseId.equals(loadingWarehouseId)) { //装车仓库 就是 运单起始仓 - if(realUnloadWarehouseId.equals(waybillEndWarehouseId)){ + if (realUnloadWarehouseId.equals(waybillEndWarehouseId)) { //卸车仓库 就是 运单目的仓 totalFreight = totalFreight.multiply(BigDecimal.ONE);//运费收入就是100% - }else{ + } else { //卸车仓库 不是 运单目的仓 totalFreight = totalFreight.multiply(new BigDecimal(proportion1));//运费收入就是80% } - }else{ + } else { totalFreight = totalFreight.multiply(new BigDecimal(proportion2));//运费收入就是20% } Integer totalCount = waybillEntity.getTotalCount();//总件数 - BigDecimal xincome = totalFreight.divide(new BigDecimal(totalCount),2, RoundingMode.HALF_DOWN); + BigDecimal xincome = totalFreight.divide(new BigDecimal(totalCount), 2, RoundingMode.HALF_DOWN); BigDecimal income = xincome.multiply(new BigDecimal(num)); trunklineCostShareRecordEntity.setIncome(income); totalIncome = totalIncome.add(income); - trunklineCostShareRecordEntity.setProportion(proportion1+":"+proportion2); + trunklineCostShareRecordEntity.setProportion(proportion1 + ":" + proportion2); } } @@ -350,7 +350,7 @@ public class CarsLoadAsyncServiceImpl implements ICarsLoadAsyncService { for (TrunklineCostShareRecordEntity trunklineCostShareRecordEntity : list) { BigDecimal income = trunklineCostShareRecordEntity.getIncome(); - trunklineCostShareRecordEntity.setCostZhang(countTransportCost.multiply(income.divide(totalIncome,8,RoundingMode.HALF_UP))); + trunklineCostShareRecordEntity.setCostZhang(countTransportCost.multiply(income.divide(totalIncome, 8, RoundingMode.HALF_UP))); } trunklineCostShareRecordService.updateBatchById(list); @@ -371,13 +371,13 @@ public class CarsLoadAsyncServiceImpl implements ICarsLoadAsyncService { @LogpmAsync("asyncExecutor") @Override - public void abnormalListStartCarByLoadIdAndWarehouseId(Long loadId, Long warehouseId,Long userId,Long deptId,String nickName,String tenantId,String warehouseName) { + public void abnormalListStartCarByLoadIdAndWarehouseId(Long loadId, Long warehouseId, Long userId, Long deptId, String nickName, String tenantId, String warehouseName) { //先查询 - List ls = trunklineCarsLoadScanService.abnormalListStartCarByLoadIdAndWarehouseId(loadId,warehouseId); + List ls = trunklineCarsLoadScanService.abnormalListStartCarByLoadIdAndWarehouseId(loadId, warehouseId); for (TrunklineCarsLoadScanEntity trunklineCarsLoadScanEntity : ls) { Integer isData = trunklineCarsLoadScanEntity.getIsData(); - if(isData == 1){ + if (isData == 1) { String loadCode = trunklineCarsLoadScanEntity.getLoadCode(); String waybillNo = trunklineCarsLoadScanEntity.getWaybillNo(); String orderCode = trunklineCarsLoadScanEntity.getOrderCode(); @@ -416,7 +416,7 @@ public class CarsLoadAsyncServiceImpl implements ICarsLoadAsyncService { @Override public void abnormalListUnloadByLoadIdAndWarehouseId(Long loadId, Long warehouseId, String warehouseName, Long loadScanId, String tenantId, Long userId, String nickName, Long deptId) { TrunklineCarsLoadScanEntity carsLoadScanEntity = trunklineCarsLoadScanService.getById(loadScanId); - if(!Objects.isNull(carsLoadScanEntity)){ + if (!Objects.isNull(carsLoadScanEntity)) { String loadCode = carsLoadScanEntity.getLoadCode(); String waybillNo = carsLoadScanEntity.getWaybillNo(); String orderCode = carsLoadScanEntity.getOrderCode(); @@ -454,21 +454,21 @@ public class CarsLoadAsyncServiceImpl implements ICarsLoadAsyncService { @LogpmAsync("asyncExecutor") @Override - public void abnormalListUnloadCheckByLoadIdAndWarehouseId(Long loadId, Long warehouseId, String warehouseName, String tenantId, Long userId, String nickName, Long deptId,TrunklineCarsLoadLineEntity carsLoadLineEntity) { + public void abnormalListUnloadCheckByLoadIdAndWarehouseId(Long loadId, Long warehouseId, String warehouseName, String tenantId, Long userId, String nickName, Long deptId, TrunklineCarsLoadLineEntity carsLoadLineEntity) { - log.info("################abnormalListUnloadCheckByLoadIdAndWarehouseId: 卸车报告生成开始 loadId={}",loadId); + log.info("################abnormalListUnloadCheckByLoadIdAndWarehouseId: 卸车报告生成开始 loadId={}", loadId); - UnloadReportVO unloadReportVO = trunklineCarsLoadScanService.findUnloadReport(loadId,warehouseId); - if(!Objects.isNull(carsLoadLineEntity)){ + UnloadReportVO unloadReportVO = trunklineCarsLoadScanService.findUnloadReport(loadId, warehouseId); + if (!Objects.isNull(carsLoadLineEntity)) { carsLoadLineEntity.setUnloadReportStatus(1); - carsLoadLineEntity.setReportOne("本次装车件数 "+unloadReportVO.getLoadingNum()+" 件,实际卸车件数 "+unloadReportVO.getUnloadNum()+" 件,计划未卸车数量 "+(unloadReportVO.getNoUnloadNum()-unloadReportVO.getNoPlanNum())+" 件"); - carsLoadLineEntity.setReportTwo("无基础数据货物 "+unloadReportVO.getNoDataNum()+" 件、非计划内货物 "+unloadReportVO.getNoPlanNum()+" 件、手动确认入库 "+unloadReportVO.getManualNum()+" 件"); + carsLoadLineEntity.setReportOne("本次装车件数 " + unloadReportVO.getLoadingNum() + " 件,实际卸车件数 " + unloadReportVO.getUnloadNum() + " 件,计划未卸车数量 " + (unloadReportVO.getNoUnloadNum() - unloadReportVO.getNoPlanNum()) + " 件"); + carsLoadLineEntity.setReportTwo("无基础数据货物 " + unloadReportVO.getNoDataNum() + " 件、非计划内货物 " + unloadReportVO.getNoPlanNum() + " 件、手动确认入库 " + unloadReportVO.getManualNum() + " 件"); trunklineCarsLoadLineService.updateById(carsLoadLineEntity); } List addList = new ArrayList<>(); - List noUnloadList = trunklineCarsLoadScanService.findUnloadCheckAbnormalNoUnloadList(loadId,warehouseId); + List noUnloadList = trunklineCarsLoadScanService.findUnloadCheckAbnormalNoUnloadList(loadId, warehouseId); for (TrunklineCarsLoadScanEntity trunklineCarsLoadScanEntity : noUnloadList) { String loadCode = trunklineCarsLoadScanEntity.getLoadCode(); String waybillNo = trunklineCarsLoadScanEntity.getWaybillNo(); @@ -504,7 +504,7 @@ public class CarsLoadAsyncServiceImpl implements ICarsLoadAsyncService { // abnormalRecordClient.addAbnormalRecord(abnormalRecordEntity); } - List noDataList = trunklineCarsLoadScanService.findUnloadCheckAbnormalNoDataList(loadId,warehouseId); + List noDataList = trunklineCarsLoadScanService.findUnloadCheckAbnormalNoDataList(loadId, warehouseId); for (TrunklineCarsLoadScanEntity carsLoadScanEntity : noDataList) { String loadCode = carsLoadScanEntity.getLoadCode(); String waybillNo = carsLoadScanEntity.getWaybillNo(); @@ -540,8 +540,8 @@ public class CarsLoadAsyncServiceImpl implements ICarsLoadAsyncService { // abnormalRecordClient.addAbnormalRecord(abnormalRecordEntity); } - List abnormalZeroScanList = trunklineCarsLoadScanService.findAbnormalZeroScanList(loadId,warehouseId); - if(CollUtil.isNotEmpty(abnormalZeroScanList)){ + List abnormalZeroScanList = trunklineCarsLoadScanService.findAbnormalZeroScanList(loadId, warehouseId); + if (CollUtil.isNotEmpty(abnormalZeroScanList)) { abnormalZeroScanList.forEach(carsLoadScanEntity -> { String loadCode = carsLoadScanEntity.getLoadCode(); String waybillNo = carsLoadScanEntity.getWaybillNo(); @@ -575,28 +575,29 @@ public class CarsLoadAsyncServiceImpl implements ICarsLoadAsyncService { abnormalRecordEntity.setUpUserName(nickName); abnormalRecordEntity.setAbnormalStatus(0); abnormalRecordEntity.setRemark("零担卸车数量异常"); - if("3".equals(scanStatus)){ + if ("3".equals(scanStatus)) { abnormalRecordEntity.setAbnormalStatus(1); abnormalRecordEntity.setRemark("零担签收未完成数量回退原仓"); DistributionStockArticleEntity stockArticleEntity = distributionStockArticleClient.findZeroByOrderCodeAndWarehouseId(orderCode, fromWarehouseId); - if(!Objects.isNull(stockArticleEntity)){ - distributionStockArticleClient.addHandQuantity(stockArticleEntity.getId(),num-unloadNum); + if (!Objects.isNull(stockArticleEntity)) { + distributionStockArticleClient.addHandQuantity(stockArticleEntity.getId(), num - unloadNum); zeroDetailVOList.forEach(zeroDetailVO -> { Long packageId = zeroDetailVO.getPackageId(); Integer loadingNum = zeroDetailVO.getLoadingNum(); Integer unloadNum1 = zeroDetailVO.getUnloadNum(); - distributionParcelListClient.addZeroQuantity(packageId,loadingNum-unloadNum1); + distributionParcelListClient.addZeroQuantity(packageId, loadingNum - unloadNum1); }); } - String content = warehouseName+"干线未签收卸车回库,总数/卸车数:"+num+"/"+num+",卸车时间"+ CommonUtil.dateToStringGeneral(new Date());; - openOrderAsyncService.saveLog(waybillId,waybillNo,"80","零担未签收回库",content,AuthUtil.getNickName(),AuthUtil.getUserId(),warehouseId,warehouseName); + String content = warehouseName + "干线未签收卸车回库,总数/卸车数:" + num + "/" + num + ",卸车时间" + CommonUtil.dateToStringGeneral(new Date()); + ; + openOrderAsyncService.saveLog(waybillId, waybillNo, "80", "零担未签收回库", content, AuthUtil.getNickName(), AuthUtil.getUserId(), warehouseId, warehouseName); } abnormalRecordEntity.setSendOrderStatus(0); abnormalRecordEntity.setUpTime(new Date()); abnormalRecordEntity.setAssociationId(scanId); abnormalRecordEntity.setAssociationType(1); abnormalRecordEntity.setIsZero(1); - abnormalRecordEntity.setNum(num-unloadNum); + abnormalRecordEntity.setNum(num - unloadNum); addList.add(abnormalRecordEntity); }); } @@ -619,13 +620,13 @@ public class CarsLoadAsyncServiceImpl implements ICarsLoadAsyncService { abnormalRecordZeroDetailEntity.setPackageId(zeroDetailVO.getPackageId()); abnormalRecordZeroDetailEntity.setGoodsId(zeroDetailVO.getGoodsId()); abnormalRecordZeroDetailEntity.setGoodsName(zeroDetailVO.getGoodsName()); - abnormalRecordZeroDetailEntity.setAbnormalNum(zeroDetailVO.getLoadingNum()-zeroDetailVO.getUnloadNum()); + abnormalRecordZeroDetailEntity.setAbnormalNum(zeroDetailVO.getLoadingNum() - zeroDetailVO.getUnloadNum()); abnormalRecordZeroDetailEntity.setReturnNum(0); abnormalRecordZeroDetailEntity.setIncomingNum(0); abnormalRecordZeroDetailEntityList.add(abnormalRecordZeroDetailEntity); }); }); - if(CollUtil.isNotEmpty(abnormalRecordZeroDetailEntityList)){ + if (CollUtil.isNotEmpty(abnormalRecordZeroDetailEntityList)) { abnormalRecordZeroDetailClient.addAbnormalRecordZeroDetail(abnormalRecordZeroDetailEntityList); } } @@ -634,23 +635,23 @@ public class CarsLoadAsyncServiceImpl implements ICarsLoadAsyncService { @Override public void dealwithAfterAbnormalPackage(String orderPackageCode, Long warehouseId, String warehouseName, String carsNo, Long userId, Long aLong, String nickName) { - List abnormalRecordEntities = abnormalRecordClient.findOrderPackageAndAbnormalStatus(orderPackageCode,"0"); + List abnormalRecordEntities = abnormalRecordClient.findOrderPackageAndAbnormalStatus(orderPackageCode, "0"); //循环abnormalRecordEntities把abnormalStatus改为1 //如果send_order_status = 1 则修改工单记录 for (AftersalesAbnormalRecordEntity abnormalRecordEntity : abnormalRecordEntities) { Integer sendOrderStatus = abnormalRecordEntity.getSendOrderStatus(); - if(Objects.isNull(sendOrderStatus)){ + if (Objects.isNull(sendOrderStatus)) { continue; } - if(sendOrderStatus == 1){ + if (sendOrderStatus == 1) { //修改对应工单记录 - aftersalesWorkOrderClient.updateWorkOrderStatus(warehouseId,orderPackageCode,1); + aftersalesWorkOrderClient.updateWorkOrderStatus(warehouseId, orderPackageCode, 1); } abnormalRecordEntity.setAbnormalStatus(1); abnormalRecordEntity.setDealUserId(userId); abnormalRecordEntity.setDealUserName(nickName); - abnormalRecordEntity.setRemark("包件已在 "+warehouseName+" 车次号:"+carsNo+" 中被卸车"); + abnormalRecordEntity.setRemark("包件已在 " + warehouseName + " 车次号:" + carsNo + " 中被卸车"); } abnormalRecordClient.updateList(abnormalRecordEntities); @@ -688,8 +689,8 @@ public class CarsLoadAsyncServiceImpl implements ICarsLoadAsyncService { Long loadId = carsLoadEntity.getId(); QueryWrapper queryWrapper = new QueryWrapper<>(); queryWrapper.eq("load_id", loadId) - .eq("warehouse_id",warehouseId) - .eq("scan_status","1"); + .eq("warehouse_id", warehouseId) + .eq("scan_status", "1"); List carsLoadScanEntityList = trunklineCarsLoadScanService.list(queryWrapper); @@ -712,8 +713,10 @@ public class CarsLoadAsyncServiceImpl implements ICarsLoadAsyncService { collect.keySet().forEach(type -> { List list = collect.get(type); - if(CollUtil.isNotEmpty(list)){ - if(type.equals("1")){ + if (CollUtil.isNotEmpty(list)) { + + + if (new Integer(1).equals(type)) { list.forEach(entity -> { PackageData packageData = new PackageData(); packageData.setPackageCode(entity.getScanCode()); @@ -724,7 +727,7 @@ public class CarsLoadAsyncServiceImpl implements ICarsLoadAsyncService { packageDataList.add(packageData); }); - }else if(type.equals("2")){ + } else if (new Integer(2).equals(type)) { //把list中所有id放入一个List集合 List carsLoadScanIds = list.stream().map(TrunklineCarsLoadScanEntity::getId).collect(Collectors.toList()); //把list转化成以id为key的Map @@ -751,7 +754,7 @@ public class CarsLoadAsyncServiceImpl implements ICarsLoadAsyncService { }); - json.put("details",packageDataList); + json.put("details", packageDataList); nodeFanoutMsg.setMain(json); FanoutMsg fanoutMsg = FanoutMsg.builder().exchange(FanoutConstants.trunkline.REPORTDATA.EXCHANGE).msg(JSONObject.toJSONString(nodeFanoutMsg)).build(); @@ -765,8 +768,8 @@ public class CarsLoadAsyncServiceImpl implements ICarsLoadAsyncService { Long loadId = carsLoadEntity.getId(); QueryWrapper queryWrapper = new QueryWrapper<>(); queryWrapper.eq("load_id", loadId) - .eq("warehouse_id",warehouseId) - .eq("scan_status","1"); + .eq("warehouse_id", warehouseId) + .eq("scan_status", "1"); List carsLoadScanEntityList = trunklineCarsLoadScanService.list(queryWrapper); @@ -789,8 +792,8 @@ public class CarsLoadAsyncServiceImpl implements ICarsLoadAsyncService { collect.keySet().forEach(type -> { List list = collect.get(type); - if(CollUtil.isNotEmpty(list)){ - if(type.equals("1")){ + if (CollUtil.isNotEmpty(list)) { + if (type.equals(1)) { list.forEach(entity -> { PackageData packageData = new PackageData(); packageData.setPackageCode(entity.getScanCode()); @@ -801,7 +804,7 @@ public class CarsLoadAsyncServiceImpl implements ICarsLoadAsyncService { packageDataList.add(packageData); }); - }else if(type.equals("2")){ + } else if (type.equals(2)) { //把list中所有id放入一个List集合 List carsLoadScanIds = list.stream().map(TrunklineCarsLoadScanEntity::getId).collect(Collectors.toList()); //把list转化成以id为key的Map @@ -828,7 +831,7 @@ public class CarsLoadAsyncServiceImpl implements ICarsLoadAsyncService { }); - json.put("details",packageDataList); + json.put("details", packageDataList); nodeFanoutMsg.setMain(json); FanoutMsg fanoutMsg = FanoutMsg.builder().exchange(FanoutConstants.trunkline.REPORTDATA.EXCHANGE).msg(JSONObject.toJSONString(nodeFanoutMsg)).build(); @@ -859,8 +862,8 @@ public class CarsLoadAsyncServiceImpl implements ICarsLoadAsyncService { collect.keySet().forEach(type -> { List list = collect.get(type); - if(CollUtil.isNotEmpty(list)){ - if(type.equals("1")){ + if (CollUtil.isNotEmpty(list)) { + if (type.equals(1)) { list.forEach(entity -> { PackageData packageData = new PackageData(); packageData.setPackageCode(entity.getScanCode()); @@ -871,7 +874,7 @@ public class CarsLoadAsyncServiceImpl implements ICarsLoadAsyncService { packageDataList.add(packageData); }); - }else if(type.equals("2")){ + } else if (type.equals(2)) { //把list中所有id放入一个List集合 List carsLoadScanIds = list.stream().map(TrunklineCarsLoadScanEntity::getId).collect(Collectors.toList()); //把list转化成以id为key的Map @@ -897,7 +900,7 @@ public class CarsLoadAsyncServiceImpl implements ICarsLoadAsyncService { } }); - json.put("details",packageDataList); + json.put("details", packageDataList); nodeFanoutMsg.setMain(json); FanoutMsg fanoutMsg = FanoutMsg.builder().exchange(FanoutConstants.trunkline.REPORTDATA.EXCHANGE).msg(JSONObject.toJSONString(nodeFanoutMsg)).build(); @@ -931,7 +934,7 @@ public class CarsLoadAsyncServiceImpl implements ICarsLoadAsyncService { packageDataList.add(packageData); }); - json.put("details",packageDataList); + json.put("details", packageDataList); nodeFanoutMsg.setMain(json); @@ -942,7 +945,7 @@ public class CarsLoadAsyncServiceImpl implements ICarsLoadAsyncService { @LogpmAsync("asyncExecutor") @Override - public void sendReportZeroPackageUnloadData(Long userId, String nickName, Long warehouseId, String warehouseName, List sendList, TrunklineCarsLoadScanEntity carsLoadScanEntity,TrunklineCarsLoadEntity carsLoadEntity) { + public void sendReportZeroPackageUnloadData(Long userId, String nickName, Long warehouseId, String warehouseName, List sendList, TrunklineCarsLoadScanEntity carsLoadScanEntity, TrunklineCarsLoadEntity carsLoadEntity) { NodeFanoutMsg nodeFanoutMsg = new NodeFanoutMsg(); nodeFanoutMsg.setNode(WorkNodeEnums.UNLOAD_INCOMING_WAREHOUSE); @@ -970,7 +973,7 @@ public class CarsLoadAsyncServiceImpl implements ICarsLoadAsyncService { packageDataList.add(packageData); }); - json.put("details",packageDataList); + json.put("details", packageDataList); nodeFanoutMsg.setMain(json); FanoutMsg fanoutMsg = FanoutMsg.builder().exchange(FanoutConstants.trunkline.REPORTDATA.EXCHANGE).msg(JSONObject.toJSONString(nodeFanoutMsg)).build(); @@ -1006,7 +1009,7 @@ public class CarsLoadAsyncServiceImpl implements ICarsLoadAsyncService { packageDataList.add(packageData); }); - json.put("details",packageDataList); + json.put("details", packageDataList); nodeFanoutMsg.setMain(json); FanoutMsg fanoutMsg = FanoutMsg.builder().exchange(FanoutConstants.trunkline.REPORTDATA.EXCHANGE).msg(JSONObject.toJSONString(nodeFanoutMsg)).build(); 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 97721e8b3..c3f8cba73 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 @@ -483,7 +483,7 @@ public class WarehouseWarehousingEntryServiceImpl extends BaseServiceImpl