金蝶凭证审核操作

This commit is contained in:
yuxueliang0813 2025-05-08 19:41:23 +08:00
parent 92413d36d7
commit 1cd4421557
2 changed files with 44 additions and 1 deletions

View File

@ -0,0 +1,43 @@
package shjh.jhzj7.fi.fi.plugin.operate;
import kd.bos.dataentity.entity.DynamicObject;
import kd.bos.entity.plugin.AbstractOperationServicePlugIn;
import kd.bos.entity.plugin.args.AfterOperationArgs;
import kd.bos.servicehelper.BusinessDataServiceHelper;
import kd.sdk.plugin.Plugin;
public class VoucherAuditOperation extends AbstractOperationServicePlugIn implements Plugin {
//凭证审核操作插件该插件完成凭证上游收付款单推送sap操作
private static final String recbillName = "cas_recbill";//收款单
private static final String paybillName = "cas_paybill";//付款单
private static final String intbillName = "cim_intbill_revenue";//预提记账处理单
@Override
public void afterExecuteOperationTransaction(AfterOperationArgs e) {
super.afterExecuteOperationTransaction(e);
String eok = e.getOperationKey();
if("audit".equals(eok)){
DynamicObject[] dos = e.getDataEntities();
long sourcebillid;//凭证的来源单据ID
String sourcebilltype;//凭证的来源单据类型
DynamicObject bizbillinfo;//业务单据对象收付款单
for (DynamicObject pzinfo : dos) {
//重新加载凭证对象
pzinfo = BusinessDataServiceHelper.loadSingle(pzinfo.getPkValue(), pzinfo.getDataEntityType().getName(), "id,billno,sourcebill,sourcebilltype");
sourcebillid = pzinfo.getLong("sourcebill");
sourcebilltype = pzinfo.getDynamicObject("sourcebilltype").getString("number");
if(recbillName.equals(sourcebilltype)){
bizbillinfo = BusinessDataServiceHelper.loadSingle(sourcebillid,recbillName);
//TODO 执行收款单推送sap操作并反馈操作执行结果
}else if(paybillName.equals(sourcebilltype)){
bizbillinfo = BusinessDataServiceHelper.loadSingle(sourcebillid,paybillName);
//TODO 执行付款单推送sap操作并反馈操作执行结果
}else if(intbillName.equals(sourcebilltype)){
bizbillinfo = BusinessDataServiceHelper.loadSingle(sourcebillid,intbillName);
//TODO 执行预提记账处理单推送sap操作并反馈操作执行结果
}
}
}
}
}

View File

@ -50,7 +50,7 @@ public class PersonCustomerBankTask extends AbstractTask implements Plugin {
return;
}
String cusname = ups.getString("name");//姓名
String skyh =ups.getString("shjh_skyh");//收款银行
// String skyh = ups.getString("shjh_skyh");//收款银行
String xxyh = ups.getString("shjh_xxyh");//详细分机银行
DynamicObject bankinfo;
if(doc_bank.isEmpty()){