Commit ade50705be5a4f2cec37d0516e24da0243d25c0f

Authored by zhangmeiyang
1 parent fb12eddc

金蝶对接pt3

Showing 21 changed files with 332 additions and 103 deletions
etrade-thirdparty/src/main/java/com/diligrp/etrade/thirdparty/component/TransferComponent.java
@@ -6,12 +6,14 @@ import com.diligrp.etrade.thirdparty.domain.co.basic.BaseSourceCo; @@ -6,12 +6,14 @@ import com.diligrp.etrade.thirdparty.domain.co.basic.BaseSourceCo;
6 import com.diligrp.etrade.thirdparty.domain.co.business.BaseBillCo; 6 import com.diligrp.etrade.thirdparty.domain.co.business.BaseBillCo;
7 import com.diligrp.etrade.thirdparty.domain.model.*; 7 import com.diligrp.etrade.thirdparty.domain.model.*;
8 import com.diligrp.etrade.thirdparty.mapper.TransMapper; 8 import com.diligrp.etrade.thirdparty.mapper.TransMapper;
  9 +import com.diligrp.etrade.thirdparty.type.OperateType;
9 import jakarta.annotation.Resource; 10 import jakarta.annotation.Resource;
10 import org.springframework.stereotype.Component; 11 import org.springframework.stereotype.Component;
11 import org.springframework.util.ObjectUtils; 12 import org.springframework.util.ObjectUtils;
12 13
13 import java.time.LocalDateTime; 14 import java.time.LocalDateTime;
14 import java.time.format.DateTimeFormatter; 15 import java.time.format.DateTimeFormatter;
  16 +import java.util.Objects;
15 17
16 /** 18 /**
17 * Transfer Component (传输组件) 19 * Transfer Component (传输组件)
@@ -36,22 +38,23 @@ public class TransferComponent { @@ -36,22 +38,23 @@ public class TransferComponent {
36 * @param systemCode 系统代码 38 * @param systemCode 系统代码
37 */ 39 */
38 public void transBaseCo(BaseBillCo co, Long marketId, String systemCode) { 40 public void transBaseCo(BaseBillCo co, Long marketId, String systemCode) {
  41 + co.setF_PZCW_Text(Objects.requireNonNull(OperateType.getOperateType(Integer.parseInt(co.getF_PZCW_Text()))).getName());
39 co.setFDATE(LocalDateTime.now().format(DateTimeFormatter.ofPattern(Constants.DATE_TIME_FORMAT))); 42 co.setFDATE(LocalDateTime.now().format(DateTimeFormatter.ofPattern(Constants.DATE_TIME_FORMAT)));
40 co.setFCURRENCYID(new FCURRENCYID()); 43 co.setFCURRENCYID(new FCURRENCYID());
41 co.setFMAINBOOKSTDCURRID(new FMAINBOOKSTDCURRID()); 44 co.setFMAINBOOKSTDCURRID(new FMAINBOOKSTDCURRID());
42 co.setFPAYORGID(new FPAYORGID()); 45 co.setFPAYORGID(new FPAYORGID());
43 co.setFSALEORGID(new FSALEORGID()); 46 co.setFSALEORGID(new FSALEORGID());
44 co.setFSETTLEORGID(new FSETTLEORGID()); 47 co.setFSETTLEORGID(new FSETTLEORGID());
45 - if (!ObjectUtils.isEmpty(co.getFORDERID())){ 48 + if (!ObjectUtils.isEmpty(co.getFORDERID())) {
46 this.transOrderId(co.getFORDERID()); 49 this.transOrderId(co.getFORDERID());
47 } 50 }
48 - if (!ObjectUtils.isEmpty(co.getFCUSTOMERID())){ 51 + if (!ObjectUtils.isEmpty(co.getFCUSTOMERID())) {
49 this.transCustomer(co.getFCUSTOMERID()); 52 this.transCustomer(co.getFCUSTOMERID());
50 } 53 }
51 - if (!ObjectUtils.isEmpty(co.getFSALEDEPTID())){ 54 + if (!ObjectUtils.isEmpty(co.getFSALEDEPTID())) {
52 this.transDepId(co.getFSALEDEPTID()); 55 this.transDepId(co.getFSALEDEPTID());
53 } 56 }
54 - if (!ObjectUtils.isEmpty(co.getFTRANSFERID())){ 57 + if (!ObjectUtils.isEmpty(co.getFTRANSFERID())) {
55 this.transTransferId(co.getFTRANSFERID()); 58 this.transTransferId(co.getFTRANSFERID());
56 } 59 }
57 this.transPayOrgId(co.getFPAYORGID(), marketId, systemCode); 60 this.transPayOrgId(co.getFPAYORGID(), marketId, systemCode);
@@ -61,7 +64,7 @@ public class TransferComponent { @@ -61,7 +64,7 @@ public class TransferComponent {
61 this.transMainBookCurrency(co.getFMAINBOOKSTDCURRID(), marketId, systemCode); 64 this.transMainBookCurrency(co.getFMAINBOOKSTDCURRID(), marketId, systemCode);
62 } 65 }
63 66
64 - public void transBasicCo(BaseSourceCo co, Long marketId, String systemCode){ 67 + public void transBasicCo(BaseSourceCo co, Long marketId, String systemCode) {
65 co.setFUseOrgId(new FUseOrgId()); 68 co.setFUseOrgId(new FUseOrgId());
66 co.setFCreateOrgId(new FCreateOrgId()); 69 co.setFCreateOrgId(new FCreateOrgId());
67 this.transFUseOrgId(co.getFUseOrgId(), marketId, systemCode); 70 this.transFUseOrgId(co.getFUseOrgId(), marketId, systemCode);
@@ -75,7 +78,7 @@ public class TransferComponent { @@ -75,7 +78,7 @@ public class TransferComponent {
75 * @param marketId 市场 ID 78 * @param marketId 市场 ID
76 * @param systemCode 系统代码 79 * @param systemCode 系统代码
77 */ 80 */
78 - public void transCurrency(FCURRENCYID fcurrencyid, Long marketId, String systemCode){ 81 + public void transCurrency(FCURRENCYID fcurrencyid, Long marketId, String systemCode) {
79 fcurrencyid.setFNumber(transMapper.getBaseConfig(systemCode, marketId).getCurrency()); 82 fcurrencyid.setFNumber(transMapper.getBaseConfig(systemCode, marketId).getCurrency());
80 } 83 }
81 84
@@ -86,7 +89,7 @@ public class TransferComponent { @@ -86,7 +89,7 @@ public class TransferComponent {
86 * @param marketId 市场 ID 89 * @param marketId 市场 ID
87 * @param systemCode 系统代码 90 * @param systemCode 系统代码
88 */ 91 */
89 - public void transMainBookCurrency(FMAINBOOKSTDCURRID fmainbookstdcurrid, Long marketId, String systemCode){ 92 + public void transMainBookCurrency(FMAINBOOKSTDCURRID fmainbookstdcurrid, Long marketId, String systemCode) {
90 fmainbookstdcurrid.setFNumber(transMapper.getBaseConfig(systemCode, marketId).getCurrency()); 93 fmainbookstdcurrid.setFNumber(transMapper.getBaseConfig(systemCode, marketId).getCurrency());
91 } 94 }
92 95
@@ -95,8 +98,8 @@ public class TransferComponent { @@ -95,8 +98,8 @@ public class TransferComponent {
95 * 98 *
96 * @param fcustomerid fcustomerid 99 * @param fcustomerid fcustomerid
97 */ 100 */
98 - public void transCustomer(FCUSTOMERID fcustomerid){  
99 - if (ObjectUtils.isEmpty(fcustomerid.getFNumber())){ 101 + public void transCustomer(FCUSTOMERID fcustomerid) {
  102 + if (ObjectUtils.isEmpty(fcustomerid.getFNumber())) {
100 return; 103 return;
101 } 104 }
102 fcustomerid.setFNumber(transMapper.getCustomer(Long.valueOf(fcustomerid.getFNumber())).getCode()); 105 fcustomerid.setFNumber(transMapper.getCustomer(Long.valueOf(fcustomerid.getFNumber())).getCode());
@@ -107,8 +110,8 @@ public class TransferComponent { @@ -107,8 +110,8 @@ public class TransferComponent {
107 * 110 *
108 * @param forderid forderid 111 * @param forderid forderid
109 */ 112 */
110 - public void transOrderId(FORDERID forderid){  
111 - if (ObjectUtils.isEmpty(forderid.getFNumber())){ 113 + public void transOrderId(FORDERID forderid) {
  114 + if (ObjectUtils.isEmpty(forderid.getFNumber())) {
112 return; 115 return;
113 } 116 }
114 forderid.setFNumber(transMapper.getCustomer(Long.valueOf(forderid.getFNumber())).getCode()); 117 forderid.setFNumber(transMapper.getCustomer(Long.valueOf(forderid.getFNumber())).getCode());
@@ -119,8 +122,8 @@ public class TransferComponent { @@ -119,8 +122,8 @@ public class TransferComponent {
119 * 122 *
120 * @param ftransferid ftransferid 123 * @param ftransferid ftransferid
121 */ 124 */
122 - public void transTransferId(FTRANSFERID ftransferid){  
123 - if (ObjectUtils.isEmpty(ftransferid.getFNumber())){ 125 + public void transTransferId(FTRANSFERID ftransferid) {
  126 + if (ObjectUtils.isEmpty(ftransferid.getFNumber())) {
124 return; 127 return;
125 } 128 }
126 ftransferid.setFNumber(transMapper.getCustomer(Long.valueOf(ftransferid.getFNumber())).getCode()); 129 ftransferid.setFNumber(transMapper.getCustomer(Long.valueOf(ftransferid.getFNumber())).getCode());
@@ -133,8 +136,8 @@ public class TransferComponent { @@ -133,8 +136,8 @@ public class TransferComponent {
133 * @param systemCode 系统代码 136 * @param systemCode 系统代码
134 * @param fUseOrgId f 使用组织 ID 137 * @param fUseOrgId f 使用组织 ID
135 */ 138 */
136 - public void transFUseOrgId(FUseOrgId fUseOrgId, Long marketId, String systemCode){  
137 - fUseOrgId.setFNumber(transMapper.getClientParam(systemCode,marketId).getOrganization()); 139 + public void transFUseOrgId(FUseOrgId fUseOrgId, Long marketId, String systemCode) {
  140 + fUseOrgId.setFNumber(transMapper.getClientParam(systemCode, marketId).getOrganization());
138 } 141 }
139 142
140 /** 143 /**
@@ -144,8 +147,8 @@ public class TransferComponent { @@ -144,8 +147,8 @@ public class TransferComponent {
144 * @param systemCode 系统代码 147 * @param systemCode 系统代码
145 * @param fCreateOrgId f 创建组织 ID 148 * @param fCreateOrgId f 创建组织 ID
146 */ 149 */
147 - public void transFCreateOrgId(FCreateOrgId fCreateOrgId, Long marketId, String systemCode){  
148 - fCreateOrgId.setFNumber(transMapper.getClientParam(systemCode,marketId).getOrganization()); 150 + public void transFCreateOrgId(FCreateOrgId fCreateOrgId, Long marketId, String systemCode) {
  151 + fCreateOrgId.setFNumber(transMapper.getClientParam(systemCode, marketId).getOrganization());
149 } 152 }
150 153
151 /** 154 /**
@@ -155,8 +158,8 @@ public class TransferComponent { @@ -155,8 +158,8 @@ public class TransferComponent {
155 * @param marketId 市场 ID 158 * @param marketId 市场 ID
156 * @param systemCode 系统代码 159 * @param systemCode 系统代码
157 */ 160 */
158 - public void transPayOrgId(FPAYORGID fpayorgid, Long marketId, String systemCode){  
159 - fpayorgid.setFNumber(transMapper.getClientParam(systemCode,marketId).getOrganization()); 161 + public void transPayOrgId(FPAYORGID fpayorgid, Long marketId, String systemCode) {
  162 + fpayorgid.setFNumber(transMapper.getClientParam(systemCode, marketId).getOrganization());
160 } 163 }
161 164
162 /** 165 /**
@@ -166,8 +169,8 @@ public class TransferComponent { @@ -166,8 +169,8 @@ public class TransferComponent {
166 * @param marketId 市场 ID 169 * @param marketId 市场 ID
167 * @param systemCode 系统代码 170 * @param systemCode 系统代码
168 */ 171 */
169 - public void transSaleOrgId(FSALEORGID fsaleorgid, Long marketId, String systemCode){  
170 - fsaleorgid.setFNumber(transMapper.getClientParam(systemCode,marketId).getOrganization()); 172 + public void transSaleOrgId(FSALEORGID fsaleorgid, Long marketId, String systemCode) {
  173 + fsaleorgid.setFNumber(transMapper.getClientParam(systemCode, marketId).getOrganization());
171 } 174 }
172 175
173 /** 176 /**
@@ -177,8 +180,8 @@ public class TransferComponent { @@ -177,8 +180,8 @@ public class TransferComponent {
177 * @param marketId 市场 ID 180 * @param marketId 市场 ID
178 * @param systemCode 系统代码 181 * @param systemCode 系统代码
179 */ 182 */
180 - public void transSettleOrgId(FSETTLEORGID fsettleorgid, Long marketId, String systemCode){  
181 - fsettleorgid.setFNumber(transMapper.getClientParam(systemCode,marketId).getOrganization()); 183 + public void transSettleOrgId(FSETTLEORGID fsettleorgid, Long marketId, String systemCode) {
  184 + fsettleorgid.setFNumber(transMapper.getClientParam(systemCode, marketId).getOrganization());
182 } 185 }
183 186
184 /** 187 /**
@@ -186,8 +189,8 @@ public class TransferComponent { @@ -186,8 +189,8 @@ public class TransferComponent {
186 * 189 *
187 * @param fsaledeptid fsaledeptid 190 * @param fsaledeptid fsaledeptid
188 */ 191 */
189 - public void transDepId(FSALEDEPTID fsaledeptid){  
190 - if (ObjectUtils.isEmpty(fsaledeptid.getFNumber())){ 192 + public void transDepId(FSALEDEPTID fsaledeptid) {
  193 + if (ObjectUtils.isEmpty(fsaledeptid.getFNumber())) {
191 return; 194 return;
192 } 195 }
193 fsaledeptid.setFNumber(transMapper.getDepartment(Long.valueOf(fsaledeptid.getFNumber())).getDepartmentCode()); 196 fsaledeptid.setFNumber(transMapper.getDepartment(Long.valueOf(fsaledeptid.getFNumber())).getDepartmentCode());
etrade-thirdparty/src/main/java/com/diligrp/etrade/thirdparty/demarcate/AbstractBillHandler.java
@@ -135,9 +135,10 @@ public abstract class AbstractBillHandler<T extends BaseBillCo> implements TypeM @@ -135,9 +135,10 @@ public abstract class AbstractBillHandler<T extends BaseBillCo> implements TypeM
135 135
136 protected void transferDataList(List<T> ts, Long marketId, String systemCode){ 136 protected void transferDataList(List<T> ts, Long marketId, String systemCode){
137 ts.forEach(e -> { 137 ts.forEach(e -> {
  138 + DynamicType dynamicType = DynamicType.fromCode(e.getSystemDynamicCode());
138 transfer(e, marketId, systemCode); 139 transfer(e, marketId, systemCode);
139 - getFilteredDynamicDataSingle(DynamicType.fromCode(e.getF_PZCW_Text()), marketId, systemCode).forEach((k, v) -> TRANSFER_FUNCTION_SINGLE_MAP.get(k).transferDynamic(e, v));  
140 - getFilteredDynamicDataMulti(DynamicType.fromCode(e.getF_PZCW_Text()), marketId, systemCode).forEach((k, v) -> TRANSFER_FUNCTION_MULTI_MAP.get(k).transferDynamic(e, v)); 140 + getFilteredDynamicDataSingle(dynamicType, marketId, systemCode).forEach((k, v) -> TRANSFER_FUNCTION_SINGLE_MAP.get(k).transferDynamic(e, v));
  141 + getFilteredDynamicDataMulti(dynamicType, marketId, systemCode).forEach((k, v) -> TRANSFER_FUNCTION_MULTI_MAP.get(k).transferDynamic(e, v));
141 }); 142 });
142 } 143 }
143 144
@@ -187,8 +188,8 @@ public abstract class AbstractBillHandler&lt;T extends BaseBillCo&gt; implements TypeM @@ -187,8 +188,8 @@ public abstract class AbstractBillHandler&lt;T extends BaseBillCo&gt; implements TypeM
187 * @throws Exception 例外 188 * @throws Exception 例外
188 */ 189 */
189 protected void sendPurchaseOrder(List<T> ts,Long marketId, String systemCode) throws Exception { 190 protected void sendPurchaseOrder(List<T> ts,Long marketId, String systemCode) throws Exception {
190 - ClientDto clientParam = transMapper.getClientParam(systemCode, marketId);  
191 var identifyInfo = new IdentifyInfo(); 191 var identifyInfo = new IdentifyInfo();
  192 + ClientDto clientParam = transMapper.getClientParam(systemCode, marketId);
192 identifyInfo.setAppId(clientParam.getApplyId()); 193 identifyInfo.setAppId(clientParam.getApplyId());
193 identifyInfo.setUserName(clientParam.getUsername()); 194 identifyInfo.setUserName(clientParam.getUsername());
194 identifyInfo.setServerUrl(clientParam.getServiceAddress()); 195 identifyInfo.setServerUrl(clientParam.getServiceAddress());
@@ -196,7 +197,8 @@ public abstract class AbstractBillHandler&lt;T extends BaseBillCo&gt; implements TypeM @@ -196,7 +197,8 @@ public abstract class AbstractBillHandler&lt;T extends BaseBillCo&gt; implements TypeM
196 identifyInfo.setdCID(clientParam.getDataCentreId()); 197 identifyInfo.setdCID(clientParam.getDataCentreId());
197 var util = new PurchaseOrderApiUtils(identifyInfo); 198 var util = new PurchaseOrderApiUtils(identifyInfo);
198 for (T e : ts) { 199 for (T e : ts) {
199 - util.createOnePurchaseOrder(JsonUtils.toJsonString(e), getDocumentType(marketId, systemCode, e.getFBillTypeID().getFNUMBER())); 200 + e.getFBillTypeID().setFNUMBER("YSD01_SYS");//TODO TEST
  201 + util.createOnePurchaseOrder(JsonUtils.toJsonString(e), "AR_receivable");
200 } 202 }
201 } 203 }
202 204
etrade-thirdparty/src/main/java/com/diligrp/etrade/thirdparty/domain/co/business/BaseBillCo.java
@@ -12,6 +12,7 @@ import java.util.List; @@ -12,6 +12,7 @@ import java.util.List;
12 * @Version: todo 12 * @Version: todo
13 */ 13 */
14 public class BaseBillCo implements Serializable { 14 public class BaseBillCo implements Serializable {
  15 + private String systemDynamicCode;
15 private String FAR_Remark; 16 private String FAR_Remark;
16 private String F_PZCW_Text; 17 private String F_PZCW_Text;
17 private String FDATE; 18 private String FDATE;
@@ -28,6 +29,25 @@ public class BaseBillCo implements Serializable { @@ -28,6 +29,25 @@ public class BaseBillCo implements Serializable {
28 private FChargeId FChargeId; 29 private FChargeId FChargeId;
29 private FSettleTypeID FSettleTypeID; 30 private FSettleTypeID FSettleTypeID;
30 private List<FEntityDetail> FEntityDetail; 31 private List<FEntityDetail> FEntityDetail;
  32 + private String F_ZDB_Text;
  33 +
  34 + @JsonProperty("systemDynamicCode")
  35 + public String getSystemDynamicCode() {
  36 + return systemDynamicCode;
  37 + }
  38 +
  39 + public void setSystemDynamicCode(String systemDynamicCode) {
  40 + this.systemDynamicCode = systemDynamicCode;
  41 + }
  42 +
  43 + @JsonProperty("F_ZDB_Text")
  44 + public String getF_ZDB_Text() {
  45 + return F_ZDB_Text;
  46 + }
  47 +
  48 + public void setF_ZDB_Text(String f_ZDB_Text) {
  49 + F_ZDB_Text = f_ZDB_Text;
  50 + }
31 51
32 @JsonProperty("FAR_Remark") 52 @JsonProperty("FAR_Remark")
33 public String getFAR_Remark() { 53 public String getFAR_Remark() {
etrade-thirdparty/src/main/java/com/diligrp/etrade/thirdparty/domain/co/business/CardBillCo.java
1 package com.diligrp.etrade.thirdparty.domain.co.business; 1 package com.diligrp.etrade.thirdparty.domain.co.business;
2 2
3 -import com.fasterxml.jackson.annotation.JsonProperty;  
4 -  
5 /** 3 /**
6 * @Author: zhangmeiyang 4 * @Author: zhangmeiyang
7 * @CreateTime: 2024-10-10 14:23 5 * @CreateTime: 2024-10-10 14:23
8 * @Version: todo 6 * @Version: todo
9 */ 7 */
10 public class CardBillCo extends BaseBillCo { 8 public class CardBillCo extends BaseBillCo {
11 - private String F_ZDB_Text;  
12 -  
13 - @JsonProperty("F_ZDB_Text")  
14 - public String getF_ZDB_Text() {  
15 - return F_ZDB_Text;  
16 - }  
17 9
18 - public void setF_ZDB_Text(String f_ZDB_Text) {  
19 - F_ZDB_Text = f_ZDB_Text;  
20 - }  
21 } 10 }
22 11
23 12
etrade-thirdparty/src/main/java/com/diligrp/etrade/thirdparty/domain/co/business/SettleBillCo.java
1 package com.diligrp.etrade.thirdparty.domain.co.business; 1 package com.diligrp.etrade.thirdparty.domain.co.business;
2 2
3 -import com.fasterxml.jackson.annotation.JsonProperty;  
4 -  
5 /** 3 /**
6 * @Author: zhangmeiyang 4 * @Author: zhangmeiyang
7 * @CreateTime: 2024-10-10 14:23 5 * @CreateTime: 2024-10-10 14:23
8 * @Version: todo 6 * @Version: todo
9 */ 7 */
10 public class SettleBillCo extends BaseBillCo { 8 public class SettleBillCo extends BaseBillCo {
11 - private String F_ZDB_Text;  
12 -  
13 - @JsonProperty("F_ZDB_Text")  
14 - public String getF_ZDB_Text() {  
15 - return F_ZDB_Text;  
16 - }  
17 -  
18 - public void setF_ZDB_Text(String f_ZDB_Text) {  
19 - F_ZDB_Text = f_ZDB_Text;  
20 - }  
21 9
22 } 10 }
23 11
etrade-thirdparty/src/main/java/com/diligrp/etrade/thirdparty/domain/co/business/WeighingBillCo.java
@@ -7,5 +7,4 @@ package com.diligrp.etrade.thirdparty.domain.co.business; @@ -7,5 +7,4 @@ package com.diligrp.etrade.thirdparty.domain.co.business;
7 */ 7 */
8 public class WeighingBillCo extends BaseBillCo { 8 public class WeighingBillCo extends BaseBillCo {
9 9
10 -  
11 } 10 }
etrade-thirdparty/src/main/java/com/diligrp/etrade/thirdparty/domain/model/FT_BD_CUSTLOCATION.java
@@ -10,10 +10,10 @@ import com.fasterxml.jackson.annotation.JsonProperty; @@ -10,10 +10,10 @@ import com.fasterxml.jackson.annotation.JsonProperty;
10 */ 10 */
11 public class FT_BD_CUSTLOCATION { 11 public class FT_BD_CUSTLOCATION {
12 private FContactId FContactId; 12 private FContactId FContactId;
13 - private String FNumber;  
14 private String FName; 13 private String FName;
15 - private String FMobile; 14 + private String FMOBILEPHONE;
16 private String FBizAddress; 15 private String FBizAddress;
  16 + private String FCompanyType;
17 17
18 @JsonProperty("FContactId") 18 @JsonProperty("FContactId")
19 public FContactId getFContactId() { 19 public FContactId getFContactId() {
@@ -24,15 +24,6 @@ public class FT_BD_CUSTLOCATION { @@ -24,15 +24,6 @@ public class FT_BD_CUSTLOCATION {
24 this.FContactId = FContactId; 24 this.FContactId = FContactId;
25 } 25 }
26 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") 27 @JsonProperty("FName")
37 public String getFName() { 28 public String getFName() {
38 return FName; 29 return FName;
@@ -42,13 +33,13 @@ public class FT_BD_CUSTLOCATION { @@ -42,13 +33,13 @@ public class FT_BD_CUSTLOCATION {
42 this.FName = FName; 33 this.FName = FName;
43 } 34 }
44 35
45 - @JsonProperty("FMobile")  
46 - public String getFMobile() {  
47 - return FMobile; 36 + @JsonProperty("FMOBILEPHONE")
  37 + public String getFMOBILEPHONE() {
  38 + return FMOBILEPHONE;
48 } 39 }
49 40
50 - public void setFMobile(String FMobile) {  
51 - this.FMobile = FMobile; 41 + public void setFMOBILEPHONE(String FMOBILEPHONE) {
  42 + this.FMOBILEPHONE = FMOBILEPHONE;
52 } 43 }
53 44
54 @JsonProperty("FBizAddress") 45 @JsonProperty("FBizAddress")
@@ -59,4 +50,13 @@ public class FT_BD_CUSTLOCATION { @@ -59,4 +50,13 @@ public class FT_BD_CUSTLOCATION {
59 public void setFBizAddress(String FBizAddress) { 50 public void setFBizAddress(String FBizAddress) {
60 this.FBizAddress = FBizAddress; 51 this.FBizAddress = FBizAddress;
61 } 52 }
  53 +
  54 + @JsonProperty("FCompanyType")
  55 + public String getFCompanyType() {
  56 + return FCompanyType;
  57 + }
  58 +
  59 + public void setFCompanyType(String FCompanyType) {
  60 + this.FCompanyType = FCompanyType;
  61 + }
62 } 62 }
etrade-thirdparty/src/main/java/com/diligrp/etrade/thirdparty/exec/basic/BasicReceiver.java
@@ -40,34 +40,34 @@ public class BasicReceiver extends AbstractReceiver { @@ -40,34 +40,34 @@ public class BasicReceiver extends AbstractReceiver {
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") 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 { 41 public void receiveMessage(Channel channel, Message message) throws IOException {
42 var content = new String(message.getBody(), StandardCharsets.UTF_8); 42 var content = new String(message.getBody(), StandardCharsets.UTF_8);
43 - LOG.info("business receive message:{}", content); 43 + LOG.info("基础数据队列收到消息:{}", content);
44 GeneralMessage msg = JsonUtils.fromJsonString(content, GeneralMessage.class); 44 GeneralMessage msg = JsonUtils.fromJsonString(content, GeneralMessage.class);
45 try { 45 try {
46 Holder.BASIC_CONTEXT.get(msg.getBasic()).handle(msg.getData(), msg.getMarketId(), msg.getSystemCode()); 46 Holder.BASIC_CONTEXT.get(msg.getBasic()).handle(msg.getData(), msg.getMarketId(), msg.getSystemCode());
47 channel.basicAck(message.getMessageProperties().getDeliveryTag(), false); 47 channel.basicAck(message.getMessageProperties().getDeliveryTag(), false);
48 - LOG.info("business handle success:{}", content); 48 + LOG.info("基础数据队列消息处理成功:{}", content);
49 } catch (Exception e) { 49 } catch (Exception e) {
50 channel.basicAck(message.getMessageProperties().getDeliveryTag(), false); 50 channel.basicAck(message.getMessageProperties().getDeliveryTag(), false);
51 msg.setRetryCount(msg.getRetryCount() + 1); 51 msg.setRetryCount(msg.getRetryCount() + 1);
52 sendDelayMsg(DELAY, JsonUtils.toJsonString(msg)); 52 sendDelayMsg(DELAY, JsonUtils.toJsonString(msg));
53 - LOG.error("business exception:", e); 53 + LOG.error("基础数据队列消息处理失败:", e);
54 } 54 }
55 } 55 }
56 56
57 @RabbitListener(queues = ZR_BASIC_DEAD_QUEUE, ackMode = "MANUAL") 57 @RabbitListener(queues = ZR_BASIC_DEAD_QUEUE, ackMode = "MANUAL")
58 public void handleCustomDelayMsg(Channel channel, Message message) throws IOException { 58 public void handleCustomDelayMsg(Channel channel, Message message) throws IOException {
59 var content = new String(message.getBody(), StandardCharsets.UTF_8); 59 var content = new String(message.getBody(), StandardCharsets.UTF_8);
60 - LOG.info("business receive retry message:{}", content); 60 + LOG.info("基础数据重试队列收到消息:{}", content);
61 GeneralMessage msg = JsonUtils.fromJsonString(content, GeneralMessage.class); 61 GeneralMessage msg = JsonUtils.fromJsonString(content, GeneralMessage.class);
62 try { 62 try {
63 Holder.BASIC_CONTEXT.get(msg.getBasic()).handle(msg.getData(), msg.getMarketId(), msg.getSystemCode()); 63 Holder.BASIC_CONTEXT.get(msg.getBasic()).handle(msg.getData(), msg.getMarketId(), msg.getSystemCode());
64 channel.basicAck(message.getMessageProperties().getDeliveryTag(), false); 64 channel.basicAck(message.getMessageProperties().getDeliveryTag(), false);
65 - LOG.info("business retry message success:{}", content); 65 + LOG.info("基础数据重试队列消息处理成功:{}", content);
66 } catch (Exception e) { 66 } catch (Exception e) {
67 channel.basicAck(message.getMessageProperties().getDeliveryTag(), false); 67 channel.basicAck(message.getMessageProperties().getDeliveryTag(), false);
68 if (msg.getRetryCount() > 3) { 68 if (msg.getRetryCount() > 3) {
69 super.handleError(e.fillInStackTrace().getMessage(), msg.getData(), msg.getBasic().code, msg.getSystemCode(), msg.getMarketId()); 69 super.handleError(e.fillInStackTrace().getMessage(), msg.getData(), msg.getBasic().code, msg.getSystemCode(), msg.getMarketId());
70 - LOG.error("retry business exception:", e); 70 + LOG.error("基础数据重试队列消息处理失败:", e);
71 } else { 71 } else {
72 msg.setRetryCount(msg.getRetryCount() + 1); 72 msg.setRetryCount(msg.getRetryCount() + 1);
73 sendDelayMsg(DELAY, JsonUtils.toJsonString(msg)); 73 sendDelayMsg(DELAY, JsonUtils.toJsonString(msg));
etrade-thirdparty/src/main/java/com/diligrp/etrade/thirdparty/exec/business/BusinessReceiver.java
@@ -38,34 +38,34 @@ public class BusinessReceiver extends AbstractReceiver { @@ -38,34 +38,34 @@ public class BusinessReceiver extends AbstractReceiver {
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") 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")
39 public void receiveMessage(Channel channel, Message message) throws IOException { 39 public void receiveMessage(Channel channel, Message message) throws IOException {
40 var content = new String(message.getBody(), StandardCharsets.UTF_8); 40 var content = new String(message.getBody(), StandardCharsets.UTF_8);
41 - LOG.info("basic receive message:{}",content); 41 + LOG.info("业务队列收到消息:{}",content);
42 GeneralMessage msg = JsonUtils.fromJsonString(content, GeneralMessage.class); 42 GeneralMessage msg = JsonUtils.fromJsonString(content, GeneralMessage.class);
43 try { 43 try {
44 Holder.BUSINESS_CONTEXT.get(msg.getBusiness()).handle(msg.getData(), msg.getMarketId(), msg.getSystemCode()); 44 Holder.BUSINESS_CONTEXT.get(msg.getBusiness()).handle(msg.getData(), msg.getMarketId(), msg.getSystemCode());
45 channel.basicAck(message.getMessageProperties().getDeliveryTag(), false); 45 channel.basicAck(message.getMessageProperties().getDeliveryTag(), false);
46 - LOG.info("basic handle success:{}",content); 46 + LOG.info("业务队列消息处理成功:{}",content);
47 } catch (Exception e) { 47 } catch (Exception e) {
48 channel.basicAck(message.getMessageProperties().getDeliveryTag(), false); 48 channel.basicAck(message.getMessageProperties().getDeliveryTag(), false);
49 msg.setRetryCount(msg.getRetryCount()+1); 49 msg.setRetryCount(msg.getRetryCount()+1);
50 sendDelayMsg(DELAY, JsonUtils.toJsonString(msg)); 50 sendDelayMsg(DELAY, JsonUtils.toJsonString(msg));
51 - LOG.error("basic exception:",e); 51 + LOG.error("业务队列消息处理失败:",e);
52 } 52 }
53 } 53 }
54 54
55 @RabbitListener(queues = ZR_BUSINESS_DEAD_QUEUE, ackMode = "MANUAL") 55 @RabbitListener(queues = ZR_BUSINESS_DEAD_QUEUE, ackMode = "MANUAL")
56 public void handleCustomDelayMsg(Channel channel, Message message) throws IOException { 56 public void handleCustomDelayMsg(Channel channel, Message message) throws IOException {
57 var content = new String(message.getBody(), StandardCharsets.UTF_8); 57 var content = new String(message.getBody(), StandardCharsets.UTF_8);
58 - LOG.info("basic receive retry message:{}",content); 58 + LOG.info("业务重试队列收到消息:{}",content);
59 GeneralMessage msg = JsonUtils.fromJsonString(content, GeneralMessage.class); 59 GeneralMessage msg = JsonUtils.fromJsonString(content, GeneralMessage.class);
60 try { 60 try {
61 Holder.BUSINESS_CONTEXT.get(msg.getBusiness()).handle(msg.getData(), msg.getMarketId(), msg.getSystemCode()); 61 Holder.BUSINESS_CONTEXT.get(msg.getBusiness()).handle(msg.getData(), msg.getMarketId(), msg.getSystemCode());
62 channel.basicAck(message.getMessageProperties().getDeliveryTag(), false); 62 channel.basicAck(message.getMessageProperties().getDeliveryTag(), false);
63 - LOG.info("basic retry message success:{}",content); 63 + LOG.info("业务重试队列消息处理成功:{}",content);
64 } catch (Exception e) { 64 } catch (Exception e) {
65 channel.basicAck(message.getMessageProperties().getDeliveryTag(), false); 65 channel.basicAck(message.getMessageProperties().getDeliveryTag(), false);
66 if (msg.getRetryCount() > 3) { 66 if (msg.getRetryCount() > 3) {
67 super.handleError(e.fillInStackTrace().getMessage(), msg.getData(), msg.getBusiness().code, msg.getSystemCode(),msg.getMarketId()); 67 super.handleError(e.fillInStackTrace().getMessage(), msg.getData(), msg.getBusiness().code, msg.getSystemCode(),msg.getMarketId());
68 - LOG.error("retry basic exception:",e); 68 + LOG.error("业务重试队列消息处理失败:",e);
69 }else{ 69 }else{
70 msg.setRetryCount(msg.getRetryCount() + 1); 70 msg.setRetryCount(msg.getRetryCount() + 1);
71 sendDelayMsg(DELAY, JsonUtils.toJsonString(msg)); 71 sendDelayMsg(DELAY, JsonUtils.toJsonString(msg));
etrade-thirdparty/src/main/java/com/diligrp/etrade/thirdparty/handler/basic/CustomerBasicHandler.java
@@ -13,6 +13,7 @@ import com.fasterxml.jackson.core.type.TypeReference; @@ -13,6 +13,7 @@ import com.fasterxml.jackson.core.type.TypeReference;
13 import org.springframework.stereotype.Component; 13 import org.springframework.stereotype.Component;
14 import org.springframework.util.ObjectUtils; 14 import org.springframework.util.ObjectUtils;
15 15
  16 +import java.util.ArrayList;
16 import java.util.List; 17 import java.util.List;
17 18
18 /** 19 /**
@@ -22,6 +23,7 @@ import java.util.List; @@ -22,6 +23,7 @@ import java.util.List;
22 */ 23 */
23 @Component 24 @Component
24 public class CustomerBasicHandler extends AbstractBasicHandler<CustomerCo> { 25 public class CustomerBasicHandler extends AbstractBasicHandler<CustomerCo> {
  26 + private static final String F_COMPANY_TYPE = "BD_Customer";
25 27
26 @Override 28 @Override
27 public void handleInside(String json, Long marketId, String systemCode) throws Exception { 29 public void handleInside(String json, Long marketId, String systemCode) throws Exception {
@@ -32,14 +34,19 @@ public class CustomerBasicHandler extends AbstractBasicHandler&lt;CustomerCo&gt; { @@ -32,14 +34,19 @@ public class CustomerBasicHandler extends AbstractBasicHandler&lt;CustomerCo&gt; {
32 super.transfer(e, marketId, systemCode); 34 super.transfer(e, marketId, systemCode);
33 MappingDto mappingData = super.getMappingData(marketId, systemCode, e.getSystemDataId()); 35 MappingDto mappingData = super.getMappingData(marketId, systemCode, e.getSystemDataId());
34 List<FT_BD_CUSTLOCATION> ftBdCustlocation = e.getFT_BD_CUSTLOCATION(); 36 List<FT_BD_CUSTLOCATION> ftBdCustlocation = e.getFT_BD_CUSTLOCATION();
  37 + var list = new ArrayList<FT_BD_CUSTLOCATION>();
35 if (!ObjectUtils.isEmpty(ftBdCustlocation)){ 38 if (!ObjectUtils.isEmpty(ftBdCustlocation)){
36 for (FT_BD_CUSTLOCATION ftBdCustLocation : ftBdCustlocation) { 39 for (FT_BD_CUSTLOCATION ftBdCustLocation : ftBdCustlocation) {
  40 + ftBdCustLocation.setFCompanyType(F_COMPANY_TYPE);
37 String contact = contactUtils.createContact(JsonUtils.toJsonString(ftBdCustLocation)); 41 String contact = contactUtils.createContact(JsonUtils.toJsonString(ftBdCustLocation));
38 FContactId fContactId = new FContactId(); 42 FContactId fContactId = new FContactId();
39 fContactId.setFNUMBER(contact); 43 fContactId.setFNUMBER(contact);
40 - ftBdCustLocation.setFContactId(fContactId); 44 + var item = new FT_BD_CUSTLOCATION();
  45 + item.setFContactId(fContactId);
  46 + list.add(item);
41 } 47 }
42 } 48 }
  49 + e.setFT_BD_CUSTLOCATION(list);
43 e.setFCUSTID(ObjectUtils.isEmpty(mappingData) ? null : mappingData.getThirdPartyDataId()); 50 e.setFCUSTID(ObjectUtils.isEmpty(mappingData) ? null : mappingData.getThirdPartyDataId());
44 if (!ObjectUtils.isEmpty(mappingData)){ 51 if (!ObjectUtils.isEmpty(mappingData)){
45 customerUtils.updateCustomer(String.valueOf(mappingData.getThirdPartyDataId()),JsonUtils.toJsonString(e)); 52 customerUtils.updateCustomer(String.valueOf(mappingData.getThirdPartyDataId()),JsonUtils.toJsonString(e));
etrade-thirdparty/src/main/java/com/diligrp/etrade/thirdparty/message/GeneralMessage.java
@@ -9,6 +9,7 @@ import com.diligrp.etrade.thirdparty.type.BusinessEnum; @@ -9,6 +9,7 @@ import com.diligrp.etrade.thirdparty.type.BusinessEnum;
9 * @Version: todo 9 * @Version: todo
10 */ 10 */
11 public class GeneralMessage { 11 public class GeneralMessage {
  12 + private static final String SYSTEM_CODE = "kingdee";
12 private BusinessEnum business; 13 private BusinessEnum business;
13 private BasicEnum basic; 14 private BasicEnum basic;
14 private String data; 15 private String data;
@@ -18,8 +19,9 @@ public class GeneralMessage { @@ -18,8 +19,9 @@ public class GeneralMessage {
18 19
19 public GeneralMessage() { 20 public GeneralMessage() {
20 this.retryCount = 0; 21 this.retryCount = 0;
21 - this.systemCode = "kingdee"; 22 + this.systemCode = SYSTEM_CODE;
22 } 23 }
  24 +
23 public BasicEnum getBasic() { 25 public BasicEnum getBasic() {
24 return basic; 26 return basic;
25 } 27 }
etrade-thirdparty/src/main/java/com/diligrp/etrade/thirdparty/message/GeneralSendMessage.java
1 package com.diligrp.etrade.thirdparty.message; 1 package com.diligrp.etrade.thirdparty.message;
2 2
  3 +import com.fasterxml.jackson.annotation.JsonProperty;
  4 +
3 import java.util.Map; 5 import java.util.Map;
4 6
5 /** 7 /**
@@ -11,6 +13,7 @@ public class GeneralSendMessage { @@ -11,6 +13,7 @@ public class GeneralSendMessage {
11 private Map<String,Object> Model; 13 private Map<String,Object> Model;
12 private Boolean IsAutoSubmitAndAudit; 14 private Boolean IsAutoSubmitAndAudit;
13 15
  16 + @JsonProperty("Model")
14 public Map<String, Object> getModel() { 17 public Map<String, Object> getModel() {
15 return Model; 18 return Model;
16 } 19 }
@@ -19,6 +22,7 @@ public class GeneralSendMessage { @@ -19,6 +22,7 @@ public class GeneralSendMessage {
19 Model = model; 22 Model = model;
20 } 23 }
21 24
  25 + @JsonProperty("IsAutoSubmitAndAudit")
22 public Boolean getAutoSubmitAndAudit() { 26 public Boolean getAutoSubmitAndAudit() {
23 return IsAutoSubmitAndAudit; 27 return IsAutoSubmitAndAudit;
24 } 28 }
etrade-thirdparty/src/main/java/com/diligrp/etrade/thirdparty/type/OperateType.java 0 → 100644
  1 +package com.diligrp.etrade.thirdparty.type;
  2 +
  3 +import java.util.ArrayList;
  4 +import java.util.Arrays;
  5 +import java.util.List;
  6 +
  7 +/**
  8 + * @description:
  9 + * 柜台操作记录类型
  10 + * @author :WangBo
  11 + * @time :2020年6月17日下午5:15:19
  12 + */
  13 +public enum OperateType {
  14 + ACCOUNT_TRANSACT("办卡", 1010),
  15 + ACCOUNT_CHARGE("存款", 1011),
  16 + ACCOUNT_WITHDRAW("取款", 1012),
  17 + BANK_ACCOUNT_CHARGE("银行存款", 2011),
  18 + CHANGE("换卡", 1013),
  19 + LOSS_CARD("挂失", 1014),
  20 + LOSS_REMOVE("解挂", 1015),
  21 + PWD_CHANGE("修改密码", 1016),
  22 + RESET_PWD("重置密码", 1017),
  23 + REFUND_CARD("退卡", 1018),
  24 + LIFT_LOCKED("卡片解锁", 1019),
  25 + FLAT_COST("缴费", 1020),
  26 + BANKCARD_BIND("银行卡绑定", 1021),
  27 + BANKCARD_REMOVE("银行卡解绑", 1022),
  28 + BANK_TRANSFER("转账", 1023),
  29 + PERMISSION_SET("权限设置", 1024),
  30 + BANK_ACCOUNT_WITHDRAW("银行取款", 2012),
  31 + PAYEE("领款", 1025),
  32 + PAYER("交款", 1026),
  33 + FROZEN_FUND("冻结资金", 1027),
  34 + UNFROZEN_FUND("解冻资金", 1028),
  35 + FROZEN_ACCOUNT("冻结账户", 1029),
  36 + UNFROZEN_ACCOUNT("解冻账户", 1030),
  37 + FUND_REVERSE("冲正", 1031),
  38 + FIRM_WITHDRAW("市场圈提", 1032),
  39 + ETC_BIND("ETC绑定", 1033),
  40 + ETC_PAY("ETC缴费", 1034),
  41 + SCAN_ACCOUNT_CHARGE("扫码存款", 1035),
  42 + // CYCLE_SURPLUS("账期调账",1035),
  43 +// CYCLE_LOSS("账期罚款",1036),
  44 + DAILY_SETTLE("日扎处理", 1036),
  45 + TRANSFER_OUT("柜员转出", 1037),
  46 + TRANSFER_IN("柜员转入", 1038),
  47 + PERMISSION_SET_BUSINESS("卡账户权限设置", 24),//业务日志的业务类型
  48 +
  49 + CAIWU_PAYEE("从财务领款", 2025),
  50 +
  51 + CAIWU_PAYER("向财务交款", 2026),
  52 +
  53 + BOOTH_LEASE("摊位租赁", 1),
  54 + EARNEST("定金", 2),
  55 + DEPOSIT_ORDER("保证金", 3),
  56 + LOCATION_LEASE("冷库租赁", 4),
  57 + LODGING_LEASE("公寓租赁", 5),
  58 + BOUTIQUE_ENTRANCE("精品停车费", 6),
  59 + PASSPORT("通行证", 7),
  60 + STOCKIN("冷库入库", 8),
  61 + STOCKOUT("冷库出库", 9),
  62 + OTHER_FEE("其它收费", 10),
  63 + LABOR_VEST("劳务马甲", 11),
  64 + MESSAGEFEE("信息费", 14),
  65 + WATER("水费", 15),
  66 + ELECTRICITY("电费", 16),
  67 + UTILITY_BILLS_PRE_STORAGE("水电预存", 17),
  68 + ENTRANCE_CARD("车辆进门办卡", 301),
  69 + SCALES("磅秤租赁", 18),
  70 + LINGKUAN("领款", 67),
  71 + SETTLE_PAY("结算缴费", 510),
  72 + SETTLE_REFUND("结算退款", 511),
  73 + SETTLE_PAY_CANCEL("结算缴费撤销", 512),
  74 + APPROACH("报备进场", 501),
  75 + TRADE("交易", 502),
  76 + ETRADE_TRADE("交易", 5502),
  77 + ETRADE_RETURN("赊销回款", 5503),
  78 + DETECT("检测", 503),
  79 + PUT("上下架", 504),
  80 + TRANSFER("转离场", 505),
  81 + Cold_IN_ORDER("冷库入库", 506),
  82 + LOAN("客户借款", 507),
  83 + RENT("磅秤租赁", 508),
  84 + SETTLE("批号结算", 509),
  85 + CASH_LOAN("现金借款", 519),
  86 + CASH_BACK("现金还款", 514),
  87 + CARD_LOAN("园区卡借款", 516),
  88 + CARD_BACK("园区卡还款", 515),
  89 + QT_LOAN("其他借款", 518),
  90 + QT_BACK("其他还款", 517),
  91 + STOP_CAR_TRADE_AERE("停车交易区", 523),
  92 + CARD_METER("卡表收费", 525),
  93 + QUERY_FEE("查询费", 513),
  94 + RUZHU("入住", 601),
  95 + BUJIAO("补缴", 602),
  96 + TUIFANG("退房", 603),
  97 + HONGCHONG("红冲", 604),
  98 + /** 本地配送费 */
  99 + LOCAL_DELIVERY_FEE("本地配送费",8816),
  100 + /** 车辆进场费 */
  101 + CAR_ENTRANCE_FEE("车辆进场费",8817),
  102 + /** 车辆出场费 */
  103 + CAR_OUT_FEE("车辆出场费",8818),
  104 + /** 称重服务费 */
  105 + WEIGH_SERVICE_FEE("称重服务费",8819),
  106 + /** 车辆转场费 */
  107 + TRANSFER_FEE("车辆转场费",8820),
  108 + /** 车辆离场费 */
  109 + LEAVE_FEE("车辆离场费",8821),
  110 +
  111 + /** 通行证管理费 */
  112 + PASSPORT_MANAGE_FEE("通行证管理费",8824),
  113 +
  114 + /** 进门冻结 */
  115 + ENTRANCE_FREEZE_FEE("进门冻结",8831),
  116 + ENTRANCE_UNFREEZE_FEE("进门解冻",8832),
  117 + ENTRANCE_HANDLING_FEE("装卸费",8833),
  118 + ENTRANCE_CAR_CARD_FEE("办卡费",8834),
  119 + ENTRANCE_FEEDBACK_FEE("返点",8835),
  120 + ENTRANCE_LAND_FEE("占地费",8836),
  121 + /** 称重服务费 没有用了*/
  122 + SELF_WEIGH_SERVICE_FEE("自助称重费",88101),
  123 + /** 称重服务费 */
  124 + SELF_WEIGH_SERVICE_FEE_1("自助称重费",8901),
  125 + /**资金复核*/
  126 + FUND_REVIEW("资金复核",10001),
  127 + ACCOUNT_TRANSFER_IN("转账-入", 3011),
  128 + ACCOUNT_TRANSFER_OUT("转账-出", 3012),
  129 + ;
  130 +
  131 + private String name;
  132 + private int code;
  133 +
  134 + OperateType(String name, int code) {
  135 + this.name = name;
  136 + this.code = code;
  137 + }
  138 +
  139 + /**
  140 + * 是否是可以冲正的业务(只有充值和提款)
  141 + * @author miaoguoxin
  142 + * @date 2020/11/25
  143 + */
  144 + public static boolean canReverseType(Integer code) {
  145 + if (code == null) {
  146 + return false;
  147 + }
  148 + return OperateType.ACCOUNT_CHARGE.getCode() == code || OperateType.ACCOUNT_WITHDRAW.getCode() == code;
  149 + }
  150 +
  151 + public static OperateType getOperateType(int code) {
  152 + for (OperateType type : OperateType.values()) {
  153 + if (type.getCode() == code) {
  154 + return type;
  155 + }
  156 + }
  157 + return null;
  158 + }
  159 +
  160 + public static String getName(int code) {
  161 + for (OperateType type : OperateType.values()) {
  162 + if (type.getCode() == code) {
  163 + return type.name;
  164 + }
  165 + }
  166 + return null;
  167 + }
  168 +
  169 + /**
  170 + * 获取用于当前账期补打操作列表
  171 + * @return
  172 + */
  173 + public static List<Integer> createReprintList() {
  174 + List<Integer> typeList = new ArrayList<>();
  175 + typeList.add(ACCOUNT_TRANSACT.getCode());
  176 + typeList.add(ACCOUNT_CHARGE.getCode());
  177 + typeList.add(ACCOUNT_WITHDRAW.getCode());
  178 + typeList.add(CHANGE.getCode());
  179 + typeList.add(REFUND_CARD.getCode());
  180 + typeList.add(RESET_PWD.getCode());
  181 + typeList.add(PWD_CHANGE.getCode());
  182 + typeList.add(LOSS_CARD.getCode());
  183 + typeList.add(LOSS_REMOVE.getCode());
  184 + typeList.add(LIFT_LOCKED.getCode());
  185 + typeList.add(PERMISSION_SET.getCode());
  186 + return typeList;
  187 + }
  188 +
  189 + public static List<OperateType> getAll() {
  190 + return new ArrayList<>(Arrays.asList(OperateType.values()));
  191 + }
  192 +
  193 + public String getName() {
  194 + return name;
  195 + }
  196 +
  197 + public void setName(String name) {
  198 + this.name = name;
  199 + }
  200 +
  201 + public int getCode() {
  202 + return code;
  203 + }
  204 +
  205 + public void setCode(int code) {
  206 + this.code = code;
  207 + }
  208 +}
etrade-thirdparty/src/main/java/com/diligrp/etrade/thirdparty/utils/BillTypeApiUtils.java
@@ -5,6 +5,7 @@ import com.diligrp.etrade.thirdparty.error.ThirdPartyException; @@ -5,6 +5,7 @@ import com.diligrp.etrade.thirdparty.error.ThirdPartyException;
5 import com.diligrp.etrade.thirdparty.message.GeneralSendMessage; 5 import com.diligrp.etrade.thirdparty.message.GeneralSendMessage;
6 import com.diligrp.etrade.thirdparty.type.ThirdPartyErrorCodeEnum; 6 import com.diligrp.etrade.thirdparty.type.ThirdPartyErrorCodeEnum;
7 import com.fasterxml.jackson.core.type.TypeReference; 7 import com.fasterxml.jackson.core.type.TypeReference;
  8 +import com.google.gson.Gson;
8 import com.kingdee.bos.webapi.entity.IdentifyInfo; 9 import com.kingdee.bos.webapi.entity.IdentifyInfo;
9 import com.kingdee.bos.webapi.entity.OperateParam; 10 import com.kingdee.bos.webapi.entity.OperateParam;
10 import com.kingdee.bos.webapi.entity.OperatorResult; 11 import com.kingdee.bos.webapi.entity.OperatorResult;
@@ -52,8 +53,8 @@ public class BillTypeApiUtils extends BaseApiUtils { @@ -52,8 +53,8 @@ public class BillTypeApiUtils extends BaseApiUtils {
52 53
53 private String save(String json) throws Exception { 54 private String save(String json) throws Exception {
54 String res = api.save("BOS_BillType", json); 55 String res = api.save("BOS_BillType", json);
55 - RepoRet repoRet = JsonUtils.fromJsonString(res, new TypeReference<>() {  
56 - }); 56 + Gson gson = new Gson();
  57 + RepoRet<?> repoRet = gson.fromJson(res, RepoRet.class);
57 if (!repoRet.getResult().getResponseStatus().isIsSuccess()) { 58 if (!repoRet.getResult().getResponseStatus().isIsSuccess()) {
58 ThirdPartyErrorCodeEnum errorCodeEnum = ThirdPartyErrorCodeEnum.getByCode(repoRet.getResult().getResponseStatus().getErrorCode()); 59 ThirdPartyErrorCodeEnum errorCodeEnum = ThirdPartyErrorCodeEnum.getByCode(repoRet.getResult().getResponseStatus().getErrorCode());
59 throw new ThirdPartyException(errorCodeEnum.desc); 60 throw new ThirdPartyException(errorCodeEnum.desc);
etrade-thirdparty/src/main/java/com/diligrp/etrade/thirdparty/utils/ContactApiUtils.java
@@ -5,6 +5,7 @@ import com.diligrp.etrade.thirdparty.error.ThirdPartyException; @@ -5,6 +5,7 @@ import com.diligrp.etrade.thirdparty.error.ThirdPartyException;
5 import com.diligrp.etrade.thirdparty.message.GeneralSendMessage; 5 import com.diligrp.etrade.thirdparty.message.GeneralSendMessage;
6 import com.diligrp.etrade.thirdparty.type.ThirdPartyErrorCodeEnum; 6 import com.diligrp.etrade.thirdparty.type.ThirdPartyErrorCodeEnum;
7 import com.fasterxml.jackson.core.type.TypeReference; 7 import com.fasterxml.jackson.core.type.TypeReference;
  8 +import com.google.gson.Gson;
8 import com.kingdee.bos.webapi.entity.IdentifyInfo; 9 import com.kingdee.bos.webapi.entity.IdentifyInfo;
9 import com.kingdee.bos.webapi.entity.OperateParam; 10 import com.kingdee.bos.webapi.entity.OperateParam;
10 import com.kingdee.bos.webapi.entity.OperatorResult; 11 import com.kingdee.bos.webapi.entity.OperatorResult;
@@ -35,7 +36,6 @@ public class ContactApiUtils extends BaseApiUtils { @@ -35,7 +36,6 @@ public class ContactApiUtils extends BaseApiUtils {
35 Map<String, Object> map = JsonUtils.fromJsonString(json, new TypeReference<>() {}); 36 Map<String, Object> map = JsonUtils.fromJsonString(json, new TypeReference<>() {});
36 var message = new GeneralSendMessage(); 37 var message = new GeneralSendMessage();
37 message.setModel(map); 38 message.setModel(map);
38 - message.setAutoSubmitAndAudit(true);  
39 return save(JsonUtils.toJsonString(message)); 39 return save(JsonUtils.toJsonString(message));
40 } 40 }
41 41
@@ -45,20 +45,19 @@ public class ContactApiUtils extends BaseApiUtils { @@ -45,20 +45,19 @@ public class ContactApiUtils extends BaseApiUtils {
45 }); 45 });
46 var message = new GeneralSendMessage(); 46 var message = new GeneralSendMessage();
47 message.setModel(map); 47 message.setModel(map);
48 - message.setAutoSubmitAndAudit(true);  
49 save(JsonUtils.toJsonString(message)); 48 save(JsonUtils.toJsonString(message));
50 } 49 }
51 50
52 private String save(String json) throws Exception { 51 private String save(String json) throws Exception {
53 String res = api.save("BD_CommonContact", json); 52 String res = api.save("BD_CommonContact", json);
54 - RepoRet repoRet = JsonUtils.fromJsonString(res, new TypeReference<>() {  
55 - }); 53 + Gson gson = new Gson();
  54 + RepoRet<?> repoRet = gson.fromJson(res, RepoRet.class);
56 if (!repoRet.getResult().getResponseStatus().isIsSuccess()) { 55 if (!repoRet.getResult().getResponseStatus().isIsSuccess()) {
57 ThirdPartyErrorCodeEnum errorCodeEnum = ThirdPartyErrorCodeEnum.getByCode(repoRet.getResult().getResponseStatus().getErrorCode()); 56 ThirdPartyErrorCodeEnum errorCodeEnum = ThirdPartyErrorCodeEnum.getByCode(repoRet.getResult().getResponseStatus().getErrorCode());
58 throw new ThirdPartyException(errorCodeEnum.desc); 57 throw new ThirdPartyException(errorCodeEnum.desc);
59 } 58 }
60 log.info("联系人保存接口已完成,{}", res); 59 log.info("联系人保存接口已完成,{}", res);
61 - return repoRet.getResult().getResponseStatus().getSuccessEntitys().get(0).getId(); 60 + return repoRet.getResult().getResponseStatus().getSuccessEntitys().get(0).getNumber();
62 } 61 }
63 62
64 private void unAudit(String FNumber) throws Exception { 63 private void unAudit(String FNumber) throws Exception {
etrade-thirdparty/src/main/java/com/diligrp/etrade/thirdparty/utils/CustomerApiUtils.java
@@ -5,6 +5,7 @@ import com.diligrp.etrade.thirdparty.error.ThirdPartyException; @@ -5,6 +5,7 @@ import com.diligrp.etrade.thirdparty.error.ThirdPartyException;
5 import com.diligrp.etrade.thirdparty.message.GeneralSendMessage; 5 import com.diligrp.etrade.thirdparty.message.GeneralSendMessage;
6 import com.diligrp.etrade.thirdparty.type.ThirdPartyErrorCodeEnum; 6 import com.diligrp.etrade.thirdparty.type.ThirdPartyErrorCodeEnum;
7 import com.fasterxml.jackson.core.type.TypeReference; 7 import com.fasterxml.jackson.core.type.TypeReference;
  8 +import com.google.gson.Gson;
8 import com.kingdee.bos.webapi.entity.IdentifyInfo; 9 import com.kingdee.bos.webapi.entity.IdentifyInfo;
9 import com.kingdee.bos.webapi.entity.OperateParam; 10 import com.kingdee.bos.webapi.entity.OperateParam;
10 import com.kingdee.bos.webapi.entity.OperatorResult; 11 import com.kingdee.bos.webapi.entity.OperatorResult;
@@ -51,8 +52,8 @@ public class CustomerApiUtils extends BaseApiUtils { @@ -51,8 +52,8 @@ public class CustomerApiUtils extends BaseApiUtils {
51 52
52 private String save(String json) throws Exception { 53 private String save(String json) throws Exception {
53 String res = api.save("BD_Customer", json); 54 String res = api.save("BD_Customer", json);
54 - RepoRet repoRet = JsonUtils.fromJsonString(res, new TypeReference<>() {  
55 - }); 55 + Gson gson = new Gson();
  56 + RepoRet<?> repoRet = gson.fromJson(res, RepoRet.class);
56 if (!repoRet.getResult().getResponseStatus().isIsSuccess()) { 57 if (!repoRet.getResult().getResponseStatus().isIsSuccess()) {
57 ThirdPartyErrorCodeEnum errorCodeEnum = ThirdPartyErrorCodeEnum.getByCode(repoRet.getResult().getResponseStatus().getErrorCode()); 58 ThirdPartyErrorCodeEnum errorCodeEnum = ThirdPartyErrorCodeEnum.getByCode(repoRet.getResult().getResponseStatus().getErrorCode());
58 throw new ThirdPartyException(errorCodeEnum.desc); 59 throw new ThirdPartyException(errorCodeEnum.desc);
etrade-thirdparty/src/main/java/com/diligrp/etrade/thirdparty/utils/DepartmentApiUtils.java
@@ -5,6 +5,7 @@ import com.diligrp.etrade.thirdparty.error.ThirdPartyException; @@ -5,6 +5,7 @@ import com.diligrp.etrade.thirdparty.error.ThirdPartyException;
5 import com.diligrp.etrade.thirdparty.message.GeneralSendMessage; 5 import com.diligrp.etrade.thirdparty.message.GeneralSendMessage;
6 import com.diligrp.etrade.thirdparty.type.ThirdPartyErrorCodeEnum; 6 import com.diligrp.etrade.thirdparty.type.ThirdPartyErrorCodeEnum;
7 import com.fasterxml.jackson.core.type.TypeReference; 7 import com.fasterxml.jackson.core.type.TypeReference;
  8 +import com.google.gson.Gson;
8 import com.kingdee.bos.webapi.entity.IdentifyInfo; 9 import com.kingdee.bos.webapi.entity.IdentifyInfo;
9 import com.kingdee.bos.webapi.entity.OperateParam; 10 import com.kingdee.bos.webapi.entity.OperateParam;
10 import com.kingdee.bos.webapi.entity.OperatorResult; 11 import com.kingdee.bos.webapi.entity.OperatorResult;
@@ -52,7 +53,8 @@ public class DepartmentApiUtils extends BaseApiUtils { @@ -52,7 +53,8 @@ public class DepartmentApiUtils extends BaseApiUtils {
52 53
53 private String save(String json) throws Exception { 54 private String save(String json) throws Exception {
54 String res = api.save("BD_Department", json); 55 String res = api.save("BD_Department", json);
55 - RepoRet repoRet = JsonUtils.fromJsonString(res, new TypeReference<>() {}); 56 + Gson gson = new Gson();
  57 + RepoRet<?> repoRet = gson.fromJson(res, RepoRet.class);
56 if (!repoRet.getResult().getResponseStatus().isIsSuccess()) { 58 if (!repoRet.getResult().getResponseStatus().isIsSuccess()) {
57 ThirdPartyErrorCodeEnum errorCodeEnum = ThirdPartyErrorCodeEnum.getByCode(repoRet.getResult().getResponseStatus().getErrorCode()); 59 ThirdPartyErrorCodeEnum errorCodeEnum = ThirdPartyErrorCodeEnum.getByCode(repoRet.getResult().getResponseStatus().getErrorCode());
58 throw new ThirdPartyException(errorCodeEnum.desc); 60 throw new ThirdPartyException(errorCodeEnum.desc);
etrade-thirdparty/src/main/java/com/diligrp/etrade/thirdparty/utils/FeeApiUtils.java
@@ -5,6 +5,7 @@ import com.diligrp.etrade.thirdparty.error.ThirdPartyException; @@ -5,6 +5,7 @@ import com.diligrp.etrade.thirdparty.error.ThirdPartyException;
5 import com.diligrp.etrade.thirdparty.message.GeneralSendMessage; 5 import com.diligrp.etrade.thirdparty.message.GeneralSendMessage;
6 import com.diligrp.etrade.thirdparty.type.ThirdPartyErrorCodeEnum; 6 import com.diligrp.etrade.thirdparty.type.ThirdPartyErrorCodeEnum;
7 import com.fasterxml.jackson.core.type.TypeReference; 7 import com.fasterxml.jackson.core.type.TypeReference;
  8 +import com.google.gson.Gson;
8 import com.kingdee.bos.webapi.entity.IdentifyInfo; 9 import com.kingdee.bos.webapi.entity.IdentifyInfo;
9 import com.kingdee.bos.webapi.entity.OperateParam; 10 import com.kingdee.bos.webapi.entity.OperateParam;
10 import com.kingdee.bos.webapi.entity.OperatorResult; 11 import com.kingdee.bos.webapi.entity.OperatorResult;
@@ -53,8 +54,8 @@ public class FeeApiUtils extends BaseApiUtils { @@ -53,8 +54,8 @@ public class FeeApiUtils extends BaseApiUtils {
53 54
54 private String save(String json) throws Exception { 55 private String save(String json) throws Exception {
55 String res = api.save("BD_Expense", json); 56 String res = api.save("BD_Expense", json);
56 - RepoRet repoRet = JsonUtils.fromJsonString(res, new TypeReference<>() {  
57 - }); 57 + Gson gson = new Gson();
  58 + RepoRet<?> repoRet = gson.fromJson(res, RepoRet.class);
58 if (!repoRet.getResult().getResponseStatus().isIsSuccess()) { 59 if (!repoRet.getResult().getResponseStatus().isIsSuccess()) {
59 ThirdPartyErrorCodeEnum errorCodeEnum = ThirdPartyErrorCodeEnum.getByCode(repoRet.getResult().getResponseStatus().getErrorCode()); 60 ThirdPartyErrorCodeEnum errorCodeEnum = ThirdPartyErrorCodeEnum.getByCode(repoRet.getResult().getResponseStatus().getErrorCode());
60 throw new ThirdPartyException(errorCodeEnum.desc); 61 throw new ThirdPartyException(errorCodeEnum.desc);
etrade-thirdparty/src/main/java/com/diligrp/etrade/thirdparty/utils/FeeGroupApiUtils.java
@@ -5,6 +5,7 @@ import com.diligrp.etrade.thirdparty.error.ThirdPartyException; @@ -5,6 +5,7 @@ import com.diligrp.etrade.thirdparty.error.ThirdPartyException;
5 import com.diligrp.etrade.thirdparty.message.GeneralSendMessage; 5 import com.diligrp.etrade.thirdparty.message.GeneralSendMessage;
6 import com.diligrp.etrade.thirdparty.type.ThirdPartyErrorCodeEnum; 6 import com.diligrp.etrade.thirdparty.type.ThirdPartyErrorCodeEnum;
7 import com.fasterxml.jackson.core.type.TypeReference; 7 import com.fasterxml.jackson.core.type.TypeReference;
  8 +import com.google.gson.Gson;
8 import com.kingdee.bos.webapi.entity.IdentifyInfo; 9 import com.kingdee.bos.webapi.entity.IdentifyInfo;
9 import com.kingdee.bos.webapi.entity.RepoRet; 10 import com.kingdee.bos.webapi.entity.RepoRet;
10 import org.slf4j.Logger; 11 import org.slf4j.Logger;
@@ -47,8 +48,8 @@ public class FeeGroupApiUtils extends BaseApiUtils { @@ -47,8 +48,8 @@ public class FeeGroupApiUtils extends BaseApiUtils {
47 48
48 private String save(String json) throws Exception { 49 private String save(String json) throws Exception {
49 String res = api.groupSave("BD_Expense", json); 50 String res = api.groupSave("BD_Expense", json);
50 - RepoRet repoRet = JsonUtils.fromJsonString(res, new TypeReference<>() {  
51 - }); 51 + Gson gson = new Gson();
  52 + RepoRet<?> repoRet = gson.fromJson(res, RepoRet.class);
52 if (!repoRet.getResult().getResponseStatus().isIsSuccess()) { 53 if (!repoRet.getResult().getResponseStatus().isIsSuccess()) {
53 ThirdPartyErrorCodeEnum errorCodeEnum = ThirdPartyErrorCodeEnum.getByCode(repoRet.getResult().getResponseStatus().getErrorCode()); 54 ThirdPartyErrorCodeEnum errorCodeEnum = ThirdPartyErrorCodeEnum.getByCode(repoRet.getResult().getResponseStatus().getErrorCode());
54 throw new ThirdPartyException(errorCodeEnum.desc); 55 throw new ThirdPartyException(errorCodeEnum.desc);
etrade-thirdparty/src/main/java/com/diligrp/etrade/thirdparty/utils/PurchaseOrderApiUtils.java
@@ -5,6 +5,7 @@ import com.diligrp.etrade.thirdparty.error.ThirdPartyException; @@ -5,6 +5,7 @@ import com.diligrp.etrade.thirdparty.error.ThirdPartyException;
5 import com.diligrp.etrade.thirdparty.message.GeneralSendMessage; 5 import com.diligrp.etrade.thirdparty.message.GeneralSendMessage;
6 import com.diligrp.etrade.thirdparty.type.ThirdPartyErrorCodeEnum; 6 import com.diligrp.etrade.thirdparty.type.ThirdPartyErrorCodeEnum;
7 import com.fasterxml.jackson.core.type.TypeReference; 7 import com.fasterxml.jackson.core.type.TypeReference;
  8 +import com.google.gson.Gson;
8 import com.kingdee.bos.webapi.entity.IdentifyInfo; 9 import com.kingdee.bos.webapi.entity.IdentifyInfo;
9 import com.kingdee.bos.webapi.entity.RepoRet; 10 import com.kingdee.bos.webapi.entity.RepoRet;
10 import org.slf4j.Logger; 11 import org.slf4j.Logger;
@@ -30,18 +31,18 @@ public class PurchaseOrderApiUtils extends BaseApiUtils { @@ -30,18 +31,18 @@ public class PurchaseOrderApiUtils extends BaseApiUtils {
30 31
31 32
32 public void createOnePurchaseOrder(String json,String formId) throws Exception { 33 public void createOnePurchaseOrder(String json,String formId) throws Exception {
33 - Map<String, Object> map = JsonUtils.fromJsonString(json, new TypeReference<>() {  
34 - }); 34 + Map<String, Object> map = JsonUtils.fromJsonString(json, new TypeReference<>() {});
35 var message = new GeneralSendMessage(); 35 var message = new GeneralSendMessage();
36 message.setModel(map); 36 message.setModel(map);
37 message.setAutoSubmitAndAudit(true); 37 message.setAutoSubmitAndAudit(true);
38 -// save(JsonUtils.toJsonString(message)); 38 + save(JsonUtils.toJsonString(message),formId);
39 System.out.println(JsonUtils.toJsonString(message)); 39 System.out.println(JsonUtils.toJsonString(message));
40 } 40 }
41 41
42 private void save(String json,String formId) throws Exception { 42 private void save(String json,String formId) throws Exception {
43 String res = api.save(formId, json); 43 String res = api.save(formId, json);
44 - RepoRet repoRet = JsonUtils.fromJsonString(res, new TypeReference<>() {}); 44 + Gson gson = new Gson();
  45 + RepoRet<?> repoRet = gson.fromJson(res, RepoRet.class);
45 if (!repoRet.getResult().getResponseStatus().isIsSuccess()) { 46 if (!repoRet.getResult().getResponseStatus().isIsSuccess()) {
46 ThirdPartyErrorCodeEnum errorCodeEnum = ThirdPartyErrorCodeEnum.getByCode(repoRet.getResult().getResponseStatus().getErrorCode()); 47 ThirdPartyErrorCodeEnum errorCodeEnum = ThirdPartyErrorCodeEnum.getByCode(repoRet.getResult().getResponseStatus().getErrorCode());
47 throw new ThirdPartyException(errorCodeEnum.desc); 48 throw new ThirdPartyException(errorCodeEnum.desc);
etrade-thirdparty/src/main/java/com/diligrp/etrade/thirdparty/utils/SettleTypeApiUtils.java
@@ -5,6 +5,7 @@ import com.diligrp.etrade.thirdparty.error.ThirdPartyException; @@ -5,6 +5,7 @@ import com.diligrp.etrade.thirdparty.error.ThirdPartyException;
5 import com.diligrp.etrade.thirdparty.message.GeneralSendMessage; 5 import com.diligrp.etrade.thirdparty.message.GeneralSendMessage;
6 import com.diligrp.etrade.thirdparty.type.ThirdPartyErrorCodeEnum; 6 import com.diligrp.etrade.thirdparty.type.ThirdPartyErrorCodeEnum;
7 import com.fasterxml.jackson.core.type.TypeReference; 7 import com.fasterxml.jackson.core.type.TypeReference;
  8 +import com.google.gson.Gson;
8 import com.kingdee.bos.webapi.entity.IdentifyInfo; 9 import com.kingdee.bos.webapi.entity.IdentifyInfo;
9 import com.kingdee.bos.webapi.entity.OperateParam; 10 import com.kingdee.bos.webapi.entity.OperateParam;
10 import com.kingdee.bos.webapi.entity.OperatorResult; 11 import com.kingdee.bos.webapi.entity.OperatorResult;
@@ -52,8 +53,8 @@ public class SettleTypeApiUtils extends BaseApiUtils { @@ -52,8 +53,8 @@ public class SettleTypeApiUtils extends BaseApiUtils {
52 53
53 private String save(String json) throws Exception { 54 private String save(String json) throws Exception {
54 String res = api.save("BD_SETTLETYPE", json); 55 String res = api.save("BD_SETTLETYPE", json);
55 - RepoRet repoRet = JsonUtils.fromJsonString(res, new TypeReference<>() {  
56 - }); 56 + Gson gson = new Gson();
  57 + RepoRet<?> repoRet = gson.fromJson(res, RepoRet.class);
57 if (!repoRet.getResult().getResponseStatus().isIsSuccess()) { 58 if (!repoRet.getResult().getResponseStatus().isIsSuccess()) {
58 ThirdPartyErrorCodeEnum errorCodeEnum = ThirdPartyErrorCodeEnum.getByCode(repoRet.getResult().getResponseStatus().getErrorCode()); 59 ThirdPartyErrorCodeEnum errorCodeEnum = ThirdPartyErrorCodeEnum.getByCode(repoRet.getResult().getResponseStatus().getErrorCode());
59 throw new ThirdPartyException(errorCodeEnum.desc); 60 throw new ThirdPartyException(errorCodeEnum.desc);