【泛微采购合同新增、变更接口】

This commit is contained in:
tanfengling@x-ri.com 2025-10-25 14:43:01 +08:00
parent 87ba54fa88
commit 52398adc76
1 changed files with 16 additions and 13 deletions

View File

@ -1,11 +1,14 @@
package tqq9.lc123.cloud.app.plugin.operate.conm; package tqq9.lc123.cloud.app.plugin.operate.conm;
import com.alibaba.fastjson.JSONObject;
import kd.bos.dataentity.entity.DynamicObject; import kd.bos.dataentity.entity.DynamicObject;
import kd.bos.entity.operate.result.OperationResult; import kd.bos.entity.operate.result.OperationResult;
import kd.bos.entity.plugin.AbstractOperationServicePlugIn; import kd.bos.entity.plugin.AbstractOperationServicePlugIn;
import kd.bos.entity.plugin.args.AfterOperationArgs; import kd.bos.entity.plugin.args.AfterOperationArgs;
import kd.bos.servicehelper.BusinessDataServiceHelper; import kd.bos.servicehelper.BusinessDataServiceHelper;
import kd.bos.servicehelper.QueryServiceHelper; import kd.bos.servicehelper.QueryServiceHelper;
import kd.bos.servicehelper.operation.SaveServiceHelper;
import org.apache.commons.lang3.StringUtils;
import tqq9.lc123.cloud.app.plugin.trd.FWImpl; import tqq9.lc123.cloud.app.plugin.trd.FWImpl;
import java.util.List; import java.util.List;
@ -32,21 +35,21 @@ public class PurconmSubmitToFwOp extends AbstractOperationServicePlugIn {
boolean existChange = QueryServiceHelper.exists("conm_xpurcontract", successPkId); boolean existChange = QueryServiceHelper.exists("conm_xpurcontract", successPkId);
if(existChange){ if(existChange){
bill = BusinessDataServiceHelper.loadSingle(successPkId, "conm_xpurcontract"); bill = BusinessDataServiceHelper.loadSingle(successPkId, "conm_xpurcontract");
resultStr = FWImpl.pushFwPurChange(bill); resultStr = FWImpl.pushFwPurconmChange(bill);
}
}
if(StringUtils.isNotBlank(resultStr)){
JSONObject resultObj = JSONObject.parseObject(resultStr);
String code = resultObj.getString("code");
if("SUCCESS".equals(code)){
JSONObject data = resultObj.getJSONObject("data");
if(data != null){
String requestid = data.getString("requestid");
bill.set("tqq9_fwrequestid", requestid);
SaveServiceHelper.save(new DynamicObject[]{bill});
}
} }
} }
// if(StringUtils.isNotBlank(resultStr)){
// JSONObject resultObj = JSONObject.parseObject(resultStr);
// String code = resultObj.getString("code");
// if("SUCCESS".equals(code)){
// JSONObject data = resultObj.getJSONObject("data");
// if(data != null){
// String requestid = data.getString("requestid");
// bill.set("tqq9_fwrequestid", requestid);
// SaveServiceHelper.save(new DynamicObject[]{bill});
// }
// }
// }
} }
} }