北上广注册证,生产商根据标记推送,非采购供应商创建人根据泛微id查询
This commit is contained in:
parent
5f571ca997
commit
ba785762c9
|
|
@ -61,9 +61,9 @@ public class SupplierControl implements Serializable {
|
|||
billStatus = false;
|
||||
} else {
|
||||
creator = BusinessDataServiceHelper.loadSingle("bos_user",
|
||||
new QFilter[]{new QFilter("number", QCP.equals, creator_number)});
|
||||
new QFilter[]{new QFilter("entryentity.tqq9_fwuserid", QCP.equals, creator_number)});
|
||||
if (null == creator) {
|
||||
rowMsg.add("根据创建人工号【" + creator_number + "】在金蝶系统中没有查询到对应的人员信息");
|
||||
rowMsg.add("根据泛微人员id【" + creator_number + "】在金蝶系统中没有查询到对应的人员信息");
|
||||
billStatus = false;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -61,36 +61,44 @@ public class BGScsOpPlugin extends AbstractOperationServicePlugIn {
|
|||
HashMap<String, String> headMap = new HashMap<>();
|
||||
logger.info("北广生产商同步body:" + jsonBody);
|
||||
try {
|
||||
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"));
|
||||
boolean tqq9_pushbj = dataEntity.getBoolean("tqq9_pushbj");
|
||||
if (!tqq9_pushbj) {
|
||||
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_pushbj", code.equals("0"));
|
||||
}
|
||||
logger.info("北京生产商同步结果:" + result);
|
||||
}
|
||||
logger.info("北京生产商同步结果:" + result);
|
||||
}
|
||||
|
||||
} catch (IOException ex) {
|
||||
throw new RuntimeException(ex);
|
||||
}
|
||||
|
||||
//广州
|
||||
try {
|
||||
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"));
|
||||
boolean tqq9_pushgz = dataEntity.getBoolean("tqq9_pushgz");
|
||||
if (!tqq9_pushgz) {
|
||||
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_pushgz", code.equals("0"));
|
||||
}
|
||||
logger.info("广州生产商同步结果:" + result);
|
||||
}
|
||||
logger.info("广州生产商同步结果:" + result);
|
||||
}
|
||||
|
||||
} catch (IOException ex) {
|
||||
throw new RuntimeException(ex);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -140,35 +140,43 @@ public class BGZczOpPlugin extends AbstractOperationServicePlugIn {
|
|||
logger.info("广州注册证body:" + gzjsonBody);
|
||||
//北京
|
||||
try {
|
||||
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"));
|
||||
boolean tqq9_pushbj = dataEntity.getBoolean("tqq9_pushbj");
|
||||
if (!tqq9_pushbj) {
|
||||
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_pushbj", code.equals("0"));
|
||||
}
|
||||
logger.info("北京注册证同步结果:" + result);
|
||||
}
|
||||
logger.info("北京注册证同步结果:" + result);
|
||||
}
|
||||
|
||||
} catch (IOException ex) {
|
||||
throw new RuntimeException(ex);
|
||||
}
|
||||
//广州
|
||||
try {
|
||||
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"));
|
||||
boolean tqq9_pushgz = dataEntity.getBoolean("tqq9_pushgz");
|
||||
if (!tqq9_pushgz) {
|
||||
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_pushgz", code.equals("0"));
|
||||
}
|
||||
logger.info("广州注册证同步结果:" + result);
|
||||
}
|
||||
logger.info("广州注册证同步结果:" + result);
|
||||
}
|
||||
|
||||
} catch (IOException ex) {
|
||||
throw new RuntimeException(ex);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -43,6 +43,9 @@ public class WmsScsSyncOpPlugin extends AbstractOperationServicePlugIn {
|
|||
e.getFieldKeys().add("name");
|
||||
e.getFieldKeys().add("tqq9_address");
|
||||
e.getFieldKeys().add("tqq9_proaddress");
|
||||
e.getFieldKeys().add("tqq9_pushw");
|
||||
e.getFieldKeys().add("tqq9_pushgz");
|
||||
e.getFieldKeys().add("tqq9_pushbj");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
@ -117,18 +120,22 @@ 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 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");
|
||||
boolean tqq9_pushw = dataEntity.getBoolean("tqq9_pushw");
|
||||
if (!tqq9_pushw) {
|
||||
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"));
|
||||
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);
|
||||
logger.info("wms生产商同步接口结果:" + result);
|
||||
}
|
||||
}
|
||||
|
||||
} catch (IOException ex) {
|
||||
throw new RuntimeException(ex);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -50,6 +50,9 @@ public class WmsZczSyncOpPlugin extends AbstractOperationServicePlugIn {
|
|||
e.getFieldKeys().add("tqq9_proxyno");
|
||||
e.getFieldKeys().add("tqq9_entry.tqq9_e_supno");
|
||||
e.getFieldKeys().add("enable");
|
||||
e.getFieldKeys().add("tqq9_pushw");
|
||||
e.getFieldKeys().add("tqq9_pushgz");
|
||||
e.getFieldKeys().add("tqq9_pushbj");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
@ -169,17 +172,21 @@ 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 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"));
|
||||
boolean tqq9_pushw = dataEntity.getBoolean("tqq9_pushw");
|
||||
if (!tqq9_pushw) {
|
||||
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);
|
||||
logger.info("wms注册证接口结果:" + result);
|
||||
}
|
||||
}
|
||||
|
||||
} catch (IOException ex) {
|
||||
throw new RuntimeException(ex);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue