北上广注册证,生产商根据标记推送,非采购供应商创建人根据泛微id查询

This commit is contained in:
sez 2025-12-10 11:41:04 +08:00
parent 5f571ca997
commit ba785762c9
5 changed files with 90 additions and 60 deletions

View File

@ -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;
}
}

View File

@ -61,6 +61,8 @@ public class BGScsOpPlugin extends AbstractOperationServicePlugIn {
HashMap<String, String> headMap = new HashMap<>();
logger.info("北广生产商同步body" + jsonBody);
try {
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();
@ -68,17 +70,21 @@ public class BGScsOpPlugin extends AbstractOperationServicePlugIn {
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"));
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);
}
}
} catch (IOException ex) {
throw new RuntimeException(ex);
}
//广州
try {
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();
@ -86,11 +92,13 @@ public class BGScsOpPlugin extends AbstractOperationServicePlugIn {
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"));
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);
}
}
} catch (IOException ex) {
throw new RuntimeException(ex);
}

View File

@ -140,6 +140,8 @@ public class BGZczOpPlugin extends AbstractOperationServicePlugIn {
logger.info("广州注册证body" + gzjsonBody);
//北京
try {
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();
@ -147,16 +149,20 @@ public class BGZczOpPlugin extends AbstractOperationServicePlugIn {
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"));
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);
}
}
} catch (IOException ex) {
throw new RuntimeException(ex);
}
//广州
try {
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();
@ -164,11 +170,13 @@ public class BGZczOpPlugin extends AbstractOperationServicePlugIn {
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"));
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);
}
}
} catch (IOException ex) {
throw new RuntimeException(ex);
}

View File

@ -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,6 +120,8 @@ 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 {
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);
@ -129,6 +134,8 @@ public class WmsScsSyncOpPlugin extends AbstractOperationServicePlugIn {
logger.info("wms生产商同步接口结果" + result);
}
}
} catch (IOException ex) {
throw new RuntimeException(ex);
}

View File

@ -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,6 +172,8 @@ 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 {
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);
@ -180,6 +185,8 @@ public class WmsZczSyncOpPlugin extends AbstractOperationServicePlugIn {
logger.info("wms注册证接口结果" + result);
}
}
} catch (IOException ex) {
throw new RuntimeException(ex);
}