From 5482ee74515723f9effa0dc7311797bd06a99765 Mon Sep 17 00:00:00 2001 From: PigBaoBei <2739175034@qq.com> Date: Mon, 19 Aug 2024 14:00:36 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BB=B4=E6=8A=A4=E8=AE=A2=E5=8D=95=E6=97=A5?= =?UTF-8?q?=E5=BF=97=E5=A2=9E=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../DistributionStockArticleServiceImpl.java | 77 +++++++++---------- 1 file changed, 36 insertions(+), 41 deletions(-) diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockArticleServiceImpl.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockArticleServiceImpl.java index f7657239b..8abe6fdc6 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockArticleServiceImpl.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockArticleServiceImpl.java @@ -305,7 +305,7 @@ public class DistributionStockArticleServiceImpl extends BaseServiceImpl userR = userClient.userInfoById(distributionStockupVO.getCreateUser()); - if(userR.isSuccess()&& userR.getData()!=null){ + if (userR.isSuccess() && userR.getData() != null) { distributionStockupVO.setCreateUserName(userR.getData().getName()); } } @@ -708,9 +708,9 @@ public class DistributionStockArticleServiceImpl extends BaseServiceImpl result = baseMapper.selectClientListPage(page, distributionStockArticle,warehouseIds); + List result = baseMapper.selectClientListPage(page, distributionStockArticle, warehouseIds); return page.setRecords(result); } @@ -874,7 +874,6 @@ public class DistributionStockArticleServiceImpl extends BaseServiceImpl handlePackage(IPage pageVO) { @@ -1012,15 +1011,15 @@ public class DistributionStockArticleServiceImpl extends BaseServiceImpl warehouseIdList = new ArrayList<>(); BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse(); - if(Func.isEmpty(myCurrentWarehouse)){ + if (Func.isEmpty(myCurrentWarehouse)) { List myWarehouseList = warehouseClient.getMyWarehouseList(); List collect = myWarehouseList.stream().map(BasicdataWarehouseEntity::getId).collect(Collectors.toList()); warehouseIdList.addAll(collect); - }else{ + } else { warehouseIdList.add(myCurrentWarehouse.getId()); } - IPage distributionStockArticleEntityIPage = baseMapper.pageListOwe(page, stockArticleEntity,warehouseIdList); + IPage distributionStockArticleEntityIPage = baseMapper.pageListOwe(page, stockArticleEntity, warehouseIdList); return distributionStockArticleEntityIPage; } @@ -1133,7 +1132,7 @@ public class DistributionStockArticleServiceImpl extends BaseServiceImpl map = new HashMap<>(); map.put("id", orderId); - map.put("orderCode",orderCode); + map.put("orderCode", orderCode); String filename = QRCodeUtil.createCodeToFile(orderCode); map.put("orderCodeImage", QRCodeUtil.getEmpAutograph(filename)); - if(!Objects.isNull(warehouseWaybill)){ + if (!Objects.isNull(warehouseWaybill)) { String consignee = warehouseWaybill.getConsignee(); String consigneeName = warehouseWaybill.getConsigneeName(); String consigneeMobile = warehouseWaybill.getConsigneeMobile(); String remark = warehouseWaybill.getRemark(); - map.put("consigneeUnit", StringUtil.isBlank(consignee)?"":consignee); - map.put("consigneePerson",StringUtil.isBlank(consigneeName)?"":consigneeName); - map.put("consigneeMobile",StringUtil.isBlank(consigneeMobile)?"":consigneeMobile); + map.put("consigneeUnit", StringUtil.isBlank(consignee) ? "" : consignee); + map.put("consigneePerson", StringUtil.isBlank(consigneeName) ? "" : consigneeName); + map.put("consigneeMobile", StringUtil.isBlank(consigneeMobile) ? "" : consigneeMobile); map.put("product", warehouseWaybill.getGoodsName() + "(" + warehouseWaybill.getTotalCount() + ")"); - map.put("remark",StringUtil.isBlank(remark)?"":remark); + map.put("remark", StringUtil.isBlank(remark) ? "" : remark); } String customerName = stockArticleEntity.getCustomerName(); String customerTelephone = stockArticleEntity.getCustomerTelephone(); String customerAddress = stockArticleEntity.getCustomerAddress(); - map.put("customerName",StringUtil.isBlank(customerName)?"":customerName); - map.put("customerTelephone",StringUtil.isBlank(customerTelephone)?"":customerTelephone); - map.put("customerAddress",StringUtil.isBlank(customerAddress)?"":customerAddress); + map.put("customerName", StringUtil.isBlank(customerName) ? "" : customerName); + map.put("customerTelephone", StringUtil.isBlank(customerTelephone) ? "" : customerTelephone); + map.put("customerAddress", StringUtil.isBlank(customerAddress) ? "" : customerAddress); // 订单号 生成二维码 String fileTypeName = QRCodeUtil.createCodeToFile(orderCode); map.put("imgType", QRCodeUtil.getEmpAutograph(fileTypeName)); @@ -2642,7 +2641,7 @@ public class DistributionStockArticleServiceImpl extends BaseServiceImpl collect = null; - if(ObjectUtils.isNotNull(currentWarehouse)){ + if (ObjectUtils.isNotNull(currentWarehouse)) { collect = new ArrayList<>(); collect.add(currentWarehouse.getId()); - }else{ + } else { collect = myWarehouseList.stream().map(BasicdataWarehouseEntity::getId).collect(Collectors.toList()); } - log.info(">>>>>>>>>>>>>当前仓库:{}",collect); - IPage distributionStockArticleEntityIPage = baseMapper.pageSignforListOwe(page, stockArticleEntity,collect); + log.info(">>>>>>>>>>>>>当前仓库:{}", collect); + IPage distributionStockArticleEntityIPage = baseMapper.pageSignforListOwe(page, stockArticleEntity, collect); //处理创建人 distributionStockArticleEntityIPage.getRecords().forEach(a -> { if (Func.isNotEmpty(a.getCreateUser())) { @@ -2760,11 +2759,11 @@ public class DistributionStockArticleServiceImpl extends BaseServiceImpl warehouseIdList = null; - if (ObjectUtils.isNotNull(currentWarehouse)){ + if (ObjectUtils.isNotNull(currentWarehouse)) { warehouseIdList = new ArrayList<>(); warehouseIdList.add(currentWarehouse.getId()); - }else{ - warehouseIdList=myWarehouseList.stream().map(BasicdataWarehouseEntity::getId).collect(Collectors.toList()); + } else { + warehouseIdList = myWarehouseList.stream().map(BasicdataWarehouseEntity::getId).collect(Collectors.toList()); } // if (collect.size() > 1) { @@ -2776,7 +2775,7 @@ public class DistributionStockArticleServiceImpl extends BaseServiceImpl list = baseMapper.listSignforListOwe(stockArticleEntity,warehouseIdList); + List list = baseMapper.listSignforListOwe(stockArticleEntity, warehouseIdList); //处理创建人 List signForStockArticleExcels = new ArrayList<>(); list.forEach(a -> { @@ -2794,10 +2793,6 @@ public class DistributionStockArticleServiceImpl extends BaseServiceImpl orderCodes,Long warehouseId) { - return baseMapper.findOrderTotalNumByOrderCodes(orderCodes,warehouseId); + public Integer findOrderTotalNumByOrderCodes(List orderCodes, Long warehouseId) { + return baseMapper.findOrderTotalNumByOrderCodes(orderCodes, warehouseId); } @Override public Integer findOrderTotalNumByOrderPackageCodes(List orderPackageCodes, Long warehouseId) { - List orderCodes = distributionParcelListService.findOrderCodesByOrderPackageCodes(orderPackageCodes,warehouseId); + List orderCodes = distributionParcelListService.findOrderCodesByOrderPackageCodes(orderPackageCodes, warehouseId); - return baseMapper.findOrderTotalNumByOrderCodes(orderCodes,warehouseId); + return baseMapper.findOrderTotalNumByOrderCodes(orderCodes, warehouseId); } @Override