Commit 6eb2f2ca79be8d1fa83c96bfda9c8047f506d889

Authored by zhangmeiyang
1 parent 68a05c10

金蝶对接pt5

etrade-thirdparty/src/main/java/com/diligrp/etrade/thirdparty/demarcate/AbstractBillHandler.java
@@ -178,7 +178,9 @@ public abstract class AbstractBillHandler<T extends BaseBillCo> implements TypeM @@ -178,7 +178,9 @@ public abstract class AbstractBillHandler<T extends BaseBillCo> implements TypeM
178 }; 178 };
179 var dynamicParam = transMapper.getFixedWithQueryArrays(systemCode, dynamicType.code, marketId, SelectType.FIXED.getCode(), queryArrays); 179 var dynamicParam = transMapper.getFixedWithQueryArrays(systemCode, dynamicType.code, marketId, SelectType.FIXED.getCode(), queryArrays);
180 Map<String, BusinessDetailDto> map = new HashMap<>(); 180 Map<String, BusinessDetailDto> map = new HashMap<>();
181 - dynamicParam.forEach(e -> map.computeIfAbsent(e.getCode(), k -> e)); 181 + if (!ObjectUtils.isEmpty(dynamicParam)){
  182 + dynamicParam.forEach(e -> map.computeIfAbsent(e.getCode(), k -> e));
  183 + }
182 return map; 184 return map;
183 } 185 }
184 186
@@ -194,7 +196,9 @@ public abstract class AbstractBillHandler&lt;T extends BaseBillCo&gt; implements TypeM @@ -194,7 +196,9 @@ public abstract class AbstractBillHandler&lt;T extends BaseBillCo&gt; implements TypeM
194 var queryArrays = new String[]{BasicEnum.CHARGE_ITEM_TO_LOWER.code}; 196 var queryArrays = new String[]{BasicEnum.CHARGE_ITEM_TO_LOWER.code};
195 var dynamicParam = transMapper.getFixedWithQueryArrays(systemCode, dynamicType.code, marketId, SelectType.FIXED.getCode(), queryArrays); 197 var dynamicParam = transMapper.getFixedWithQueryArrays(systemCode, dynamicType.code, marketId, SelectType.FIXED.getCode(), queryArrays);
196 Map<String, List<BusinessDetailDto>> map = new HashMap<>(); 198 Map<String, List<BusinessDetailDto>> map = new HashMap<>();
197 - dynamicParam.forEach(e -> map.computeIfAbsent(e.getCode(), k -> new ArrayList<>()).add(e)); 199 + if (!ObjectUtils.isEmpty(dynamicParam)){
  200 + dynamicParam.forEach(e -> map.computeIfAbsent(e.getCode(), k -> new ArrayList<>()).add(e));
  201 + }
198 return map; 202 return map;
199 } 203 }
200 204
@@ -216,6 +220,7 @@ public abstract class AbstractBillHandler&lt;T extends BaseBillCo&gt; implements TypeM @@ -216,6 +220,7 @@ public abstract class AbstractBillHandler&lt;T extends BaseBillCo&gt; implements TypeM
216 identifyInfo.setdCID(clientParam.getDataCentreId()); 220 identifyInfo.setdCID(clientParam.getDataCentreId());
217 var util = new PurchaseOrderApiUtils(identifyInfo); 221 var util = new PurchaseOrderApiUtils(identifyInfo);
218 for (T e : ts) { 222 for (T e : ts) {
  223 + var billId = e.getFBillTypeID().getFNUMBER();
219 e.getFBillTypeID().setFNUMBER("YSD01_SYS");//TODO TEST 224 e.getFBillTypeID().setFNUMBER("YSD01_SYS");//TODO TEST
220 util.createOnePurchaseOrder(JsonUtils.toJsonString(e), "AR_receivable"); 225 util.createOnePurchaseOrder(JsonUtils.toJsonString(e), "AR_receivable");
221 } 226 }
etrade-thirdparty/src/main/java/com/diligrp/etrade/thirdparty/type/DynamicType.java
@@ -13,11 +13,25 @@ public enum DynamicType { @@ -13,11 +13,25 @@ public enum DynamicType {
13 COLD("506"), 13 COLD("506"),
14 CARD("CARD"), 14 CARD("CARD"),
15 ENTIRE_TENANCY("1"), 15 ENTIRE_TENANCY("1"),
  16 + EARNEST("2"),
  17 + BAIL("3"),
16 SUBLET("4"), 18 SUBLET("4"),
17 ACCOMMODATION("5"), 19 ACCOMMODATION("5"),
18 - BAIL("3"),  
19 - EARNEST("2"), 20 + BOUTIQUE_ENTRANCE("6"),
  21 + PASSPORT("7"),
  22 + STOCKIN("8"),
  23 + STOCKOUT("9"),
20 OTHER_CHARGES("10"), 24 OTHER_CHARGES("10"),
  25 + LABOR_VEST("11"),
  26 + MESSAGEFEE("14"),
  27 + WATER("15"),
  28 + ELECTRICITY("16"),
  29 + UTILITY_BILLS_PRE_STORAGE("17"),
  30 + SCALES("18"),
  31 + ENTRANCE_CARD("301"),
  32 + ENQUIRY_FEE_ORDER("513"),
  33 + TRADING_AREA("523"),
  34 + CARD_METER("525"),
21 TRADE("5502"), 35 TRADE("5502"),
22 REFUND("5503"); 36 REFUND("5503");
23 public final String code; 37 public final String code;