From ef5e9e23ae9b10485ee1f113c39f571d416987c6 Mon Sep 17 00:00:00 2001 From: 10002327 Date: Fri, 30 Aug 2024 18:05:41 +0800 Subject: [PATCH] =?UTF-8?q?PBOM=E5=BA=93=E5=AD=98=E5=9C=B0=E7=82=B9?= =?UTF-8?q?=E3=80=81ebom=E6=8E=92=E5=BA=8F=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../nflg/product/bomnew/api/user/PBomApi.java | 21 +++---------------- 1 file changed, 3 insertions(+), 18 deletions(-) diff --git a/nflg_project_dev/nflg-bom-new/src/main/java/com/nflg/product/bomnew/api/user/PBomApi.java b/nflg_project_dev/nflg-bom-new/src/main/java/com/nflg/product/bomnew/api/user/PBomApi.java index 3c79e1f0..cf3e1824 100644 --- a/nflg_project_dev/nflg-bom-new/src/main/java/com/nflg/product/bomnew/api/user/PBomApi.java +++ b/nflg_project_dev/nflg-bom-new/src/main/java/com/nflg/product/bomnew/api/user/PBomApi.java @@ -83,26 +83,12 @@ public class PBomApi extends BaseApi { List materialNoList = Lists.newArrayList(); List facList = Lists.newArrayList(); -// r.getRecords().forEach(bom -> { -// materialNoList.add(bom.getMaterialNo()); -// facList.add(bom.getFacCode()); -// if(CollectionUtil.isNotEmpty(bom.getChildNodes())){ -// materialNoList.addAll(bom.getChildNodes().stream().map(BaseMaterialVO::getMaterialNo).collect(Collectors.toList())); -// facList.addAll(bom.getChildNodes().stream().map(BomNewPbomParentVO::getFacCode).collect(Collectors.toList())); -// } -// }); this.get(r.getRecords(),materialNoList,facList); List> lgproList = sapService.lgproByList(materialNoList,facList); - Map lgproMap = lgproList.stream().collect(Collectors.toMap(m-> { - return String.valueOf(m.get("MATNR")) + String.valueOf(m.get("WERKS")); - },m->String.valueOf(m.get("LGPRO")),(k1,k2)->k1)); + Map lgproMap = lgproList.stream().collect(Collectors.toMap(m-> + String.valueOf(m.get("MATNR")) + String.valueOf(m.get("WERKS")) + ,m->String.valueOf(m.get("LGPRO")),(k1,k2)->k1)); this.set(r.getRecords(),lgproMap); -// r.getRecords().forEach(re -> { -// re.setLgpro(lgproMap.get(StrUtil.padPre(re.getMaterialNo(),18,"0") +re.getFacCode())); -// if(CollectionUtil.isNotEmpty(re.getChildNodes())){ -// re.getChildNodes().forEach(cn -> cn.setLgpro(lgproMap.get(StrUtil.padPre(cn.getMaterialNo(),18,"0") +cn.getFacCode()))); -// } -// }); } return ResultVO.success(r); @@ -127,7 +113,6 @@ public class PBomApi extends BaseApi { }); } - @PostMapping("releaseListByPage") @ApiOperation("PBom已发布工作列表") public ResultVO> releaseListByPage(@RequestBody BomNewPbomParentQuery query) {