소스 검색

采购接口账套配置

zengtx 2 년 전
부모
커밋
8a4deb2782
1개의 변경된 파일14개의 추가작업 그리고 9개의 파일을 삭제
  1. 14 9
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/openApi/controller/PurchaseWarehousingController.java

+ 14 - 9
jeecg-boot-module-system/src/main/java/org/jeecg/modules/openApi/controller/PurchaseWarehousingController.java

@@ -186,9 +186,9 @@ public class PurchaseWarehousingController extends JeecgController<PurchaseWareh
               List<Map<String,Object>> mapListTwo=new ArrayList<>();
               //账套3
               List<Map<String,Object>> mapListThree=new ArrayList<>();
-              String accidOne = "";
-              String accidTwo = "";
-              String accidThree = "";
+              String accidOne = sysDictService.queryDictTextByKey("cAccID", "1");
+              String accidTwo = sysDictService.queryDictTextByKey("cAccID", "2");
+              String accidThree = sysDictService.queryDictTextByKey("cAccID", "3");
               for(int i=0;i<json.size();i++){
                   //获取对象
                   JSONObject jsonObject=json.getJSONObject(i);
@@ -196,15 +196,15 @@ public class PurchaseWarehousingController extends JeecgController<PurchaseWareh
                   String cAccId=jsonObject.get("cAccId").toString();
                   //转map
                   Map<String,Object> map=updateMap(jsonObject);
-                  if(cAccId.equals("901")){
+                  if(cAccId.equals(accidOne)){
 					  accidOne = cAccId;
                       mapListOne.add(map);
 					  boo = true;
-                  }else if(cAccId.equals("902")){
+                  }else if(cAccId.equals(accidTwo)){
                       mapListTwo.add(map);
 					  accidTwo = cAccId;
 					  boo = true;
-                  }else if(cAccId.equals("903")){
+                  }else if(cAccId.equals(accidThree)){
                       mapListThree.add(map);
 					  accidThree = cAccId;
 					  boo = true;
@@ -279,6 +279,11 @@ public class PurchaseWarehousingController extends JeecgController<PurchaseWareh
 			  List<Map<String,Object>> mapListTwo=new ArrayList<>();
 			  //账套3
 			  List<Map<String,Object>> mapListThree=new ArrayList<>();
+
+			  String accidOne = sysDictService.queryDictTextByKey("cAccID", "1");
+			  String accidTwo = sysDictService.queryDictTextByKey("cAccID", "2");
+			  String accidThree = sysDictService.queryDictTextByKey("cAccID", "3");
+
 			  for(int i=0;i<json.size();i++){
 				  //获取对象
 				  JSONObject jsonObject=json.getJSONObject(i);
@@ -286,13 +291,13 @@ public class PurchaseWarehousingController extends JeecgController<PurchaseWareh
 				  String cAccId=jsonObject.get("cAccId").toString();
 				  //转map
 				  Map<String,Object> map=updateMap(jsonObject);
-				  if(cAccId.equals("901")){
+				  if(cAccId.equals(accidOne)){
 					  mapListOne.add(map);
 					  boo = true;
-				  }else if(cAccId.equals("902")){
+				  }else if(cAccId.equals(accidTwo)){
 					  mapListTwo.add(map);
 					  boo = true;
-				  }else if(cAccId.equals("903")){
+				  }else if(cAccId.equals(accidThree)){
 					  mapListThree.add(map);
 					  boo = true;
 				  }