优化了纷享销客token获取和新增ERPURL常量

This commit is contained in:
itzhang 2025-06-04 17:01:30 +08:00
parent aa352be359
commit bcc88adc97
26 changed files with 71 additions and 43 deletions

View File

@ -12,7 +12,7 @@ public class CertificateConstant {
public static final String PERMANENT_CODE = "1A49B50861909007935CAB5E33E52BAA";//永久授权码
public static final String APP_SECRET = "5bda722932a54e80a05d2cc9b1722fed";//appSecret
public static final String CORP_ID = "FSCID_11F505C980B5FE43D5D7230567802E09";//企业Id
public static final String CURRENT_OPEN_USERID = "FSUID_50D3C26809B163F663DC8557268A8D44";//当前登录用户id
public static final String CURRENT_OPEN_USERID = "FSUID_A9AD0C360309427B3F431487883B73B9";//当前登录用户id
// public static final String APP_ID = "FSAID_131fa51";//appId
// public static final String PERMANENT_CODE = "EF03533F6929B59934A7E1155221420B";//永久授权码

View File

@ -0,0 +1,5 @@
package org.ssssssss.magicboot.constant;
public class ERPURLConstant {
public static final String ERP_URL = "http://192.168.31.233:8022";//erp地址
}

View File

@ -11,6 +11,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.client.RestClientException;
import org.springframework.web.client.RestTemplate;
import org.ssssssss.magicboot.constant.ERPURLConstant;
import org.ssssssss.magicboot.constant.URLConstant;
import org.ssssssss.magicboot.entity.Filter;
import org.ssssssss.magicboot.utils.CrmRequestUtil;
@ -82,7 +83,7 @@ public class BankInfoController {
HttpEntity bankReqEntity = new HttpEntity(deptReq, headers);
//开始发起请求
String bankInfoUrl = "http://192.168.31.158:8022/ierp/kapi/v2/f9w5/basedata/bd_bebank/bebankQuery";
String bankInfoUrl = ERPURLConstant.ERP_URL +"/ierp/kapi/v2/f9w5/basedata/bd_bebank/bebankQuery";
String bankInfoResStr = "";
@ -304,7 +305,7 @@ public class BankInfoController {
HttpEntity bankReqEntity = new HttpEntity(deptReq, headers);
//开始发起请求
String bankInfoUrl = "http://192.168.31.158:8022/ierp/kapi/v2/f9w5/basedata/bd_bebank/bebankQuery";
String bankInfoUrl = ERPURLConstant.ERP_URL+"/ierp/kapi/v2/f9w5/basedata/bd_bebank/bebankQuery";
String bankInfoResStr = "";

View File

@ -11,6 +11,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.client.RestClientException;
import org.springframework.web.client.RestTemplate;
import org.ssssssss.magicboot.constant.ERPURLConstant;
import org.ssssssss.magicboot.constant.URLConstant;
import org.ssssssss.magicboot.entity.Filter;
import org.ssssssss.magicboot.utils.CrmRequestUtil;
@ -253,7 +254,7 @@ public class DesignController {
System.out.println("请求为:" + JSON.parseObject(JSON.toJSONString(designDocReqEntity)));
//开始向金蝶发起请求
String designPlanUrl = "http://192.168.31.158:8022/ierp/kapi/v2/f9w5/pssc/requirapplybillSave";
String designPlanUrl = ERPURLConstant.ERP_URL + "/ierp/kapi/v2/f9w5/pssc/requirapplybillSave";
JSONObject erpDesignDocRes = new JSONObject();
@ -499,8 +500,6 @@ public class DesignController {
e.printStackTrace();
}
System.out.println("测试负责人"+ownerRes);
if ("success".equals(ownerRes.getString("errorDescription")) && !ownerRes.getJSONObject("data").getJSONArray("dataList").isEmpty()) {
JSONObject ownerData = ownerRes.getJSONObject("data").getJSONArray("dataList").getJSONObject(0);
ownerCode = ownerData.getString("field_T1xid__c") != null ? ownerData.getString("field_T1xid__c") : "";
@ -578,7 +577,7 @@ public class DesignController {
System.out.println("请求为:" + JSON.parseObject(JSON.toJSONString(designDocReqEntity)));
//开始向金蝶发起请求
String designPlanUrl = "http://192.168.31.158:8022/ierp/kapi/v2/f9w5/pssc/pm_requirapplybill/requirapplybillSave";
String designPlanUrl = ERPURLConstant.ERP_URL + "/ierp/kapi/v2/f9w5/pssc/pm_requirapplybill/requirapplybillSave";
JSONObject erpDesignDocRes = new JSONObject();

View File

@ -11,6 +11,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.client.RestClientException;
import org.springframework.web.client.RestTemplate;
import org.ssssssss.magicboot.constant.ERPURLConstant;
import org.ssssssss.magicboot.constant.URLConstant;
import org.ssssssss.magicboot.entity.Filter;
import org.ssssssss.magicboot.utils.CrmRequestUtil;
@ -258,7 +259,7 @@ public class FrameContractController {
System.out.println(JSON.parseObject(JSON.toJSONString(contractReqEntity)));
//开始向金蝶发起请求
String contractUrl = "http://192.168.31.158:8022/ierp/kapi/v2/f9w5/conm/conm_salcontract/savecontract";
String contractUrl = ERPURLConstant.ERP_URL + "/ierp/kapi/v2/f9w5/conm/conm_salcontract/savecontract";
JSONObject contractRes = new JSONObject();

View File

@ -11,6 +11,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.client.RestClientException;
import org.springframework.web.client.RestTemplate;
import org.ssssssss.magicboot.constant.ERPURLConstant;
import org.ssssssss.magicboot.constant.URLConstant;
import org.ssssssss.magicboot.entity.Filter;
import org.ssssssss.magicboot.utils.CrmRequestUtil;
@ -268,7 +269,7 @@ public class GoodsPlanController {
System.out.println(JSON.parseObject(JSON.toJSONString(goodsPlanReqEntity)));
//开始向金蝶发起请求
String goodsPlanUrl = "http://192.168.31.158:8022/ierp/kapi/v2/f9w5/sm/f9w5_sm_purchaseplan/purchaseplanSave";
String goodsPlanUrl = ERPURLConstant.ERP_URL + "/ierp/kapi/v2/f9w5/sm/f9w5_sm_purchaseplan/purchaseplanSave";
JSONObject erpGoodsPlanRes = new JSONObject();
@ -581,7 +582,7 @@ public class GoodsPlanController {
System.out.println(JSON.parseObject(JSON.toJSONString(goodsPlanReqEntity)));
//开始向金蝶发起请求
String goodsPlanUrl = "http://192.168.31.158:8022/ierp/kapi/v2/f9w5/sm/f9w5_sm_purchaseplan/purchaseplanSave";
String goodsPlanUrl = ERPURLConstant.ERP_URL + "/ierp/kapi/v2/f9w5/sm/f9w5_sm_purchaseplan/purchaseplanSave";
JSONObject erpGoodsPlanRes = new JSONObject();

View File

@ -11,6 +11,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.client.RestClientException;
import org.springframework.web.client.RestTemplate;
import org.ssssssss.magicboot.constant.ERPURLConstant;
import org.ssssssss.magicboot.constant.URLConstant;
import org.ssssssss.magicboot.entity.Filter;
import org.ssssssss.magicboot.utils.CrmRequestUtil;
@ -313,7 +314,7 @@ public class InvoiceController {
System.out.println(JSON.parseObject(JSON.toJSONString(invoiceReqEntity)));
String invoiceUrl = "http://192.168.31.158:8022/ierp/kapi/v2/f9w5/ar/arbusbill/createInvoice";
String invoiceUrl = ERPURLConstant.ERP_URL + "/ierp/kapi/v2/f9w5/ar/arbusbill/createInvoice";
JSONObject erpInvoiceRes = new JSONObject();
@ -581,7 +582,7 @@ public class InvoiceController {
System.out.println(JSON.parseObject(JSON.toJSONString(invoiceReqEntity)));
String invoiceUrl = "http://192.168.31.158:8022/ierp/kapi/v2/f9w5/ar/arbusbill/createInvoice";
String invoiceUrl = ERPURLConstant.ERP_URL + "/ierp/kapi/v2/f9w5/ar/arbusbill/createInvoice";
JSONObject erpInvoiceRes = new JSONObject();

View File

@ -7,6 +7,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.client.RestClientException;
import org.springframework.web.client.RestTemplate;
import org.ssssssss.magicboot.constant.ERPURLConstant;
import org.ssssssss.magicboot.utils.CaffeineCacheUtil;
import java.util.LinkedHashMap;
@ -150,7 +151,7 @@ public class KDTokenController {
//开始封装
//接口地址
String appTokenUrl = "http://192.168.31.158:8022/ierp/api/getAppToken.do";
String appTokenUrl = ERPURLConstant.ERP_URL + "/ierp/api/getAppToken.do";
//请求参数
LinkedHashMap appTokenParams = new LinkedHashMap<>();
appTokenParams.put("appId", "FXXKCRM");
@ -205,7 +206,7 @@ public class KDTokenController {
//不存在将执行获取accessToken的逻辑
//开始封装参数
//URL
String accessTokenUrl = "http://192.168.31.158:8022/ierp/api/login.do";
String accessTokenUrl = ERPURLConstant.ERP_URL + "/ierp/api/login.do";
//请求参数
LinkedHashMap accessTokenParams = new LinkedHashMap<>();

View File

@ -11,6 +11,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.client.RestClientException;
import org.springframework.web.client.RestTemplate;
import org.ssssssss.magicboot.constant.ERPURLConstant;
import org.ssssssss.magicboot.constant.URLConstant;
import org.ssssssss.magicboot.entity.Filter;
import org.ssssssss.magicboot.utils.CrmRequestUtil;
@ -246,7 +247,7 @@ public class PreContractController {
System.out.println(JSON.parseObject(JSON.toJSONString(contractReqEntity)));
//开始向金蝶发起请求
String contractUrl = "http://192.168.31.158:8022/ierp/kapi/v2/f9w5/conm/conm_salcontract/savecontract";
String contractUrl = ERPURLConstant.ERP_URL + "/ierp/kapi/v2/f9w5/conm/conm_salcontract/savecontract";
JSONObject contractRes = new JSONObject();
@ -542,7 +543,7 @@ public class PreContractController {
System.out.println(JSON.parseObject(JSON.toJSONString(contractReqEntity)));
//开始向金蝶发起请求
String contractUrl = "http://192.168.31.158:8022/ierp/kapi/v2/f9w5/conm/salcontract/change";
String contractUrl = ERPURLConstant.ERP_URL + "/ierp/kapi/v2/f9w5/conm/salcontract/change";
String erpPreContractBGRes = "";

View File

@ -8,6 +8,7 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.ssssssss.magicboot.constant.ERPURLConstant;
import org.ssssssss.magicboot.fxapi.HttpClientResult;
import org.ssssssss.magicboot.fxapi.HttpClientUtils;
import org.ssssssss.magicboot.fxapi.XKTokenAccess;
@ -189,7 +190,7 @@ public class ProjectNewOpportunityController {
*/
public void getSynDataSave(StringBuffer stringBuffer,Boolean sendFlag,FXHTTP fxapi,String dataId,String nameData,String obj,JSONObject str) {
String syn_type = "0";//同步类型 0新增 1修改 2删除
String res_url = "http://192.168.31.158:8022/ierp/kapi/v2/f9w5/basedata/bd_project/projectSave";
String res_url = ERPURLConstant.ERP_URL + "/ierp/kapi/v2/f9w5/basedata/bd_project/projectSave";
String res_param = obj;
String res = "";
try {
@ -390,7 +391,7 @@ public class ProjectNewOpportunityController {
}
public void getSynDataSaveUP(StringBuffer stringBuffer,Boolean sendFlag,FXHTTP fxapi,String dataId,String nameData,String obj,JSONObject str) {
String syn_type = "1";//同步类型 0新增 1修改 2删除
String res_url = "http://192.168.31.158:8022/ierp/kapi/v2/f9w5/basedata/bd_project/projectSave";
String res_url = ERPURLConstant.ERP_URL + "/ierp/kapi/v2/f9w5/basedata/bd_project/projectSave";
String res_param = obj;
String res = "";
try {

View File

@ -8,6 +8,7 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.ssssssss.magicboot.constant.ERPURLConstant;
import org.ssssssss.magicboot.fxapi.HttpClientResult;
import org.ssssssss.magicboot.fxapi.HttpClientUtils;
import org.ssssssss.magicboot.fxapi.XKTokenAccess;
@ -196,7 +197,7 @@ public class ProjectObjController {
*/
public void getSynDataSave(StringBuffer stringBuffer,Boolean sendFlag,FXHTTP fxapi,String dataId,String nameData,String obj,JSONObject str) {
String syn_type = "0";//同步类型 0新增 1修改 2删除
String res_url = "http://192.168.31.158:8022/ierp/kapi/v2/f9w5/basedata/bd_project/projectSave";
String res_url = ERPURLConstant.ERP_URL + "/ierp/kapi/v2/f9w5/basedata/bd_project/projectSave";
String res_param = obj;
String res = "";
try {
@ -397,7 +398,7 @@ public class ProjectObjController {
}
public void getSynDataSaveUP(StringBuffer stringBuffer,Boolean sendFlag,FXHTTP fxapi,String dataId,String nameData,String obj,JSONObject str) {
String syn_type = "1";//同步类型 0新增 1修改 2删除
String res_url = "http://192.168.31.158:8022/ierp/kapi/v2/f9w5/basedata/bd_project/projectSave";
String res_url = ERPURLConstant.ERP_URL + "/ierp/kapi/v2/f9w5/basedata/bd_project/projectSave";
String res_param = obj;
String res = "";
try {

View File

@ -14,6 +14,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.client.RestClientException;
import org.springframework.web.client.RestTemplate;
import org.ssssssss.magicboot.constant.ERPURLConstant;
import org.ssssssss.magicboot.constant.URLConstant;
import org.ssssssss.magicboot.entity.Filter;
import org.ssssssss.magicboot.utils.CrmRequestUtil;
@ -192,7 +193,7 @@ public class QualityBackController {
System.out.println(JSON.parseObject(JSON.toJSONString(qualityBackReqEntity)));
String qualityBackUrl = "http://192.168.31.158:8022/ierp/kapi/v2/f9w5/qcqi/f9w5_problemfeedback/save";
String qualityBackUrl = ERPURLConstant.ERP_URL + "/ierp/kapi/v2/f9w5/qcqi/f9w5_problemfeedback/save";
String qualityBackRes = "";
try {
@ -286,7 +287,7 @@ public class QualityBackController {
JSONObject fileRes = new JSONObject();
try {
fileRes = restTemplate.postForObject("http://192.168.31.158:8022/ierp/kapi/v2/f9w5/qcqi/feedback/uploadFile", entity, JSONObject.class);
fileRes = restTemplate.postForObject(ERPURLConstant.ERP_URL + "/ierp/kapi/v2/f9w5/qcqi/feedback/uploadFile", entity, JSONObject.class);
} catch (RestClientException e) {
e.printStackTrace();
}

View File

@ -11,6 +11,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.client.RestClientException;
import org.springframework.web.client.RestTemplate;
import org.ssssssss.magicboot.constant.ERPURLConstant;
import org.ssssssss.magicboot.constant.URLConstant;
import org.ssssssss.magicboot.entity.Filter;
import org.ssssssss.magicboot.utils.CrmRequestUtil;
@ -80,7 +81,7 @@ public class ReimbursementController {
HttpEntity expensesEntity = new HttpEntity(expensesMap, headers);
String expensesUrl = "http://192.168.31.158:8022/ierp/kapi/v2/f9w5/em/er_dailyreimbursebill/dailyreimbursebillQuery";
String expensesUrl = ERPURLConstant.ERP_URL + "/ierp/kapi/v2/f9w5/em/er_dailyreimbursebill/dailyreimbursebillQuery";
JSONObject expensesRes = new JSONObject();
@ -393,7 +394,7 @@ public class ReimbursementController {
HttpEntity expensesEntity = new HttpEntity(expensesMap, headers);
String expensesUrl = "http://192.168.31.158:8022/ierp/kapi/v2/f9w5/em/er_publicreimbursebill/publicreimbursebillQuery";
String expensesUrl = ERPURLConstant.ERP_URL + "/ierp/kapi/v2/f9w5/em/er_publicreimbursebill/publicreimbursebillQuery";
JSONObject expensesRes = new JSONObject();

View File

@ -12,6 +12,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.client.RestClientException;
import org.springframework.web.client.RestTemplate;
import org.ssssssss.magicboot.constant.ERPURLConstant;
import org.ssssssss.magicboot.constant.URLConstant;
import org.ssssssss.magicboot.entity.Filter;
import org.ssssssss.magicboot.utils.CrmRequestUtil;
@ -169,7 +170,7 @@ public class TenderingController {
System.out.println(JSON.parseObject(JSON.toJSONString(tenderingReqEntity)));
String tenderingUrl = "http://192.168.31.158:8022/ierp/kapi/v2/f9w5/em/f9w5_tenderbuyapply/save";
String tenderingUrl = ERPURLConstant.ERP_URL + "/ierp/kapi/v2/f9w5/em/f9w5_tenderbuyapply/save";
JSONObject tenderingERPRes = new JSONObject();

View File

@ -12,6 +12,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.client.RestClientException;
import org.springframework.web.client.RestTemplate;
import org.ssssssss.magicboot.constant.ERPURLConstant;
import org.ssssssss.magicboot.constant.URLConstant;
import org.ssssssss.magicboot.entity.Filter;
import org.ssssssss.magicboot.utils.CrmRequestUtil;
@ -379,7 +380,7 @@ public class XSHTController {
System.out.println(JSON.parseObject(JSON.toJSONString(contractReqEntity)));
//开始向金蝶发起请求
String contractUrl = "http://192.168.31.158:8022/ierp/kapi/v2/f9w5/conm/conm_salcontract/savecontract";
String contractUrl = ERPURLConstant.ERP_URL + "/ierp/kapi/v2/f9w5/conm/conm_salcontract/savecontract";
JSONObject contractRes = new JSONObject();
@ -488,7 +489,7 @@ public class XSHTController {
JSONObject fileRes = new JSONObject();
try {
fileRes = restTemplate.postForObject("http://192.168.31.158:8022/ierp/kapi/v2/frame/attachment/uploadFile", entity, JSONObject.class);
fileRes = restTemplate.postForObject(ERPURLConstant.ERP_URL + "/ierp/kapi/v2/frame/attachment/uploadFile", entity, JSONObject.class);
} catch (RestClientException e) {
e.printStackTrace();
}
@ -583,7 +584,7 @@ public class XSHTController {
JSONObject isCompleteRes = new JSONObject();
try {
isCompleteRes = restTemplate.postForObject("http://192.168.31.158:8022/ierp/kapi/v2/f9w5/f9w5_conm_ext/salcontract/beComplete", isCompleteEntity, JSONObject.class);
isCompleteRes = restTemplate.postForObject(ERPURLConstant.ERP_URL + "/ierp/kapi/v2/f9w5/f9w5_conm_ext/salcontract/beComplete", isCompleteEntity, JSONObject.class);
} catch (RestClientException e) {
e.printStackTrace();
}

View File

@ -8,6 +8,7 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.ssssssss.magicboot.constant.ERPURLConstant;
import org.ssssssss.magicboot.fxapi.HttpClientResult;
import org.ssssssss.magicboot.fxapi.HttpClientUtils;
import org.ssssssss.magicboot.fxapi.XKTokenAccess;
@ -208,7 +209,7 @@ public class customerContactController {
*/
public void getSynDataSave(StringBuffer stringBuffer,Boolean sendFlag,FXHTTP fxapi,String dataId,String nameData,String obj,JSONObject str) {
String syn_type = "0";//同步类型 0新增 1修改 2删除
String res_url = "http://192.168.31.158:8022/ierp/kapi/v2/f9w5/basedata/bd_customer/customerSave";
String res_url = ERPURLConstant.ERP_URL + "/ierp/kapi/v2/f9w5/basedata/bd_customer/customerSave";
String res_param = obj;
String res = "";
try {

View File

@ -10,6 +10,7 @@ import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.ssssssss.magicboot.constant.ERPURLConstant;
import org.ssssssss.magicboot.fxapi.HttpClientResult;
import org.ssssssss.magicboot.fxapi.HttpClientUtils;
import org.ssssssss.magicboot.fxapi.XKTokenAccess;
@ -255,7 +256,7 @@ public class customerController {
*/
public void getSynDataSave(StringBuffer stringBuffer,Boolean sendFlag,FXHTTP fxapi,String dataId,String nameData,String obj,JSONObject str) {
String syn_type = "0";//同步类型 0新增 1修改 2删除
String res_url = "http://192.168.31.158:8022/ierp/kapi/v2/f9w5/basedata/bd_customer/customerSave";
String res_url = ERPURLConstant.ERP_URL + "/ierp/kapi/v2/f9w5/basedata/bd_customer/customerSave";
String res_param = obj;
String res = "";
try {
@ -526,7 +527,7 @@ public class customerController {
public void getSynDataSaveup(StringBuffer stringBuffer,Boolean sendFlag,FXHTTP fxapi,String dataId,String nameData,String obj,JSONObject str) {
String syn_type = "1";//同步类型 0新增 1修改 2删除
String res_url = "http://192.168.31.158:8022/ierp/kapi/v2/f9w5/basedata/bd_customer/customerSave";
String res_url = ERPURLConstant.ERP_URL + "/ierp/kapi/v2/f9w5/basedata/bd_customer/customerSave";
String res_param = obj;
String res = "";
try {

View File

@ -8,6 +8,7 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.ssssssss.magicboot.constant.ERPURLConstant;
import org.ssssssss.magicboot.fxapi.HttpClientResult;
import org.ssssssss.magicboot.fxapi.HttpClientUtils;
import org.ssssssss.magicboot.fxapi.XKTokenAccess;
@ -203,7 +204,7 @@ public class customerFinInfoController {
*/
public void getSynDataSave(StringBuffer stringBuffer,Boolean sendFlag,FXHTTP fxapi,String dataId,String nameData,String obj,JSONObject str) {
String syn_type = "0";//同步类型 0新增 1修改 2删除
String res_url = "http://192.168.31.158:8022/ierp/kapi/v2/f9w5/basedata/bd_customer/customerSave";
String res_url = ERPURLConstant.ERP_URL + "/ierp/kapi/v2/f9w5/basedata/bd_customer/customerSave";
String res_param = obj;
String res = "";
try {

View File

@ -8,6 +8,7 @@ import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.ssssssss.magicboot.constant.ERPURLConstant;
import org.ssssssss.magicboot.fxapi.HttpClientResult;
import org.ssssssss.magicboot.fxapi.HttpClientUtils;
import org.ssssssss.magicboot.fxapi.XKTokenAccess;
@ -42,7 +43,7 @@ public class customergroupController {
Boolean sendFlag = false;//是否阻断
StringBuffer stringBuffer = new StringBuffer();
String sendUrl = "http://192.168.31.158:8022/ierp/kapi/v2/f9w5/basedata/bd_customergroup/customergroupSave";
String sendUrl = ERPURLConstant.ERP_URL + "/ierp/kapi/v2/f9w5/basedata/bd_customergroup/customergroupSave";
String sendBody = "";
String sendRes = "";

View File

@ -8,6 +8,7 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.ssssssss.magicboot.constant.ERPURLConstant;
import org.ssssssss.magicboot.fxapi.HttpClientResult;
import org.ssssssss.magicboot.fxapi.HttpClientUtils;
import org.ssssssss.magicboot.fxapi.XKTokenAccess;
@ -250,7 +251,7 @@ public class materialreqbillController {
*/
public void getSynDataSave(StringBuffer stringBuffer,Boolean sendFlag,FXHTTP fxapi,String dataId,String nameData,String obj,JSONObject str) {
String syn_type = "0";//同步类型 0新增 1修改 2删除
String res_url = "http://192.168.31.158:8022/ierp/kapi/v2/f9w5/im/im_materialreqbill/materialreqbillSave";
String res_url = ERPURLConstant.ERP_URL + "/ierp/kapi/v2/f9w5/im/im_materialreqbill/materialreqbillSave";
String res_param = obj;
String res = "";
try {

View File

@ -8,6 +8,7 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.ssssssss.magicboot.constant.ERPURLConstant;
import org.ssssssss.magicboot.fxapi.HttpClientResult;
import org.ssssssss.magicboot.fxapi.HttpClientUtils;
import org.ssssssss.magicboot.fxapi.XKTokenAccess;
@ -299,7 +300,7 @@ public class materialreqbillXTController {
*/
public void getSynDataSave(StringBuffer stringBuffer,Boolean sendFlag,FXHTTP fxapi,String dataId,String nameData,String obj,JSONObject str) {
String syn_type = "0";//同步类型 0新增 1修改 2删除
String res_url = "http://192.168.31.158:8022/ierp/kapi/v2/f9w5/im/materialreqbill/push";
String res_url = ERPURLConstant.ERP_URL + "/ierp/kapi/v2/f9w5/im/materialreqbill/push";
String res_param = obj;
String res = "";
try {
@ -383,7 +384,7 @@ public class materialreqbillXTController {
public void doOperation(String crmId,String operation) throws Exception {
FXHTTP fxapi = new FXHTTP();
//操作类型submit提交audit审核撤销unsubmit删除:delete;反审核unaudit
String res_url = "http://192.168.31.158:8022/ierp/kapi/v2/f9w5/im/materialreqbill/doOperation";
String res_url = ERPURLConstant.ERP_URL + "/ierp/kapi/v2/f9w5/im/materialreqbill/doOperation";
JSONObject datajson = new JSONObject();
datajson.put("crmId",crmId);
datajson.put("operation",operation);

View File

@ -14,6 +14,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.client.RestClientException;
import org.springframework.web.client.RestTemplate;
import org.ssssssss.magicboot.constant.ERPURLConstant;
import org.ssssssss.magicboot.fxapi.HttpClientResult;
import org.ssssssss.magicboot.fxapi.HttpClientUtils;
import org.ssssssss.magicboot.fxapi.XKTokenAccess;
@ -275,7 +276,7 @@ public class priceapprovaController {
*/
public void getSynDataSave(StringBuffer stringBuffer,Boolean sendFlag,FXHTTP fxapi,String dataId,String nameData,String obj,JSONObject str,JSONArray specificationfile) {
String syn_type = "0";//同步类型 0新增 1修改 2删除
String res_url = "http://192.168.31.158:8022/ierp/kapi/v2/f9w5/pmp/f9w5_pmp_priceapproval/priceapprovalSave";
String res_url = ERPURLConstant.ERP_URL + "/ierp/kapi/v2/f9w5/pmp/f9w5_pmp_priceapproval/priceapprovalSave";
String res_param = obj;
String res = "";
try {
@ -314,7 +315,7 @@ public class priceapprovaController {
//开始发起传输
JSONObject fileRes = new JSONObject();
try {
fileRes = restTemplate.postForObject("http://192.168.31.158:8022/ierp/kapi/v2/frame/attachment/uploadFile", entity, JSONObject.class);
fileRes = restTemplate.postForObject(ERPURLConstant.ERP_URL + "/ierp/kapi/v2/frame/attachment/uploadFile", entity, JSONObject.class);
Map<String, Object> paramMap2 = new HashMap<String, Object>();
String message = fileRes.getString("message");

View File

@ -8,6 +8,7 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.ssssssss.magicboot.constant.ERPURLConstant;
import org.ssssssss.magicboot.fxapi.HttpClientResult;
import org.ssssssss.magicboot.fxapi.HttpClientUtils;
import org.ssssssss.magicboot.fxapi.XKTokenAccess;
@ -267,7 +268,7 @@ public class returnapplicationController {
*/
public void getSynDataSave(StringBuffer stringBuffer,Boolean sendFlag,FXHTTP fxapi,String dataId,String nameData,String obj,JSONObject str) {
String syn_type = "0";//同步类型 0新增 1修改 2删除
String res_url = "http://192.168.31.158:8022/ierp/kapi/v2/f9w5/im/materialreqbill/save";
String res_url = ERPURLConstant.ERP_URL + "/ierp/kapi/v2/f9w5/im/materialreqbill/save";
String res_param = obj;
String res = "";
try {

View File

@ -9,6 +9,7 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.ssssssss.magicboot.constant.ERPURLConstant;
import org.ssssssss.magicboot.fxapi.HttpClientResult;
import org.ssssssss.magicboot.fxapi.HttpClientUtils;
import org.ssssssss.magicboot.fxapi.XKTokenAccess;
@ -223,7 +224,7 @@ public class salesPredictionController {
*/
public void getSynDataSave(StringBuffer stringBuffer,Boolean sendFlag,FXHTTP fxapi,String dataId,String nameData,String obj,JSONObject str) {
String syn_type = "0";//同步类型 0新增 1修改 2删除
String res_url = "http://192.168.31.158:8022/ierp/kapi/v2/f9w5/sm/f9w5_salespred/salespredSave";
String res_url = ERPURLConstant.ERP_URL + "/ierp/kapi/v2/f9w5/sm/f9w5_salespred/salespredSave";
String res_param = obj;
String res = "";
try {
@ -482,7 +483,7 @@ public class salesPredictionController {
*/
public void getSynDataSaveUP(StringBuffer stringBuffer,Boolean sendFlag,FXHTTP fxapi,String dataId,String nameData,String obj,JSONObject str) {
String syn_type = "1";//同步类型 0新增 1修改 2删除
String res_url = "http://192.168.31.158:8022/ierp/kapi/v2/f9w5/sm/f9w5_salespred/salespredSave";
String res_url = ERPURLConstant.ERP_URL + "/ierp/kapi/v2/f9w5/sm/f9w5_salespred/salespredSave";
String res_param = obj;
String res = "";
try {

View File

@ -7,6 +7,7 @@ import org.springframework.http.HttpHeaders;
import org.springframework.http.MediaType;
import org.springframework.web.client.RestClientException;
import org.springframework.web.client.RestTemplate;
import org.ssssssss.magicboot.constant.ERPURLConstant;
import org.ssssssss.magicboot.controller.KDTokenController;
import java.util.HashMap;
@ -26,7 +27,7 @@ public class KingDeeUtils {
* @Author weiloong_zhang
*/
public void audit(String ErpId, String BillType) {
String url = "http://192.168.31.158:8022/ierp/kapi/v2/f9w5/devportal/operation/submit";
String url = ERPURLConstant.ERP_URL + "/ierp/kapi/v2/f9w5/devportal/operation/submit";
//开始封装参数
Map auditParams = new HashMap();

View File

@ -1,5 +1,7 @@
package org.ssssssss.magicboot.zdyutils;
import org.ssssssss.magicboot.constant.ERPURLConstant;
public class FXTIC {
//
public static String URL_FX_CREATE="https://open.fxiaoke.com/cgi/crm/v2/data/create";
@ -19,7 +21,7 @@ public class FXTIC {
public static String URL_DESCRIBE="https://open.fxiaoke.com/cgi/crm/v2/object/describe";
public static String TESTERPURL="http://192.168.31.158:8022/ierp/kapi";
public static String TESTERPURL= ERPURLConstant.ERP_URL + "/ierp/kapi";
public static String ERPURL="https://lxr2.zhydsp.cn:40448/ierp/kapi";