Commit 38b68476970772d0d543358fc25639a8ff694cd5

Authored by zhangmeiyang
1 parent a782af95

zr对接提交commit1

Showing 95 changed files with 3718 additions and 187 deletions
ereport-core/src/main/java/com/diligrp/etrade/report/ReportConfiguration.java
... ... @@ -7,6 +7,6 @@ import org.springframework.context.annotation.Configuration;
7 7  
8 8 @Configuration
9 9 @ComponentScan("com.diligrp.etrade.report")
10   -@MapperScan(basePackages = {"com.diligrp.etrade.report.dao"},markerInterface = MybatisMapperSupport.class)
  10 +@MapperScan(basePackages = {"com.diligrp.etrade.report.dao","com.diligrp.etrade.thirdparty.mapper"},markerInterface = MybatisMapperSupport.class)
11 11 public class ReportConfiguration {
12 12 }
... ...
ereport-core/src/main/java/com/diligrp/etrade/report/component/LogArgsInfoAspect.java
... ... @@ -2,27 +2,19 @@ package com.diligrp.etrade.report.component;
2 2  
3 3  
4 4 import cn.hutool.core.util.ArrayUtil;
5   -import com.diligrp.etrade.core.util.JsonUtils;
6 5 import com.diligrp.etrade.report.anno.LogArgsInfo;
7   -import jakarta.servlet.http.HttpServletRequest;
8   -import jakarta.servlet.http.HttpServletResponse;
9   -import org.aspectj.lang.JoinPoint;
10 6 import org.aspectj.lang.ProceedingJoinPoint;
11   -import org.aspectj.lang.Signature;
12   -import org.aspectj.lang.annotation.*;
  7 +import org.aspectj.lang.annotation.Around;
  8 +import org.aspectj.lang.annotation.Aspect;
  9 +import org.aspectj.lang.annotation.Pointcut;
13 10 import org.aspectj.lang.reflect.MethodSignature;
14 11 import org.slf4j.Logger;
15 12 import org.slf4j.LoggerFactory;
16   -import org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint;
17 13 import org.springframework.stereotype.Component;
18   -import org.springframework.web.multipart.MultipartFile;
19 14  
20 15 import java.lang.reflect.Method;
21 16 import java.util.Arrays;
22   -import java.util.Collections;
23 17 import java.util.List;
24   -import java.util.Objects;
25   -import java.util.concurrent.locks.Lock;
26 18  
27 19 /**
28 20 * 方法操作日志记录处理
... ...
ereport-core/src/main/java/com/diligrp/etrade/report/domain/co/ImageCreateCO.java
1 1 package com.diligrp.etrade.report.domain.co;
2 2  
3   -import cn.hutool.core.annotation.Alias;
4 3 import com.diligrp.etrade.report.anno.CheckTimeRange;
5   -import com.fasterxml.jackson.annotation.JsonAlias;
6   -import com.fasterxml.jackson.annotation.JsonFormat;
7   -import com.fasterxml.jackson.annotation.JsonProperty;
8 4 import jakarta.validation.constraints.NotNull;
9 5  
10 6 import java.io.Serializable;
... ...
etrade-thirdparty/build.gradle
... ... @@ -3,4 +3,6 @@ archivesBaseName = 'etrade-thirdparty'
3 3  
4 4 dependencies {
5 5 api project(':etrade-shared')
  6 + api project(':ereport-core')
  7 + implementation fileTree(dir: 'src/main/resources/lib', include: ['*.jar'])
6 8 }
... ...
etrade-thirdparty/src/main/java/com/diligrp/etrade/thirdparty/component/TransferComponent.java 0 → 100644
  1 +package com.diligrp.etrade.thirdparty.component;
  2 +
  3 +
  4 +import com.diligrp.etrade.thirdparty.domain.co.basic.BaseSourceCo;
  5 +import com.diligrp.etrade.thirdparty.domain.co.business.BaseBillCo;
  6 +import com.diligrp.etrade.thirdparty.domain.model.*;
  7 +import com.diligrp.etrade.thirdparty.mapper.TransMapper;
  8 +import jakarta.annotation.Resource;
  9 +import org.springframework.stereotype.Component;
  10 +import org.springframework.util.ObjectUtils;
  11 +
  12 +import java.time.LocalDateTime;
  13 +
  14 +/**
  15 + * Transfer Component (传输组件)
  16 + *
  17 + * @author zhangmeiyang
  18 + * @Author: zhangmeiyang
  19 + * @CreateTime: 2024-10-22 18:16
  20 + * @Version: todo
  21 + * @date 2024/10/24
  22 + */
  23 +@Component
  24 +public class TransferComponent {
  25 +
  26 + @Resource
  27 + private TransMapper transMapper;
  28 +
  29 + /**
  30 + * 转换数据baseCo
  31 + *
  32 + * @param co CO
  33 + * @param marketId 市场 ID
  34 + * @param systemCode 系统代码
  35 + */
  36 + public void transBaseCo(BaseBillCo co, Long marketId, String systemCode) {
  37 + co.setFDATE(LocalDateTime.now().toString());
  38 + co.setFCURRENCYID(new FCURRENCYID());
  39 + co.setFMAINBOOKSTDCURRID(new FMAINBOOKSTDCURRID());
  40 + co.setFPAYORGID(new FPAYORGID());
  41 + co.setFSALEORGID(new FSALEORGID());
  42 + co.setFSETTLEORGID(new FSETTLEORGID());
  43 + if (!ObjectUtils.isEmpty(co.getFORDERID())){
  44 + this.transOrderId(co.getFORDERID());
  45 + }
  46 + if (!ObjectUtils.isEmpty(co.getFCUSTOMERID())){
  47 + this.transCustomer(co.getFCUSTOMERID());
  48 + }
  49 + if (!ObjectUtils.isEmpty(co.getFSALEDEPTID())){
  50 + this.transDepId(co.getFSALEDEPTID());
  51 + }
  52 + if (!ObjectUtils.isEmpty(co.getFTRANSFERID())){
  53 + this.transTransferId(co.getFTRANSFERID());
  54 + }
  55 + this.transPayOrgId(co.getFPAYORGID(), marketId, systemCode);
  56 + this.transSaleOrgId(co.getFSALEORGID(), marketId, systemCode);
  57 + this.transSettleOrgId(co.getFSETTLEORGID(), marketId, systemCode);
  58 + this.transCurrency(co.getFCURRENCYID(), marketId, systemCode);
  59 + this.transMainBookCurrency(co.getFMAINBOOKSTDCURRID(), marketId, systemCode);
  60 +
  61 + }
  62 +
  63 + public void transBasicCo(BaseSourceCo co, Long marketId, String systemCode){
  64 + co.setFUseOrgId(new FUseOrgId());
  65 + co.setFCreateOrgId(new FCreateOrgId());
  66 + this.transFUseOrgId(co.getFUseOrgId(), marketId, systemCode);
  67 + this.transFCreateOrgId(co.getFCreateOrgId(), marketId, systemCode);
  68 + }
  69 +
  70 + /**
  71 + * 交易货币
  72 + *
  73 + * @param fcurrencyid fcurrencyid
  74 + * @param marketId 市场 ID
  75 + * @param systemCode 系统代码
  76 + */
  77 + public void transCurrency(FCURRENCYID fcurrencyid, Long marketId, String systemCode){
  78 + fcurrencyid.setFNumber(transMapper.getBaseConfig(systemCode, marketId).getCurrency());
  79 + }
  80 +
  81 + /**
  82 + * Trans Main Book 货币
  83 + *
  84 + * @param fmainbookstdcurrid fmainbookstdcurrid
  85 + * @param marketId 市场 ID
  86 + * @param systemCode 系统代码
  87 + */
  88 + public void transMainBookCurrency(FMAINBOOKSTDCURRID fmainbookstdcurrid, Long marketId, String systemCode){
  89 + fmainbookstdcurrid.setFNumber(transMapper.getBaseConfig(systemCode, marketId).getCurrency());
  90 + }
  91 +
  92 + /**
  93 + * 跨性别客户
  94 + *
  95 + * @param fcustomerid fcustomerid
  96 + */
  97 + public void transCustomer(FCUSTOMERID fcustomerid){
  98 + fcustomerid.setFNumber(transMapper.getCustomer(Long.valueOf(fcustomerid.getFNumber())).getCode());
  99 + }
  100 +
  101 + /**
  102 + * 交易订单 ID
  103 + *
  104 + * @param forderid forderid
  105 + */
  106 + public void transOrderId(FORDERID forderid){
  107 + forderid.setFNumber(transMapper.getCustomer(Long.valueOf(forderid.getFNumber())).getCode());
  108 + }
  109 +
  110 + /**
  111 + * Trans Transfer ID (转账 ID)
  112 + *
  113 + * @param ftransferid ftransferid
  114 + */
  115 + public void transTransferId(FTRANSFERID ftransferid){
  116 + ftransferid.setFNumber(transMapper.getCustomer(Long.valueOf(ftransferid.getFNumber())).getCode());
  117 + }
  118 +
  119 + /**
  120 + * Trans Pay 组织 ID
  121 + *
  122 + * @param marketId 市场 ID
  123 + * @param systemCode 系统代码
  124 + * @param fUseOrgId f 使用组织 ID
  125 + */
  126 + public void transFUseOrgId(FUseOrgId fUseOrgId, Long marketId, String systemCode){
  127 + fUseOrgId.setFNumber(transMapper.getClientParam(systemCode,marketId).getOrganization());
  128 + }
  129 +
  130 + /**
  131 + * Trans fcreate org ID
  132 + *
  133 + * @param marketId 市场 ID
  134 + * @param systemCode 系统代码
  135 + * @param fCreateOrgId f 创建组织 ID
  136 + */
  137 + public void transFCreateOrgId(FCreateOrgId fCreateOrgId, Long marketId, String systemCode){
  138 + fCreateOrgId.setFNumber(transMapper.getClientParam(systemCode,marketId).getOrganization());
  139 + }
  140 +
  141 + /**
  142 + * Trans Pay 组织 ID
  143 + *
  144 + * @param fpayorgid fpayorgid
  145 + * @param marketId 市场 ID
  146 + * @param systemCode 系统代码
  147 + */
  148 + public void transPayOrgId(FPAYORGID fpayorgid, Long marketId, String systemCode){
  149 + fpayorgid.setFNumber(transMapper.getClientParam(systemCode,marketId).getOrganization());
  150 + }
  151 +
  152 + /**
  153 + * Trans 销售组织 ID
  154 + *
  155 + * @param fsaleorgid fsaleorgid
  156 + * @param marketId 市场 ID
  157 + * @param systemCode 系统代码
  158 + */
  159 + public void transSaleOrgId(FSALEORGID fsaleorgid, Long marketId, String systemCode){
  160 + fsaleorgid.setFNumber(transMapper.getClientParam(systemCode,marketId).getOrganization());
  161 + }
  162 +
  163 + /**
  164 + * Trans Settle 组织 ID
  165 + *
  166 + * @param fsettleorgid fsettleorgid
  167 + * @param marketId 市场 ID
  168 + * @param systemCode 系统代码
  169 + */
  170 + public void transSettleOrgId(FSETTLEORGID fsettleorgid, Long marketId, String systemCode){
  171 + fsettleorgid.setFNumber(transMapper.getClientParam(systemCode,marketId).getOrganization());
  172 + }
  173 +
  174 + /**
  175 + * 跨性别 dep id
  176 + *
  177 + * @param fsaledeptid fsaledeptid
  178 + */
  179 + public void transDepId(FSALEDEPTID fsaledeptid){
  180 + fsaledeptid.setFNumber(transMapper.getDepartment(Long.valueOf(fsaledeptid.getFNumber())).getDepartmentCode());
  181 + }
  182 +
  183 +}
... ...
etrade-thirdparty/src/main/java/com/diligrp/etrade/thirdparty/demarcate/AbstractBasicHandler.java 0 → 100644
  1 +package com.diligrp.etrade.thirdparty.demarcate;
  2 +
  3 +import com.diligrp.etrade.thirdparty.component.TransferComponent;
  4 +import com.diligrp.etrade.thirdparty.domain.co.basic.BaseSourceCo;
  5 +import com.diligrp.etrade.thirdparty.domain.dto.BaseConfigDto;
  6 +import com.diligrp.etrade.thirdparty.domain.dto.ClientDto;
  7 +import com.diligrp.etrade.thirdparty.domain.dto.MappingDto;
  8 +import com.diligrp.etrade.thirdparty.mapper.RecordMapper;
  9 +import com.diligrp.etrade.thirdparty.mapper.TransMapper;
  10 +import com.diligrp.etrade.thirdparty.type.BasicEnum;
  11 +import com.kingdee.bos.webapi.entity.IdentifyInfo;
  12 +import jakarta.annotation.Resource;
  13 +
  14 +import java.util.Arrays;
  15 +import java.util.Set;
  16 +import java.util.stream.Collectors;
  17 +
  18 +/**
  19 + * 抽象业务处理程序
  20 + *
  21 + * @author zhangmeiyang
  22 + * @date 2024/09/26
  23 + */
  24 +public abstract class AbstractBasicHandler<T extends BaseSourceCo> implements TypeMarkInterface<BasicEnum> {
  25 +
  26 + @Resource
  27 + private TransferComponent transferComponent;
  28 +
  29 + @Resource
  30 + private RecordMapper recordMapper;
  31 +
  32 + @Resource
  33 + private TransMapper transMapper;
  34 +
  35 +
  36 + /**
  37 + * 记录映射
  38 + *
  39 + * @param marketId 市场 ID
  40 + * @param systemCode 系统代码
  41 + * @param systemDataId 系统数据 ID
  42 + * @param thirdPartyDataId 第三方数据 ID
  43 + */
  44 + protected void recordMapping(Long marketId, String systemCode, Long systemDataId, Long thirdPartyDataId) {
  45 + var mapping = new MappingDto();
  46 + mapping.setMarketId(marketId);
  47 + mapping.setBusiness(getType().code);
  48 + mapping.setSystemCode(systemCode);
  49 + mapping.setSystemDataId(systemDataId);
  50 + mapping.setThirdPartyDataId(thirdPartyDataId);
  51 + recordMapper.recordTheMappingData(mapping);
  52 + }
  53 +
  54 + /**
  55 + * 获取身份信息
  56 + *
  57 + * @param marketId 市场 ID
  58 + * @param systemCode 系统代码
  59 + * @return {@link IdentifyInfo}
  60 + */
  61 + protected IdentifyInfo getIdentifyInfo(Long marketId, String systemCode) {
  62 + ClientDto clientParam = transMapper.getClientParam(systemCode, marketId);
  63 + var identifyInfo = new IdentifyInfo();
  64 + identifyInfo.setAppId(clientParam.getApplyId());
  65 + identifyInfo.setUserName(clientParam.getUsername());
  66 + identifyInfo.setServerUrl(clientParam.getServiceAddress());
  67 + identifyInfo.setAppSecret(clientParam.getSecurityKey());
  68 + identifyInfo.setdCID(clientParam.getDataCentreId());
  69 + return identifyInfo;
  70 + }
  71 +
  72 + /**
  73 + * 获取映射数据
  74 + *
  75 + * @param marketId 市场 ID
  76 + * @param systemCode 系统代码
  77 + * @param systemDataId 系统数据 ID
  78 + * @return {@link MappingDto}
  79 + */
  80 + protected MappingDto getMappingData(Long marketId, String systemCode, Long systemDataId) {
  81 + var mapping = new MappingDto();
  82 + mapping.setMarketId(marketId);
  83 + mapping.setBusiness(getType().code);
  84 + mapping.setSystemCode(systemCode);
  85 + mapping.setSystemDataId(systemDataId);
  86 + return transMapper.getMappingData(mapping);
  87 + }
  88 +
  89 + /**
  90 + * 是否同步
  91 + *
  92 + * @param marketId 市场 ID
  93 + * @param systemCode 系统代码
  94 + * @return boolean
  95 + */
  96 + protected boolean isSync(Long marketId, String systemCode) {
  97 + BaseConfigDto baseConfig = transMapper.getBaseConfig(systemCode, marketId);
  98 + Set<String> set = Arrays.stream(baseConfig.getSyncItem().split(",")).map(String::toUpperCase).collect(Collectors.toSet());
  99 + return set.contains(getType().code);
  100 + }
  101 +
  102 + /**
  103 + * 固定转换
  104 + *
  105 + * @param t t
  106 + * @param marketId 市场 ID
  107 + * @param systemCode 系统代码
  108 + */
  109 + protected void transfer(T t, Long marketId, String systemCode) {
  110 + transferComponent.transBasicCo(t, marketId, systemCode);
  111 + }
  112 +
  113 + /**
  114 + * 处理
  115 + *
  116 + * @param json JSON 格式
  117 + * @param marketId 市场 ID
  118 + * @param systemCode 系统代码
  119 + * @throws Exception 例外
  120 + */
  121 + public void handle(String json, Long marketId, String systemCode) throws Exception{
  122 + if (isSync(marketId, systemCode)) {
  123 + handleInside(json, marketId, systemCode);
  124 + }
  125 + }
  126 +
  127 + /**
  128 + * 处理
  129 + *
  130 + * @param json JSON 格式
  131 + * @param marketId 市场 ID
  132 + * @param systemCode 系统代码
  133 + * @throws Exception 例外
  134 + */
  135 + protected abstract void handleInside(String json, Long marketId, String systemCode) throws Exception;
  136 +}
... ...
etrade-thirdparty/src/main/java/com/diligrp/etrade/thirdparty/demarcate/AbstractBillHandler.java 0 → 100644
  1 +package com.diligrp.etrade.thirdparty.demarcate;
  2 +
  3 +import com.diligrp.etrade.thirdparty.component.TransferComponent;
  4 +import com.diligrp.etrade.thirdparty.domain.co.business.BaseBillCo;
  5 +import com.diligrp.etrade.thirdparty.domain.dto.BusinessDetailDto;
  6 +import com.diligrp.etrade.thirdparty.mapper.TransMapper;
  7 +import com.diligrp.etrade.thirdparty.type.BusinessEnum;
  8 +import jakarta.annotation.Resource;
  9 +
  10 +/**
  11 + * 抽象业务处理程序
  12 + *
  13 + * @author zhangmeiyang
  14 + * @date 2024/09/26
  15 + */
  16 +public abstract class AbstractBillHandler<T extends BaseBillCo> implements TypeMarkInterface<BusinessEnum> {
  17 +
  18 + @Resource
  19 + protected TransferComponent transferComponent;
  20 +
  21 + @Resource
  22 + protected TransMapper transMapper;
  23 +
  24 + /**
  25 + * 固定转换
  26 + *
  27 + * @param t t
  28 + * @param marketId 市场 ID
  29 + * @param systemCode 系统代码
  30 + */
  31 + protected void transfer(T t, Long marketId, String systemCode) {
  32 + transferComponent.transBaseCo(t, marketId, systemCode);
  33 + }
  34 +
  35 +
  36 + /**
  37 + * 获取动态数据
  38 + *
  39 + * @param code 法典
  40 + * @param marketId 市场 ID
  41 + * @param systemCode 系统代码
  42 + * @return {@link BusinessDetailDto}
  43 + */
  44 + protected BusinessDetailDto getDynamicData(String code, Long marketId, String systemCode) {
  45 + return transMapper.getDynamicParam(systemCode, code, marketId);
  46 + }
  47 +
  48 +
  49 + /**
  50 + * 处理
  51 + *
  52 + * @param json JSON 格式
  53 + * @param marketId 市场 ID
  54 + * @param systemCode 系统代码
  55 + * @throws Exception 例外
  56 + */
  57 + public abstract void handle(String json, Long marketId, String systemCode) throws Exception;
  58 +}
... ...
etrade-thirdparty/src/main/java/com/diligrp/etrade/thirdparty/demarcate/AbstractBusinessHandler.java deleted 100644 → 0
1   -package com.diligrp.etrade.thirdparty.demarcate;
2   -
3   -import com.diligrp.etrade.core.util.JsonUtils;
4   -import com.fasterxml.jackson.core.type.TypeReference;
5   -
6   -/**
7   - * 抽象业务处理程序
8   - *
9   - * @author zhangmeiyang
10   - * @date 2024/09/26
11   - */
12   -public abstract class AbstractBusinessHandler<T> implements TypeMarkInterface {
13   - /**
14   - * 处理
15   - *
16   - * @param json JSON 格式
17   - */
18   - public void handle(String json){
19   - this.handle(this.convertData(json));
20   - }
21   -
22   - /**
23   - * 转换数据
24   - *
25   - * @param json JSON 格式
26   - * @return {@link T}
27   - */
28   - protected T convertData(String json){
29   - return JsonUtils.fromJsonString(json,new TypeReference<>() {});
30   - }
31   -
32   - /**
33   - * 处理
34   - *
35   - * @param t t
36   - */
37   - protected abstract void handle(T t);
38   -}
etrade-thirdparty/src/main/java/com/diligrp/etrade/thirdparty/demarcate/AbstractReceiver.java 0 → 100644
  1 +package com.diligrp.etrade.thirdparty.demarcate;
  2 +
  3 +import com.diligrp.etrade.thirdparty.error.ErrorCo;
  4 +import com.diligrp.etrade.thirdparty.mapper.RecordMapper;
  5 +import jakarta.annotation.Resource;
  6 +import org.springframework.transaction.annotation.Transactional;
  7 +
  8 +/**
  9 + * @Author: zhangmeiyang
  10 + * @CreateTime: 2024-10-23 16:27
  11 + * @Version: todo
  12 + */
  13 +public abstract class AbstractReceiver {
  14 +
  15 + @Resource
  16 + private RecordMapper recordMapper;
  17 +
  18 + /**
  19 + * 处理错误
  20 + *
  21 + * @param message 消息
  22 + * @param data 数据
  23 + * @param business 商
  24 + * @param systemCode 系统代码
  25 + * @param marketId 市场 ID
  26 + */
  27 + @Transactional
  28 + public void handleError(String message,String data,String business,String systemCode, Long marketId) {
  29 + ErrorCo errorCo = new ErrorCo();
  30 + errorCo.setContent(data);
  31 + errorCo.setErrorMessage(message);
  32 + errorCo.setBusiness(business);
  33 + errorCo.setMarketId(marketId);
  34 + errorCo.setSystemCode(systemCode);
  35 + recordMapper.recordError(errorCo);
  36 + }
  37 +
  38 +}
... ...
etrade-thirdparty/src/main/java/com/diligrp/etrade/thirdparty/demarcate/ErrorHandleInterface.java deleted 100644 → 0
1   -package com.diligrp.etrade.thirdparty.demarcate;
2   -
3   -/**
4   - * 错误处理接口
5   - *
6   - * @author zhangmeiyang
7   - * @date 2024/09/26
8   - */
9   -public interface ErrorHandleInterface extends TypeMarkInterface {
10   - /**
11   - * 保存和记录错误
12   - *
13   - * @param json JSON 格式
14   - * @param errorMessage 错误信息
15   - */
16   - void saveAndRecordError(String json, String errorMessage);
17   -}
etrade-thirdparty/src/main/java/com/diligrp/etrade/thirdparty/demarcate/TypeMarkInterface.java
... ... @@ -8,11 +8,11 @@ import com.diligrp.etrade.thirdparty.type.BusinessEnum;
8 8 * @author zhangmeiyang
9 9 * @date 2024/09/26
10 10 */
11   -public interface TypeMarkInterface {
  11 +public interface TypeMarkInterface<T> {
12 12 /**
13 13 * 获取类型
14 14 *
15 15 * @return {@link BusinessEnum}
16 16 */
17   - BusinessEnum getType();
  17 + T getType();
18 18 }
... ...
etrade-thirdparty/src/main/java/com/diligrp/etrade/thirdparty/domain/co/TestCo.java deleted 100644 → 0
1   -package com.diligrp.etrade.thirdparty.domain.co;
2   -
3   -/**
4   - * @Author: zhangmeiyang
5   - * @CreateTime: 2024-09-10 15:06
6   - * @Version: todo
7   - */
8   -public class TestCo{
9   - private String name;
10   -
11   - public String getName() {
12   - return name;
13   - }
14   -
15   - public void setName(String name) {
16   - this.name = name;
17   - }
18   -}
etrade-thirdparty/src/main/java/com/diligrp/etrade/thirdparty/domain/co/basic/BaseSourceCo.java 0 → 100644
  1 +package com.diligrp.etrade.thirdparty.domain.co.basic;
  2 +
  3 +import com.diligrp.etrade.thirdparty.domain.model.FCreateOrgId;
  4 +import com.diligrp.etrade.thirdparty.domain.model.FUseOrgId;
  5 +import com.fasterxml.jackson.annotation.JsonProperty;
  6 +
  7 +/**
  8 + * Base Source CO (基础源 CO)
  9 + *
  10 + * @author zhangmeiyang
  11 + * @Author: zhangmeiyang
  12 + * @CreateTime: 2024-10-23 15:35
  13 + * @Version: todo
  14 + * @date 2024/10/24
  15 + */
  16 +public class BaseSourceCo {
  17 + private Long systemDataId;
  18 + private String FNumber;
  19 + private String FName;
  20 + private String FDescription;
  21 + private FCreateOrgId FCreateOrgId;
  22 + private FUseOrgId FUseOrgId;
  23 +
  24 + @JsonProperty("systemDataId")
  25 + public Long getSystemDataId() {
  26 + return systemDataId;
  27 + }
  28 +
  29 + public void setSystemDataId(Long systemDataId) {
  30 + this.systemDataId = systemDataId;
  31 + }
  32 +
  33 + @JsonProperty("FNumber")
  34 + public String getFNumber() {
  35 + return FNumber;
  36 + }
  37 +
  38 + public void setFNumber(String FNumber) {
  39 + this.FNumber = FNumber;
  40 + }
  41 + @JsonProperty("FName")
  42 + public String getFName() {
  43 + return FName;
  44 + }
  45 +
  46 + public void setFName(String FName) {
  47 + this.FName = FName;
  48 + }
  49 + @JsonProperty("FDescription")
  50 + public String getFDescription() {
  51 + return FDescription;
  52 + }
  53 +
  54 + public void setFDescription(String FDescription) {
  55 + this.FDescription = FDescription;
  56 + }
  57 + @JsonProperty("FCreateOrgId")
  58 + public FCreateOrgId getFCreateOrgId() {
  59 + return FCreateOrgId;
  60 + }
  61 +
  62 + public void setFCreateOrgId(FCreateOrgId FCreateOrgId) {
  63 + this.FCreateOrgId = FCreateOrgId;
  64 + }
  65 + @JsonProperty("FUseOrgId")
  66 + public FUseOrgId getFUseOrgId() {
  67 + return FUseOrgId;
  68 + }
  69 +
  70 + public void setFUseOrgId(FUseOrgId FUseOrgId) {
  71 + this.FUseOrgId = FUseOrgId;
  72 + }
  73 +}
... ...
etrade-thirdparty/src/main/java/com/diligrp/etrade/thirdparty/domain/co/basic/BusinessTypeCo.java 0 → 100644
  1 +package com.diligrp.etrade.thirdparty.domain.co.basic;
  2 +
  3 +import com.diligrp.etrade.thirdparty.domain.model.FBillFormID;
  4 +import com.fasterxml.jackson.annotation.JsonProperty;
  5 +
  6 +/**
  7 + * 文件 CO
  8 + *
  9 + * @author zhangmeiyang
  10 + * @Author: zhangmeiyang
  11 + * @CreateTime: 2024-10-23 15:46
  12 + * @Version: todo
  13 + * @date 2024/10/24
  14 + */
  15 +public class BusinessTypeCo extends BaseSourceCo{
  16 + private Long FBILLTYPEID;
  17 + private FBillFormID FBillFormID;
  18 +
  19 + @JsonProperty("FBILLTYPEID")
  20 + public Long getFBILLTYPEID() {
  21 + return FBILLTYPEID;
  22 + }
  23 +
  24 + public void setFBILLTYPEID(Long FBILLTYPEID) {
  25 + this.FBILLTYPEID = FBILLTYPEID;
  26 + }
  27 +
  28 + @JsonProperty("FBillFormID")
  29 + public FBillFormID getFBillFormID() {
  30 + return FBillFormID;
  31 + }
  32 +
  33 + public void setFBillFormID(FBillFormID FBillFormID) {
  34 + this.FBillFormID = FBillFormID;
  35 + }
  36 +}
... ...
etrade-thirdparty/src/main/java/com/diligrp/etrade/thirdparty/domain/co/basic/ChargeItemCo.java 0 → 100644
  1 +package com.diligrp.etrade.thirdparty.domain.co.basic;
  2 +
  3 +import com.diligrp.etrade.thirdparty.domain.model.FGroup;
  4 +import com.fasterxml.jackson.annotation.JsonProperty;
  5 +
  6 +/**
  7 + * @Author: zhangmeiyang
  8 + * @CreateTime: 2024-10-24 14:22
  9 + * @Version: todo
  10 + */
  11 +public class ChargeItemCo extends BaseSourceCo{
  12 + private Long FEXPID;
  13 + private FGroup FGroup;
  14 +
  15 + @JsonProperty("FEXPID")
  16 + public Long getFEXPID() {
  17 + return FEXPID;
  18 + }
  19 +
  20 + public void setFEXPID(Long FEXPID) {
  21 + this.FEXPID = FEXPID;
  22 + }
  23 +
  24 + @JsonProperty("FGroup")
  25 + public FGroup getFGroup() {
  26 + return FGroup;
  27 + }
  28 +
  29 + public void setFGroup(FGroup FGroup) {
  30 + this.FGroup = FGroup;
  31 + }
  32 +}
... ...
etrade-thirdparty/src/main/java/com/diligrp/etrade/thirdparty/domain/co/basic/ChargeItemGroupCo.java 0 → 100644
  1 +package com.diligrp.etrade.thirdparty.domain.co.basic;
  2 +
  3 +import com.fasterxml.jackson.annotation.JsonProperty;
  4 +
  5 +/**
  6 + * 费用项 CO
  7 + *
  8 + * @author zhangmeiyang
  9 + * @Author: zhangmeiyang
  10 + * @CreateTime: 2024-10-23 15:12
  11 + * @Version: todo
  12 + * @date 2024/10/24
  13 + */
  14 +public class ChargeItemGroupCo extends BaseSourceCo{
  15 +
  16 + private Long FParentId;
  17 + private Long GroupPkId;
  18 +
  19 + @JsonProperty("FParentId")
  20 + public Long getFParentId() {
  21 + return FParentId;
  22 + }
  23 +
  24 + public void setFParentId(Long FParentId) {
  25 + this.FParentId = FParentId;
  26 + }
  27 +
  28 + @JsonProperty("GroupPkId")
  29 + public Long getGroupPkId() {
  30 + return GroupPkId;
  31 + }
  32 +
  33 + public void setGroupPkId(Long groupPkId) {
  34 + GroupPkId = groupPkId;
  35 + }
  36 +}
... ...
etrade-thirdparty/src/main/java/com/diligrp/etrade/thirdparty/domain/co/basic/ContactCo.java 0 → 100644
  1 +package com.diligrp.etrade.thirdparty.domain.co.basic;
  2 +
  3 +import com.fasterxml.jackson.annotation.JsonProperty;
  4 +
  5 +/**
  6 + * 联系人 CO
  7 + *
  8 + * @author zhangmeiyang
  9 + * @Author: zhangmeiyang
  10 + * @CreateTime: 2024-10-23 18:04
  11 + * @Version: todo
  12 + * @date 2024/10/23
  13 + */
  14 +public class ContactCo {
  15 + private String FName;
  16 + private String FCompanyType;
  17 + private String FBizAddress;
  18 + private String FMobile;
  19 +
  20 + @JsonProperty("FName")
  21 + public String getFName() {
  22 + return FName;
  23 + }
  24 +
  25 + public void setFName(String FName) {
  26 + this.FName = FName;
  27 + }
  28 + @JsonProperty("FCompanyType")
  29 + public String getFCompanyType() {
  30 + return FCompanyType;
  31 + }
  32 +
  33 + public void setFCompanyType(String FCompanyType) {
  34 + this.FCompanyType = FCompanyType;
  35 + }
  36 + @JsonProperty("FBizAddress")
  37 + public String getFBizAddress() {
  38 + return FBizAddress;
  39 + }
  40 +
  41 + public void setFBizAddress(String FBizAddress) {
  42 + this.FBizAddress = FBizAddress;
  43 + }
  44 + @JsonProperty("FMobile")
  45 + public String getFMobile() {
  46 + return FMobile;
  47 + }
  48 +
  49 + public void setFMobile(String FMobile) {
  50 + this.FMobile = FMobile;
  51 + }
  52 +}
... ...
etrade-thirdparty/src/main/java/com/diligrp/etrade/thirdparty/domain/co/basic/CustomerCo.java 0 → 100644
  1 +package com.diligrp.etrade.thirdparty.domain.co.basic;
  2 +
  3 +import com.diligrp.etrade.thirdparty.domain.model.*;
  4 +import com.fasterxml.jackson.annotation.JsonProperty;
  5 +
  6 +import java.util.List;
  7 +
  8 +/**
  9 + * 客户 CO
  10 + *
  11 + * @author zhangmeiyang
  12 + * @Author: zhangmeiyang
  13 + * @CreateTime: 2024-10-23 15:45
  14 + * @Version: todo
  15 + * @date 2024/10/24
  16 + */
  17 +public class CustomerCo extends BaseSourceCo{
  18 + private Long FCUSTID;
  19 + private String FShortName;
  20 + private FCOUNTRY FCOUNTRY;
  21 + private FTRADINGCURRID FTRADINGCURRID;
  22 + private FPROVINCIAL FPROVINCIAL;
  23 + private String FADDRESS;
  24 + private FGroup FGroup;
  25 + private String FINVOICETITLE;
  26 + private String FLegalPerson;
  27 + private String FSOCIALCRECODE;
  28 + private String FRegisterAddress;
  29 + private List<FT_BD_CUSTLOCATION> FT_BD_CUSTLOCATION;
  30 +
  31 + @JsonProperty("FCUSTID")
  32 + public Long getFCUSTID() {
  33 + return FCUSTID;
  34 + }
  35 +
  36 + public void setFCUSTID(Long FCUSTID) {
  37 + this.FCUSTID = FCUSTID;
  38 + }
  39 +
  40 + @JsonProperty("FShortName")
  41 + public String getFShortName() {
  42 + return FShortName;
  43 + }
  44 +
  45 + public void setFShortName(String FShortName) {
  46 + this.FShortName = FShortName;
  47 + }
  48 + @JsonProperty("FCOUNTRY")
  49 + public FCOUNTRY getFCOUNTRY() {
  50 + return FCOUNTRY;
  51 + }
  52 +
  53 + public void setFCOUNTRY(FCOUNTRY FCOUNTRY) {
  54 + this.FCOUNTRY = FCOUNTRY;
  55 + }
  56 + @JsonProperty("FTRADINGCURRID")
  57 + public FTRADINGCURRID getFTRADINGCURRID() {
  58 + return FTRADINGCURRID;
  59 + }
  60 +
  61 + public void setFTRADINGCURRID(FTRADINGCURRID FTRADINGCURRID) {
  62 + this.FTRADINGCURRID = FTRADINGCURRID;
  63 + }
  64 + @JsonProperty("FPROVINCIAL")
  65 + public FPROVINCIAL getFPROVINCIAL() {
  66 + return FPROVINCIAL;
  67 + }
  68 +
  69 + public void setFPROVINCIAL(FPROVINCIAL FPROVINCIAL) {
  70 + this.FPROVINCIAL = FPROVINCIAL;
  71 + }
  72 + @JsonProperty("FADDRESS")
  73 + public String getFADDRESS() {
  74 + return FADDRESS;
  75 + }
  76 +
  77 + public void setFADDRESS(String FADDRESS) {
  78 + this.FADDRESS = FADDRESS;
  79 + }
  80 + @JsonProperty("FGroup")
  81 + public FGroup getFGroup() {
  82 + return FGroup;
  83 + }
  84 +
  85 + public void setFGroup(FGroup FGroup) {
  86 + this.FGroup = FGroup;
  87 + }
  88 + @JsonProperty("FINVOICETITLE")
  89 + public String getFINVOICETITLE() {
  90 + return FINVOICETITLE;
  91 + }
  92 +
  93 + public void setFINVOICETITLE(String FINVOICETITLE) {
  94 + this.FINVOICETITLE = FINVOICETITLE;
  95 + }
  96 + @JsonProperty("FLegalPerson")
  97 + public String getFLegalPerson() {
  98 + return FLegalPerson;
  99 + }
  100 +
  101 + public void setFLegalPerson(String FLegalPerson) {
  102 + this.FLegalPerson = FLegalPerson;
  103 + }
  104 + @JsonProperty("FSOCIALCRECODE")
  105 + public String getFSOCIALCRECODE() {
  106 + return FSOCIALCRECODE;
  107 + }
  108 +
  109 + public void setFSOCIALCRECODE(String FSOCIALCRECODE) {
  110 + this.FSOCIALCRECODE = FSOCIALCRECODE;
  111 + }
  112 + @JsonProperty("FRegisterAddress")
  113 + public String getFRegisterAddress() {
  114 + return FRegisterAddress;
  115 + }
  116 +
  117 + public void setFRegisterAddress(String FRegisterAddress) {
  118 + this.FRegisterAddress = FRegisterAddress;
  119 + }
  120 +
  121 + @JsonProperty("FT_BD_CUSTLOCATION")
  122 + public List<FT_BD_CUSTLOCATION> getFT_BD_CUSTLOCATION() {
  123 + return FT_BD_CUSTLOCATION;
  124 + }
  125 +
  126 + public void setFT_BD_CUSTLOCATION(List<FT_BD_CUSTLOCATION> FT_BD_CUSTLOCATION) {
  127 + this.FT_BD_CUSTLOCATION = FT_BD_CUSTLOCATION;
  128 + }
  129 +}
... ...
etrade-thirdparty/src/main/java/com/diligrp/etrade/thirdparty/domain/co/basic/DepartmentCo.java 0 → 100644
  1 +package com.diligrp.etrade.thirdparty.domain.co.basic;
  2 +
  3 +import com.fasterxml.jackson.annotation.JsonProperty;
  4 +
  5 +/**
  6 + * 部门 CO
  7 + *
  8 + * @author zhangmeiyang
  9 + * @Author: zhangmeiyang
  10 + * @CreateTime: 2024-10-23 15:47
  11 + * @Version: todo
  12 + * @date 2024/10/24
  13 + */
  14 +public class DepartmentCo extends BaseSourceCo{
  15 + private Long FDEPTID;
  16 +
  17 + @JsonProperty("FDEPTID")
  18 + public Long getFDEPTID() {
  19 + return FDEPTID;
  20 + }
  21 +
  22 + public void setFDEPTID(Long FDEPTID) {
  23 + this.FDEPTID = FDEPTID;
  24 + }
  25 +}
... ...
etrade-thirdparty/src/main/java/com/diligrp/etrade/thirdparty/domain/co/basic/SettlementCo.java 0 → 100644
  1 +package com.diligrp.etrade.thirdparty.domain.co.basic;
  2 +
  3 +import com.fasterxml.jackson.annotation.JsonProperty;
  4 +
  5 +/**
  6 + * 结算公司
  7 + *
  8 + * @author zhangmeiyang
  9 + * @Author: zhangmeiyang
  10 + * @CreateTime: 2024-10-23 15:46
  11 + * @Version: todo
  12 + * @date 2024/10/24
  13 + */
  14 +public class SettlementCo extends BaseSourceCo {
  15 + private Long FID;
  16 + private String FSETTLECATEGORY;
  17 + private String FTYPE;
  18 +
  19 + @JsonProperty("FID")
  20 + public Long getFID() {
  21 + return FID;
  22 + }
  23 +
  24 + public void setFID(Long FID) {
  25 + this.FID = FID;
  26 + }
  27 +
  28 + @JsonProperty("FSETTLECATEGORY")
  29 + public String getFSETTLECATEGORY() {
  30 + return FSETTLECATEGORY;
  31 + }
  32 +
  33 + public void setFSETTLECATEGORY(String FSETTLECATEGORY) {
  34 + this.FSETTLECATEGORY = FSETTLECATEGORY;
  35 + }
  36 +
  37 + @JsonProperty("FTYPE")
  38 + public String getFTYPE() {
  39 + return FTYPE;
  40 + }
  41 +
  42 + public void setFTYPE(String FTYPE) {
  43 + this.FTYPE = FTYPE;
  44 + }
  45 +}
... ...
etrade-thirdparty/src/main/java/com/diligrp/etrade/thirdparty/domain/co/business/BaseBillCo.java 0 → 100644
  1 +package com.diligrp.etrade.thirdparty.domain.co.business;
  2 +
  3 +import com.diligrp.etrade.thirdparty.domain.model.*;
  4 +import com.fasterxml.jackson.annotation.JsonProperty;
  5 +
  6 +import java.io.Serializable;
  7 +import java.math.BigDecimal;
  8 +
  9 +/**
  10 + * @Author: zhangmeiyang
  11 + * @CreateTime: 2024-10-22 18:34
  12 + * @Version: todo
  13 + */
  14 +public class BaseBillCo implements Serializable {
  15 + private String FAR_Remark;
  16 + private BigDecimal FPrice;
  17 + private BigDecimal FTaxPrice;
  18 + private BigDecimal FPriceQty;
  19 + private String FBUSINESSTYPE;
  20 + private String FDATE;
  21 + private FBillTypeID FBillTypeID;
  22 + private FSETTLEORGID FSETTLEORGID;
  23 + private FCURRENCYID FCURRENCYID;
  24 + private FCUSTOMERID FCUSTOMERID;
  25 + private FSALEORGID FSALEORGID;
  26 + private FSALEDEPTID FSALEDEPTID;
  27 + private FPAYORGID FPAYORGID;
  28 + private FTRANSFERID FTRANSFERID;
  29 + private FORDERID FORDERID;
  30 + private FMAINBOOKSTDCURRID FMAINBOOKSTDCURRID;
  31 + private FCOSTID FCOSTID;
  32 + private FASSETID FASSETID;
  33 + private FChargeId FChargeId;
  34 + private FSettleTypeID FSettleTypeID;
  35 +
  36 + @JsonProperty("FAR_Remark")
  37 + public String getFAR_Remark() {
  38 + return FAR_Remark;
  39 + }
  40 +
  41 + public void setFAR_Remark(String FAR_Remark) {
  42 + this.FAR_Remark = FAR_Remark;
  43 + }
  44 +
  45 + @JsonProperty("FPrice")
  46 + public BigDecimal getFPrice() {
  47 + return FPrice;
  48 + }
  49 +
  50 + public void setFPrice(BigDecimal FPrice) {
  51 + this.FPrice = FPrice;
  52 + }
  53 +
  54 + @JsonProperty("FTaxPrice")
  55 + public BigDecimal getFTaxPrice() {
  56 + return FTaxPrice;
  57 + }
  58 +
  59 + public void setFTaxPrice(BigDecimal FTaxPrice) {
  60 + this.FTaxPrice = FTaxPrice;
  61 + }
  62 +
  63 + @JsonProperty("FPriceQty")
  64 + public BigDecimal getFPriceQty() {
  65 + return FPriceQty;
  66 + }
  67 +
  68 + public void setFPriceQty(BigDecimal FPriceQty) {
  69 + this.FPriceQty = FPriceQty;
  70 + }
  71 +
  72 + @JsonProperty("FBUSINESSTYPE")
  73 + public String getFBUSINESSTYPE() {
  74 + return FBUSINESSTYPE;
  75 + }
  76 +
  77 + public void setFBUSINESSTYPE(String FBUSINESSTYPE) {
  78 + this.FBUSINESSTYPE = FBUSINESSTYPE;
  79 + }
  80 +
  81 + @JsonProperty("FDATE")
  82 + public String getFDATE() {
  83 + return FDATE;
  84 + }
  85 +
  86 + public void setFDATE(String FDATE) {
  87 + this.FDATE = FDATE;
  88 + }
  89 +
  90 + @JsonProperty("FBillTypeID")
  91 + public FBillTypeID getFBillTypeID() {
  92 + return FBillTypeID;
  93 + }
  94 +
  95 + public void setFBillTypeID(FBillTypeID FBillTypeID) {
  96 + this.FBillTypeID = FBillTypeID;
  97 + }
  98 +
  99 + @JsonProperty("FSETTLEORGID")
  100 + public FSETTLEORGID getFSETTLEORGID() {
  101 + return FSETTLEORGID;
  102 + }
  103 +
  104 + public void setFSETTLEORGID(FSETTLEORGID FSETTLEORGID) {
  105 + this.FSETTLEORGID = FSETTLEORGID;
  106 + }
  107 +
  108 + @JsonProperty("FCURRENCYID")
  109 + public FCURRENCYID getFCURRENCYID() {
  110 + return FCURRENCYID;
  111 + }
  112 +
  113 + public void setFCURRENCYID(FCURRENCYID FCURRENCYID) {
  114 + this.FCURRENCYID = FCURRENCYID;
  115 + }
  116 +
  117 + @JsonProperty("FCUSTOMERID")
  118 + public FCUSTOMERID getFCUSTOMERID() {
  119 + return FCUSTOMERID;
  120 + }
  121 +
  122 + public void setFCUSTOMERID(FCUSTOMERID FCUSTOMERID) {
  123 + this.FCUSTOMERID = FCUSTOMERID;
  124 + }
  125 +
  126 + @JsonProperty("FSALEORGID")
  127 + public FSALEORGID getFSALEORGID() {
  128 + return FSALEORGID;
  129 + }
  130 +
  131 + public void setFSALEORGID(FSALEORGID FSALEORGID) {
  132 + this.FSALEORGID = FSALEORGID;
  133 + }
  134 +
  135 + @JsonProperty("FSALEDEPTID")
  136 + public FSALEDEPTID getFSALEDEPTID() {
  137 + return FSALEDEPTID;
  138 + }
  139 +
  140 + public void setFSALEDEPTID(FSALEDEPTID FSALEDEPTID) {
  141 + this.FSALEDEPTID = FSALEDEPTID;
  142 + }
  143 +
  144 + @JsonProperty("FPAYORGID")
  145 + public FPAYORGID getFPAYORGID() {
  146 + return FPAYORGID;
  147 + }
  148 +
  149 + public void setFPAYORGID(FPAYORGID FPAYORGID) {
  150 + this.FPAYORGID = FPAYORGID;
  151 + }
  152 +
  153 + @JsonProperty("FTRANSFERID")
  154 + public FTRANSFERID getFTRANSFERID() {
  155 + return FTRANSFERID;
  156 + }
  157 +
  158 + public void setFTRANSFERID(FTRANSFERID FTRANSFERID) {
  159 + this.FTRANSFERID = FTRANSFERID;
  160 + }
  161 +
  162 + @JsonProperty("FORDERID")
  163 + public FORDERID getFORDERID() {
  164 + return FORDERID;
  165 + }
  166 +
  167 + public void setFORDERID(FORDERID FORDERID) {
  168 + this.FORDERID = FORDERID;
  169 + }
  170 +
  171 + @JsonProperty("FMAINBOOKSTDCURRID")
  172 + public FMAINBOOKSTDCURRID getFMAINBOOKSTDCURRID() {
  173 + return FMAINBOOKSTDCURRID;
  174 + }
  175 +
  176 + public void setFMAINBOOKSTDCURRID(FMAINBOOKSTDCURRID FMAINBOOKSTDCURRID) {
  177 + this.FMAINBOOKSTDCURRID = FMAINBOOKSTDCURRID;
  178 + }
  179 +
  180 + @JsonProperty("FCOSTID")
  181 + public FCOSTID getFCOSTID() {
  182 + return FCOSTID;
  183 + }
  184 +
  185 + public void setFCOSTID(FCOSTID FCOSTID) {
  186 + this.FCOSTID = FCOSTID;
  187 + }
  188 +
  189 + @JsonProperty("FASSETID")
  190 + public FASSETID getFASSETID() {
  191 + return FASSETID;
  192 + }
  193 +
  194 + public void setFASSETID(FASSETID FASSETID) {
  195 + this.FASSETID = FASSETID;
  196 + }
  197 +
  198 + @JsonProperty("FChargeId")
  199 + public FChargeId getFChargeId() {
  200 + return FChargeId;
  201 + }
  202 +
  203 + public void setFChargeId(FChargeId FChargeId) {
  204 + this.FChargeId = FChargeId;
  205 + }
  206 +
  207 + @JsonProperty("FSettleTypeID")
  208 + public FSettleTypeID getFSettleTypeID() {
  209 + return FSettleTypeID;
  210 + }
  211 +
  212 + public void setFSettleTypeID(FSettleTypeID FSettleTypeID) {
  213 + this.FSettleTypeID = FSettleTypeID;
  214 + }
  215 +}
... ...
etrade-thirdparty/src/main/java/com/diligrp/etrade/thirdparty/domain/co/business/BusinessBillCo.java 0 → 100644
  1 +package com.diligrp.etrade.thirdparty.domain.co.business;
  2 +
  3 +import com.fasterxml.jackson.annotation.JsonProperty;
  4 +
  5 +import java.math.BigDecimal;
  6 +
  7 +/**
  8 + * @Author: zhangmeiyang
  9 + * @CreateTime: 2024-10-14 10:55
  10 + * @Version: todo
  11 + */
  12 +public class BusinessBillCo extends BaseBillCo{
  13 + private BigDecimal FNoTaxAmountFor_D;
  14 +
  15 + @JsonProperty("FNoTaxAmountFor_D")
  16 + public BigDecimal getFNoTaxAmountFor_D() {
  17 + return FNoTaxAmountFor_D;
  18 + }
  19 +
  20 + public void setFNoTaxAmountFor_D(BigDecimal FNoTaxAmountFor_D) {
  21 + this.FNoTaxAmountFor_D = FNoTaxAmountFor_D;
  22 + }
  23 +}
... ...
etrade-thirdparty/src/main/java/com/diligrp/etrade/thirdparty/domain/co/business/CardBillCo.java 0 → 100644
  1 +package com.diligrp.etrade.thirdparty.domain.co.business;
  2 +
  3 +import com.fasterxml.jackson.annotation.JsonProperty;
  4 +
  5 +/**
  6 + * @Author: zhangmeiyang
  7 + * @CreateTime: 2024-10-10 14:23
  8 + * @Version: todo
  9 + */
  10 +public class CardBillCo extends BaseBillCo {
  11 + private String F_ZDB_Text;
  12 + private String F_PZCW_Text;
  13 +
  14 + @JsonProperty("F_ZDB_Text")
  15 + public String getF_ZDB_Text() {
  16 + return F_ZDB_Text;
  17 + }
  18 +
  19 + public void setF_ZDB_Text(String f_ZDB_Text) {
  20 + F_ZDB_Text = f_ZDB_Text;
  21 + }
  22 +
  23 + @JsonProperty("F_PZCW_Text")
  24 + public String getF_PZCW_Text() {
  25 + return F_PZCW_Text;
  26 + }
  27 +
  28 + public void setF_PZCW_Text(String f_PZCW_Text) {
  29 + F_PZCW_Text = f_PZCW_Text;
  30 + }
  31 +}
  32 +
  33 +
  34 +
... ...
etrade-thirdparty/src/main/java/com/diligrp/etrade/thirdparty/domain/co/business/EntranceFeeBillCo.java 0 → 100644
  1 +package com.diligrp.etrade.thirdparty.domain.co.business;
  2 +
  3 +import com.fasterxml.jackson.annotation.JsonProperty;
  4 +
  5 +import java.math.BigDecimal;
  6 +
  7 +/**
  8 + * @Author: zhangmeiyang
  9 + * @CreateTime: 2024-10-10 10:17
  10 + * @Version: todo
  11 + */
  12 +public class EntranceFeeBillCo extends BaseBillCo{
  13 + private BigDecimal FNoTaxAmountFor_D;
  14 +
  15 + @JsonProperty("FNoTaxAmountFor_D")
  16 + public BigDecimal getFNoTaxAmountFor_D() {
  17 + return FNoTaxAmountFor_D;
  18 + }
  19 +
  20 + public void setFNoTaxAmountFor_D(BigDecimal FNoTaxAmountFor_D) {
  21 + this.FNoTaxAmountFor_D = FNoTaxAmountFor_D;
  22 + }
  23 +
  24 +}
... ...
etrade-thirdparty/src/main/java/com/diligrp/etrade/thirdparty/domain/co/business/RefrigeratorBillCo.java 0 → 100644
  1 +package com.diligrp.etrade.thirdparty.domain.co.business;
  2 +
  3 +import com.fasterxml.jackson.annotation.JsonProperty;
  4 +
  5 +import java.math.BigDecimal;
  6 +
  7 +/**
  8 + * @Author: zhangmeiyang
  9 + * @CreateTime: 2024-10-10 14:18
  10 + * @Version: todo
  11 + */
  12 +public class RefrigeratorBillCo extends BaseBillCo {
  13 + private BigDecimal FNoTaxAmountFor_D;
  14 +
  15 + @JsonProperty("FNoTaxAmountFor_D")
  16 + public BigDecimal getFNoTaxAmountFor_D() {
  17 + return FNoTaxAmountFor_D;
  18 + }
  19 +
  20 + public void setFNoTaxAmountFor_D(BigDecimal FNoTaxAmountFor_D) {
  21 + this.FNoTaxAmountFor_D = FNoTaxAmountFor_D;
  22 + }
  23 +
  24 +}
... ...
etrade-thirdparty/src/main/java/com/diligrp/etrade/thirdparty/domain/co/business/SettleBillCo.java 0 → 100644
  1 +package com.diligrp.etrade.thirdparty.domain.co.business;
  2 +
  3 +import com.fasterxml.jackson.annotation.JsonProperty;
  4 +
  5 +/**
  6 + * @Author: zhangmeiyang
  7 + * @CreateTime: 2024-10-10 14:23
  8 + * @Version: todo
  9 + */
  10 +public class SettleBillCo extends BaseBillCo {
  11 + private String F_ZDB_Text;
  12 + private String F_PZCW_Text;
  13 +
  14 + @JsonProperty("F_ZDB_Text")
  15 + public String getF_ZDB_Text() {
  16 + return F_ZDB_Text;
  17 + }
  18 +
  19 + public void setF_ZDB_Text(String f_ZDB_Text) {
  20 + F_ZDB_Text = f_ZDB_Text;
  21 + }
  22 +
  23 + @JsonProperty("F_PZCW_Text")
  24 + public String getF_PZCW_Text() {
  25 + return F_PZCW_Text;
  26 + }
  27 +
  28 + public void setF_PZCW_Text(String f_PZCW_Text) {
  29 + F_PZCW_Text = f_PZCW_Text;
  30 + }
  31 +
  32 +}
  33 +
... ...
etrade-thirdparty/src/main/java/com/diligrp/etrade/thirdparty/domain/co/business/WeighingBillCo.java 0 → 100644
  1 +package com.diligrp.etrade.thirdparty.domain.co.business;
  2 +
  3 +import com.fasterxml.jackson.annotation.JsonProperty;
  4 +
  5 +import java.math.BigDecimal;
  6 +
  7 +/**
  8 + * @Author: zhangmeiyang
  9 + * @CreateTime: 2024-10-10 11:08
  10 + * @Version: todo
  11 + */
  12 +public class WeighingBillCo extends BaseBillCo {
  13 + private BigDecimal FNoTaxAmountFor_D;
  14 +
  15 + @JsonProperty("FNoTaxAmountFor_D")
  16 + public BigDecimal getFNoTaxAmountFor_D() {
  17 + return FNoTaxAmountFor_D;
  18 + }
  19 +
  20 + public void setFNoTaxAmountFor_D(BigDecimal FNoTaxAmountFor_D) {
  21 + this.FNoTaxAmountFor_D = FNoTaxAmountFor_D;
  22 + }
  23 +
  24 +}
... ...
etrade-thirdparty/src/main/java/com/diligrp/etrade/thirdparty/domain/dto/BaseConfigDto.java 0 → 100644
  1 +package com.diligrp.etrade.thirdparty.domain.dto;
  2 +
  3 +/**
  4 + * @Author: zhangmeiyang
  5 + * @CreateTime: 2024-10-22 14:36
  6 + * @Version: todo
  7 + */
  8 +public class BaseConfigDto {
  9 + private String currency;
  10 + private String syncItem;
  11 +
  12 + public String getCurrency() {
  13 + return currency;
  14 + }
  15 +
  16 + public void setCurrency(String currency) {
  17 + this.currency = currency;
  18 + }
  19 +
  20 + public String getSyncItem() {
  21 + return syncItem;
  22 + }
  23 +
  24 + public void setSyncItem(String syncItem) {
  25 + this.syncItem = syncItem;
  26 + }
  27 +}
... ...
etrade-thirdparty/src/main/java/com/diligrp/etrade/thirdparty/domain/dto/BusinessDetailDto.java 0 → 100644
  1 +package com.diligrp.etrade.thirdparty.domain.dto;
  2 +
  3 +import com.diligrp.etrade.thirdparty.type.SelectType;
  4 +
  5 +/**
  6 + * @author zhangmeiyang
  7 + * @Author: zhangmeiyang
  8 + * @CreateTime: 2024-10-21 10:29
  9 + * @Version: todo
  10 + * @date 2024/10/22
  11 + */
  12 +public class BusinessDetailDto {
  13 + private String code;
  14 + private String name;
  15 + private SelectType selectType;
  16 + private String itemCode;
  17 + private String itemName;
  18 + private Long itemRelationId;
  19 + private String itemValue;
  20 +
  21 + public String getCode() {
  22 + return code;
  23 + }
  24 +
  25 + public void setCode(String code) {
  26 + this.code = code;
  27 + }
  28 +
  29 + public String getName() {
  30 + return name;
  31 + }
  32 +
  33 + public void setName(String name) {
  34 + this.name = name;
  35 + }
  36 +
  37 + public SelectType getSelectType() {
  38 + return selectType;
  39 + }
  40 +
  41 + public void setSelectType(SelectType selectType) {
  42 + this.selectType = selectType;
  43 + }
  44 +
  45 + public String getItemCode() {
  46 + return itemCode;
  47 + }
  48 +
  49 + public void setItemCode(String itemCode) {
  50 + this.itemCode = itemCode;
  51 + }
  52 +
  53 + public String getItemName() {
  54 + return itemName;
  55 + }
  56 +
  57 + public void setItemName(String itemName) {
  58 + this.itemName = itemName;
  59 + }
  60 +
  61 + public Long getItemRelationId() {
  62 + return itemRelationId;
  63 + }
  64 +
  65 + public void setItemRelationId(Long itemRelationId) {
  66 + this.itemRelationId = itemRelationId;
  67 + }
  68 +
  69 + public String getItemValue() {
  70 + return itemValue;
  71 + }
  72 +
  73 + public void setItemValue(String itemValue) {
  74 + this.itemValue = itemValue;
  75 + }
  76 +}
... ...
etrade-thirdparty/src/main/java/com/diligrp/etrade/thirdparty/domain/dto/ChargeItemDto.java 0 → 100644
  1 +package com.diligrp.etrade.thirdparty.domain.dto;
  2 +
  3 +/**
  4 + * @Author: zhangmeiyang
  5 + * @CreateTime: 2024-10-22 16:34
  6 + * @Version: todo
  7 + */
  8 +public class ChargeItemDto {
  9 + private Long id;
  10 + private String businessType;
  11 +}
... ...
etrade-thirdparty/src/main/java/com/diligrp/etrade/thirdparty/domain/dto/ClientDto.java 0 → 100644
  1 +package com.diligrp.etrade.thirdparty.domain.dto;
  2 +
  3 +/**
  4 + * @Author: zhangmeiyang
  5 + * @CreateTime: 2024-10-21 10:12
  6 + * @Version: todo
  7 + */
  8 +public class ClientDto {
  9 + private String dataCentreId;
  10 + private String applyId;
  11 + private String securityKey;
  12 + private String serviceAddress;
  13 + private String username;
  14 + private String organization;
  15 +
  16 + public String getDataCentreId() {
  17 + return dataCentreId;
  18 + }
  19 +
  20 + public void setDataCentreId(String dataCentreId) {
  21 + this.dataCentreId = dataCentreId;
  22 + }
  23 +
  24 + public String getApplyId() {
  25 + return applyId;
  26 + }
  27 +
  28 + public void setApplyId(String applyId) {
  29 + this.applyId = applyId;
  30 + }
  31 +
  32 + public String getSecurityKey() {
  33 + return securityKey;
  34 + }
  35 +
  36 + public void setSecurityKey(String securityKey) {
  37 + this.securityKey = securityKey;
  38 + }
  39 +
  40 + public String getServiceAddress() {
  41 + return serviceAddress;
  42 + }
  43 +
  44 + public void setServiceAddress(String serviceAddress) {
  45 + this.serviceAddress = serviceAddress;
  46 + }
  47 +
  48 + public String getUsername() {
  49 + return username;
  50 + }
  51 +
  52 + public void setUsername(String username) {
  53 + this.username = username;
  54 + }
  55 +
  56 + public String getOrganization() {
  57 + return organization;
  58 + }
  59 +
  60 + public void setOrganization(String organization) {
  61 + this.organization = organization;
  62 + }
  63 +}
... ...
etrade-thirdparty/src/main/java/com/diligrp/etrade/thirdparty/domain/dto/CustomerDto.java 0 → 100644
  1 +package com.diligrp.etrade.thirdparty.domain.dto;
  2 +
  3 +/**
  4 + * @Author: zhangmeiyang
  5 + * @CreateTime: 2024-10-22 16:29
  6 + * @Version: todo
  7 + */
  8 +public class CustomerDto {
  9 + private String code;
  10 + private Long id;
  11 +
  12 + public String getCode() {
  13 + return code;
  14 + }
  15 +
  16 + public void setCode(String code) {
  17 + this.code = code;
  18 + }
  19 +
  20 + public Long getId() {
  21 + return id;
  22 + }
  23 +
  24 + public void setId(Long id) {
  25 + this.id = id;
  26 + }
  27 +}
... ...
etrade-thirdparty/src/main/java/com/diligrp/etrade/thirdparty/domain/dto/DepartmentDto.java 0 → 100644
  1 +package com.diligrp.etrade.thirdparty.domain.dto;
  2 +
  3 +/**
  4 + * @Author: zhangmeiyang
  5 + * @CreateTime: 2024-10-22 14:13
  6 + * @Version: todo
  7 + */
  8 +public class DepartmentDto {
  9 + private Long id;
  10 + private String departmentCode;
  11 + private String departmentName;
  12 +
  13 + public Long getId() {
  14 + return id;
  15 + }
  16 +
  17 + public void setId(Long id) {
  18 + this.id = id;
  19 + }
  20 +
  21 + public String getDepartmentCode() {
  22 + return departmentCode;
  23 + }
  24 +
  25 + public void setDepartmentCode(String departmentCode) {
  26 + this.departmentCode = departmentCode;
  27 + }
  28 +
  29 + public String getDepartmentName() {
  30 + return departmentName;
  31 + }
  32 +
  33 + public void setDepartmentName(String departmentName) {
  34 + this.departmentName = departmentName;
  35 + }
  36 +}
... ...
etrade-thirdparty/src/main/java/com/diligrp/etrade/thirdparty/domain/dto/MappingDto.java 0 → 100644
  1 +package com.diligrp.etrade.thirdparty.domain.dto;
  2 +
  3 +/**
  4 + * @Author: zhangmeiyang
  5 + * @CreateTime: 2024-10-24 10:13
  6 + * @Version: todo
  7 + */
  8 +public class MappingDto {
  9 + private Long id;
  10 + private Long marketId;
  11 + private String systemCode;
  12 + private String business;
  13 + private Long systemDataId;
  14 + private Long thirdPartyDataId;
  15 +
  16 + public Long getId() {
  17 + return id;
  18 + }
  19 +
  20 + public void setId(Long id) {
  21 + this.id = id;
  22 + }
  23 +
  24 + public Long getMarketId() {
  25 + return marketId;
  26 + }
  27 +
  28 + public void setMarketId(Long marketId) {
  29 + this.marketId = marketId;
  30 + }
  31 +
  32 + public String getSystemCode() {
  33 + return systemCode;
  34 + }
  35 +
  36 + public void setSystemCode(String systemCode) {
  37 + this.systemCode = systemCode;
  38 + }
  39 +
  40 + public String getBusiness() {
  41 + return business;
  42 + }
  43 +
  44 + public void setBusiness(String business) {
  45 + this.business = business;
  46 + }
  47 +
  48 + public Long getSystemDataId() {
  49 + return systemDataId;
  50 + }
  51 +
  52 + public void setSystemDataId(Long systemDataId) {
  53 + this.systemDataId = systemDataId;
  54 + }
  55 +
  56 + public Long getThirdPartyDataId() {
  57 + return thirdPartyDataId;
  58 + }
  59 +
  60 + public void setThirdPartyDataId(Long thirdPartyDataId) {
  61 + this.thirdPartyDataId = thirdPartyDataId;
  62 + }
  63 +}
... ...
etrade-thirdparty/src/main/java/com/diligrp/etrade/thirdparty/domain/model/FASSETID.java 0 → 100644
  1 +package com.diligrp.etrade.thirdparty.domain.model;
  2 +
  3 +import com.fasterxml.jackson.annotation.JsonProperty;
  4 +
  5 +/**
  6 + * @Author: zhangmeiyang
  7 + * @CreateTime: 2024-10-10 10:04
  8 + * @Version: todo
  9 + */
  10 +public class FASSETID {
  11 + private String FNUMBER;
  12 +
  13 + @JsonProperty("FNUMBER")
  14 + public String getFNUMBER() {
  15 + return FNUMBER;
  16 + }
  17 +
  18 + public void setFNUMBER(String FNUMBER) {
  19 + this.FNUMBER = FNUMBER;
  20 + }
  21 +}
... ...
etrade-thirdparty/src/main/java/com/diligrp/etrade/thirdparty/domain/model/FBillFormID.java 0 → 100644
  1 +package com.diligrp.etrade.thirdparty.domain.model;
  2 +
  3 +import com.fasterxml.jackson.annotation.JsonProperty;
  4 +
  5 +/**
  6 + * @Author: zhangmeiyang
  7 + * @CreateTime: 2024-10-23 15:15
  8 + * @Version: todo
  9 + */
  10 +public class FBillFormID {
  11 + private String FNumber;
  12 +
  13 + @JsonProperty("FNumber")
  14 + public String getFNumber() {
  15 + return FNumber;
  16 + }
  17 +
  18 + public void setFNumber(String FNumber) {
  19 + this.FNumber = FNumber;
  20 + }
  21 +}
... ...
etrade-thirdparty/src/main/java/com/diligrp/etrade/thirdparty/domain/model/FBillTypeID.java 0 → 100644
  1 +package com.diligrp.etrade.thirdparty.domain.model;
  2 +
  3 +import com.fasterxml.jackson.annotation.JsonProperty;
  4 +
  5 +/**
  6 + * @Author: zhangmeiyang
  7 + * @CreateTime: 2024-10-09 10:26
  8 + * @Version: todo
  9 + */
  10 +public class FBillTypeID {
  11 + private String FNUMBER;
  12 +
  13 + @JsonProperty("FNUMBER")
  14 + public String getFNUMBER() {
  15 + return FNUMBER;
  16 + }
  17 +
  18 + public void setFNUMBER(String FNUMBER) {
  19 + this.FNUMBER = FNUMBER;
  20 + }
  21 +}
... ...
etrade-thirdparty/src/main/java/com/diligrp/etrade/thirdparty/domain/model/FCOSTID.java 0 → 100644
  1 +package com.diligrp.etrade.thirdparty.domain.model;
  2 +
  3 +import com.fasterxml.jackson.annotation.JsonProperty;
  4 +
  5 +/**
  6 + * @Author: zhangmeiyang
  7 + * @CreateTime: 2024-10-10 10:03
  8 + * @Version: todo
  9 + */
  10 +public class FCOSTID {
  11 + private String FNUMBER;
  12 +
  13 + @JsonProperty("FNUMBER")
  14 + public String getFNUMBER() {
  15 + return FNUMBER;
  16 + }
  17 +
  18 + public void setFNUMBER(String FNUMBER) {
  19 + this.FNUMBER = FNUMBER;
  20 + }
  21 +}
... ...
etrade-thirdparty/src/main/java/com/diligrp/etrade/thirdparty/domain/model/FCOUNTRY.java 0 → 100644
  1 +package com.diligrp.etrade.thirdparty.domain.model;
  2 +
  3 +import com.fasterxml.jackson.annotation.JsonProperty;
  4 +
  5 +/**
  6 + * @Author: zhangmeiyang
  7 + * @CreateTime: 2024-10-23 15:15
  8 + * @Version: todo
  9 + */
  10 +public class FCOUNTRY {
  11 + private String FNumber;
  12 +
  13 + @JsonProperty("FNumber")
  14 + public String getFNumber() {
  15 + return FNumber;
  16 + }
  17 +
  18 + public void setFNumber(String FNumber) {
  19 + this.FNumber = FNumber;
  20 + }
  21 +}
... ...
etrade-thirdparty/src/main/java/com/diligrp/etrade/thirdparty/domain/model/FCURRENCYID.java 0 → 100644
  1 +package com.diligrp.etrade.thirdparty.domain.model;
  2 +
  3 +import com.fasterxml.jackson.annotation.JsonProperty;
  4 +
  5 +/**
  6 + * @Author: zhangmeiyang
  7 + * @CreateTime: 2024-10-09 10:25
  8 + * @Version: todo
  9 + */
  10 +public class FCURRENCYID {
  11 +
  12 + private String FNumber;
  13 +
  14 + @JsonProperty("FNumber")
  15 + public String getFNumber() {
  16 + return FNumber;
  17 + }
  18 +
  19 + public void setFNumber(String FNumber) {
  20 + this.FNumber = FNumber;
  21 + }
  22 +}
... ...
etrade-thirdparty/src/main/java/com/diligrp/etrade/thirdparty/domain/model/FCUSTOMERID.java 0 → 100644
  1 +package com.diligrp.etrade.thirdparty.domain.model;
  2 +
  3 +import com.fasterxml.jackson.annotation.JsonProperty;
  4 +
  5 +/**
  6 + * @Author: zhangmeiyang
  7 + * @CreateTime: 2024-10-10 10:00
  8 + * @Version: todo
  9 + */
  10 +public class FCUSTOMERID {
  11 +
  12 + private String FNumber;
  13 +
  14 + @JsonProperty("FNumber")
  15 + public String getFNumber() {
  16 + return FNumber;
  17 + }
  18 +
  19 + public void setFNumber(String FNumber) {
  20 + this.FNumber = FNumber;
  21 + }
  22 +}
... ...
etrade-thirdparty/src/main/java/com/diligrp/etrade/thirdparty/domain/model/FChargeId.java 0 → 100644
  1 +package com.diligrp.etrade.thirdparty.domain.model;
  2 +
  3 +import com.fasterxml.jackson.annotation.JsonProperty;
  4 +
  5 +/**
  6 + * @Author: zhangmeiyang
  7 + * @CreateTime: 2024-10-10 10:06
  8 + * @Version: todo
  9 + */
  10 +public class FChargeId {
  11 + private String FNumber;
  12 +
  13 + @JsonProperty("FNumber")
  14 + public String getFNumber() {
  15 + return FNumber;
  16 + }
  17 +
  18 + public void setFNumber(String FNumber) {
  19 + this.FNumber = FNumber;
  20 + }
  21 +}
... ...
etrade-thirdparty/src/main/java/com/diligrp/etrade/thirdparty/domain/model/FContactId.java 0 → 100644
  1 +package com.diligrp.etrade.thirdparty.domain.model;
  2 +
  3 +import com.fasterxml.jackson.annotation.JsonProperty;
  4 +
  5 +/**
  6 + * @Author: zhangmeiyang
  7 + * @CreateTime: 2024-10-23 17:56
  8 + * @Version: todo
  9 + */
  10 +public class FContactId {
  11 + private String FNUMBER;
  12 +
  13 + @JsonProperty("FNUMBER")
  14 + public String getFNUMBER() {
  15 + return FNUMBER;
  16 + }
  17 +
  18 + public void setFNUMBER(String FNUMBER) {
  19 + this.FNUMBER = FNUMBER;
  20 + }
  21 +}
... ...
etrade-thirdparty/src/main/java/com/diligrp/etrade/thirdparty/domain/model/FCreateOrgId.java 0 → 100644
  1 +package com.diligrp.etrade.thirdparty.domain.model;
  2 +
  3 +import com.fasterxml.jackson.annotation.JsonProperty;
  4 +
  5 +/**
  6 + * @Author: zhangmeiyang
  7 + * @CreateTime: 2024-10-23 15:15
  8 + * @Version: todo
  9 + */
  10 +public class FCreateOrgId {
  11 + private String FNumber;
  12 +
  13 + @JsonProperty("FNumber")
  14 + public String getFNumber() {
  15 + return FNumber;
  16 + }
  17 +
  18 + public void setFNumber(String FNumber) {
  19 + this.FNumber = FNumber;
  20 + }
  21 +}
... ...
etrade-thirdparty/src/main/java/com/diligrp/etrade/thirdparty/domain/model/FGroup.java 0 → 100644
  1 +package com.diligrp.etrade.thirdparty.domain.model;
  2 +
  3 +import com.fasterxml.jackson.annotation.JsonProperty;
  4 +
  5 +/**
  6 + * @Author: zhangmeiyang
  7 + * @CreateTime: 2024-10-23 15:15
  8 + * @Version: todo
  9 + */
  10 +public class FGroup {
  11 + private String FNumber;
  12 +
  13 + @JsonProperty("FNumber")
  14 + public String getFNumber() {
  15 + return FNumber;
  16 + }
  17 +
  18 + public void setFNumber(String FNumber) {
  19 + this.FNumber = FNumber;
  20 + }
  21 +}
... ...
etrade-thirdparty/src/main/java/com/diligrp/etrade/thirdparty/domain/model/FMAINBOOKSTDCURRID.java 0 → 100644
  1 +package com.diligrp.etrade.thirdparty.domain.model;
  2 +
  3 +import com.fasterxml.jackson.annotation.JsonProperty;
  4 +
  5 +/**
  6 + * @Author: zhangmeiyang
  7 + * @CreateTime: 2024-10-10 10:06
  8 + * @Version: todo
  9 + */
  10 +public class FMAINBOOKSTDCURRID {
  11 +
  12 + private String FNumber;
  13 +
  14 + @JsonProperty("FNumber")
  15 + public String getFNumber() {
  16 + return FNumber;
  17 + }
  18 +
  19 + public void setFNumber(String FNumber) {
  20 + this.FNumber = FNumber;
  21 + }
  22 +}
... ...
etrade-thirdparty/src/main/java/com/diligrp/etrade/thirdparty/domain/model/FORDERID.java 0 → 100644
  1 +package com.diligrp.etrade.thirdparty.domain.model;
  2 +
  3 +import com.fasterxml.jackson.annotation.JsonProperty;
  4 +
  5 +/**
  6 + * @Author: zhangmeiyang
  7 + * @CreateTime: 2024-10-10 10:06
  8 + * @Version: todo
  9 + */
  10 +public class FORDERID {
  11 + private String FNumber;
  12 +
  13 + @JsonProperty("FNumber")
  14 + public String getFNumber() {
  15 + return FNumber;
  16 + }
  17 +
  18 + public void setFNumber(String FNumber) {
  19 + this.FNumber = FNumber;
  20 + }
  21 +}
... ...
etrade-thirdparty/src/main/java/com/diligrp/etrade/thirdparty/domain/model/FPAYORGID.java 0 → 100644
  1 +package com.diligrp.etrade.thirdparty.domain.model;
  2 +
  3 +import com.fasterxml.jackson.annotation.JsonProperty;
  4 +
  5 +/**
  6 + * @Author: zhangmeiyang
  7 + * @CreateTime: 2024-10-10 10:01
  8 + * @Version: todo
  9 + */
  10 +public class FPAYORGID {
  11 +
  12 + private String FNumber;
  13 +
  14 + @JsonProperty("FNumber")
  15 + public String getFNumber() {
  16 + return FNumber;
  17 + }
  18 +
  19 + public void setFNumber(String FNumber) {
  20 + this.FNumber = FNumber;
  21 + }
  22 +}
... ...
etrade-thirdparty/src/main/java/com/diligrp/etrade/thirdparty/domain/model/FPROVINCIAL.java 0 → 100644
  1 +package com.diligrp.etrade.thirdparty.domain.model;
  2 +
  3 +import com.fasterxml.jackson.annotation.JsonProperty;
  4 +
  5 +/**
  6 + * @Author: zhangmeiyang
  7 + * @CreateTime: 2024-10-23 15:15
  8 + * @Version: todo
  9 + */
  10 +public class FPROVINCIAL {
  11 + private String FNumber;
  12 +
  13 + @JsonProperty("FNumber")
  14 + public String getFNumber() {
  15 + return FNumber;
  16 + }
  17 +
  18 + public void setFNumber(String FNumber) {
  19 + this.FNumber = FNumber;
  20 + }
  21 +}
... ...
etrade-thirdparty/src/main/java/com/diligrp/etrade/thirdparty/domain/model/FSALEDEPTID.java 0 → 100644
  1 +package com.diligrp.etrade.thirdparty.domain.model;
  2 +
  3 +import com.fasterxml.jackson.annotation.JsonProperty;
  4 +
  5 +/**
  6 + * @Author: zhangmeiyang
  7 + * @CreateTime: 2024-10-10 10:01
  8 + * @Version: todo
  9 + */
  10 +public class FSALEDEPTID {
  11 + private String FNumber;
  12 +
  13 + @JsonProperty("FNumber")
  14 + public String getFNumber() {
  15 + return FNumber;
  16 + }
  17 +
  18 + public void setFNumber(String FNumber) {
  19 + this.FNumber = FNumber;
  20 + }
  21 +}
... ...
etrade-thirdparty/src/main/java/com/diligrp/etrade/thirdparty/domain/model/FSALEORGID.java 0 → 100644
  1 +package com.diligrp.etrade.thirdparty.domain.model;
  2 +
  3 +import com.fasterxml.jackson.annotation.JsonProperty;
  4 +
  5 +/**
  6 + * @Author: zhangmeiyang
  7 + * @CreateTime: 2024-10-10 10:00
  8 + * @Version: todo
  9 + */
  10 +public class FSALEORGID {
  11 +
  12 + private String FNumber;
  13 +
  14 + @JsonProperty("FNumber")
  15 + public String getFNumber() {
  16 + return FNumber;
  17 + }
  18 +
  19 + public void setFNumber(String FNumber) {
  20 + this.FNumber = FNumber;
  21 + }
  22 +}
... ...
etrade-thirdparty/src/main/java/com/diligrp/etrade/thirdparty/domain/model/FSETTLEORGID.java 0 → 100644
  1 +package com.diligrp.etrade.thirdparty.domain.model;
  2 +
  3 +import com.fasterxml.jackson.annotation.JsonProperty;
  4 +
  5 +/**
  6 + * @Author: zhangmeiyang
  7 + * @CreateTime: 2024-10-09 10:24
  8 + * @Version: todo
  9 + */
  10 +public class FSETTLEORGID {
  11 + private String FNumber;
  12 +
  13 + @JsonProperty("FNumber")
  14 + public String getFNumber() {
  15 + return FNumber;
  16 + }
  17 +
  18 + public void setFNumber(String FNumber) {
  19 + this.FNumber = FNumber;
  20 + }
  21 +}
... ...
etrade-thirdparty/src/main/java/com/diligrp/etrade/thirdparty/domain/model/FSettleTypeID.java 0 → 100644
  1 +package com.diligrp.etrade.thirdparty.domain.model;
  2 +
  3 +import com.fasterxml.jackson.annotation.JsonProperty;
  4 +
  5 +/**
  6 + * @Author: zhangmeiyang
  7 + * @CreateTime: 2024-10-10 10:06
  8 + * @Version: todo
  9 + */
  10 +public class FSettleTypeID {
  11 + private String FNumber;
  12 +
  13 + @JsonProperty("FNumber")
  14 + public String getFNumber() {
  15 + return FNumber;
  16 + }
  17 +
  18 + public void setFNumber(String FNumber) {
  19 + this.FNumber = FNumber;
  20 + }
  21 +}
... ...
etrade-thirdparty/src/main/java/com/diligrp/etrade/thirdparty/domain/model/FTRADINGCURRID.java 0 → 100644
  1 +package com.diligrp.etrade.thirdparty.domain.model;
  2 +
  3 +import com.fasterxml.jackson.annotation.JsonProperty;
  4 +
  5 +/**
  6 + * @Author: zhangmeiyang
  7 + * @CreateTime: 2024-10-23 15:15
  8 + * @Version: todo
  9 + */
  10 +public class FTRADINGCURRID {
  11 + private String FNumber;
  12 +
  13 + @JsonProperty("FNumber")
  14 + public String getFNumber() {
  15 + return FNumber;
  16 + }
  17 +
  18 + public void setFNumber(String FNumber) {
  19 + this.FNumber = FNumber;
  20 + }
  21 +}
... ...
etrade-thirdparty/src/main/java/com/diligrp/etrade/thirdparty/domain/model/FTRANSFERID.java 0 → 100644
  1 +package com.diligrp.etrade.thirdparty.domain.model;
  2 +
  3 +import com.fasterxml.jackson.annotation.JsonProperty;
  4 +
  5 +/**
  6 + * @Author: zhangmeiyang
  7 + * @CreateTime: 2024-10-10 10:05
  8 + * @Version: todo
  9 + */
  10 +public class FTRANSFERID {
  11 + private String FNumber;
  12 +
  13 + @JsonProperty("FNumber")
  14 + public String getFNumber() {
  15 + return FNumber;
  16 + }
  17 +
  18 + public void setFNumber(String FNumber) {
  19 + this.FNumber = FNumber;
  20 + }
  21 +}
... ...
etrade-thirdparty/src/main/java/com/diligrp/etrade/thirdparty/domain/model/FT_BD_CUSTLOCATION.java 0 → 100644
  1 +package com.diligrp.etrade.thirdparty.domain.model;
  2 +
  3 +
  4 +import com.fasterxml.jackson.annotation.JsonProperty;
  5 +
  6 +/**
  7 + * @Author: zhangmeiyang
  8 + * @CreateTime: 2024-10-23 16:01
  9 + * @Version: todo
  10 + */
  11 +public class FT_BD_CUSTLOCATION {
  12 + private FContactId FContactId;
  13 + private String FNumber;
  14 + private String FName;
  15 + private String FMobile;
  16 + private String FBizAddress;
  17 +
  18 + @JsonProperty("FContactId")
  19 + public FContactId getFContactId() {
  20 + return FContactId;
  21 + }
  22 +
  23 + public void setFContactId(FContactId FContactId) {
  24 + this.FContactId = FContactId;
  25 + }
  26 +
  27 + @JsonProperty("FNumber")
  28 + public String getFNumber() {
  29 + return FNumber;
  30 + }
  31 +
  32 + public void setFNumber(String FNumber) {
  33 + this.FNumber = FNumber;
  34 + }
  35 +
  36 + @JsonProperty("FName")
  37 + public String getFName() {
  38 + return FName;
  39 + }
  40 +
  41 + public void setFName(String FName) {
  42 + this.FName = FName;
  43 + }
  44 +
  45 + @JsonProperty("FMobile")
  46 + public String getFMobile() {
  47 + return FMobile;
  48 + }
  49 +
  50 + public void setFMobile(String FMobile) {
  51 + this.FMobile = FMobile;
  52 + }
  53 +
  54 + @JsonProperty("FBizAddress")
  55 + public String getFBizAddress() {
  56 + return FBizAddress;
  57 + }
  58 +
  59 + public void setFBizAddress(String FBizAddress) {
  60 + this.FBizAddress = FBizAddress;
  61 + }
  62 +}
... ...
etrade-thirdparty/src/main/java/com/diligrp/etrade/thirdparty/domain/model/FUseOrgId.java 0 → 100644
  1 +package com.diligrp.etrade.thirdparty.domain.model;
  2 +
  3 +import com.fasterxml.jackson.annotation.JsonProperty;
  4 +
  5 +/**
  6 + * @Author: zhangmeiyang
  7 + * @CreateTime: 2024-10-23 15:15
  8 + * @Version: todo
  9 + */
  10 +public class FUseOrgId {
  11 + private String FNumber;
  12 +
  13 + @JsonProperty("FNumber")
  14 + public String getFNumber() {
  15 + return FNumber;
  16 + }
  17 +
  18 + public void setFNumber(String FNumber) {
  19 + this.FNumber = FNumber;
  20 + }
  21 +}
... ...
etrade-thirdparty/src/main/java/com/diligrp/etrade/thirdparty/domain/co/ErrorMessageCo.java renamed to etrade-thirdparty/src/main/java/com/diligrp/etrade/thirdparty/error/ErrorCo.java
1   -package com.diligrp.etrade.thirdparty.domain.co;
2   -
3   -import com.diligrp.etrade.thirdparty.type.BusinessEnum;
  1 +package com.diligrp.etrade.thirdparty.error;
4 2  
5 3 /**
6 4 * @Author: zhangmeiyang
7 5 * @CreateTime: 2024-09-10 11:32
8 6 * @Version: todo
9 7 */
10   -public class ErrorMessageCo {
  8 +public class ErrorCo{
11 9 private String errorMessage;
12   -
13 10 private String content;
14   -
15   - private BusinessEnum business;
  11 + private String business;
  12 + private String systemCode;
  13 + private Long marketId;
16 14  
17 15 public String getContent() {
18 16 return content;
... ... @@ -30,11 +28,27 @@ public class ErrorMessageCo {
30 28 this.errorMessage = errorMessage;
31 29 }
32 30  
33   - public BusinessEnum getBusiness() {
  31 + public String getBusiness() {
34 32 return business;
35 33 }
36 34  
37   - public void setBusiness(BusinessEnum business) {
  35 + public void setBusiness(String business) {
38 36 this.business = business;
39 37 }
  38 +
  39 + public String getSystemCode() {
  40 + return systemCode;
  41 + }
  42 +
  43 + public void setSystemCode(String systemCode) {
  44 + this.systemCode = systemCode;
  45 + }
  46 +
  47 + public Long getMarketId() {
  48 + return marketId;
  49 + }
  50 +
  51 + public void setMarketId(Long marketId) {
  52 + this.marketId = marketId;
  53 + }
40 54 }
... ...
etrade-thirdparty/src/main/java/com/diligrp/etrade/thirdparty/error/ThirdPartyException.java 0 → 100644
  1 +package com.diligrp.etrade.thirdparty.error;
  2 +
  3 +import com.diligrp.etrade.core.exception.PlatformServiceException;
  4 +
  5 +/**
  6 + * @Author: zhangmeiyang
  7 + * @CreateTime: 2024-10-15 11:32
  8 + * @Version: todo
  9 + */
  10 +public class ThirdPartyException extends PlatformServiceException {
  11 +
  12 + public ThirdPartyException(String message) {
  13 + super(message);
  14 + }
  15 +}
... ...
etrade-thirdparty/src/main/java/com/diligrp/etrade/thirdparty/exec/ZrHolder.java renamed to etrade-thirdparty/src/main/java/com/diligrp/etrade/thirdparty/exec/Holder.java
1 1 package com.diligrp.etrade.thirdparty.exec;
2 2  
3   -import com.diligrp.etrade.thirdparty.demarcate.AbstractBusinessHandler;
4   -import com.diligrp.etrade.thirdparty.demarcate.ErrorHandleInterface;
  3 +import com.diligrp.etrade.thirdparty.demarcate.AbstractBasicHandler;
  4 +import com.diligrp.etrade.thirdparty.demarcate.AbstractBillHandler;
  5 +import com.diligrp.etrade.thirdparty.type.BasicEnum;
5 6 import com.diligrp.etrade.thirdparty.type.BusinessEnum;
6 7 import jakarta.annotation.Resource;
7 8 import org.springframework.beans.factory.DisposableBean;
... ... @@ -18,29 +19,25 @@ import java.util.concurrent.ConcurrentHashMap;
18 19 * @Version: todo
19 20 */
20 21 @Component
21   -public class ZrHolder implements InitializingBean, DisposableBean {
  22 +public class Holder implements InitializingBean, DisposableBean {
22 23  
23 24 /**
24 25 * 上下文
25 26 */
26   - public final static Map<BusinessEnum, AbstractBusinessHandler<?>> CONTEXT = new ConcurrentHashMap<>();
  27 + public final static Map<BusinessEnum, AbstractBillHandler<?>> BUSINESS_CONTEXT = new ConcurrentHashMap<>();
  28 + public final static Map<BasicEnum, AbstractBasicHandler<?>> BASIC_CONTEXT = new ConcurrentHashMap<>();
27 29  
28 30  
29   - /**
30   - * 错误处理程序上下文
31   - */
32   - public final static Map<BusinessEnum, ErrorHandleInterface> ERROR_HANDLER_CONTEXT = new ConcurrentHashMap<>();
33   -
34 31 @Resource
35   - private List<AbstractBusinessHandler<?>> businessHandlers;
  32 + private List<AbstractBillHandler<?>> businessHandlers;
36 33  
37 34 @Resource
38   - private List<ErrorHandleInterface> errorHandleInterfaces;
  35 + private List<AbstractBasicHandler<?>> basicHandlers;
39 36  
40 37 @Override
41 38 public void afterPropertiesSet() {
42   - businessHandlers.forEach(e -> CONTEXT.put(e.getType(), e));
43   - errorHandleInterfaces.forEach(e -> ERROR_HANDLER_CONTEXT.put(e.getType(), e));
  39 + businessHandlers.forEach(e -> BUSINESS_CONTEXT.put(e.getType(), e));
  40 + basicHandlers.forEach(e -> BASIC_CONTEXT.put(e.getType(), e));
44 41 }
45 42  
46 43 @Override
... ...
etrade-thirdparty/src/main/java/com/diligrp/etrade/thirdparty/exec/basic/BasicAutoPush.java 0 → 100644
  1 +package com.diligrp.etrade.thirdparty.exec.basic;
  2 +
  3 +import org.springframework.amqp.core.*;
  4 +import org.springframework.beans.factory.annotation.Qualifier;
  5 +import org.springframework.context.annotation.Bean;
  6 +import org.springframework.context.annotation.Configuration;
  7 +
  8 +import java.util.HashMap;
  9 +import java.util.Map;
  10 +
  11 +/**
  12 + * @Author: zhangmeiyang
  13 + * @CreateTime: 2024-09-02 15:51
  14 + * @Version: todo
  15 + */
  16 +@Configuration
  17 +public class BasicAutoPush {
  18 + public static final String ZR_BASIC_NORMAL_EXCHANGE = "zr.normal.basic.exchange";
  19 + public static final String ZR_BASIC_NORMAL_QUEUE = "zr.normal.basic.queue";
  20 + public static final String ZR_BASIC_NORMAL_ROUTING = "zr.normal.basic.routing.process";
  21 + public static final String ZR_BASIC_DEAD_EXCHANGE = "zr.dead.basic.exchange";
  22 + public static final String ZR_BASIC_DEAD_EXCHANGE_TYPE = "x-delayed-message";
  23 + public static final String ZR_BASIC_DEAD_QUEUE = "zr.dead.basic.queue";
  24 +
  25 + @Bean("normalBasicExchange")
  26 + public DirectExchange normalExchange(){
  27 + return new DirectExchange(ZR_BASIC_NORMAL_EXCHANGE,true,false);
  28 + }
  29 +
  30 + @Bean("normalBasicQueue")
  31 + public Queue normalQueue(){
  32 + return new Queue(ZR_BASIC_NORMAL_QUEUE);
  33 + }
  34 +
  35 + @Bean("normalBasicBinding")
  36 + public Binding normalBinding(@Qualifier("normalBasicQueue") Queue normalQueue, @Qualifier("normalBasicExchange") DirectExchange normalExchange) {
  37 + return BindingBuilder.bind(normalQueue).to(normalExchange).with(ZR_BASIC_NORMAL_ROUTING);
  38 + }
  39 +
  40 + @Bean("dlxBasicCustomQueue")
  41 + public Queue dlxCustomQueue() {
  42 + return new Queue(ZR_BASIC_DEAD_QUEUE, true, false, false);
  43 + }
  44 +
  45 + @Bean("dlxBasicCustomExchange")
  46 + public CustomExchange dlxCustomExchange() {
  47 + Map<String, Object> args = new HashMap<>();
  48 + args.put("x-delayed-type", "direct");
  49 + return new CustomExchange(ZR_BASIC_DEAD_EXCHANGE, ZR_BASIC_DEAD_EXCHANGE_TYPE, true,false,args);
  50 + }
  51 +
  52 + @Bean("dlxBasicCustomBinding")
  53 + public Binding dlxCustomBinding(@Qualifier("dlxBasicCustomQueue") Queue queue, @Qualifier("dlxBasicCustomExchange") CustomExchange exchange) {
  54 + return BindingBuilder.bind(queue).to(exchange).with(ZR_BASIC_DEAD_QUEUE).noargs();
  55 + }
  56 +
  57 +}
... ...
etrade-thirdparty/src/main/java/com/diligrp/etrade/thirdparty/exec/basic/BasicReceiver.java 0 → 100644
  1 +package com.diligrp.etrade.thirdparty.exec.basic;
  2 +
  3 +import com.diligrp.etrade.core.util.JsonUtils;
  4 +import com.diligrp.etrade.thirdparty.demarcate.AbstractReceiver;
  5 +import com.diligrp.etrade.thirdparty.exec.Holder;
  6 +import com.diligrp.etrade.thirdparty.message.GeneralMessage;
  7 +import com.rabbitmq.client.Channel;
  8 +import jakarta.annotation.Resource;
  9 +import org.slf4j.Logger;
  10 +import org.slf4j.LoggerFactory;
  11 +import org.springframework.amqp.core.Message;
  12 +import org.springframework.amqp.core.MessageBuilder;
  13 +import org.springframework.amqp.rabbit.annotation.Exchange;
  14 +import org.springframework.amqp.rabbit.annotation.Queue;
  15 +import org.springframework.amqp.rabbit.annotation.QueueBinding;
  16 +import org.springframework.amqp.rabbit.annotation.RabbitListener;
  17 +import org.springframework.amqp.rabbit.core.RabbitTemplate;
  18 +import org.springframework.stereotype.Component;
  19 +
  20 +import java.io.IOException;
  21 +import java.nio.charset.StandardCharsets;
  22 +
  23 +import static com.diligrp.etrade.thirdparty.exec.basic.BasicAutoPush.*;
  24 +
  25 +/**
  26 + * @Author: zhangmeiyang
  27 + * @CreateTime: 2024-09-02 16:32
  28 + * @Version: todo
  29 + */
  30 +@Component
  31 +public class BasicReceiver extends AbstractReceiver {
  32 + private final static Logger LOG = LoggerFactory.getLogger(BasicReceiver.class);
  33 + private static final Long DELAY = 5000L;
  34 + private static final String DELAY_PREFIX = "x-delay";
  35 +
  36 +
  37 + @Resource
  38 + private RabbitTemplate rabbitTemplate;
  39 +
  40 + @RabbitListener(bindings = @QueueBinding(value = @Queue(value = ZR_BASIC_NORMAL_QUEUE, autoDelete = "false"), exchange = @Exchange(value = ZR_BASIC_NORMAL_EXCHANGE), key = ZR_BASIC_NORMAL_ROUTING), ackMode = "MANUAL")
  41 + public void receiveMessage(Channel channel, Message message) throws IOException {
  42 + var content = new String(message.getBody(), StandardCharsets.UTF_8);
  43 + LOG.info("business receive message:{}", content);
  44 + GeneralMessage msg = JsonUtils.fromJsonString(content, GeneralMessage.class);
  45 + try {
  46 + Holder.BASIC_CONTEXT.get(msg.getBasic()).handle(msg.getData(), msg.getMarketId(), msg.getSystemCode());
  47 + channel.basicAck(message.getMessageProperties().getDeliveryTag(), false);
  48 + LOG.info("business handle success:{}", content);
  49 + } catch (Exception e) {
  50 + channel.basicAck(message.getMessageProperties().getDeliveryTag(), false);
  51 + msg.setRetryCount(msg.getRetryCount() + 1);
  52 + sendDelayMsg(DELAY, JsonUtils.toJsonString(msg));
  53 + LOG.error("business exception:", e);
  54 + }
  55 + }
  56 +
  57 + @RabbitListener(queues = ZR_BASIC_DEAD_QUEUE, ackMode = "MANUAL")
  58 + public void handleCustomDelayMsg(Channel channel, Message message) throws IOException {
  59 + var content = new String(message.getBody(), StandardCharsets.UTF_8);
  60 + LOG.info("business receive retry message:{}", content);
  61 + GeneralMessage msg = JsonUtils.fromJsonString(content, GeneralMessage.class);
  62 + try {
  63 + Holder.BASIC_CONTEXT.get(msg.getBasic()).handle(msg.getData(), msg.getMarketId(), msg.getSystemCode());
  64 + channel.basicAck(message.getMessageProperties().getDeliveryTag(), false);
  65 + LOG.info("business retry message success:{}", content);
  66 + } catch (Exception e) {
  67 + channel.basicAck(message.getMessageProperties().getDeliveryTag(), false);
  68 + if (msg.getRetryCount() > 3) {
  69 + super.handleError(e.fillInStackTrace().getMessage(), msg.getData(), msg.getBasic().code, msg.getSystemCode(), msg.getMarketId());
  70 + LOG.error("retry business exception:", e);
  71 + } else {
  72 + msg.setRetryCount(msg.getRetryCount() + 1);
  73 + sendDelayMsg(DELAY, JsonUtils.toJsonString(msg));
  74 + }
  75 + }
  76 + }
  77 +
  78 + public void sendDelayMsg(Long currentMills, String message) {
  79 + byte[] bytes = message.getBytes(StandardCharsets.UTF_8);
  80 + Message msg = MessageBuilder.withBody(bytes).setHeader(DELAY_PREFIX, currentMills).build();
  81 + rabbitTemplate.convertAndSend(ZR_BASIC_DEAD_EXCHANGE, ZR_BASIC_DEAD_QUEUE, msg);
  82 + }
  83 +}
... ...
etrade-thirdparty/src/main/java/com/diligrp/etrade/thirdparty/exec/ZrAutoPush.java renamed to etrade-thirdparty/src/main/java/com/diligrp/etrade/thirdparty/exec/business/BusinessAutoPush.java
1   -package com.diligrp.etrade.thirdparty.exec;
  1 +package com.diligrp.etrade.thirdparty.exec.business;
2 2  
3 3 import org.springframework.amqp.core.*;
4 4 import org.springframework.beans.factory.annotation.Qualifier;
... ... @@ -14,44 +14,44 @@ import java.util.Map;
14 14 * @Version: todo
15 15 */
16 16 @Configuration
17   -public class ZrAutoPush {
18   - public static final String ZR_NORMAL_EXCHANGE = "zr.normal.exchange";
19   - public static final String ZR_NORMAL_QUEUE = "zr.normal.queue";
20   - public static final String ZR_NORMAL_ROUTING = "zr.normal.routing.process";
21   - public static final String ZR_DEAD_EXCHANGE = "zr.dead.exchange";
22   - public static final String ZR_DEAD_EXCHANGE_TYPE = "x-delayed-message";
23   - public static final String ZR_DEAD_QUEUE = "zr.dead.queue";
  17 +public class BusinessAutoPush {
  18 + public static final String ZR_BUSINESS_NORMAL_EXCHANGE = "zr.normal.exchange";
  19 + public static final String ZR_BUSINESS_NORMAL_QUEUE = "zr.normal.queue";
  20 + public static final String ZR_BUSINESS_NORMAL_ROUTING = "zr.normal.routing.process";
  21 + public static final String ZR_BUSINESS_DEAD_EXCHANGE = "zr.dead.exchange";
  22 + public static final String ZR_BUSINESS_DEAD_EXCHANGE_TYPE = "x-delayed-message";
  23 + public static final String ZR_BUSINESS_DEAD_QUEUE = "zr.dead.queue";
24 24  
25 25 @Bean("normalExchange")
26 26 public DirectExchange normalExchange(){
27   - return new DirectExchange(ZR_NORMAL_EXCHANGE,true,false);
  27 + return new DirectExchange(ZR_BUSINESS_NORMAL_EXCHANGE,true,false);
28 28 }
29 29  
30 30 @Bean("normalQueue")
31 31 public Queue normalQueue(){
32   - return new Queue(ZR_NORMAL_QUEUE);
  32 + return new Queue(ZR_BUSINESS_NORMAL_QUEUE);
33 33 }
34 34  
35 35 @Bean("normalBinding")
36 36 public Binding normalBinding(@Qualifier("normalQueue") Queue normalQueue, @Qualifier("normalExchange") DirectExchange normalExchange) {
37   - return BindingBuilder.bind(normalQueue).to(normalExchange).with(ZR_NORMAL_ROUTING);
  37 + return BindingBuilder.bind(normalQueue).to(normalExchange).with(ZR_BUSINESS_NORMAL_ROUTING);
38 38 }
39 39  
40 40 @Bean("dlxCustomQueue")
41 41 public Queue dlxCustomQueue() {
42   - return new Queue(ZR_DEAD_QUEUE, true, false, false);
  42 + return new Queue(ZR_BUSINESS_DEAD_QUEUE, true, false, false);
43 43 }
44 44  
45 45 @Bean("dlxCustomExchange")
46 46 public CustomExchange dlxCustomExchange() {
47 47 Map<String, Object> args = new HashMap<>();
48 48 args.put("x-delayed-type", "direct");
49   - return new CustomExchange(ZR_DEAD_EXCHANGE, ZR_DEAD_EXCHANGE_TYPE, true,false,args);
  49 + return new CustomExchange(ZR_BUSINESS_DEAD_EXCHANGE, ZR_BUSINESS_DEAD_EXCHANGE_TYPE, true,false,args);
50 50 }
51 51  
52 52 @Bean("dlxCustomBinding")
53 53 public Binding dlxCustomBinding(@Qualifier("dlxCustomQueue") Queue queue, @Qualifier("dlxCustomExchange") CustomExchange exchange) {
54   - return BindingBuilder.bind(queue).to(exchange).with(ZR_DEAD_QUEUE).noargs();
  54 + return BindingBuilder.bind(queue).to(exchange).with(ZR_BUSINESS_DEAD_QUEUE).noargs();
55 55 }
56 56  
57 57 }
... ...
etrade-thirdparty/src/main/java/com/diligrp/etrade/thirdparty/exec/ZrReceiver.java renamed to etrade-thirdparty/src/main/java/com/diligrp/etrade/thirdparty/exec/business/BusinessReceiver.java
1   -package com.diligrp.etrade.thirdparty.exec;
  1 +package com.diligrp.etrade.thirdparty.exec.business;
2 2  
3 3 import com.diligrp.etrade.core.util.JsonUtils;
4   -import com.diligrp.etrade.thirdparty.domain.co.ErrorMessageCo;
  4 +import com.diligrp.etrade.thirdparty.demarcate.AbstractReceiver;
  5 +import com.diligrp.etrade.thirdparty.exec.Holder;
5 6 import com.diligrp.etrade.thirdparty.message.GeneralMessage;
6   -import com.diligrp.etrade.thirdparty.type.BusinessEnum;
7 7 import com.rabbitmq.client.Channel;
8 8 import jakarta.annotation.Resource;
9 9 import org.slf4j.Logger;
... ... @@ -20,7 +20,7 @@ import org.springframework.stereotype.Component;
20 20 import java.io.IOException;
21 21 import java.nio.charset.StandardCharsets;
22 22  
23   -import static com.diligrp.etrade.thirdparty.exec.ZrAutoPush.*;
  23 +import static com.diligrp.etrade.thirdparty.exec.business.BusinessAutoPush.*;
24 24  
25 25 /**
26 26 * @Author: zhangmeiyang
... ... @@ -28,59 +28,54 @@ import static com.diligrp.etrade.thirdparty.exec.ZrAutoPush.*;
28 28 * @Version: todo
29 29 */
30 30 @Component
31   -public class ZrReceiver {
32   - private final static Logger LOG = LoggerFactory.getLogger(ZrReceiver.class);
  31 +public class BusinessReceiver extends AbstractReceiver {
  32 + private final static Logger LOG = LoggerFactory.getLogger(BusinessReceiver.class);
33 33 private static final Long DELAY = 5000L;
34 34 private static final String DELAY_PREFIX = "x-delay";
35   -
36 35 @Resource
37 36 private RabbitTemplate rabbitTemplate;
38 37  
39   - @RabbitListener(bindings = @QueueBinding(value = @Queue(value = ZR_NORMAL_QUEUE, autoDelete = "false"), exchange = @Exchange(value = ZR_NORMAL_EXCHANGE), key = ZR_NORMAL_ROUTING), ackMode = "MANUAL")
  38 + @RabbitListener(bindings = @QueueBinding(value = @Queue(value = ZR_BUSINESS_NORMAL_QUEUE, autoDelete = "false"), exchange = @Exchange(value = ZR_BUSINESS_NORMAL_EXCHANGE), key = ZR_BUSINESS_NORMAL_ROUTING), ackMode = "MANUAL")
40 39 public void receiveMessage(Channel channel, Message message) throws IOException {
41 40 var content = new String(message.getBody(), StandardCharsets.UTF_8);
42   - LOG.info("business receive message:{}",content);
  41 + LOG.info("basic receive message:{}",content);
43 42 GeneralMessage msg = JsonUtils.fromJsonString(content, GeneralMessage.class);
44 43 try {
45   - ZrHolder.CONTEXT.get(msg.getBusiness()).handle(msg.getData());
  44 + Holder.BUSINESS_CONTEXT.get(msg.getBusiness()).handle(msg.getData(), msg.getMarketId(), msg.getSystemCode());
46 45 channel.basicAck(message.getMessageProperties().getDeliveryTag(), false);
47   - LOG.info("business handle success:{}",content);
  46 + LOG.info("basic handle success:{}",content);
48 47 } catch (Exception e) {
49 48 channel.basicAck(message.getMessageProperties().getDeliveryTag(), false);
50 49 msg.setRetryCount(msg.getRetryCount()+1);
51 50 sendDelayMsg(DELAY, JsonUtils.toJsonString(msg));
52   - LOG.error("business exception:",e);
  51 + LOG.error("basic exception:",e);
53 52 }
54 53 }
55 54  
56   - @RabbitListener(queues = ZR_DEAD_QUEUE, ackMode = "MANUAL")
  55 + @RabbitListener(queues = ZR_BUSINESS_DEAD_QUEUE, ackMode = "MANUAL")
57 56 public void handleCustomDelayMsg(Channel channel, Message message) throws IOException {
58 57 var content = new String(message.getBody(), StandardCharsets.UTF_8);
59   - LOG.info("business receive retry message:{}",content);
  58 + LOG.info("basic receive retry message:{}",content);
60 59 GeneralMessage msg = JsonUtils.fromJsonString(content, GeneralMessage.class);
61 60 try {
62   - ZrHolder.CONTEXT.get(msg.getBusiness()).handle(msg.getData());
  61 + Holder.BUSINESS_CONTEXT.get(msg.getBusiness()).handle(msg.getData(), msg.getMarketId(), msg.getSystemCode());
63 62 channel.basicAck(message.getMessageProperties().getDeliveryTag(), false);
64   - LOG.info("business retry message success:{}",content);
  63 + LOG.info("basic retry message success:{}",content);
65 64 } catch (Exception e) {
66 65 channel.basicAck(message.getMessageProperties().getDeliveryTag(), false);
67   - msg.setRetryCount(msg.getRetryCount() + 1);
68 66 if (msg.getRetryCount() > 3) {
69   - ErrorMessageCo errorMessageCo = new ErrorMessageCo();
70   - errorMessageCo.setContent(msg.getData());
71   - errorMessageCo.setErrorMessage(e.fillInStackTrace().getMessage());
72   - errorMessageCo.setBusiness(msg.getBusiness());
73   - msg.setData(JsonUtils.toJsonString(errorMessageCo));
74   - msg.setBusiness(BusinessEnum.ERROR);
75   - LOG.error("retry business exception:",e);
  67 + super.handleError(e.fillInStackTrace().getMessage(), msg.getData(), msg.getBusiness().code, msg.getSystemCode(),msg.getMarketId());
  68 + LOG.error("retry basic exception:",e);
  69 + }else{
  70 + msg.setRetryCount(msg.getRetryCount() + 1);
  71 + sendDelayMsg(DELAY, JsonUtils.toJsonString(msg));
76 72 }
77   - sendDelayMsg(DELAY, JsonUtils.toJsonString(msg));
78 73 }
79 74 }
80 75  
81 76 public void sendDelayMsg(Long currentMills, String message) {
82 77 byte[] bytes = message.getBytes(StandardCharsets.UTF_8);
83 78 Message msg = MessageBuilder.withBody(bytes).setHeader(DELAY_PREFIX, currentMills).build();
84   - rabbitTemplate.convertAndSend(ZR_DEAD_EXCHANGE, ZR_DEAD_QUEUE, msg);
  79 + rabbitTemplate.convertAndSend(ZR_BUSINESS_DEAD_EXCHANGE, ZR_BUSINESS_DEAD_QUEUE, msg);
85 80 }
86 81 }
... ...
etrade-thirdparty/src/main/java/com/diligrp/etrade/thirdparty/handler/basic/BusinessTypeBasicHandler.java 0 → 100644
  1 +package com.diligrp.etrade.thirdparty.handler.basic;
  2 +
  3 +import com.diligrp.etrade.core.util.JsonUtils;
  4 +import com.diligrp.etrade.thirdparty.demarcate.AbstractBasicHandler;
  5 +import com.diligrp.etrade.thirdparty.domain.co.basic.BusinessTypeCo;
  6 +import com.diligrp.etrade.thirdparty.domain.dto.MappingDto;
  7 +import com.diligrp.etrade.thirdparty.type.BasicEnum;
  8 +import com.diligrp.etrade.thirdparty.utils.BillTypeApiUtils;
  9 +import com.fasterxml.jackson.core.type.TypeReference;
  10 +import org.springframework.stereotype.Component;
  11 +import org.springframework.util.ObjectUtils;
  12 +
  13 +import java.util.List;
  14 +
  15 +/**
  16 + * @Author: zhangmeiyang
  17 + * @CreateTime: 2024-10-23 14:58
  18 + * @Version: todo
  19 + */
  20 +@Component
  21 +public class BusinessTypeBasicHandler extends AbstractBasicHandler<BusinessTypeCo> {
  22 +
  23 + @Override
  24 + public void handleInside(String json, Long marketId, String systemCode) throws Exception {
  25 + List<BusinessTypeCo> businessTypeCos = JsonUtils.fromJsonString(json, new TypeReference<>() {});
  26 + var utils = new BillTypeApiUtils(getIdentifyInfo(marketId, systemCode));
  27 + for (BusinessTypeCo e : businessTypeCos) {
  28 + super.transfer(e, marketId, systemCode);
  29 + MappingDto mappingData = super.getMappingData(marketId, systemCode, e.getSystemDataId());
  30 + e.setFBILLTYPEID(ObjectUtils.isEmpty(mappingData) ? null : mappingData.getThirdPartyDataId());
  31 + if (!ObjectUtils.isEmpty(mappingData)){
  32 + utils.updateBillType(String.valueOf(mappingData.getThirdPartyDataId()),JsonUtils.toJsonString(e));
  33 + }else {
  34 + String billType = utils.createBillType(JsonUtils.toJsonString(e));
  35 + super.recordMapping(marketId, systemCode, e.getSystemDataId(), Long.parseLong(billType));
  36 + }
  37 + }
  38 + }
  39 +
  40 + @Override
  41 + public BasicEnum getType() {
  42 + return BasicEnum.FINANCIAL_BUSINESS_TYPE;
  43 + }
  44 +}
... ...
etrade-thirdparty/src/main/java/com/diligrp/etrade/thirdparty/handler/basic/ChargeItemBasicHandler.java 0 → 100644
  1 +package com.diligrp.etrade.thirdparty.handler.basic;
  2 +
  3 +import com.diligrp.etrade.core.util.JsonUtils;
  4 +import com.diligrp.etrade.thirdparty.demarcate.AbstractBasicHandler;
  5 +import com.diligrp.etrade.thirdparty.domain.co.basic.ChargeItemCo;
  6 +import com.diligrp.etrade.thirdparty.domain.dto.MappingDto;
  7 +import com.diligrp.etrade.thirdparty.type.BasicEnum;
  8 +import com.diligrp.etrade.thirdparty.utils.FeeApiUtils;
  9 +import com.fasterxml.jackson.core.type.TypeReference;
  10 +import org.springframework.stereotype.Component;
  11 +import org.springframework.util.ObjectUtils;
  12 +
  13 +import java.util.List;
  14 +
  15 +/**
  16 + * @Author: zhangmeiyang
  17 + * @CreateTime: 2024-10-23 14:58
  18 + * @Version: todo
  19 + */
  20 +@Component
  21 +public class ChargeItemBasicHandler extends AbstractBasicHandler<ChargeItemCo> {
  22 +
  23 + @Override
  24 + public void handleInside(String json, Long marketId, String systemCode) throws Exception {
  25 + List<ChargeItemCo> chargeItemCos = JsonUtils.fromJsonString(json, new TypeReference<>(){});
  26 + var utils =new FeeApiUtils(getIdentifyInfo(marketId, systemCode));
  27 + for (ChargeItemCo e : chargeItemCos) {
  28 + super.transfer(e, marketId, systemCode);
  29 + MappingDto mappingData = super.getMappingData(marketId, systemCode, e.getSystemDataId());
  30 + e.setFEXPID(ObjectUtils.isEmpty(mappingData) ? null : mappingData.getThirdPartyDataId());
  31 + if (!ObjectUtils.isEmpty(mappingData)){
  32 + utils.updateFee(String.valueOf(mappingData.getThirdPartyDataId()),JsonUtils.toJsonString(e));
  33 + }else {
  34 + String fee = utils.createFee(JsonUtils.toJsonString(e));
  35 + super.recordMapping(marketId, systemCode, e.getSystemDataId(), Long.parseLong(fee));
  36 + }
  37 + }
  38 + }
  39 +
  40 + @Override
  41 + public BasicEnum getType() {
  42 + return BasicEnum.CHARGE_ITEM;
  43 + }
  44 +}
... ...
etrade-thirdparty/src/main/java/com/diligrp/etrade/thirdparty/handler/basic/ChargeItemGroupBasicHandler.java 0 → 100644
  1 +package com.diligrp.etrade.thirdparty.handler.basic;
  2 +
  3 +import com.diligrp.etrade.core.util.JsonUtils;
  4 +import com.diligrp.etrade.thirdparty.demarcate.AbstractBasicHandler;
  5 +import com.diligrp.etrade.thirdparty.domain.co.basic.ChargeItemGroupCo;
  6 +import com.diligrp.etrade.thirdparty.domain.dto.MappingDto;
  7 +import com.diligrp.etrade.thirdparty.type.BasicEnum;
  8 +import com.diligrp.etrade.thirdparty.utils.FeeGroupApiUtils;
  9 +import com.fasterxml.jackson.core.type.TypeReference;
  10 +import com.kingdee.bos.webapi.entity.IdentifyInfo;
  11 +import org.springframework.stereotype.Component;
  12 +import org.springframework.util.ObjectUtils;
  13 +
  14 +import java.util.List;
  15 +
  16 +/**
  17 + * @Author: zhangmeiyang
  18 + * @CreateTime: 2024-10-23 14:58
  19 + * @Version: todo
  20 + */
  21 +@Component
  22 +public class ChargeItemGroupBasicHandler extends AbstractBasicHandler<ChargeItemGroupCo> {
  23 +
  24 + @Override
  25 + public void handleInside(String json, Long marketId, String systemCode) throws Exception {
  26 + IdentifyInfo identifyInfo = getIdentifyInfo(marketId, systemCode);
  27 + var util = new FeeGroupApiUtils(identifyInfo);
  28 + List<ChargeItemGroupCo> chargeItemGroupCos = JsonUtils.fromJsonString(json, new TypeReference<>(){});
  29 + for (ChargeItemGroupCo e : chargeItemGroupCos) {
  30 + super.transfer(e, marketId, systemCode);
  31 + e.setFParentId(e.getFParentId().equals(0L) ? 0L : super.getMappingData(marketId, systemCode, e.getFParentId()).getThirdPartyDataId());
  32 + MappingDto mappingData = super.getMappingData(marketId, systemCode, e.getSystemDataId());
  33 + e.setGroupPkId(ObjectUtils.isEmpty(mappingData) ? null : mappingData.getThirdPartyDataId());
  34 + String s = util.saveFeeGroup(JsonUtils.toJsonString(e));
  35 + if (ObjectUtils.isEmpty(mappingData)) {
  36 + super.recordMapping(marketId, systemCode, e.getSystemDataId(), Long.parseLong(s));
  37 + }
  38 + }
  39 + }
  40 +
  41 + @Override
  42 + public BasicEnum getType() {
  43 + return BasicEnum.CHARGE_ITEM_GROUP;
  44 + }
  45 +}
... ...
etrade-thirdparty/src/main/java/com/diligrp/etrade/thirdparty/handler/basic/CustomerBasicHandler.java 0 → 100644
  1 +package com.diligrp.etrade.thirdparty.handler.basic;
  2 +
  3 +import com.diligrp.etrade.core.util.JsonUtils;
  4 +import com.diligrp.etrade.thirdparty.demarcate.AbstractBasicHandler;
  5 +import com.diligrp.etrade.thirdparty.domain.co.basic.CustomerCo;
  6 +import com.diligrp.etrade.thirdparty.domain.dto.MappingDto;
  7 +import com.diligrp.etrade.thirdparty.domain.model.FContactId;
  8 +import com.diligrp.etrade.thirdparty.domain.model.FT_BD_CUSTLOCATION;
  9 +import com.diligrp.etrade.thirdparty.type.BasicEnum;
  10 +import com.diligrp.etrade.thirdparty.utils.ContactApiUtils;
  11 +import com.diligrp.etrade.thirdparty.utils.CustomerApiUtils;
  12 +import com.fasterxml.jackson.core.type.TypeReference;
  13 +import org.springframework.stereotype.Component;
  14 +import org.springframework.util.ObjectUtils;
  15 +
  16 +import java.util.List;
  17 +
  18 +/**
  19 + * @Author: zhangmeiyang
  20 + * @CreateTime: 2024-10-23 14:58
  21 + * @Version: todo
  22 + */
  23 +@Component
  24 +public class CustomerBasicHandler extends AbstractBasicHandler<CustomerCo> {
  25 +
  26 + @Override
  27 + public void handleInside(String json, Long marketId, String systemCode) throws Exception {
  28 + List<CustomerCo> customerCos = JsonUtils.fromJsonString(json, new TypeReference<>() {});
  29 + var customerUtils = new CustomerApiUtils(getIdentifyInfo(marketId, systemCode));
  30 + var contactUtils = new ContactApiUtils(getIdentifyInfo(marketId, systemCode));
  31 + for (CustomerCo e : customerCos) {
  32 + super.transfer(e, marketId, systemCode);
  33 + MappingDto mappingData = super.getMappingData(marketId, systemCode, e.getSystemDataId());
  34 + List<FT_BD_CUSTLOCATION> ftBdCustlocation = e.getFT_BD_CUSTLOCATION();
  35 + if (!ObjectUtils.isEmpty(ftBdCustlocation)){
  36 + for (FT_BD_CUSTLOCATION ftBdCustLocation : ftBdCustlocation) {
  37 + String contact = contactUtils.createContact(JsonUtils.toJsonString(ftBdCustLocation));
  38 + FContactId fContactId = new FContactId();
  39 + fContactId.setFNUMBER(contact);
  40 + ftBdCustLocation.setFContactId(fContactId);
  41 + }
  42 + }
  43 + e.setFCUSTID(ObjectUtils.isEmpty(mappingData) ? null : mappingData.getThirdPartyDataId());
  44 + if (!ObjectUtils.isEmpty(mappingData)){
  45 + customerUtils.updateCustomer(String.valueOf(mappingData.getThirdPartyDataId()),JsonUtils.toJsonString(e));
  46 + }else {
  47 + String billType = customerUtils.createCustomer(JsonUtils.toJsonString(e));
  48 + super.recordMapping(marketId, systemCode, e.getSystemDataId(), Long.parseLong(billType));
  49 + }
  50 + }
  51 + }
  52 +
  53 + @Override
  54 + public BasicEnum getType() {
  55 + return BasicEnum.CUSTOMER;
  56 + }
  57 +}
... ...
etrade-thirdparty/src/main/java/com/diligrp/etrade/thirdparty/handler/basic/DepartmentBasicHandler.java 0 → 100644
  1 +package com.diligrp.etrade.thirdparty.handler.basic;
  2 +
  3 +import com.diligrp.etrade.core.util.JsonUtils;
  4 +import com.diligrp.etrade.thirdparty.demarcate.AbstractBasicHandler;
  5 +import com.diligrp.etrade.thirdparty.domain.co.basic.DepartmentCo;
  6 +import com.diligrp.etrade.thirdparty.domain.dto.MappingDto;
  7 +import com.diligrp.etrade.thirdparty.type.BasicEnum;
  8 +import com.diligrp.etrade.thirdparty.utils.DepartmentApiUtils;
  9 +import com.fasterxml.jackson.core.type.TypeReference;
  10 +import org.springframework.stereotype.Component;
  11 +import org.springframework.util.ObjectUtils;
  12 +
  13 +import java.util.List;
  14 +
  15 +/**
  16 + * @Author: zhangmeiyang
  17 + * @CreateTime: 2024-10-23 14:58
  18 + * @Version: todo
  19 + */
  20 +@Component
  21 +public class DepartmentBasicHandler extends AbstractBasicHandler<DepartmentCo> {
  22 +
  23 + @Override
  24 + public void handleInside(String json, Long marketId, String systemCode) throws Exception {
  25 + List<DepartmentCo> departmentCos = JsonUtils.fromJsonString(json, new TypeReference<>(){});
  26 + var utils = new DepartmentApiUtils(getIdentifyInfo(marketId, systemCode));
  27 + for (DepartmentCo e : departmentCos) {
  28 + super.transfer(e, marketId, systemCode);
  29 + MappingDto mappingData = super.getMappingData(marketId, systemCode, e.getSystemDataId());
  30 + e.setFDEPTID(ObjectUtils.isEmpty(mappingData) ? null : mappingData.getThirdPartyDataId());
  31 + if (!ObjectUtils.isEmpty(mappingData)){
  32 + utils.updateDepartment(String.valueOf(mappingData.getThirdPartyDataId()),JsonUtils.toJsonString(e));
  33 + }else {
  34 + String department = utils.createDepartment(JsonUtils.toJsonString(e));
  35 + super.recordMapping(marketId, systemCode, e.getSystemDataId(), Long.parseLong(department));
  36 + }
  37 + }
  38 +
  39 + }
  40 +
  41 + @Override
  42 + public BasicEnum getType() {
  43 + return BasicEnum.DEPARTMENT;
  44 + }
  45 +}
... ...
etrade-thirdparty/src/main/java/com/diligrp/etrade/thirdparty/handler/basic/SettlementBasicHandler.java 0 → 100644
  1 +package com.diligrp.etrade.thirdparty.handler.basic;
  2 +
  3 +import com.diligrp.etrade.core.util.JsonUtils;
  4 +import com.diligrp.etrade.thirdparty.demarcate.AbstractBasicHandler;
  5 +import com.diligrp.etrade.thirdparty.domain.co.basic.SettlementCo;
  6 +import com.diligrp.etrade.thirdparty.domain.dto.MappingDto;
  7 +import com.diligrp.etrade.thirdparty.type.BasicEnum;
  8 +import com.diligrp.etrade.thirdparty.utils.SettleTypeApiUtils;
  9 +import com.fasterxml.jackson.core.type.TypeReference;
  10 +import org.springframework.stereotype.Component;
  11 +import org.springframework.util.ObjectUtils;
  12 +
  13 +import java.util.List;
  14 +
  15 +/**
  16 + * @Author: zhangmeiyang
  17 + * @CreateTime: 2024-10-23 14:58
  18 + * @Version: todo
  19 + */
  20 +@Component
  21 +public class SettlementBasicHandler extends AbstractBasicHandler<SettlementCo> {
  22 +
  23 + @Override
  24 + public void handleInside(String json, Long marketId, String systemCode) throws Exception {
  25 + List<SettlementCo> settlementCos = JsonUtils.fromJsonString(json, new TypeReference<>() {});
  26 + var utils = new SettleTypeApiUtils(getIdentifyInfo(marketId, systemCode));
  27 + for (SettlementCo e : settlementCos) {
  28 + super.transfer(e, marketId, systemCode);
  29 + MappingDto mappingData = super.getMappingData(marketId, systemCode, e.getSystemDataId());
  30 + e.setFID(ObjectUtils.isEmpty(mappingData) ? null : mappingData.getThirdPartyDataId());
  31 + if (!ObjectUtils.isEmpty(mappingData)){
  32 + utils.updateSettleType(String.valueOf(mappingData.getThirdPartyDataId()),JsonUtils.toJsonString(e));
  33 + }else {
  34 + String billType = utils.createSettleType(JsonUtils.toJsonString(e));
  35 + super.recordMapping(marketId, systemCode, e.getSystemDataId(), Long.parseLong(billType));
  36 + }
  37 + }
  38 + }
  39 +
  40 + @Override
  41 + public BasicEnum getType() {
  42 + return BasicEnum.FINANCIAL_CHANNEL_TYPE;
  43 + }
  44 +}
... ...
etrade-thirdparty/src/main/java/com/diligrp/etrade/thirdparty/handler/ErrorBusinessHandler.java renamed to etrade-thirdparty/src/main/java/com/diligrp/etrade/thirdparty/handler/business/BusinessBillHandler.java
1   -package com.diligrp.etrade.thirdparty.handler;
  1 +package com.diligrp.etrade.thirdparty.handler.business;
2 2  
3   -import com.diligrp.etrade.thirdparty.demarcate.AbstractBusinessHandler;
4   -import com.diligrp.etrade.thirdparty.domain.co.ErrorMessageCo;
5   -import com.diligrp.etrade.thirdparty.exec.ZrHolder;
  3 +import com.diligrp.etrade.core.util.JsonUtils;
  4 +import com.diligrp.etrade.thirdparty.demarcate.AbstractBillHandler;
  5 +import com.diligrp.etrade.thirdparty.domain.co.business.BusinessBillCo;
6 6 import com.diligrp.etrade.thirdparty.type.BusinessEnum;
  7 +import com.fasterxml.jackson.core.type.TypeReference;
7 8 import org.springframework.stereotype.Component;
8 9  
  10 +import java.util.List;
  11 +
9 12 /**
10 13 * @Author: zhangmeiyang
11   - * @CreateTime: 2024-09-10 10:56
  14 + * @CreateTime: 2024-10-15 10:57
12 15 * @Version: todo
13 16 */
14 17 @Component
15   -public class ErrorBusinessHandler extends AbstractBusinessHandler<ErrorMessageCo> {
  18 +public class BusinessBillHandler extends AbstractBillHandler<BusinessBillCo> {
16 19 @Override
17   - protected void handle(ErrorMessageCo co) {
18   - ZrHolder.ERROR_HANDLER_CONTEXT.get(co.getBusiness()).saveAndRecordError(co.getContent(),co.getErrorMessage());
  20 + public void handle(String json, Long marketId, String systemCode) {
  21 + List<BusinessBillCo> businessBillCos = JsonUtils.fromJsonString(json, new TypeReference<>() {});
  22 + businessBillCos.forEach(e->super.transfer(e,marketId,systemCode));
  23 + System.out.println(JsonUtils.toJsonString(businessBillCos));
19 24 }
20 25  
21 26 @Override
22 27 public BusinessEnum getType() {
23   - return BusinessEnum.ERROR;
  28 + return BusinessEnum.BILL;
24 29 }
25 30 }
... ...
etrade-thirdparty/src/main/java/com/diligrp/etrade/thirdparty/handler/business/CardBillHandler.java 0 → 100644
  1 +package com.diligrp.etrade.thirdparty.handler.business;
  2 +
  3 +import com.diligrp.etrade.core.util.JsonUtils;
  4 +import com.diligrp.etrade.thirdparty.demarcate.AbstractBillHandler;
  5 +import com.diligrp.etrade.thirdparty.domain.co.business.CardBillCo;
  6 +import com.diligrp.etrade.thirdparty.type.BusinessEnum;
  7 +import com.fasterxml.jackson.core.type.TypeReference;
  8 +import org.springframework.stereotype.Component;
  9 +
  10 +import java.util.List;
  11 +
  12 +/**
  13 + * @Author: zhangmeiyang
  14 + * @CreateTime: 2024-10-23 16:53
  15 + * @Version: todo
  16 + */
  17 +@Component
  18 +public class CardBillHandler extends AbstractBillHandler<CardBillCo> {
  19 + @Override
  20 + public void handle(String json, Long marketId, String systemCode) throws Exception {
  21 + List<CardBillCo> cardBillCos = JsonUtils.fromJsonString(json, new TypeReference<>() {});
  22 + cardBillCos.forEach(e-> super.transfer(e,marketId,systemCode));
  23 + System.out.println(JsonUtils.toJsonString(cardBillCos));
  24 + }
  25 +
  26 + @Override
  27 + public BusinessEnum getType() {
  28 + return BusinessEnum.CARD;
  29 + }
  30 +}
... ...
etrade-thirdparty/src/main/java/com/diligrp/etrade/thirdparty/handler/business/EntranceFeeBillHandler.java 0 → 100644
  1 +package com.diligrp.etrade.thirdparty.handler.business;
  2 +
  3 +import com.diligrp.etrade.core.util.JsonUtils;
  4 +import com.diligrp.etrade.thirdparty.demarcate.AbstractBillHandler;
  5 +import com.diligrp.etrade.thirdparty.domain.co.business.EntranceFeeBillCo;
  6 +import com.diligrp.etrade.thirdparty.type.BusinessEnum;
  7 +import com.fasterxml.jackson.core.type.TypeReference;
  8 +import org.springframework.stereotype.Component;
  9 +
  10 +import java.util.List;
  11 +
  12 +/**
  13 + * @Author: zhangmeiyang
  14 + * @CreateTime: 2024-10-15 10:57
  15 + * @Version: todo
  16 + */
  17 +@Component
  18 +public class EntranceFeeBillHandler extends AbstractBillHandler<EntranceFeeBillCo> {
  19 + @Override
  20 + public void handle(String json, Long marketId, String systemCode) {
  21 + List<EntranceFeeBillCo> entranceFeeBillCos = JsonUtils.fromJsonString(json, new TypeReference<>() {});
  22 + entranceFeeBillCos.forEach(e->super.transfer(e,marketId,systemCode));
  23 + System.out.println(JsonUtils.toJsonString(entranceFeeBillCos));
  24 + }
  25 +
  26 + @Override
  27 + public BusinessEnum getType() {
  28 + return BusinessEnum.ENTRANCE_FEE;
  29 + }
  30 +}
... ...
etrade-thirdparty/src/main/java/com/diligrp/etrade/thirdparty/handler/business/RefrigeratorBillHandler.java 0 → 100644
  1 +package com.diligrp.etrade.thirdparty.handler.business;
  2 +
  3 +import com.diligrp.etrade.core.util.JsonUtils;
  4 +import com.diligrp.etrade.thirdparty.demarcate.AbstractBillHandler;
  5 +import com.diligrp.etrade.thirdparty.domain.co.business.RefrigeratorBillCo;
  6 +import com.diligrp.etrade.thirdparty.type.BusinessEnum;
  7 +import com.fasterxml.jackson.core.type.TypeReference;
  8 +import org.springframework.stereotype.Component;
  9 +
  10 +import java.util.List;
  11 +
  12 +/**
  13 + * @Author: zhangmeiyang
  14 + * @CreateTime: 2024-10-15 10:57
  15 + * @Version: todo
  16 + */
  17 +@Component
  18 +public class RefrigeratorBillHandler extends AbstractBillHandler<RefrigeratorBillCo> {
  19 + @Override
  20 + public void handle(String json, Long marketId, String systemCode) {
  21 + List<RefrigeratorBillCo> refrigeratorBillCos = JsonUtils.fromJsonString(json, new TypeReference<>() {});
  22 + refrigeratorBillCos.forEach(e->super.transfer(e,marketId,systemCode));
  23 + System.out.println(JsonUtils.toJsonString(refrigeratorBillCos));
  24 + }
  25 +
  26 + @Override
  27 + public BusinessEnum getType() {
  28 + return BusinessEnum.REFRIGERATOR;
  29 + }
  30 +}
... ...
etrade-thirdparty/src/main/java/com/diligrp/etrade/thirdparty/handler/business/TestBusinessHandleInterface.java renamed to etrade-thirdparty/src/main/java/com/diligrp/etrade/thirdparty/handler/business/SettleBillHandler.java
1 1 package com.diligrp.etrade.thirdparty.handler.business;
2 2  
3   -import com.diligrp.etrade.thirdparty.demarcate.AbstractBusinessHandler;
4   -import com.diligrp.etrade.thirdparty.demarcate.ErrorHandleInterface;
5   -import com.diligrp.etrade.thirdparty.domain.co.TestCo;
  3 +import com.diligrp.etrade.core.util.JsonUtils;
  4 +import com.diligrp.etrade.thirdparty.demarcate.AbstractBillHandler;
  5 +import com.diligrp.etrade.thirdparty.domain.co.business.SettleBillCo;
6 6 import com.diligrp.etrade.thirdparty.type.BusinessEnum;
  7 +import com.fasterxml.jackson.core.type.TypeReference;
7 8 import org.springframework.stereotype.Component;
8 9  
  10 +import java.util.List;
  11 +
9 12 /**
10 13 * @Author: zhangmeiyang
11   - * @CreateTime: 2024-09-10 15:03
  14 + * @CreateTime: 2024-10-22 16:46
12 15 * @Version: todo
13 16 */
14 17 @Component
15   -public class TestBusinessHandleInterface extends AbstractBusinessHandler<TestCo> implements ErrorHandleInterface {
  18 +public class SettleBillHandler extends AbstractBillHandler<SettleBillCo> {
  19 +
16 20 @Override
17   - protected void handle(TestCo t) {
18   - var s = 1/0;
  21 + public void handle(String json, Long marketId, String systemCode) {
  22 + List<SettleBillCo> settleBillCos = JsonUtils.fromJsonString(json, new TypeReference<>() {});
  23 + settleBillCos.forEach(e-> super.transfer(e,marketId,systemCode));
  24 + System.out.println(JsonUtils.toJsonString(settleBillCos));
19 25 }
20 26  
21 27 @Override
22 28 public BusinessEnum getType() {
23   - return BusinessEnum.TEST;
24   - }
25   - @Override
26   - public void saveAndRecordError(String json,String errorMessage) {
27   - System.out.println(json);
28   - System.out.println(errorMessage);
29   - System.out.println("save db");
  29 + return BusinessEnum.SETTLE;
30 30 }
31 31 }
... ...
etrade-thirdparty/src/main/java/com/diligrp/etrade/thirdparty/handler/business/WeighingBillHandler.java 0 → 100644
  1 +package com.diligrp.etrade.thirdparty.handler.business;
  2 +
  3 +import com.diligrp.etrade.core.util.JsonUtils;
  4 +import com.diligrp.etrade.thirdparty.demarcate.AbstractBillHandler;
  5 +import com.diligrp.etrade.thirdparty.domain.co.business.WeighingBillCo;
  6 +import com.diligrp.etrade.thirdparty.type.BusinessEnum;
  7 +import com.fasterxml.jackson.core.type.TypeReference;
  8 +import org.springframework.stereotype.Component;
  9 +
  10 +import java.util.List;
  11 +
  12 +/**
  13 + * @Author: zhangmeiyang
  14 + * @CreateTime: 2024-10-15 10:57
  15 + * @Version: todo
  16 + */
  17 +@Component
  18 +public class WeighingBillHandler extends AbstractBillHandler<WeighingBillCo> {
  19 + @Override
  20 + public void handle(String json, Long marketId, String systemCode) {
  21 + List<WeighingBillCo> weighingBillCos = JsonUtils.fromJsonString(json, new TypeReference<>() {});
  22 + weighingBillCos.forEach(e->super.transfer(e,marketId,systemCode));
  23 + System.out.println(JsonUtils.toJsonString(weighingBillCos));
  24 + }
  25 +
  26 + @Override
  27 + public BusinessEnum getType() {
  28 + return BusinessEnum.WEIGHING;
  29 + }
  30 +}
... ...
etrade-thirdparty/src/main/java/com/diligrp/etrade/thirdparty/mapper/RecordMapper.java 0 → 100644
  1 +package com.diligrp.etrade.thirdparty.mapper;
  2 +
  3 +import com.diligrp.etrade.core.mybatis.MybatisMapperSupport;
  4 +import com.diligrp.etrade.report.anno.DataSource;
  5 +import com.diligrp.etrade.report.constant.DataSourceConstants;
  6 +import com.diligrp.etrade.thirdparty.domain.dto.MappingDto;
  7 +import com.diligrp.etrade.thirdparty.error.ErrorCo;
  8 +import org.apache.ibatis.annotations.Mapper;
  9 +import org.apache.ibatis.annotations.Param;
  10 +
  11 +@Mapper
  12 +public interface RecordMapper extends MybatisMapperSupport {
  13 + /**
  14 + * 记录错误
  15 + *
  16 + * @param co CO
  17 + */
  18 + @DataSource(DataSourceConstants.DS_KEY_MASTER)
  19 + void recordError(@Param("co") ErrorCo co);
  20 +
  21 + /**
  22 + * 记录映射数据
  23 + *
  24 + * @param mapping 映射
  25 + */
  26 + @DataSource(DataSourceConstants.DS_KEY_MASTER)
  27 + void recordTheMappingData(@Param("mapping")MappingDto mapping);
  28 +}
... ...
etrade-thirdparty/src/main/java/com/diligrp/etrade/thirdparty/mapper/TransMapper.java 0 → 100644
  1 +package com.diligrp.etrade.thirdparty.mapper;
  2 +
  3 +import com.diligrp.etrade.core.mybatis.MybatisMapperSupport;
  4 +import com.diligrp.etrade.report.anno.DataSource;
  5 +import com.diligrp.etrade.report.constant.DataSourceConstants;
  6 +import com.diligrp.etrade.thirdparty.domain.dto.*;
  7 +import org.apache.ibatis.annotations.Mapper;
  8 +import org.apache.ibatis.annotations.Param;
  9 +
  10 +/**
  11 + * @Author: zhangmeiyang
  12 + * @CreateTime: 2024-10-16 17:08
  13 + * @Version: todo
  14 + */
  15 +@Mapper
  16 +public interface TransMapper extends MybatisMapperSupport {
  17 +
  18 + /**
  19 + * 获取客户端参数
  20 + *
  21 + * @param systemCode 系统代码
  22 + * @param marketId 市场 ID
  23 + * @return {@link ClientDto}
  24 + */
  25 + @DataSource(DataSourceConstants.DS_KEY_SLAVE)
  26 + ClientDto getClientParam(@Param("systemCode") String systemCode, @Param("marketId") Long marketId);
  27 +
  28 + /**
  29 + * 获取动态参数
  30 + *
  31 + * @param systemCode 系统代码
  32 + * @param code 法典
  33 + * @param marketId 市场 ID
  34 + * @return {@link BusinessDetailDto}
  35 + */
  36 + @DataSource(DataSourceConstants.DS_KEY_SLAVE)
  37 + BusinessDetailDto getDynamicParam(@Param("systemCode")String systemCode, @Param("code") String code, @Param("marketId")Long marketId);
  38 +
  39 +
  40 + /**
  41 + * 获取部门
  42 + *
  43 + * @param departmentId 部门 ID
  44 + * @return {@link DepartmentDto}
  45 + */
  46 + @DataSource(DataSourceConstants.DS_KEY_SLAVE)
  47 + DepartmentDto getDepartment(@Param("departmentId") Long departmentId);
  48 +
  49 + /**
  50 + * 获取基本配置
  51 + *
  52 + * @param systemCode 系统代码
  53 + * @param marketId 市场 ID
  54 + * @return {@link BaseConfigDto}
  55 + */
  56 + @DataSource(DataSourceConstants.DS_KEY_SLAVE)
  57 + BaseConfigDto getBaseConfig(@Param("systemCode") String systemCode, @Param("marketId") Long marketId);
  58 +
  59 +
  60 + /**
  61 + * 获取客户
  62 + *
  63 + * @param customerId 客户 ID
  64 + * @return {@link CustomerDto}
  65 + */
  66 + @DataSource(DataSourceConstants.DS_KEY_SLAVE)
  67 + CustomerDto getCustomer(@Param("customerId") Long customerId);
  68 +
  69 + /**
  70 + * 获取 Charge 项
  71 + *
  72 + * @param chargeItemId 收费商品 ID
  73 + * @return {@link ChargeItemDto}
  74 + */
  75 + @DataSource(DataSourceConstants.DS_KEY_SLAVE)
  76 + ChargeItemDto getChargeItem(@Param("chargeItemId") Long chargeItemId);
  77 +
  78 +
  79 + /**
  80 + * 获取映射数据
  81 + *
  82 + * @param mappingDto 映射 DTO
  83 + * @return {@link MappingDto}
  84 + */
  85 + @DataSource(DataSourceConstants.DS_KEY_SLAVE)
  86 + MappingDto getMappingData(@Param("mapping") MappingDto mappingDto);
  87 +
  88 +}
... ...
etrade-thirdparty/src/main/java/com/diligrp/etrade/thirdparty/message/GeneralMessage.java
1 1 package com.diligrp.etrade.thirdparty.message;
2 2  
  3 +import com.diligrp.etrade.thirdparty.type.BasicEnum;
3 4 import com.diligrp.etrade.thirdparty.type.BusinessEnum;
4 5  
5 6 /**
... ... @@ -9,11 +10,22 @@ import com.diligrp.etrade.thirdparty.type.BusinessEnum;
9 10 */
10 11 public class GeneralMessage {
11 12 private BusinessEnum business;
  13 + private BasicEnum basic;
12 14 private String data;
13 15 private Integer retryCount;
  16 + private Long marketId;
  17 + private String systemCode;
14 18  
15 19 public GeneralMessage() {
16 20 this.retryCount = 0;
  21 + this.systemCode = "kingdee";
  22 + }
  23 + public BasicEnum getBasic() {
  24 + return basic;
  25 + }
  26 +
  27 + public void setBasic(BasicEnum basic) {
  28 + this.basic = basic;
17 29 }
18 30  
19 31 public BusinessEnum getBusiness() {
... ... @@ -39,4 +51,20 @@ public class GeneralMessage {
39 51 public void setRetryCount(Integer retryCount) {
40 52 this.retryCount = retryCount;
41 53 }
  54 +
  55 + public Long getMarketId() {
  56 + return marketId;
  57 + }
  58 +
  59 + public void setMarketId(Long marketId) {
  60 + this.marketId = marketId;
  61 + }
  62 +
  63 + public String getSystemCode() {
  64 + return systemCode;
  65 + }
  66 +
  67 + public void setSystemCode(String systemCode) {
  68 + this.systemCode = systemCode;
  69 + }
42 70 }
... ...
etrade-thirdparty/src/main/java/com/diligrp/etrade/thirdparty/message/GeneralSendMessage.java 0 → 100644
  1 +package com.diligrp.etrade.thirdparty.message;
  2 +
  3 +import java.util.Map;
  4 +
  5 +/**
  6 + * @Author: zhangmeiyang
  7 + * @CreateTime: 2024-10-16 14:34
  8 + * @Version: todo
  9 + */
  10 +public class GeneralSendMessage {
  11 + private Map<String,Object> Model;
  12 + private Boolean IsAutoSubmitAndAudit;
  13 +
  14 + public Map<String, Object> getModel() {
  15 + return Model;
  16 + }
  17 +
  18 + public void setModel(Map<String, Object> model) {
  19 + Model = model;
  20 + }
  21 +
  22 + public Boolean getAutoSubmitAndAudit() {
  23 + return IsAutoSubmitAndAudit;
  24 + }
  25 +
  26 + public void setAutoSubmitAndAudit(Boolean autoSubmitAndAudit) {
  27 + IsAutoSubmitAndAudit = autoSubmitAndAudit;
  28 + }
  29 +}
... ...
etrade-thirdparty/src/main/java/com/diligrp/etrade/thirdparty/type/BasicEnum.java 0 → 100644
  1 +package com.diligrp.etrade.thirdparty.type;
  2 +
  3 +/**
  4 + * 基本枚举
  5 + *
  6 + * @author zhangmeiyang
  7 + * @Author: zhangmeiyang
  8 + * @CreateTime: 2024-10-16 10:13
  9 + * @Version: todo
  10 + * @date 2024/10/18
  11 + */
  12 +public enum BasicEnum {
  13 + DEPARTMENT("DEPARTMENT"),
  14 + CHARGE_ITEM("CHARGE_ITEM"),
  15 + CHARGE_ITEM_GROUP("CHARGE_ITEM_GROUP"),
  16 + CUSTOMER("CUSTOMER"),
  17 + FINANCIAL_CHANNEL_TYPE("FINANCIAL_CHANNEL_TYPE"),
  18 + FINANCIAL_BUSINESS_TYPE("FINANCIAL_BUSINESS_TYPE");
  19 + public final String code;
  20 +
  21 +
  22 + BasicEnum(String code) {
  23 + this.code = code;
  24 +
  25 + }
  26 +}
... ...
etrade-thirdparty/src/main/java/com/diligrp/etrade/thirdparty/type/BusinessEnum.java
1 1 package com.diligrp.etrade.thirdparty.type;
2 2  
3   -import com.diligrp.etrade.thirdparty.domain.co.ErrorMessageCo;
4   -import com.diligrp.etrade.thirdparty.domain.co.TestCo;
5   -
6 3 /**
7 4 * @Author: zhangmeiyang
8 5 * @CreateTime: 2024-09-10 10:53
9 6 * @Version: todo
10 7 */
11   -public enum BusinessEnum{
12   -
13   - ERROR("ERROR", ErrorMessageCo.class),
14   -
15   - TEST("TEST",TestCo.class);
  8 +public enum BusinessEnum {
16 9  
  10 + SETTLE("SETTLE"),
  11 + ENTRANCE_FEE("ENTRANCE_FEE"),
  12 + REFRIGERATOR("REFRIGERATOR"),
  13 + CARD("CARD"),
  14 + WEIGHING("WEIGHING"),
  15 + BILL("BILL");
17 16 public final String code;
18   - public final Class<?> clazz;
19 17  
20   - BusinessEnum(String code, Class<?> clazz) {
  18 + BusinessEnum(String code) {
21 19 this.code = code;
22   - this.clazz = clazz;
23 20 }
24 21 }
... ...
etrade-thirdparty/src/main/java/com/diligrp/etrade/thirdparty/type/SelectType.java 0 → 100644
  1 +package com.diligrp.etrade.thirdparty.type;
  2 +
  3 +import com.diligrp.etrade.core.type.IEnumType;
  4 +
  5 +public enum SelectType implements IEnumType {
  6 + FIXED(1,"固定"),
  7 + FOLLOW_THE_DOCUMENTS(2,"按照单据");
  8 +
  9 + private Integer code;
  10 + private String name;
  11 +
  12 + SelectType(Integer code, String name) {
  13 + this.code = code;
  14 + this.name = name;
  15 + }
  16 +
  17 + @Override
  18 + public int getCode() {
  19 + return this.code;
  20 + }
  21 +
  22 + public void setCode(Integer code) {
  23 + this.code = code;
  24 + }
  25 +
  26 + @Override
  27 + public String getName() {
  28 + return this.name;
  29 + }
  30 +
  31 + public void setName(String name) {
  32 + this.name = name;
  33 + }
  34 +}
... ...
etrade-thirdparty/src/main/java/com/diligrp/etrade/thirdparty/type/ThirdPartyErrorCodeEnum.java 0 → 100644
  1 +package com.diligrp.etrade.thirdparty.type;
  2 +
  3 +public enum ThirdPartyErrorCodeEnum {
  4 +// 0:默认
  5 +// 1:上下文丢失
  6 +// 2:没有权限
  7 +// 3:操作标识为空
  8 +// 4:异常
  9 +// 5:单据标识为空
  10 +// 6:数据库操作失败
  11 +// 7:许可错误
  12 +// 8:参数错误
  13 +// 9:指定字段/值不存在
  14 +// 10:未找到对应数据
  15 +// 11:验证失败
  16 +// 12:不可操作
  17 +// 13:网控冲突
  18 +// 14:调用限制
  19 +// 15:禁止管理员登录
  20 + DEFAULT("默认", "0"),
  21 + CONTEXT_LOST("上下文丢失", "1"),
  22 + NO_PERMISSION("没有权限", "2"),
  23 + OPERATION_ID_EMPTY("操作标识为空", "3"),
  24 + EXCEPTION("异常", "4"),
  25 + BILL_ID_EMPTY("单据标识为空", "5"),
  26 + DB_OPERATION_FAIL("数据库操作失败", "6"),
  27 + LICENSE_ERROR("许可错误", "7"),
  28 + PARAM_ERROR("参数错误", "8"),
  29 + FIELD_NOT_EXIST("指定字段/值不存在", "9"),
  30 + DATA_NOT_FOUND("未找到对应数据", "10"),
  31 + VALIDATE_FAIL("验证失败", "11"),
  32 + NOT_ALLOWED("不可操作", "12"),
  33 + NET_CONTROL_CONFLICT("网控冲突", "13"),
  34 + CALL_LIMIT("调用限制", "14"),
  35 + ADMIN_LOGIN_FORBIDDEN("禁止管理员登录", "15");
  36 +
  37 + public final String code;
  38 + public final String desc;
  39 +
  40 + ThirdPartyErrorCodeEnum(String desc, String code) {
  41 + this.desc = desc;
  42 + this.code = code;
  43 + }
  44 +
  45 + public static ThirdPartyErrorCodeEnum getByCode(String code) {
  46 + for (ThirdPartyErrorCodeEnum item : ThirdPartyErrorCodeEnum.values()) {
  47 + if (item.code.equals(code)) {
  48 + return item;
  49 + }
  50 + }
  51 + return DEFAULT;
  52 + }
  53 +}
... ...
etrade-thirdparty/src/main/java/com/diligrp/etrade/thirdparty/utils/BaseApiUtils.java 0 → 100644
  1 +package com.diligrp.etrade.thirdparty.utils;
  2 +
  3 +import com.kingdee.bos.webapi.entity.IdentifyInfo;
  4 +import com.kingdee.bos.webapi.sdk.K3CloudApi;
  5 +
  6 +/**
  7 + * 基本 API 实用程序
  8 + *
  9 + * @author zhangmeiyang
  10 + * @Author: zhangmeiyang
  11 + * @CreateTime: 2024-10-16 16:15
  12 + * @Version: todo
  13 + * @date 2024/10/23
  14 + */
  15 +public abstract class BaseApiUtils {
  16 + protected K3CloudApi api;
  17 +
  18 + public BaseApiUtils(IdentifyInfo identifyInfo) {
  19 + api = new K3CloudApi(identifyInfo);
  20 + }
  21 +}
... ...
etrade-thirdparty/src/main/java/com/diligrp/etrade/thirdparty/utils/BillTypeApiUtils.java 0 → 100644
  1 +package com.diligrp.etrade.thirdparty.utils;
  2 +
  3 +import com.diligrp.etrade.core.util.JsonUtils;
  4 +import com.diligrp.etrade.thirdparty.error.ThirdPartyException;
  5 +import com.diligrp.etrade.thirdparty.message.GeneralSendMessage;
  6 +import com.diligrp.etrade.thirdparty.type.ThirdPartyErrorCodeEnum;
  7 +import com.fasterxml.jackson.core.type.TypeReference;
  8 +import com.kingdee.bos.webapi.entity.IdentifyInfo;
  9 +import com.kingdee.bos.webapi.entity.OperateParam;
  10 +import com.kingdee.bos.webapi.entity.OperatorResult;
  11 +import com.kingdee.bos.webapi.entity.RepoRet;
  12 +import org.slf4j.Logger;
  13 +import org.slf4j.LoggerFactory;
  14 +
  15 +import java.util.List;
  16 +import java.util.Map;
  17 +
  18 +/**
  19 + * 账单类型 API 实用程序
  20 + *
  21 + * @author zhangmeiyang
  22 + * @Author: zhangmeiyang
  23 + * @CreateTime: 2024-10-16 16:12
  24 + * @Version: todo
  25 + * @date 2024/10/23
  26 + */
  27 +public class BillTypeApiUtils extends BaseApiUtils {
  28 + private static final Logger log = LoggerFactory.getLogger(FeeApiUtils.class);
  29 +
  30 + public BillTypeApiUtils(IdentifyInfo identifyInfo) {
  31 + super(identifyInfo);
  32 + }
  33 +
  34 + public String createBillType(String json) throws Exception {
  35 + Map<String, Object> map = JsonUtils.fromJsonString(json, new TypeReference<>() {
  36 + });
  37 + var message = new GeneralSendMessage();
  38 + message.setModel(map);
  39 + message.setAutoSubmitAndAudit(true);
  40 + return save(JsonUtils.toJsonString(message));
  41 + }
  42 +
  43 + public void updateBillType(String FNumber, String updateJson) throws Exception {
  44 + unAudit(FNumber);
  45 + Map<String, Object> map = JsonUtils.fromJsonString(updateJson, new TypeReference<>() {
  46 + });
  47 + var message = new GeneralSendMessage();
  48 + message.setModel(map);
  49 + message.setAutoSubmitAndAudit(true);
  50 + save(JsonUtils.toJsonString(message));
  51 + }
  52 +
  53 + private String save(String json) throws Exception {
  54 + String res = api.save("BOS_BillType", json);
  55 + RepoRet repoRet = JsonUtils.fromJsonString(res, new TypeReference<>() {
  56 + });
  57 + if (!repoRet.getResult().getResponseStatus().isIsSuccess()) {
  58 + ThirdPartyErrorCodeEnum errorCodeEnum = ThirdPartyErrorCodeEnum.getByCode(repoRet.getResult().getResponseStatus().getErrorCode());
  59 + throw new ThirdPartyException(errorCodeEnum.desc);
  60 + }
  61 + log.info("单据类型保存接口已完成,{}", res);
  62 + return repoRet.getResult().getResponseStatus().getSuccessEntitys().get(0).getId();
  63 + }
  64 +
  65 + private void unAudit(String FNumber) throws Exception {
  66 + var para = new OperateParam();
  67 + List<String> Numbers = List.of(FNumber);
  68 + para.setNumbers(Numbers);
  69 + OperatorResult res = api.unAudit("BOS_BillType", para);
  70 + if (!res.getResult().getResponseStatus().isIsSuccess()) {
  71 + ThirdPartyErrorCodeEnum errorCodeEnum = ThirdPartyErrorCodeEnum.getByCode(res.getResult().getResponseStatus().getErrorCode());
  72 + throw new ThirdPartyException(errorCodeEnum.desc);
  73 + }
  74 + log.info("单据类型反审核接口已完成,{}", res);
  75 + }
  76 +}
... ...
etrade-thirdparty/src/main/java/com/diligrp/etrade/thirdparty/utils/ContactApiUtils.java 0 → 100644
  1 +package com.diligrp.etrade.thirdparty.utils;
  2 +
  3 +import com.diligrp.etrade.core.util.JsonUtils;
  4 +import com.diligrp.etrade.thirdparty.error.ThirdPartyException;
  5 +import com.diligrp.etrade.thirdparty.message.GeneralSendMessage;
  6 +import com.diligrp.etrade.thirdparty.type.ThirdPartyErrorCodeEnum;
  7 +import com.fasterxml.jackson.core.type.TypeReference;
  8 +import com.kingdee.bos.webapi.entity.IdentifyInfo;
  9 +import com.kingdee.bos.webapi.entity.OperateParam;
  10 +import com.kingdee.bos.webapi.entity.OperatorResult;
  11 +import com.kingdee.bos.webapi.entity.RepoRet;
  12 +import org.slf4j.Logger;
  13 +import org.slf4j.LoggerFactory;
  14 +
  15 +import java.util.List;
  16 +import java.util.Map;
  17 +
  18 +/**
  19 + * 客户 API 实用程序
  20 + *
  21 + * @author zhangmeiyang
  22 + * @Author: zhangmeiyang
  23 + * @CreateTime: 2024-10-15 11:09
  24 + * @Version: todo
  25 + * @date 2024/10/23
  26 + */
  27 +public class ContactApiUtils extends BaseApiUtils {
  28 + private static final Logger log = LoggerFactory.getLogger(ContactApiUtils.class);
  29 +
  30 + public ContactApiUtils(IdentifyInfo identifyInfo) {
  31 + super(identifyInfo);
  32 + }
  33 +
  34 + public String createContact(String json) throws Exception {
  35 + Map<String, Object> map = JsonUtils.fromJsonString(json, new TypeReference<>() {});
  36 + var message = new GeneralSendMessage();
  37 + message.setModel(map);
  38 + message.setAutoSubmitAndAudit(true);
  39 + return save(JsonUtils.toJsonString(message));
  40 + }
  41 +
  42 + public void updateContact(String FNumber, String updateJson) throws Exception {
  43 + unAudit(FNumber);
  44 + Map<String, Object> map = JsonUtils.fromJsonString(updateJson, new TypeReference<>() {
  45 + });
  46 + var message = new GeneralSendMessage();
  47 + message.setModel(map);
  48 + message.setAutoSubmitAndAudit(true);
  49 + save(JsonUtils.toJsonString(message));
  50 + }
  51 +
  52 + private String save(String json) throws Exception {
  53 + String res = api.save("BD_CommonContact", json);
  54 + RepoRet repoRet = JsonUtils.fromJsonString(res, new TypeReference<>() {
  55 + });
  56 + if (!repoRet.getResult().getResponseStatus().isIsSuccess()) {
  57 + ThirdPartyErrorCodeEnum errorCodeEnum = ThirdPartyErrorCodeEnum.getByCode(repoRet.getResult().getResponseStatus().getErrorCode());
  58 + throw new ThirdPartyException(errorCodeEnum.desc);
  59 + }
  60 + log.info("联系人保存接口已完成,{}", res);
  61 + return repoRet.getResult().getResponseStatus().getSuccessEntitys().get(0).getId();
  62 + }
  63 +
  64 + private void unAudit(String FNumber) throws Exception {
  65 + var para = new OperateParam();
  66 + List<String> Numbers = List.of(FNumber);
  67 + para.setNumbers(Numbers);
  68 + OperatorResult res = api.unAudit("BD_CommonContact", para);
  69 + if (!res.getResult().getResponseStatus().isIsSuccess()) {
  70 + ThirdPartyErrorCodeEnum errorCodeEnum = ThirdPartyErrorCodeEnum.getByCode(res.getResult().getResponseStatus().getErrorCode());
  71 + throw new ThirdPartyException(errorCodeEnum.desc);
  72 + }
  73 + log.info("联系人反审核接口已完成,{}", res);
  74 + }
  75 +}
... ...
etrade-thirdparty/src/main/java/com/diligrp/etrade/thirdparty/utils/CustomerApiUtils.java 0 → 100644
  1 +package com.diligrp.etrade.thirdparty.utils;
  2 +
  3 +import com.diligrp.etrade.core.util.JsonUtils;
  4 +import com.diligrp.etrade.thirdparty.error.ThirdPartyException;
  5 +import com.diligrp.etrade.thirdparty.message.GeneralSendMessage;
  6 +import com.diligrp.etrade.thirdparty.type.ThirdPartyErrorCodeEnum;
  7 +import com.fasterxml.jackson.core.type.TypeReference;
  8 +import com.kingdee.bos.webapi.entity.IdentifyInfo;
  9 +import com.kingdee.bos.webapi.entity.OperateParam;
  10 +import com.kingdee.bos.webapi.entity.OperatorResult;
  11 +import com.kingdee.bos.webapi.entity.RepoRet;
  12 +import org.slf4j.Logger;
  13 +import org.slf4j.LoggerFactory;
  14 +
  15 +import java.util.List;
  16 +import java.util.Map;
  17 +
  18 +/**
  19 + * 客户 API 实用程序
  20 + *
  21 + * @author zhangmeiyang
  22 + * @Author: zhangmeiyang
  23 + * @CreateTime: 2024-10-15 11:09
  24 + * @Version: todo
  25 + * @date 2024/10/23
  26 + */
  27 +public class CustomerApiUtils extends BaseApiUtils {
  28 + private static final Logger log = LoggerFactory.getLogger(CustomerApiUtils.class);
  29 +
  30 + public CustomerApiUtils(IdentifyInfo identifyInfo) {
  31 + super(identifyInfo);
  32 + }
  33 +
  34 + public String createCustomer(String json) throws Exception {
  35 + Map<String, Object> map = JsonUtils.fromJsonString(json, new TypeReference<>() {});
  36 + var message = new GeneralSendMessage();
  37 + message.setModel(map);
  38 + message.setAutoSubmitAndAudit(true);
  39 + return save(JsonUtils.toJsonString(message));
  40 + }
  41 +
  42 + public void updateCustomer(String FNumber, String updateJson) throws Exception {
  43 + unAudit(FNumber);
  44 + Map<String, Object> map = JsonUtils.fromJsonString(updateJson, new TypeReference<>() {
  45 + });
  46 + var message = new GeneralSendMessage();
  47 + message.setModel(map);
  48 + message.setAutoSubmitAndAudit(true);
  49 + save(JsonUtils.toJsonString(message));
  50 + }
  51 +
  52 + private String save(String json) throws Exception {
  53 + String res = api.save("BD_Customer", json);
  54 + RepoRet repoRet = JsonUtils.fromJsonString(res, new TypeReference<>() {
  55 + });
  56 + if (!repoRet.getResult().getResponseStatus().isIsSuccess()) {
  57 + ThirdPartyErrorCodeEnum errorCodeEnum = ThirdPartyErrorCodeEnum.getByCode(repoRet.getResult().getResponseStatus().getErrorCode());
  58 + throw new ThirdPartyException(errorCodeEnum.desc);
  59 + }
  60 + log.info("客户保存接口已完成,{}", res);
  61 + return repoRet.getResult().getResponseStatus().getSuccessEntitys().get(0).getId();
  62 + }
  63 +
  64 + private void unAudit(String FNumber) throws Exception {
  65 + var para = new OperateParam();
  66 + List<String> Numbers = List.of(FNumber);
  67 + para.setNumbers(Numbers);
  68 + OperatorResult res = api.unAudit("BD_Customer", para);
  69 + if (!res.getResult().getResponseStatus().isIsSuccess()) {
  70 + ThirdPartyErrorCodeEnum errorCodeEnum = ThirdPartyErrorCodeEnum.getByCode(res.getResult().getResponseStatus().getErrorCode());
  71 + throw new ThirdPartyException(errorCodeEnum.desc);
  72 + }
  73 + log.info("客户反审核接口已完成,{}", res);
  74 + }
  75 +}
... ...
etrade-thirdparty/src/main/java/com/diligrp/etrade/thirdparty/utils/DepartmentApiUtils.java 0 → 100644
  1 +package com.diligrp.etrade.thirdparty.utils;
  2 +
  3 +import com.diligrp.etrade.core.util.JsonUtils;
  4 +import com.diligrp.etrade.thirdparty.error.ThirdPartyException;
  5 +import com.diligrp.etrade.thirdparty.message.GeneralSendMessage;
  6 +import com.diligrp.etrade.thirdparty.type.ThirdPartyErrorCodeEnum;
  7 +import com.fasterxml.jackson.core.type.TypeReference;
  8 +import com.kingdee.bos.webapi.entity.IdentifyInfo;
  9 +import com.kingdee.bos.webapi.entity.OperateParam;
  10 +import com.kingdee.bos.webapi.entity.OperatorResult;
  11 +import com.kingdee.bos.webapi.entity.RepoRet;
  12 +import org.slf4j.Logger;
  13 +import org.slf4j.LoggerFactory;
  14 +
  15 +import java.util.List;
  16 +import java.util.Map;
  17 +
  18 +/**
  19 + * settle 类型 API utils
  20 + *
  21 + * @author zhangmeiyang
  22 + * @Author: zhangmeiyang
  23 + * @CreateTime: 2024-10-16 16:12
  24 + * @Version: todo
  25 + * @date 2024/10/23
  26 + */
  27 +public class DepartmentApiUtils extends BaseApiUtils {
  28 + private static final Logger log = LoggerFactory.getLogger(FeeApiUtils.class);
  29 +
  30 + public DepartmentApiUtils(IdentifyInfo identifyInfo) {
  31 + super(identifyInfo);
  32 + }
  33 +
  34 + public String createDepartment(String json) throws Exception {
  35 + Map<String, Object> map = JsonUtils.fromJsonString(json, new TypeReference<>() {
  36 + });
  37 + var message = new GeneralSendMessage();
  38 + message.setModel(map);
  39 + message.setAutoSubmitAndAudit(true);
  40 + return save(JsonUtils.toJsonString(message));
  41 + }
  42 +
  43 + public void updateDepartment(String FNumber, String updateJson) throws Exception {
  44 + unAudit(FNumber);
  45 + Map<String, Object> map = JsonUtils.fromJsonString(updateJson, new TypeReference<>() {
  46 + });
  47 + var message = new GeneralSendMessage();
  48 + message.setModel(map);
  49 + message.setAutoSubmitAndAudit(true);
  50 + save(JsonUtils.toJsonString(message));
  51 + }
  52 +
  53 + private String save(String json) throws Exception {
  54 + String res = api.save("BD_Department", json);
  55 + RepoRet repoRet = JsonUtils.fromJsonString(res, new TypeReference<>() {});
  56 + if (!repoRet.getResult().getResponseStatus().isIsSuccess()) {
  57 + ThirdPartyErrorCodeEnum errorCodeEnum = ThirdPartyErrorCodeEnum.getByCode(repoRet.getResult().getResponseStatus().getErrorCode());
  58 + throw new ThirdPartyException(errorCodeEnum.desc);
  59 + }
  60 + log.info("部门保存接口已完成,{}", res);
  61 + return repoRet.getResult().getResponseStatus().getSuccessEntitys().get(0).getId();
  62 + }
  63 +
  64 + private void unAudit(String FNumber) throws Exception {
  65 + var para = new OperateParam();
  66 + List<String> Numbers = List.of(FNumber);
  67 + para.setNumbers(Numbers);
  68 + OperatorResult res = api.unAudit("BD_Department", para);
  69 + if (!res.getResult().getResponseStatus().isIsSuccess()) {
  70 + ThirdPartyErrorCodeEnum errorCodeEnum = ThirdPartyErrorCodeEnum.getByCode(res.getResult().getResponseStatus().getErrorCode());
  71 + throw new ThirdPartyException(errorCodeEnum.desc);
  72 + }
  73 + log.info("部门反审核接口已完成,{}", res);
  74 + }
  75 +}
... ...
etrade-thirdparty/src/main/java/com/diligrp/etrade/thirdparty/utils/FeeApiUtils.java 0 → 100644
  1 +package com.diligrp.etrade.thirdparty.utils;
  2 +
  3 +import com.diligrp.etrade.core.util.JsonUtils;
  4 +import com.diligrp.etrade.thirdparty.error.ThirdPartyException;
  5 +import com.diligrp.etrade.thirdparty.message.GeneralSendMessage;
  6 +import com.diligrp.etrade.thirdparty.type.ThirdPartyErrorCodeEnum;
  7 +import com.fasterxml.jackson.core.type.TypeReference;
  8 +import com.kingdee.bos.webapi.entity.IdentifyInfo;
  9 +import com.kingdee.bos.webapi.entity.OperateParam;
  10 +import com.kingdee.bos.webapi.entity.OperatorResult;
  11 +import com.kingdee.bos.webapi.entity.RepoRet;
  12 +import org.slf4j.Logger;
  13 +import org.slf4j.LoggerFactory;
  14 +
  15 +import java.util.List;
  16 +import java.util.Map;
  17 +
  18 +/**
  19 + * 费用 API 实用程序
  20 + *
  21 + * @author zhangmeiyang
  22 + * @Author: zhangmeiyang
  23 + * @CreateTime: 2024-10-16 15:25
  24 + * @Version: todo
  25 + * @date 2024/10/23
  26 + */
  27 +public class FeeApiUtils extends BaseApiUtils {
  28 + private static final Logger log = LoggerFactory.getLogger(FeeApiUtils.class);
  29 +
  30 + public FeeApiUtils(IdentifyInfo identifyInfo) {
  31 + super(identifyInfo);
  32 + }
  33 +
  34 +
  35 + public String createFee(String json) throws Exception {
  36 + Map<String, Object> map = JsonUtils.fromJsonString(json, new TypeReference<>() {
  37 + });
  38 + var message = new GeneralSendMessage();
  39 + message.setModel(map);
  40 + message.setAutoSubmitAndAudit(true);
  41 + return save(JsonUtils.toJsonString(message));
  42 + }
  43 +
  44 + public void updateFee(String FNumber, String updateJson) throws Exception {
  45 + unAudit(FNumber);
  46 + Map<String, Object> map = JsonUtils.fromJsonString(updateJson, new TypeReference<>() {
  47 + });
  48 + var message = new GeneralSendMessage();
  49 + message.setModel(map);
  50 + message.setAutoSubmitAndAudit(true);
  51 + save(JsonUtils.toJsonString(message));
  52 + }
  53 +
  54 + private String save(String json) throws Exception {
  55 + String res = api.save("BD_Expense", json);
  56 + RepoRet repoRet = JsonUtils.fromJsonString(res, new TypeReference<>() {
  57 + });
  58 + if (!repoRet.getResult().getResponseStatus().isIsSuccess()) {
  59 + ThirdPartyErrorCodeEnum errorCodeEnum = ThirdPartyErrorCodeEnum.getByCode(repoRet.getResult().getResponseStatus().getErrorCode());
  60 + throw new ThirdPartyException(errorCodeEnum.desc);
  61 + }
  62 + log.info("费用项目保存接口已完成,{}", res);
  63 + return repoRet.getResult().getResponseStatus().getSuccessEntitys().get(0).getId();
  64 + }
  65 +
  66 + private void unAudit(String FNumber) throws Exception {
  67 + var para = new OperateParam();
  68 + List<String> Numbers = List.of(FNumber);
  69 + para.setNumbers(Numbers);
  70 + OperatorResult res = api.unAudit("BD_Expense", para);
  71 + if (!res.getResult().getResponseStatus().isIsSuccess()) {
  72 + ThirdPartyErrorCodeEnum errorCodeEnum = ThirdPartyErrorCodeEnum.getByCode(res.getResult().getResponseStatus().getErrorCode());
  73 + throw new ThirdPartyException(errorCodeEnum.desc);
  74 + }
  75 + log.info("费用项目反审核接口已完成,{}", res);
  76 + }
  77 +}
... ...
etrade-thirdparty/src/main/java/com/diligrp/etrade/thirdparty/utils/FeeGroupApiUtils.java 0 → 100644
  1 +package com.diligrp.etrade.thirdparty.utils;
  2 +
  3 +import com.diligrp.etrade.core.util.JsonUtils;
  4 +import com.diligrp.etrade.thirdparty.error.ThirdPartyException;
  5 +import com.diligrp.etrade.thirdparty.message.GeneralSendMessage;
  6 +import com.diligrp.etrade.thirdparty.type.ThirdPartyErrorCodeEnum;
  7 +import com.fasterxml.jackson.core.type.TypeReference;
  8 +import com.kingdee.bos.webapi.entity.IdentifyInfo;
  9 +import com.kingdee.bos.webapi.entity.RepoRet;
  10 +import org.slf4j.Logger;
  11 +import org.slf4j.LoggerFactory;
  12 +
  13 +import java.util.Map;
  14 +
  15 +/**
  16 + * 费用组 API 实用程序
  17 + *
  18 + * @author zhangmeiyang
  19 + * @Author: zhangmeiyang
  20 + * @CreateTime: 2024-10-16 15:25
  21 + * @Version: todo
  22 + * @date 2024/10/23
  23 + */
  24 +public class FeeGroupApiUtils extends BaseApiUtils {
  25 + private static final Logger log = LoggerFactory.getLogger(FeeGroupApiUtils.class);
  26 +
  27 + public FeeGroupApiUtils(IdentifyInfo identifyInfo) {
  28 + super(identifyInfo);
  29 + }
  30 +
  31 +
  32 + /**
  33 + * 包含 新增、修改
  34 + *
  35 + * @param json
  36 + * @return {@link String}
  37 + * @throws Exception
  38 + */
  39 + public String saveFeeGroup(String json) throws Exception {
  40 + Map<String, Object> map = JsonUtils.fromJsonString(json, new TypeReference<>() {
  41 + });
  42 + var message = new GeneralSendMessage();
  43 + message.setModel(map);
  44 + message.setAutoSubmitAndAudit(true);
  45 + return save(JsonUtils.toJsonString(message));
  46 + }
  47 +
  48 + private String save(String json) throws Exception {
  49 + String res = api.groupSave("BD_Expense", json);
  50 + RepoRet repoRet = JsonUtils.fromJsonString(res, new TypeReference<>() {
  51 + });
  52 + if (!repoRet.getResult().getResponseStatus().isIsSuccess()) {
  53 + ThirdPartyErrorCodeEnum errorCodeEnum = ThirdPartyErrorCodeEnum.getByCode(repoRet.getResult().getResponseStatus().getErrorCode());
  54 + throw new ThirdPartyException(errorCodeEnum.desc);
  55 + }
  56 + log.info("费用项目保存接口已完成,{}", res);
  57 + return repoRet.getResult().getResponseStatus().getSuccessEntitys().get(0).getId();
  58 + }
  59 +
  60 +}
... ...
etrade-thirdparty/src/main/java/com/diligrp/etrade/thirdparty/utils/PurchaseOrderApiUtils.java 0 → 100644
  1 +package com.diligrp.etrade.thirdparty.utils;
  2 +
  3 +import com.diligrp.etrade.core.util.JsonUtils;
  4 +import com.diligrp.etrade.thirdparty.error.ThirdPartyException;
  5 +import com.diligrp.etrade.thirdparty.message.GeneralSendMessage;
  6 +import com.diligrp.etrade.thirdparty.type.ThirdPartyErrorCodeEnum;
  7 +import com.fasterxml.jackson.core.type.TypeReference;
  8 +import com.kingdee.bos.webapi.entity.IdentifyInfo;
  9 +import com.kingdee.bos.webapi.entity.RepoRet;
  10 +import org.slf4j.Logger;
  11 +import org.slf4j.LoggerFactory;
  12 +
  13 +import java.util.Map;
  14 +
  15 +/**
  16 + * 采购订单 API 实用程序
  17 + *
  18 + * @author zhangmeiyang
  19 + * @Author: zhangmeiyang
  20 + * @CreateTime: 2024-10-15 11:09
  21 + * @Version: todo
  22 + * @date 2024/10/23
  23 + */
  24 +public class PurchaseOrderApiUtils extends BaseApiUtils {
  25 + private static final Logger log = LoggerFactory.getLogger(PurchaseOrderApiUtils.class);
  26 +
  27 + public PurchaseOrderApiUtils(IdentifyInfo identifyInfo) {
  28 + super(identifyInfo);
  29 + }
  30 +
  31 +
  32 + public void createOnePurchaseOrder(String json) throws Exception {
  33 + Map<String, Object> map = JsonUtils.fromJsonString(json, new TypeReference<>() {
  34 + });
  35 + var message = new GeneralSendMessage();
  36 + message.setModel(map);
  37 + message.setAutoSubmitAndAudit(true);
  38 + save(JsonUtils.toJsonString(message));
  39 + }
  40 +
  41 + private void save(String json) throws Exception {
  42 + String res = api.save("PUR_PurchaseOrder", json);
  43 + RepoRet repoRet = JsonUtils.fromJsonString(res, new TypeReference<>() {});
  44 + if (!repoRet.getResult().getResponseStatus().isIsSuccess()) {
  45 + ThirdPartyErrorCodeEnum errorCodeEnum = ThirdPartyErrorCodeEnum.getByCode(repoRet.getResult().getResponseStatus().getErrorCode());
  46 + throw new ThirdPartyException(errorCodeEnum.desc);
  47 + }
  48 + log.info("采购订单接口已完成,{}", repoRet);
  49 + }
  50 +}
... ...
etrade-thirdparty/src/main/java/com/diligrp/etrade/thirdparty/utils/SettleTypeApiUtils.java 0 → 100644
  1 +package com.diligrp.etrade.thirdparty.utils;
  2 +
  3 +import com.diligrp.etrade.core.util.JsonUtils;
  4 +import com.diligrp.etrade.thirdparty.error.ThirdPartyException;
  5 +import com.diligrp.etrade.thirdparty.message.GeneralSendMessage;
  6 +import com.diligrp.etrade.thirdparty.type.ThirdPartyErrorCodeEnum;
  7 +import com.fasterxml.jackson.core.type.TypeReference;
  8 +import com.kingdee.bos.webapi.entity.IdentifyInfo;
  9 +import com.kingdee.bos.webapi.entity.OperateParam;
  10 +import com.kingdee.bos.webapi.entity.OperatorResult;
  11 +import com.kingdee.bos.webapi.entity.RepoRet;
  12 +import org.slf4j.Logger;
  13 +import org.slf4j.LoggerFactory;
  14 +
  15 +import java.util.List;
  16 +import java.util.Map;
  17 +
  18 +/**
  19 + * settle 类型 API utils
  20 + *
  21 + * @author zhangmeiyang
  22 + * @Author: zhangmeiyang
  23 + * @CreateTime: 2024-10-16 16:12
  24 + * @Version: todo
  25 + * @date 2024/10/23
  26 + */
  27 +public class SettleTypeApiUtils extends BaseApiUtils {
  28 + private static final Logger log = LoggerFactory.getLogger(FeeApiUtils.class);
  29 +
  30 + public SettleTypeApiUtils(IdentifyInfo identifyInfo) {
  31 + super(identifyInfo);
  32 + }
  33 +
  34 + public String createSettleType(String json) throws Exception {
  35 + Map<String, Object> map = JsonUtils.fromJsonString(json, new TypeReference<>() {
  36 + });
  37 + var message = new GeneralSendMessage();
  38 + message.setModel(map);
  39 + message.setAutoSubmitAndAudit(true);
  40 + return save(JsonUtils.toJsonString(message));
  41 + }
  42 +
  43 + public void updateSettleType(String FNumber, String updateJson) throws Exception {
  44 + unAudit(FNumber);
  45 + Map<String, Object> map = JsonUtils.fromJsonString(updateJson, new TypeReference<>() {
  46 + });
  47 + var message = new GeneralSendMessage();
  48 + message.setModel(map);
  49 + message.setAutoSubmitAndAudit(true);
  50 + save(JsonUtils.toJsonString(message));
  51 + }
  52 +
  53 + private String save(String json) throws Exception {
  54 + String res = api.save("BD_SETTLETYPE", json);
  55 + RepoRet repoRet = JsonUtils.fromJsonString(res, new TypeReference<>() {
  56 + });
  57 + if (!repoRet.getResult().getResponseStatus().isIsSuccess()) {
  58 + ThirdPartyErrorCodeEnum errorCodeEnum = ThirdPartyErrorCodeEnum.getByCode(repoRet.getResult().getResponseStatus().getErrorCode());
  59 + throw new ThirdPartyException(errorCodeEnum.desc);
  60 + }
  61 + log.info("单据类型保存接口已完成,{}", res);
  62 + return repoRet.getResult().getResponseStatus().getSuccessEntitys().get(0).getId();
  63 + }
  64 +
  65 + private void unAudit(String FNumber) throws Exception {
  66 + var para = new OperateParam();
  67 + List<String> Numbers = List.of(FNumber);
  68 + para.setNumbers(Numbers);
  69 + OperatorResult res = api.unAudit("BD_SETTLETYPE", para);
  70 + if (!res.getResult().getResponseStatus().isIsSuccess()) {
  71 + ThirdPartyErrorCodeEnum errorCodeEnum = ThirdPartyErrorCodeEnum.getByCode(res.getResult().getResponseStatus().getErrorCode());
  72 + throw new ThirdPartyException(errorCodeEnum.desc);
  73 + }
  74 + log.info("单据类型反审核接口已完成,{}", res);
  75 + }
  76 +}
... ...
etrade-thirdparty/src/main/resources/com/diligrp/etrade/thirdparty/mapper/RecordMapper.xml 0 → 100644
  1 +<?xml version="1.0" encoding="UTF-8"?>
  2 +<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  3 +<mapper namespace="com.diligrp.etrade.thirdparty.mapper.RecordMapper">
  4 +
  5 + <insert id="recordError">
  6 + INSERT INTO
  7 + `zr_etrade`.error_message_info ( `market_id`
  8 + , `system_code`
  9 + , `error_message`
  10 + , `data`
  11 + ,`business`)
  12 + VALUES
  13 + ( #{co.marketId}
  14 + , #{co.systemCode}
  15 + , #{co.errorMessage}
  16 + , #{co.content}
  17 + , #{co.business})
  18 + </insert>
  19 + <insert id="recordTheMappingData">
  20 + INSERT INTO `zr_etrade`.`mapping_data` ( `market_id`
  21 + , `system_code`
  22 + , `business`
  23 + , `system_data_id`
  24 + , `third_party_data_id`
  25 + )
  26 + VALUES
  27 + ( #{mapping.marketId}
  28 + , #{mapping.systemCode}
  29 + , #{mapping.business}
  30 + , #{mapping.systemDataId}
  31 + , #{mapping.thirdPartyDataId}
  32 + )
  33 + </insert>
  34 +</mapper>
... ...
etrade-thirdparty/src/main/resources/com/diligrp/etrade/thirdparty/mapper/TransMapper.xml 0 → 100644
  1 +<?xml version="1.0" encoding="UTF-8"?>
  2 +<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  3 +<mapper namespace="com.diligrp.etrade.thirdparty.mapper.TransMapper">
  4 + <select id="getClientParam" resultType="com.diligrp.etrade.thirdparty.domain.dto.ClientDto">
  5 + SELECT
  6 + data_centre_id AS dataCentreId
  7 + , apply_id AS applyId
  8 + , organization AS organization
  9 + , username AS username
  10 + , security_key AS securityKey
  11 + , service_address AS serviceAddress
  12 + FROM
  13 + `dili-basic-data`.`financial_client` fc
  14 + WHERE
  15 + 1 = 1
  16 + AND market_id = #{marketId}
  17 + AND system_code = #{systemCode}
  18 + </select>
  19 + <select id="getDynamicParam" resultType="com.diligrp.etrade.thirdparty.domain.dto.BusinessDetailDto">
  20 + SELECT
  21 + fb.code AS code
  22 + , fb.name AS name
  23 + , fbd.select_type AS selectType
  24 + , fbd.item_code AS itemCode
  25 + , fbd.item_name AS itemName
  26 + , fbd.item_relation_id AS itemRelationId
  27 + , fbd.item_value AS itemValue
  28 + FROM
  29 + `dili-basic-data`.`financial_business` fb
  30 + LEFT JOIN `dili-basic-data`.financial_business_detail fbd ON fb.id = fbd.financial_business_id
  31 + WHERE
  32 + 1 = 1
  33 + AND fb.market_id = #{marketId}
  34 + AND fb.code = #{code}
  35 + AND fb.system_code = #{systemCode}
  36 + </select>
  37 + <select id="getDepartment" resultType="com.diligrp.etrade.thirdparty.domain.dto.DepartmentDto">
  38 + SELECT
  39 + kd_code AS departmentCode
  40 + , name AS departmentName
  41 + , id AS id
  42 + FROM
  43 + `uap`.`department`
  44 + WHERE
  45 + 1 = 1
  46 + AND id = #{departmentId}
  47 + </select>
  48 + <select id="getBaseConfig" resultType="com.diligrp.etrade.thirdparty.domain.dto.BaseConfigDto">
  49 + SELECT
  50 + currency AS currency
  51 + , sync_item AS syncItem
  52 + FROM
  53 + `dili-basic-data`.`financial_base_config` fbc
  54 + WHERE
  55 + 1 = 1
  56 + AND market_id = #{marketId}
  57 + AND system_code = #{systemCode}
  58 + </select>
  59 + <select id="getCustomer" resultType="com.diligrp.etrade.thirdparty.domain.dto.CustomerDto">
  60 + SELECT
  61 + `id` AS `id`
  62 + , `code` AS `code`
  63 + FROM
  64 + `dili-customer`.`customer`
  65 + WHERE
  66 + 1 = 1
  67 + AND id = #{customerId}
  68 + </select>
  69 + <select id="getChargeItem" resultType="com.diligrp.etrade.thirdparty.domain.dto.ChargeItemDto">
  70 + SELECT
  71 + `id` AS `id`
  72 + , `business_type` AS `businessType`
  73 + FROM
  74 + `dili-basic-data`.`business_charge_item`
  75 + WHERE
  76 + 1 = 1
  77 + AND id = #{chargeItemId}
  78 + </select>
  79 + <select id="getMappingData" resultType="com.diligrp.etrade.thirdparty.domain.dto.MappingDto">
  80 + SELECT
  81 + `market_id` AS `marketId`
  82 + , `system_code` AS `systemCode`
  83 + , `business` AS `business`
  84 + , `system_data_id` AS `systemDataId`
  85 + , `third_party_data_id` AS `thirdPartyDataId`
  86 + FROM
  87 + `zr_etrade`.`mapping_data`
  88 + WHERE
  89 + 1 = 1
  90 + AND market_id = #{mapping.marketId}
  91 + AND system_code = #{mapping.systemCode}
  92 + AND business = #{mapping.business}
  93 + AND system_data_id = #{mapping.systemDataId}
  94 + </select>
  95 +</mapper>
... ...