parent
c32f3dc2cc
commit
574c49ba48
|
|
@ -68,7 +68,7 @@ public class BaseDataPlugin extends AbstractFormPlugin implements Plugin {
|
|||
}
|
||||
}
|
||||
}
|
||||
if (StringUtils.equals("tqq9_zczh", key)) {
|
||||
if (StringUtils.equals("tqq9_zczh", key)) {
|
||||
StringBuilder stringBuilder = new StringBuilder();
|
||||
ChangeData[] changeSet = e.getChangeSet();
|
||||
ChangeData changeData = changeSet[0];
|
||||
|
|
|
|||
|
|
@ -0,0 +1,42 @@
|
|||
package tqq9.lc123.cloud.app.plugin.operate.im;
|
||||
|
||||
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.operation.SaveServiceHelper;
|
||||
import kd.sdk.plugin.Plugin;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import tqq9.lc123.cloud.app.plugin.trd.FWImpl;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 单据操作插件
|
||||
*/
|
||||
public class ShortageBillSubmitToFwOp extends AbstractOperationServicePlugIn implements Plugin {
|
||||
public void afterExecuteOperationTransaction(AfterOperationArgs e) {
|
||||
super.afterExecuteOperationTransaction(e);
|
||||
OperationResult operationResult = this.getOperationResult();
|
||||
List<Object> successPkIds = operationResult.getSuccessPkIds();
|
||||
for (Object successPkId : successPkIds) {
|
||||
DynamicObject bill = BusinessDataServiceHelper.loadSingle(successPkId, "tqq9_shortagebill");
|
||||
String resultStr = FWImpl.pushFwshortage(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});
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue