调整客商档案传递开户行名称
This commit is contained in:
parent
916a9b9e25
commit
43711374d6
|
@ -194,13 +194,23 @@ public class WsCustomerSynchronizationEventServiceImpl extends BaseService<WsCus
|
|||
**/
|
||||
private JSONObject updateCustomerCode(String id, String custcode,String environment ) {
|
||||
String sql = "update formmain_4389 set field0005 = '" + custcode + "' where id = " + id;
|
||||
|
||||
|
||||
String md5 = SecureUtil.md5(sql);
|
||||
System.out.println("明文摘要" + md5);
|
||||
String key = "`o7eotan9ws8c:aj";
|
||||
String encrypt = SecureUtil.aes(key.getBytes()).encryptHex(sql);
|
||||
JSONObject requestJson = new JSONObject();
|
||||
requestJson.put("userName", "hzya_rest");
|
||||
requestJson.put("password", "45562434-8459-47b4-8df0-78fad8405bc4");
|
||||
/** 生产环境和测试环境字段不一致,根据环境切换绑定*/
|
||||
String pk_currtype = null;
|
||||
if(DEV.equals(environment)){
|
||||
//所属地区编码
|
||||
requestJson.put("password", "1742a2f4-6cc2-44cd-af75-d67c885b4dc1");
|
||||
// requestJson.put("password", "2d6dd7fb-239a-4a0b-8c0a-5003647e9238");
|
||||
}else{
|
||||
requestJson.put("password", "45562434-8459-47b4-8df0-78fad8405bc4");
|
||||
}
|
||||
requestJson.put("data", encrypt);
|
||||
requestJson.put("sign", md5);
|
||||
String tokenRest = requestApi("获取token", requestJson, "800055", "8000550010", null);
|
||||
|
@ -227,11 +237,21 @@ public class WsCustomerSynchronizationEventServiceImpl extends BaseService<WsCus
|
|||
JSONArray custbasvo = new JSONArray();
|
||||
//客商档案
|
||||
JSONObject customer = new JSONObject();
|
||||
//币种类别
|
||||
String pk_currtype = formBean.getString("field0057");
|
||||
customer.put("pk_currtype1", pk_currtype);
|
||||
//分配公司
|
||||
customer.put("pk_corp", formBean.getString("field0064"));
|
||||
|
||||
|
||||
if(DEV.equals(environment)){
|
||||
//分配公司
|
||||
customer.put("pk_corp", formBean.getString("field0058"));
|
||||
//币种类别
|
||||
customer.put("pk_currtype1", formBean.getString("field0062"));
|
||||
}else{
|
||||
//分配公司
|
||||
customer.put("pk_corp", formBean.getString("field0064"));
|
||||
//币种类别
|
||||
customer.put("pk_currtype1", formBean.getString("field0057"));
|
||||
}
|
||||
|
||||
|
||||
String custprop = formBean.getString("field0027");
|
||||
//客商属性 0:客户,1:供应商,2 :客商
|
||||
switch (custprop) {
|
||||
|
@ -278,7 +298,7 @@ public class WsCustomerSynchronizationEventServiceImpl extends BaseService<WsCus
|
|||
if (null != token) {
|
||||
headerMap.put("token", token);
|
||||
}
|
||||
String body = HttpRequest.post("http://127.0.0.1:10086/kangarooDataCenterV3/entranceController/externalCallInterface").addHeaders(headerMap).body(requestJson.toJSONString()).timeout(60000).execute().body();
|
||||
String body = HttpRequest.post("http://127.0.0.1:10085/kangarooDataCenterV3/entranceController/externalCallInterface").addHeaders(headerMap).body(requestJson.toJSONString()).timeout(60000).execute().body();
|
||||
logger.info("中台转发到ESB" + method + ":{}", body);
|
||||
return body;
|
||||
}
|
||||
|
@ -320,7 +340,7 @@ public class WsCustomerSynchronizationEventServiceImpl extends BaseService<WsCus
|
|||
bank.put("banktypename", formBean.getString("field0036"));
|
||||
}
|
||||
//账户属性
|
||||
String accountproperty = formBean.getString("field0042");
|
||||
String accountproperty = formBean.getString("field0042")== null?"":formBean.getString("field0042");
|
||||
switch (accountproperty) {
|
||||
case "-3164025096780690930":
|
||||
accountproperty = "电汇账户";
|
||||
|
@ -344,7 +364,7 @@ public class WsCustomerSynchronizationEventServiceImpl extends BaseService<WsCus
|
|||
bank.put("defflag", "Y");
|
||||
bank.put("memo", formBean.getString("field0054"));
|
||||
//开户银行 传递以后名称
|
||||
bank.put("accname", formBean.getString("field0013"));
|
||||
// bank.put("accname", formBean.getString("field0013"));
|
||||
// bank.put("pk_bankdoc", formBean.getString("field0013"));
|
||||
|
||||
//新增固定传递集团
|
||||
|
@ -356,11 +376,12 @@ public class WsCustomerSynchronizationEventServiceImpl extends BaseService<WsCus
|
|||
//创建人 U8C 制单人 admin
|
||||
// parentvo.put("creator",formBean.getString("field0019"));
|
||||
parentvo.put("creator", "admin");
|
||||
|
||||
//客商名称
|
||||
parentvo.put("custname", formBean.getString("field0006"));
|
||||
|
||||
//客商类型(0 - 外部单位1 - 内部核算单位2 - 内部法人单位3 - 内部渠道成员)
|
||||
String custprop = formBean.getString("field0026");
|
||||
String custprop = formBean.getString("field0026")== null?"":formBean.getString("field0026");
|
||||
switch (custprop) {
|
||||
case "-5116388890160378443":
|
||||
custprop = "0";
|
||||
|
@ -401,7 +422,7 @@ public class WsCustomerSynchronizationEventServiceImpl extends BaseService<WsCus
|
|||
|
||||
// 运输 自定义项8 001 是 002 否
|
||||
|
||||
String def8 = formBean.getString("field0048");
|
||||
String def8 = formBean.getString("field0048")== null?"":formBean.getString("field0048");
|
||||
|
||||
switch (def8) {
|
||||
case "-8661769604040273924":
|
||||
|
@ -416,7 +437,7 @@ public class WsCustomerSynchronizationEventServiceImpl extends BaseService<WsCus
|
|||
}
|
||||
parentvo.put("def8", def8);
|
||||
//货代 自定义项7 001 是 002 否
|
||||
String def7 = formBean.getString("field0050");
|
||||
String def7 = formBean.getString("field0050") == null?"":formBean.getString("field0050");
|
||||
|
||||
switch (def7) {
|
||||
case "-8661769604040273924":
|
||||
|
@ -430,6 +451,28 @@ public class WsCustomerSynchronizationEventServiceImpl extends BaseService<WsCus
|
|||
break;
|
||||
}
|
||||
parentvo.put("def7", def7);
|
||||
|
||||
//供应商类型 自定义项9 01 生产商 02 贸易商 03 服务商
|
||||
String def9 = formBean.getString("field0065") == null?"":formBean.getString("field0065");
|
||||
|
||||
switch (def9) {
|
||||
|
||||
case "4599320723300108944":
|
||||
def9 = "01";
|
||||
break;
|
||||
case "-2027733563790049244":
|
||||
def9 = "02";
|
||||
break;
|
||||
case "-2468198780444524154":
|
||||
def9 = "03";
|
||||
break;
|
||||
default:
|
||||
def9 = "4599320723300108944";
|
||||
break;
|
||||
}
|
||||
|
||||
parentvo.put("def9", def9 );
|
||||
|
||||
//邮箱
|
||||
parentvo.put("email", formBean.getString("field0052"));
|
||||
//联系人1
|
||||
|
@ -451,7 +494,4 @@ public class WsCustomerSynchronizationEventServiceImpl extends BaseService<WsCus
|
|||
return returnData;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue