【泛微采购退货申请单新增接口】

【泛微供应商新增接口】
This commit is contained in:
tanfengling@x-ri.com 2025-10-25 17:43:02 +08:00
parent 574c49ba48
commit 711838c3cb
3 changed files with 1098 additions and 321 deletions

View File

@ -0,0 +1,44 @@
package tqq9.lc123.cloud.app.plugin.operate.pm;
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 org.apache.commons.lang3.StringUtils;
import tqq9.lc123.cloud.app.plugin.trd.FWImpl;
import java.util.List;
/**
* 采购退货申请提交泛微
*/
public class PurrefundApplySubmitToFwOp extends AbstractOperationServicePlugIn {
@Override
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, "pm_purrefundapplybill");
String resultStr = FWImpl.pushFwPurRefund(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});
}
}
}
}
}
}

View File

@ -0,0 +1,43 @@
package tqq9.lc123.cloud.app.plugin.operate.sys;
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 org.apache.commons.lang3.StringUtils;
import tqq9.lc123.cloud.app.plugin.trd.FWImpl;
import java.util.List;
/**
* 供应商提交到泛微
*/
public class SupplierSubmitToFwOp extends AbstractOperationServicePlugIn {
@Override
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, "bd_supplier");
String resultStr = FWImpl.pushFwSupplier(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