diff --git a/nlsso-server/pom.xml b/nlsso-server/pom.xml index d167382..1aaaa7a 100644 --- a/nlsso-server/pom.xml +++ b/nlsso-server/pom.xml @@ -71,6 +71,7 @@ 0.2 + org.fusesource.jansi jansi @@ -107,13 +108,6 @@ dynamic-datasource-spring-boot-starter 4.1.3 - - - org.fusesource.jansi - jansi - 1.17.1 - - cn.hutool diff --git a/nlsso-server/src/main/java/org/nl/wms/database/eas/service/impl/EasOutInBillDetailServiceImpl.java b/nlsso-server/src/main/java/org/nl/wms/database/eas/service/impl/EasOutInBillDetailServiceImpl.java index 0b58c93..4f0e77c 100644 --- a/nlsso-server/src/main/java/org/nl/wms/database/eas/service/impl/EasOutInBillDetailServiceImpl.java +++ b/nlsso-server/src/main/java/org/nl/wms/database/eas/service/impl/EasOutInBillDetailServiceImpl.java @@ -56,22 +56,22 @@ public class EasOutInBillDetailServiceImpl extends ServiceImpl easOutInBillDetailList = result.getRecords(); - List inventoryInfoList = queryInventoryInfoList(easOutInBillDetailList); - easOutInBillDetailList.forEach(bill -> { - //查询库存信息 - List matchedInventory = inventoryInfoList.stream() - .filter(inventory -> Objects.equals(inventory.getZzbm(), bill.getZzbm()) - && Objects.equals(inventory.getCkbm(), bill.getCkbm()) - && Objects.equals(inventory.getWlbm(), bill.getWlbm()) - && Objects.equals(inventory.getPc(), bill.getPc()) - && Objects.equals(inventory.getTrackno(), bill.getTrackno()) - && Objects.equals(inventory.getKwbm(), bill.getKwbm())) - .collect(Collectors.toList()); - //将库存数量赋值给单据 - if (CollectionUtils.isNotEmpty(matchedInventory)) { - bill.setKcsl(matchedInventory.get(0).getKcsl()); - } - }); + //List inventoryInfoList = queryInventoryInfoList(easOutInBillDetailList); +// easOutInBillDetailList.forEach(bill -> { +// //查询库存信息 +// List matchedInventory = inventoryInfoList.stream() +// .filter(inventory -> Objects.equals(inventory.getZzbm(), bill.getZzbm()) +// && Objects.equals(inventory.getCkbm(), bill.getCkbm()) +// && Objects.equals(inventory.getWlbm(), bill.getWlbm()) +// && Objects.equals(inventory.getPc(), bill.getPc()) +// && Objects.equals(inventory.getTrackno(), bill.getTrackno()) +// && Objects.equals(inventory.getKwbm(), bill.getKwbm())) +// .collect(Collectors.toList()); +// //将库存数量赋值给单据 +// if (CollectionUtils.isNotEmpty(matchedInventory)) { +// bill.setKcsl(matchedInventory.get(0).getKcsl()); +// } +// }); result.setRecords(easOutInBillDetailList); return CommonPage.getPage(result); } @@ -149,11 +149,10 @@ public class EasOutInBillDetailServiceImpl extends ServiceImpl entityList) { if (CollectionUtils.isNotEmpty(entityList)) { - List entityLists= entityList.stream().filter(r->StringUtils.isNotEmpty(r.getKwbm())).collect(Collectors.toList()); - List ids =entityLists.stream().map(EasOutInBillDetailVO::getCode).collect(Collectors.toList()); - if(ids.size()==entityList.size()&&ids.size()>1) - { - entityList.forEach(r->{ + List entityLists = entityList.stream().filter(r -> StringUtils.isNotEmpty(r.getKwbm())).collect(Collectors.toList()); + List ids = entityLists.stream().map(EasOutInBillDetailVO::getCode).collect(Collectors.toList()); + if (ids.size() == entityList.size() && ids.size() > 1) { + entityList.forEach(r -> { UpdateWrapper updateWrapper = new UpdateWrapper<>(); updateWrapper.eq("flid", r.getFlid()); updateWrapper.set("czsl", r.getSl()); @@ -165,16 +164,14 @@ public class EasOutInBillDetailServiceImpl extends ServiceImpl StringUtils.isNotEmpty(r.getKwbm())) .map(EasOutInBillDetailVO::getSysl) .reduce(BigDecimal.ZERO, BigDecimal::add) .compareTo(BigDecimal.ZERO) == 0; - if(isValid) - { + if (isValid) { throw new BadRequestException("请检查库位和数量信息"); } BigDecimal amount = entityList.stream() @@ -198,8 +195,6 @@ public class EasOutInBillDetailServiceImpl extends ServiceImpl