diff --git a/lc123/cloud/app/plugin/operate/conm/PurconmSubmitToFwOp.java b/lc123/cloud/app/plugin/operate/conm/PurconmSubmitToFwOp.java index aa13a33..ef05b3a 100644 --- a/lc123/cloud/app/plugin/operate/conm/PurconmSubmitToFwOp.java +++ b/lc123/cloud/app/plugin/operate/conm/PurconmSubmitToFwOp.java @@ -1,11 +1,14 @@ package tqq9.lc123.cloud.app.plugin.operate.conm; +import com.alibaba.fastjson.JSONObject; import kd.bos.dataentity.entity.DynamicObject; import kd.bos.entity.operate.result.OperationResult; import kd.bos.entity.plugin.AbstractOperationServicePlugIn; import kd.bos.entity.plugin.args.AfterOperationArgs; import kd.bos.servicehelper.BusinessDataServiceHelper; 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 java.util.List; @@ -32,21 +35,21 @@ public class PurconmSubmitToFwOp extends AbstractOperationServicePlugIn { boolean existChange = QueryServiceHelper.exists("conm_xpurcontract", successPkId); if(existChange){ 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}); -// } -// } -// } } }