对部分方法新增了解锁锁定的方法

This commit is contained in:
itzhang 2025-07-18 17:54:22 +08:00
parent b090f5a096
commit 44d443aebc
6 changed files with 268 additions and 2 deletions

View File

@ -371,10 +371,10 @@ public class FrameContractController {
}
//开始回写
JSONObject unlockReq = crmRequestUtil.unlockCRM(frameContractId, "framework_contract__c");
//解锁
if ("1".equals(frameContractData.getString("lock_status"))) {
log.info("解锁");
JSONObject unlockReq = crmRequestUtil.unlockCRM(frameContractId, "framework_contract__c");
JSONObject unlockRes = new JSONObject();
@ -383,7 +383,7 @@ public class FrameContractController {
} catch (RestClientException e) {
e.printStackTrace();
}
System.out.println(unlockRes);
System.out.println("解锁" + unlockRes);
}
JSONObject backReq = crmRequestUtil.updateCRM(backReqMap);
@ -397,6 +397,17 @@ public class FrameContractController {
}
System.out.println("回写结果为:" + backRes);
//上锁
log.info("上锁");
JSONObject lockRes = new JSONObject();
try {
lockRes = restTemplate.postForObject(URLConstant.LOCK_CRM_URL, unlockReq, JSONObject.class);
} catch (RestClientException e) {
e.printStackTrace();
}
System.out.println("上锁" + lockRes);
//开始记录日志
JSONObject logRes = new JSONObject();
@ -642,6 +653,19 @@ public class FrameContractController {
}
//开始回写
JSONObject unlockReq = crmRequestUtil.unlockCRM(frameContractBGData.getString("original_data"), "framework_contract__c");
//解锁
log.info("解锁");
JSONObject unlockRes = new JSONObject();
try {
unlockRes = restTemplate.postForObject(URLConstant.UNLOCK_CRM_URL, unlockReq, JSONObject.class);
} catch (RestClientException e) {
e.printStackTrace();
}
System.out.println("解锁" + unlockRes);
JSONObject backReq = crmRequestUtil.updateCRM(backReqMap);
JSONObject backRes = new JSONObject();
@ -653,6 +677,17 @@ public class FrameContractController {
}
System.out.println("回写结果为:" + backRes);
//上锁
log.info("上锁");
JSONObject lockRes = new JSONObject();
try {
lockRes = restTemplate.postForObject(URLConstant.LOCK_CRM_URL, unlockReq, JSONObject.class);
} catch (RestClientException e) {
e.printStackTrace();
}
System.out.println("上锁" + lockRes);
//开始记录日志
JSONObject logRes = new JSONObject();

View File

@ -303,6 +303,21 @@ public class PreContractController {
}
//开始回写
JSONObject unlockReq = crmRequestUtil.unlockCRM(preContractId, "pre_signed_contract__c");
//解锁
if ("1".equals(preContractData.getString("lock_status"))) {
log.info("解锁");
JSONObject unlockRes = new JSONObject();
try {
unlockRes = restTemplate.postForObject(URLConstant.UNLOCK_CRM_URL, unlockReq, JSONObject.class);
} catch (RestClientException e) {
e.printStackTrace();
}
System.out.println("解锁" + unlockRes);
}
JSONObject backReq = crmRequestUtil.updateCRM(backReqMap);
JSONObject backRes = new JSONObject();
@ -315,6 +330,17 @@ public class PreContractController {
System.out.println("回写结果为:" + backRes);
log.info("上锁");
JSONObject lockRes = new JSONObject();
try {
lockRes = restTemplate.postForObject(URLConstant.LOCK_CRM_URL, unlockReq, JSONObject.class);
} catch (RestClientException e) {
e.printStackTrace();
}
System.out.println("上锁" + lockRes);
//开始记录日志
JSONObject logRes = new JSONObject();
try {
@ -558,6 +584,19 @@ public class PreContractController {
}
//开始回写
JSONObject unlockReq = crmRequestUtil.unlockCRM(preContractBGData.getString("original_data"), "pre_signed_contract__c");
//解锁
log.info("解锁");
JSONObject unlockRes = new JSONObject();
try {
unlockRes = restTemplate.postForObject(URLConstant.UNLOCK_CRM_URL, unlockReq, JSONObject.class);
} catch (RestClientException e) {
e.printStackTrace();
}
System.out.println("解锁" + unlockRes);
JSONObject backReq = crmRequestUtil.updateCRM(backReqMap);
JSONObject backRes = new JSONObject();
@ -569,6 +608,17 @@ public class PreContractController {
}
System.out.println("回写结果为:" + backRes);
//上锁
log.info("上锁");
JSONObject lockRes = new JSONObject();
try {
lockRes = restTemplate.postForObject(URLConstant.LOCK_CRM_URL, unlockReq, JSONObject.class);
} catch (RestClientException e) {
e.printStackTrace();
}
System.out.println("上锁" + lockRes);
//开始记录日志
JSONObject logRes = new JSONObject();

View File

@ -504,6 +504,21 @@ public class XSHTController {
}
//开始回写
JSONObject unlockReq = crmRequestUtil.unlockCRM(contractId, "SaleContractObj");
//解锁
if ("1".equals(contractData.getString("lock_status"))) {
log.info("解锁");
JSONObject unlockRes = new JSONObject();
try {
unlockRes = restTemplate.postForObject(URLConstant.UNLOCK_CRM_URL, unlockReq, JSONObject.class);
} catch (RestClientException e) {
e.printStackTrace();
}
System.out.println("解锁" + unlockRes);
}
JSONObject backReq = crmRequestUtil.updateCRM(backReqMap);
System.out.println("回写请求为:" + JSON.parseObject(JSON.toJSONString(backReq)));
@ -518,6 +533,17 @@ public class XSHTController {
System.out.println("回写结果为:" + backRes);
log.info("上锁");
JSONObject lockRes = new JSONObject();
try {
lockRes = restTemplate.postForObject(URLConstant.LOCK_CRM_URL, unlockReq, JSONObject.class);
} catch (RestClientException e) {
e.printStackTrace();
}
System.out.println("上锁" + lockRes);
logMap.put("send_memo", JSON.toJSONString(backRes));
//开始记录日志
@ -952,6 +978,19 @@ public class XSHTController {
}
//开始回写
JSONObject unlockReq = crmRequestUtil.unlockCRM(contractBGData.getString("original_data"), "SaleContractObj");
//解锁
log.info("解锁");
JSONObject unlockRes = new JSONObject();
try {
unlockRes = restTemplate.postForObject(URLConstant.UNLOCK_CRM_URL, unlockReq, JSONObject.class);
} catch (RestClientException e) {
e.printStackTrace();
}
System.out.println("解锁" + unlockRes);
JSONObject backReq = crmRequestUtil.updateCRM(backReqMap);
JSONObject backRes = new JSONObject();
@ -964,6 +1003,18 @@ public class XSHTController {
System.out.println("回写结果为:" + backRes);
//上锁
log.info("上锁");
JSONObject lockRes = new JSONObject();
try {
lockRes = restTemplate.postForObject(URLConstant.LOCK_CRM_URL, unlockReq, JSONObject.class);
} catch (RestClientException e) {
e.printStackTrace();
}
System.out.println("上锁" + lockRes);
//开始记录日志
JSONObject logRes = new JSONObject();
try {
@ -1101,6 +1152,21 @@ public class XSHTController {
}
//开始回写
JSONObject unlockReq = crmRequestUtil.unlockCRM(contractId, "SaleContractObj");
//解锁
if ("1".equals(contractData.getString("lock_status"))) {
log.info("解锁");
JSONObject unlockRes = new JSONObject();
try {
unlockRes = restTemplate.postForObject(URLConstant.UNLOCK_CRM_URL, unlockReq, JSONObject.class);
} catch (RestClientException e) {
e.printStackTrace();
}
System.out.println("解锁" + unlockRes);
}
JSONObject backReq = crmRequestUtil.updateCRM(backReqMap);
System.out.println("回写请求为:" + JSON.parseObject(JSON.toJSONString(backReq)));
@ -1115,6 +1181,17 @@ public class XSHTController {
System.out.println("回写结果为:" + backRes);
log.info("上锁");
JSONObject lockRes = new JSONObject();
try {
lockRes = restTemplate.postForObject(URLConstant.LOCK_CRM_URL, unlockReq, JSONObject.class);
} catch (RestClientException e) {
e.printStackTrace();
}
System.out.println("上锁" + lockRes);
//开始记录日志
JSONObject logRes = new JSONObject();
try {

View File

@ -223,6 +223,21 @@ public class DeliveryReqController {
}
//开始回写
JSONObject unlockReq = crmRequestUtil.unlockCRM(deliveryId, "shipping_application__c");
//解锁
if ("1".equals(deliveryData.getString("lock_status"))) {
log.info("解锁");
JSONObject unlockRes = new JSONObject();
try {
unlockRes = restTemplate.postForObject(URLConstant.UNLOCK_CRM_URL, unlockReq, JSONObject.class);
} catch (RestClientException e) {
e.printStackTrace();
}
System.out.println("解锁" + unlockRes);
}
JSONObject backReq = crmRequestUtil.updateCRM(backReqMap);
JSONObject backRes = new JSONObject();
@ -235,6 +250,17 @@ public class DeliveryReqController {
System.out.println("回写结果为:" + backRes);
log.info("上锁");
JSONObject lockRes = new JSONObject();
try {
lockRes = restTemplate.postForObject(URLConstant.LOCK_CRM_URL, unlockReq, JSONObject.class);
} catch (RestClientException e) {
e.printStackTrace();
}
System.out.println("上锁" + lockRes);
//开始记录日志
JSONObject logRes = new JSONObject();
@ -421,6 +447,21 @@ public class DeliveryReqController {
}
//开始回写
JSONObject unlockReq = crmRequestUtil.unlockCRM(refundId, "return_application__c");
//解锁
if ("1".equals(refundData.getString("lock_status"))) {
log.info("解锁");
JSONObject unlockRes = new JSONObject();
try {
unlockRes = restTemplate.postForObject(URLConstant.UNLOCK_CRM_URL, unlockReq, JSONObject.class);
} catch (RestClientException e) {
e.printStackTrace();
}
System.out.println("解锁" + unlockRes);
}
JSONObject backReq = crmRequestUtil.updateCRM(backReqMap);
JSONObject backRes = new JSONObject();
@ -433,6 +474,17 @@ public class DeliveryReqController {
System.out.println("回写结果为:" + backRes);
log.info("上锁");
JSONObject lockRes = new JSONObject();
try {
lockRes = restTemplate.postForObject(URLConstant.LOCK_CRM_URL, unlockReq, JSONObject.class);
} catch (RestClientException e) {
e.printStackTrace();
}
System.out.println("上锁" + lockRes);
//开始记录日志
JSONObject logRes = new JSONObject();

View File

@ -196,6 +196,21 @@ public class TZXSHTController {
}
//开始回写
JSONObject unlockReq = crmRequestUtil.unlockCRM(salesOrderId, "SaleContractObj");
//解锁
if ("1".equals(salesOrderData.getString("lock_status"))) {
log.info("解锁");
JSONObject unlockRes = new JSONObject();
try {
unlockRes = restTemplate.postForObject(URLConstant.UNLOCK_CRM_URL, unlockReq, JSONObject.class);
} catch (RestClientException e) {
e.printStackTrace();
}
System.out.println("解锁" + unlockRes);
}
JSONObject backReq = crmRequestUtil.updateCRM(backReqMap);
JSONObject backRes = new JSONObject();
@ -208,6 +223,17 @@ public class TZXSHTController {
System.out.println("回写结果为:" + backRes);
log.info("上锁");
JSONObject lockRes = new JSONObject();
try {
lockRes = restTemplate.postForObject(URLConstant.LOCK_CRM_URL, unlockReq, JSONObject.class);
} catch (RestClientException e) {
e.printStackTrace();
}
System.out.println("上锁" + lockRes);
logMap.put("send_memo", JSON.toJSONString(backRes));
//开始记录日志

View File

@ -179,6 +179,21 @@ public class YQHTController {
}
//开始回写
JSONObject unlockReq = crmRequestUtil.unlockCRM(preContractId, "pre_signed_contract__c");
//解锁
if ("1".equals(preContractData.getString("lock_status"))) {
log.info("解锁");
JSONObject unlockRes = new JSONObject();
try {
unlockRes = restTemplate.postForObject(URLConstant.UNLOCK_CRM_URL, unlockReq, JSONObject.class);
} catch (RestClientException e) {
e.printStackTrace();
}
System.out.println("解锁" + unlockRes);
}
JSONObject backReq = crmRequestUtil.updateCRM(backReqMap);
JSONObject backRes = new JSONObject();
@ -191,6 +206,17 @@ public class YQHTController {
System.out.println("回写结果为:" + backRes);
log.info("上锁");
JSONObject lockRes = new JSONObject();
try {
lockRes = restTemplate.postForObject(URLConstant.LOCK_CRM_URL, unlockReq, JSONObject.class);
} catch (RestClientException e) {
e.printStackTrace();
}
System.out.println("上锁" + lockRes);
//开始记录日志
JSONObject logRes = new JSONObject();