From 5984358ff60e9d89484fbe18863f4e66e2e2d9c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9B=B9=E9=B9=8F=E9=A3=9E?= Date: Mon, 13 May 2024 10:19:01 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=AF=BC=E5=85=A5=E5=88=B0SAP=E6=97=B6?= =?UTF-8?q?=EF=BC=8C=E5=A6=82=E6=9E=9C=E9=A1=B9=E7=9B=AE=E7=B1=BB=E5=9E=8B?= =?UTF-8?q?=E4=B8=BAZ=EF=BC=8C=E5=88=99=E4=BF=AE=E6=94=B9=E4=B8=BAL?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../bomnew/service/SapOpUtilService.java | 20 ++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/nflg_project_dev/nflg-bom-new/src/main/java/com/nflg/product/bomnew/service/SapOpUtilService.java b/nflg_project_dev/nflg-bom-new/src/main/java/com/nflg/product/bomnew/service/SapOpUtilService.java index 62daec98..c913c071 100644 --- a/nflg_project_dev/nflg-bom-new/src/main/java/com/nflg/product/bomnew/service/SapOpUtilService.java +++ b/nflg_project_dev/nflg-bom-new/src/main/java/com/nflg/product/bomnew/service/SapOpUtilService.java @@ -24,10 +24,7 @@ import org.springframework.stereotype.Service; import org.springframework.util.CollectionUtils; import javax.annotation.Resource; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; +import java.util.*; import java.util.stream.Collectors; @Service @@ -154,9 +151,18 @@ public class SapOpUtilService { params.setInputParams(parentMap); Map>> inputTables = new HashMap<>(); - List> childMapList = Convert.convert(new TypeReference>>() { - } - , impartSapParamDTO.getT1()); + // List> childMapList = Convert.convert(new TypeReference>>() { + // } + // , impartSapParamDTO.getT1()); + List> childMapList = new ArrayList<>(); + impartSapParamDTO.getT1().forEach(t -> { + // 项目类别如果是Z,则改为L + if (StrUtil.equals(t.getPOSTP(), "Z", true)) { + t.setPOSTP("L"); + } + childMapList.add(Convert.convert(new TypeReference>() { + }, t)); + }); inputTables.put("T1", childMapList); params.setInputTables(inputTables);