Commit fdcc3708246b7b683a0768e1d8d08d01d34b3ae7

Authored by zhangmeiyang
1 parent 6b7c698b

金蝶对接pt10

etrade-thirdparty/src/main/java/com/diligrp/etrade/thirdparty/demarcate/AbstractBasicHandler.java
... ... @@ -100,7 +100,7 @@ public abstract class AbstractBasicHandler<T extends BaseSourceCo> implements Ty
100 100 return false;
101 101 }
102 102 Set<String> set = Arrays.stream(baseConfig.getSyncItem().split(",")).map(String::toUpperCase).collect(Collectors.toSet());
103   - return set.contains(getType().code);
  103 + return set.contains(getSyncType().code);
104 104 }
105 105  
106 106 /**
... ... @@ -128,6 +128,8 @@ public abstract class AbstractBasicHandler&lt;T extends BaseSourceCo&gt; implements Ty
128 128 }
129 129 }
130 130  
  131 + protected abstract BasicEnum getSyncType();
  132 +
131 133 /**
132 134 * 处理
133 135 *
... ...
etrade-thirdparty/src/main/java/com/diligrp/etrade/thirdparty/handler/basic/BusinessTypeBasicHandler.java
... ... @@ -41,4 +41,9 @@ public class BusinessTypeBasicHandler extends AbstractBasicHandler&lt;BusinessTypeC
41 41 public BasicEnum getType() {
42 42 return BasicEnum.FINANCIAL_BUSINESS_TYPE;
43 43 }
  44 +
  45 + @Override
  46 + protected BasicEnum getSyncType() {
  47 + return BasicEnum.FINANCIAL_BUSINESS_TYPE;
  48 + }
44 49 }
... ...
etrade-thirdparty/src/main/java/com/diligrp/etrade/thirdparty/handler/basic/ChargeItemBasicHandler.java
... ... @@ -41,4 +41,9 @@ public class ChargeItemBasicHandler extends AbstractBasicHandler&lt;ChargeItemCo&gt; {
41 41 public BasicEnum getType() {
42 42 return BasicEnum.CHARGE_ITEM;
43 43 }
  44 +
  45 + @Override
  46 + protected BasicEnum getSyncType() {
  47 + return BasicEnum.CHARGE_ITEM;
  48 + }
44 49 }
... ...
etrade-thirdparty/src/main/java/com/diligrp/etrade/thirdparty/handler/basic/ChargeItemGroupBasicHandler.java
... ... @@ -3,21 +3,15 @@ package com.diligrp.etrade.thirdparty.handler.basic;
3 3 import com.diligrp.etrade.core.util.JsonUtils;
4 4 import com.diligrp.etrade.thirdparty.demarcate.AbstractBasicHandler;
5 5 import com.diligrp.etrade.thirdparty.domain.co.basic.ChargeItemGroupCo;
6   -import com.diligrp.etrade.thirdparty.domain.dto.BaseConfigDto;
7 6 import com.diligrp.etrade.thirdparty.domain.dto.MappingDto;
8   -import com.diligrp.etrade.thirdparty.mapper.TransMapper;
9 7 import com.diligrp.etrade.thirdparty.type.BasicEnum;
10 8 import com.diligrp.etrade.thirdparty.utils.FeeGroupApiUtils;
11 9 import com.fasterxml.jackson.core.type.TypeReference;
12 10 import com.kingdee.bos.webapi.entity.IdentifyInfo;
13   -import jakarta.annotation.Resource;
14 11 import org.springframework.stereotype.Component;
15 12 import org.springframework.util.ObjectUtils;
16 13  
17   -import java.util.Arrays;
18 14 import java.util.List;
19   -import java.util.Set;
20   -import java.util.stream.Collectors;
21 15  
22 16 /**
23 17 * @Author: zhangmeiyang
... ... @@ -27,9 +21,6 @@ import java.util.stream.Collectors;
27 21 @Component
28 22 public class ChargeItemGroupBasicHandler extends AbstractBasicHandler<ChargeItemGroupCo> {
29 23  
30   - @Resource
31   - private TransMapper transMapper;
32   -
33 24 @Override
34 25 public void handleInside(String json, Long marketId, String systemCode) throws Exception {
35 26 IdentifyInfo identifyInfo = getIdentifyInfo(marketId, systemCode);
... ... @@ -53,12 +44,7 @@ public class ChargeItemGroupBasicHandler extends AbstractBasicHandler&lt;ChargeItem
53 44 }
54 45  
55 46 @Override
56   - protected boolean isSync(Long marketId, String systemCode) {
57   - BaseConfigDto baseConfig = transMapper.getBaseConfig(systemCode, marketId);
58   - if (ObjectUtils.isEmpty(baseConfig)){
59   - return false;
60   - }
61   - Set<String> set = Arrays.stream(baseConfig.getSyncItem().split(",")).map(String::toUpperCase).collect(Collectors.toSet());
62   - return set.contains(BasicEnum.CHARGE_ITEM_TO_LOWER.code);
  47 + protected BasicEnum getSyncType() {
  48 + return BasicEnum.CHARGE_ITEM;
63 49 }
64 50 }
... ...
etrade-thirdparty/src/main/java/com/diligrp/etrade/thirdparty/handler/basic/CustomerBasicHandler.java
... ... @@ -61,4 +61,9 @@ public class CustomerBasicHandler extends AbstractBasicHandler&lt;CustomerCo&gt; {
61 61 public BasicEnum getType() {
62 62 return BasicEnum.CUSTOMER;
63 63 }
  64 +
  65 + @Override
  66 + protected BasicEnum getSyncType() {
  67 + return BasicEnum.CUSTOMER;
  68 + }
64 69 }
... ...
etrade-thirdparty/src/main/java/com/diligrp/etrade/thirdparty/handler/basic/DepartmentBasicHandler.java
... ... @@ -42,4 +42,9 @@ public class DepartmentBasicHandler extends AbstractBasicHandler&lt;DepartmentCo&gt; {
42 42 public BasicEnum getType() {
43 43 return BasicEnum.DEPARTMENT;
44 44 }
  45 +
  46 + @Override
  47 + protected BasicEnum getSyncType() {
  48 + return BasicEnum.DEPARTMENT;
  49 + }
45 50 }
... ...
etrade-thirdparty/src/main/java/com/diligrp/etrade/thirdparty/handler/basic/SettlementBasicHandler.java
... ... @@ -41,4 +41,9 @@ public class SettlementBasicHandler extends AbstractBasicHandler&lt;SettlementCo&gt; {
41 41 public BasicEnum getType() {
42 42 return BasicEnum.FINANCIAL_CHANNEL_TYPE;
43 43 }
  44 +
  45 + @Override
  46 + protected BasicEnum getSyncType() {
  47 + return BasicEnum.FINANCIAL_CHANNEL_TYPE;
  48 + }
44 49 }
... ...