销售合同关闭优化

This commit is contained in:
itzhang 2025-08-13 18:02:00 +08:00
parent a0f8ddfe92
commit 8b269beec5

View File

@ -649,6 +649,20 @@ public class XSHTController {
//erpId
String erpId = contractBGData.getString("change_erp_id__c") != null ? contractBGData.getString("change_erp_id__c") : "";
//查询日志是否已经关闭过该单据
JSONObject isLogRes = new JSONObject();
try {
isLogRes = restTemplate.getForObject("http://localhost:18085/Log/query/log_data?table=send_log_htxx&log_type=XSHTGB&dataId=" + crmId + "&mark=" + erpId, JSONObject.class);
} catch (RestClientException e) {
e.printStackTrace();
}
if (!isLogRes.getJSONArray("data").isEmpty()) {
log.info("当前数据已经执行过了,将不再向下执行");
continue;
}
if (erpId.equals("")) {
log.info("erpId为空");
continue;
@ -1239,6 +1253,7 @@ public class XSHTController {
logMap.put("syn_type", "0");
logMap.put("data_id", crmId);
logMap.put("data_name", contractName);
logMap.put("mark", erpId);
logMap.put("send_body", JSON.toJSONString(contractReqEntity));
logMap.put("send_res", JSON.toJSONString(closeRes));
logMap.put("tableName", "send_log_htxx");