定期反审核校验,凭证代码注释
This commit is contained in:
parent
34304bd911
commit
baa34ac3f7
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
|
|
@ -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";//收款单
|
||||
|
|
|
|||
Loading…
Reference in New Issue