日志url
This commit is contained in:
parent
482f16e4ad
commit
5f2ef78ce9
|
|
@ -2,6 +2,8 @@ package tqq9.lc123.cloud.app.plugin.operate.sys;
|
|||
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.fasterxml.jackson.databind.JsonNode;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import kd.bos.dataentity.entity.DynamicObject;
|
||||
import kd.bos.entity.plugin.AbstractOperationServicePlugIn;
|
||||
import kd.bos.entity.plugin.args.AfterOperationArgs;
|
||||
|
|
@ -11,6 +13,8 @@ import kd.bos.orm.query.QCP;
|
|||
import kd.bos.orm.query.QFilter;
|
||||
import kd.bos.servicehelper.AttachmentServiceHelper;
|
||||
import kd.bos.servicehelper.BusinessDataServiceHelper;
|
||||
import kd.bos.util.StringUtils;
|
||||
import tqq9.lc123.cloud.app.eip.iscb.impl.LCLogServiceImpl;
|
||||
import tqq9.lc123.cloud.app.plugin.utils.HttpRequestUtils;
|
||||
|
||||
import java.io.IOException;
|
||||
|
|
@ -18,6 +22,7 @@ import java.util.ArrayList;
|
|||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
//北广生产商同步
|
||||
public class BGScsOpPlugin extends AbstractOperationServicePlugIn {
|
||||
private final static Log logger = LogFactory.getLog(BGScsOpPlugin.class);
|
||||
|
|
@ -56,16 +61,36 @@ public class BGScsOpPlugin extends AbstractOperationServicePlugIn {
|
|||
HashMap<String, String> headMap = new HashMap<>();
|
||||
logger.info("北广生产商同步body:" + jsonBody);
|
||||
try {
|
||||
String s1 = HttpRequestUtils.postJson(BJ_URL + "/api/BA/Manufacturer", jsonBody, headMap);
|
||||
logger.info("北京生产商同步结果:" + s1);
|
||||
String result = HttpRequestUtils.postJson(BJ_URL + "/api/BA/Manufacturer", jsonBody, headMap);
|
||||
if (StringUtils.isNotEmpty(result)) {
|
||||
ObjectMapper objectMapper = new ObjectMapper();
|
||||
JsonNode rootNode = objectMapper.readTree(result);
|
||||
if (null != rootNode) {
|
||||
String code = String.valueOf(rootNode.get("code"));
|
||||
LCLogServiceImpl lcLogService = new LCLogServiceImpl();
|
||||
lcLogService.savelog("北京生产商同步", BJ_URL+ "/api/BA/Manufacturer", true, code.equals("0"), jsonBody, result);
|
||||
lcLogService.isSuccess("tqq9_proxyandfactory", number, "number", "tqq9_pushw", code.equals("0"));
|
||||
}
|
||||
logger.info("北京生产商同步结果:" + result);
|
||||
}
|
||||
} catch (IOException ex) {
|
||||
throw new RuntimeException(ex);
|
||||
}
|
||||
|
||||
//广州
|
||||
try {
|
||||
String s2 = HttpRequestUtils.postJson(GZ_URL + "/api/BA/Manufacturer", jsonBody, headMap);
|
||||
logger.info("广州生产商同步结果:" + s2);
|
||||
String result = HttpRequestUtils.postJson(GZ_URL + "/api/BA/Manufacturer", jsonBody, headMap);
|
||||
if (StringUtils.isNotEmpty(result)) {
|
||||
ObjectMapper objectMapper = new ObjectMapper();
|
||||
JsonNode rootNode = objectMapper.readTree(result);
|
||||
if (null != rootNode) {
|
||||
String code = String.valueOf(rootNode.get("code"));
|
||||
LCLogServiceImpl lcLogService = new LCLogServiceImpl();
|
||||
lcLogService.savelog("广州生产商同步", GZ_URL+ "/api/BA/Manufacturer", true, code.equals("0"), jsonBody, result);
|
||||
lcLogService.isSuccess("tqq9_proxyandfactory", number, "number", "tqq9_pushw", code.equals("0"));
|
||||
}
|
||||
logger.info("广州生产商同步结果:" + result);
|
||||
}
|
||||
} catch (IOException ex) {
|
||||
throw new RuntimeException(ex);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
package tqq9.lc123.cloud.app.plugin.operate.sys;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.fasterxml.jackson.databind.JsonNode;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import kd.bos.dataentity.entity.DynamicObject;
|
||||
import kd.bos.dataentity.entity.DynamicObjectCollection;
|
||||
import kd.bos.entity.plugin.AbstractOperationServicePlugIn;
|
||||
|
|
@ -13,6 +15,7 @@ import kd.bos.orm.query.QFilter;
|
|||
import kd.bos.servicehelper.AttachmentServiceHelper;
|
||||
import kd.bos.servicehelper.BusinessDataServiceHelper;
|
||||
import kd.bos.util.StringUtils;
|
||||
import tqq9.lc123.cloud.app.eip.iscb.impl.LCLogServiceImpl;
|
||||
import tqq9.lc123.cloud.app.plugin.utils.HttpRequestUtils;
|
||||
|
||||
import java.io.IOException;
|
||||
|
|
@ -36,6 +39,7 @@ public class BGZczOpPlugin extends AbstractOperationServicePlugIn {
|
|||
String WMS_URL = WMSURL.getString("name");
|
||||
|
||||
private final static Log logger = LogFactory.getLog(BGZczOpPlugin.class);
|
||||
|
||||
@Override
|
||||
public void onPreparePropertys(PreparePropertysEventArgs e) {
|
||||
super.onPreparePropertys(e);
|
||||
|
|
@ -120,15 +124,35 @@ public class BGZczOpPlugin extends AbstractOperationServicePlugIn {
|
|||
logger.info("广州注册证body:" + gzjsonBody);
|
||||
//北京
|
||||
try {
|
||||
String s1 = HttpRequestUtils.postJson(BJ_URL + "/api/BA/Registration", bjjsonBody, null);
|
||||
logger.info("北京注册证同步结果:" + s1);
|
||||
String result = HttpRequestUtils.postJson(BJ_URL + "/api/BA/Registration", bjjsonBody, null);
|
||||
if (StringUtils.isNotEmpty(result)) {
|
||||
ObjectMapper objectMapper = new ObjectMapper();
|
||||
JsonNode rootNode = objectMapper.readTree(result);
|
||||
if (null != rootNode) {
|
||||
String code = String.valueOf(rootNode.get("code"));
|
||||
LCLogServiceImpl lcLogService = new LCLogServiceImpl();
|
||||
lcLogService.savelog("北京注册证同步", BJ_URL+ "/api/BA/Registration", true, code.equals("0"), bjjsonBody, result);
|
||||
lcLogService.isSuccess("tqq9_registration", number, "number", "tqq9_pushw", code.equals("0"));
|
||||
}
|
||||
logger.info("北京注册证同步结果:" + result);
|
||||
}
|
||||
} catch (IOException ex) {
|
||||
throw new RuntimeException(ex);
|
||||
}
|
||||
//广州
|
||||
try {
|
||||
String s2 = HttpRequestUtils.postJson(GZ_URL + "/api/BA/Registration", gzjsonBody, null);
|
||||
logger.info("广州注册证同步结果:" + s2);
|
||||
String result = HttpRequestUtils.postJson(GZ_URL + "/api/BA/Registration", gzjsonBody, null);
|
||||
if (StringUtils.isNotEmpty(result)) {
|
||||
ObjectMapper objectMapper = new ObjectMapper();
|
||||
JsonNode rootNode = objectMapper.readTree(result);
|
||||
if (null != rootNode) {
|
||||
String code = String.valueOf(rootNode.get("code"));
|
||||
LCLogServiceImpl lcLogService = new LCLogServiceImpl();
|
||||
lcLogService.savelog("广州注册证同步", GZ_URL+ "/api/BA/Registration", true, code.equals("0"), bjjsonBody, result);
|
||||
lcLogService.isSuccess("tqq9_registration", number, "number", "tqq9_pushw", code.equals("0"));
|
||||
}
|
||||
logger.info("广州注册证同步结果:" + result);
|
||||
}
|
||||
} catch (IOException ex) {
|
||||
throw new RuntimeException(ex);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
package tqq9.lc123.cloud.app.plugin.operate.sys;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import kd.bos.dataentity.entity.DynamicObject;
|
||||
import kd.bos.entity.plugin.AbstractOperationServicePlugIn;
|
||||
import kd.bos.entity.plugin.PreparePropertysEventArgs;
|
||||
|
|
@ -10,6 +11,8 @@ import kd.bos.orm.query.QCP;
|
|||
import kd.bos.orm.query.QFilter;
|
||||
import kd.bos.servicehelper.AttachmentServiceHelper;
|
||||
import kd.bos.servicehelper.BusinessDataServiceHelper;
|
||||
import kd.bos.util.StringUtils;
|
||||
import tqq9.lc123.cloud.app.eip.iscb.impl.LCLogServiceImpl;
|
||||
import tqq9.lc123.cloud.app.plugin.utils.ConfigUtils;
|
||||
import tqq9.lc123.cloud.app.plugin.utils.HttpRequestUtils;
|
||||
|
||||
|
|
@ -114,8 +117,18 @@ public class WmsScsSyncOpPlugin extends AbstractOperationServicePlugIn {
|
|||
String ttx_mainUrl = ConfigUtils.getThirdConfigByNumber("Ttx_MainURL");
|
||||
ttx_mainUrl = ttx_mainUrl + "?method=manufacturer.create&v=2.0&format=xml&customerId=" + ttx_customerId;
|
||||
try {
|
||||
String s = HttpRequestUtils.postXml(ttx_mainUrl, xmlBuilder.toString(), headMap);
|
||||
logger.info("wms生产商同步接口结果:" + s);
|
||||
String result = HttpRequestUtils.postXml(ttx_mainUrl, xmlBuilder.toString(), headMap);
|
||||
if (StringUtils.isNotEmpty(result)) {
|
||||
JSONObject jsonObject = HttpRequestUtils.xmlToJson(result);
|
||||
JSONObject response = jsonObject.getJSONObject("response");
|
||||
String code = response.getString("code");
|
||||
|
||||
LCLogServiceImpl lcLogService = new LCLogServiceImpl();
|
||||
lcLogService.savelog("wms生产商同步", ttx_mainUrl, true, code.equals("200"), xmlBuilder.toString(), result);
|
||||
lcLogService.isSuccess("tqq9_proxyandfactory", number1, "number", "tqq9_pushw", code.equals("200"));
|
||||
|
||||
logger.info("wms生产商同步接口结果:" + result);
|
||||
}
|
||||
} catch (IOException ex) {
|
||||
throw new RuntimeException(ex);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
package tqq9.lc123.cloud.app.plugin.operate.sys;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import kd.bos.dataentity.entity.DynamicObject;
|
||||
import kd.bos.dataentity.entity.DynamicObjectCollection;
|
||||
import kd.bos.entity.plugin.AbstractOperationServicePlugIn;
|
||||
|
|
@ -12,6 +13,7 @@ import kd.bos.orm.query.QFilter;
|
|||
import kd.bos.servicehelper.AttachmentServiceHelper;
|
||||
import kd.bos.servicehelper.BusinessDataServiceHelper;
|
||||
import kd.bos.util.StringUtils;
|
||||
import tqq9.lc123.cloud.app.eip.iscb.impl.LCLogServiceImpl;
|
||||
import tqq9.lc123.cloud.app.plugin.utils.ConfigUtils;
|
||||
import tqq9.lc123.cloud.app.plugin.utils.HttpRequestUtils;
|
||||
|
||||
|
|
@ -148,8 +150,17 @@ public class WmsZczSyncOpPlugin extends AbstractOperationServicePlugIn {
|
|||
String ttx_mainUrl = ConfigUtils.getThirdConfigByNumber("Ttx_MainURL");
|
||||
ttx_mainUrl = ttx_mainUrl + "?method=registrationcertificate.create&v=2.0&format=xml&customerId=" + ttx_customerId;
|
||||
try {
|
||||
String s = HttpRequestUtils.postXml(ttx_mainUrl, xmlBuilder.toString(), headMap);
|
||||
logger.info("wms注册证接口结果:" + s);
|
||||
String result = HttpRequestUtils.postXml(ttx_mainUrl, xmlBuilder.toString(), headMap);
|
||||
if (StringUtils.isNotEmpty(result)) {
|
||||
JSONObject jsonObject = HttpRequestUtils.xmlToJson(result);
|
||||
JSONObject response = jsonObject.getJSONObject("response");
|
||||
String code = response.getString("code");
|
||||
LCLogServiceImpl lcLogService = new LCLogServiceImpl();
|
||||
lcLogService.savelog("wms注册证同步", ttx_mainUrl, true, code.equals("200"), xmlBuilder.toString(), result);
|
||||
lcLogService.isSuccess("tqq9_registration", number, "number", "tqq9_pushw", code.equals("200"));
|
||||
|
||||
logger.info("wms注册证接口结果:" + result);
|
||||
}
|
||||
} catch (IOException ex) {
|
||||
throw new RuntimeException(ex);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -50,7 +50,6 @@ public class BillCloseCancelUtils {
|
|||
if (StringUtils.isNotEmpty(result)) {
|
||||
JSONObject jsonObject = HttpRequestUtils.xmlToJson(result);
|
||||
JSONObject response = jsonObject.getJSONObject("response");
|
||||
String flag = response.getString("flag");
|
||||
String code = response.getString("code");
|
||||
message = response.getString("message");
|
||||
if ("0".equals(code) || "200".equals(code)) {
|
||||
|
|
@ -99,7 +98,7 @@ public class BillCloseCancelUtils {
|
|||
message = "关闭成功";
|
||||
}
|
||||
LCLogServiceImpl lcLogService = new LCLogServiceImpl();
|
||||
lcLogService.savelog(entityName, url, true, code.equals("0"), bjjsonBody, result);
|
||||
lcLogService.savelog(entityName, url + method, true, code.equals("0"), bjjsonBody, result);
|
||||
lcLogService.isSuccess(entityType, billNo, "billno", label, code.equals("0"));
|
||||
}
|
||||
|
||||
|
|
@ -136,7 +135,7 @@ public class BillCloseCancelUtils {
|
|||
message = "关闭成功";
|
||||
}
|
||||
LCLogServiceImpl lcLogService = new LCLogServiceImpl();
|
||||
lcLogService.savelog(entityName, url, true, code.equals("0"), bjjsonBody, result);
|
||||
lcLogService.savelog(entityName, url + method, true, code.equals("0"), bjjsonBody, result);
|
||||
lcLogService.isSuccess(entityType, billNo, "billno", label, code.equals("0"));
|
||||
}
|
||||
} catch (IOException e) {
|
||||
|
|
@ -181,7 +180,7 @@ public class BillCloseCancelUtils {
|
|||
message = "关闭成功";
|
||||
}
|
||||
LCLogServiceImpl lcLogService = new LCLogServiceImpl();
|
||||
lcLogService.savelog(entityName, url, true, code.equals("0"), bjjsonBody, result);
|
||||
lcLogService.savelog(entityName, url + method, true, code.equals("0"), bjjsonBody, result);
|
||||
lcLogService.isSuccess(entityType, billNo, "billno", label, code.equals("0"));
|
||||
}
|
||||
|
||||
|
|
@ -218,7 +217,7 @@ public class BillCloseCancelUtils {
|
|||
message = "关闭成功";
|
||||
}
|
||||
LCLogServiceImpl lcLogService = new LCLogServiceImpl();
|
||||
lcLogService.savelog(entityName, url, true, code.equals("0"), bjjsonBody, result);
|
||||
lcLogService.savelog(entityName, url + method, true, code.equals("0"), bjjsonBody, result);
|
||||
lcLogService.isSuccess(entityType, billNo, "billno", label, code.equals("0"));
|
||||
}
|
||||
|
||||
|
|
@ -256,7 +255,7 @@ public class BillCloseCancelUtils {
|
|||
message = "关闭成功";
|
||||
}
|
||||
LCLogServiceImpl lcLogService = new LCLogServiceImpl();
|
||||
lcLogService.savelog(entityName, url, true, code.equals("0"), bjjsonBody, result);
|
||||
lcLogService.savelog(entityName, url + method, true, code.equals("0"), bjjsonBody, result);
|
||||
lcLogService.isSuccess(entityType, billNo, "billno", label, code.equals("0"));
|
||||
}
|
||||
|
||||
|
|
@ -302,7 +301,6 @@ public class BillCloseCancelUtils {
|
|||
if (StringUtils.isNotEmpty(result)) {
|
||||
JSONObject jsonObject = HttpRequestUtils.xmlToJson(result);
|
||||
JSONObject response = jsonObject.getJSONObject("response");
|
||||
String flag = response.getString("flag");
|
||||
String code = response.getString("code");
|
||||
message = response.getString("message");
|
||||
if ("0".equals(code) || "200".equals(code)) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue