定期反审核校验,凭证代码注释

This commit is contained in:
yuxueliang0813 2025-05-19 21:55:45 +08:00
parent 34304bd911
commit baa34ac3f7
3 changed files with 25 additions and 3 deletions

View File

@ -9,6 +9,10 @@ import kd.bos.entity.plugin.args.BeforeOperationArgs;
import kd.bos.servicehelper.BusinessDataServiceHelper;
import kd.sdk.plugin.Plugin;
/**
* 定期预提记账处理 shjh_cim_depositprein_ext-红冲单中清空已推送sap标记反冲销和反审核校验
* @author yuxueliang
*/
public class DepositpreintRedWriteOp extends AbstractOperationServicePlugIn implements Plugin {
private static final String updateSapFlag = "update t_cfm_preinterestbill set fk_shjh_sendsap=0 where fwriteoffpreintbillid=?;";
@ -17,10 +21,10 @@ public class DepositpreintRedWriteOp extends AbstractOperationServicePlugIn impl
public void beforeExecuteOperationTransaction(BeforeOperationArgs e) {
super.beforeExecuteOperationTransaction(e);
String eok = e.getOperationKey();
DynamicObject[] dos = e.getDataEntities();
DynamicObject prinfo;
if("unredwriteoff".equals(eok)){
//反冲销标识
DynamicObject[] dos = e.getDataEntities();
DynamicObject prinfo;
for (int i = 0; i < dos.length; i++) {
prinfo = BusinessDataServiceHelper.loadSingle(dos[i].getPkValue(), dos[i].getDataEntityType().getName());
//判断预提记账处理单-红单是否已推送了sap如果已推送了则不允许反冲销
@ -29,6 +33,16 @@ public class DepositpreintRedWriteOp extends AbstractOperationServicePlugIn impl
e.setCancel(true);
}
}
}else if("unaudit".equals(eok)){
//反审核标识 unaudit
for (int i = 0; i < dos.length; i++) {
prinfo = BusinessDataServiceHelper.loadSingle(dos[i].getPkValue(), dos[i].getDataEntityType().getName());
//判断预提记账处理单-红单是否已推送了sap如果已推送了则不允许反审核
if(prinfo.getBoolean("shjh_sendsap")){
e.setCancelMessage(prinfo.getString("billno") + "已推送至SAP不允许反审核");
e.setCancel(true);
}
}
}
}

View File

@ -16,8 +16,12 @@ import kd.sdk.plugin.Plugin;
import java.math.BigDecimal;
import java.util.List;
/**
* 凭证审核操作 shjh_gl_voucher_ext 该插件完成凭证上游收付款单记账预提单推送sap操作
* @author yuxueliang
*/
public class VoucherAuditOperation extends AbstractOperationServicePlugIn implements Plugin {
//凭证审核操作插件该插件完成凭证上游收付款单推送sap操作
private static final Log logger = LogFactory.getLog(VoucherAuditOperation.class);

View File

@ -6,6 +6,10 @@ import kd.bos.entity.plugin.args.BeforeOperationArgs;
import kd.bos.servicehelper.BusinessDataServiceHelper;
import kd.sdk.plugin.Plugin;
/**
* 凭证反审核校验 shjh_gl_voucher_ext 如果该凭证对应的业务单据已推送sap则不允许反审核
* @author yuxueliang
*/
public class VoucherBillOperation extends AbstractOperationServicePlugIn implements Plugin {
private static final String recbillName = "cas_recbill";//收款单