1.订舱通知单变更效验
This commit is contained in:
ljw 2024-11-06 17:47:56 +08:00
parent 9583baeda0
commit 39feb3744a

View File

@ -2,6 +2,7 @@ package com.yem.wm.sys.opplugin.op;
import com.yem.wm.sys.utils.NewVersionHelper; import com.yem.wm.sys.utils.NewVersionHelper;
import kd.bos.dataentity.entity.DynamicObject; import kd.bos.dataentity.entity.DynamicObject;
import kd.bos.dataentity.entity.DynamicObjectCollection;
import kd.bos.entity.plugin.AbstractOperationServicePlugIn; import kd.bos.entity.plugin.AbstractOperationServicePlugIn;
import kd.bos.entity.plugin.PreparePropertysEventArgs; import kd.bos.entity.plugin.PreparePropertysEventArgs;
import kd.bos.entity.plugin.args.AfterOperationArgs; import kd.bos.entity.plugin.args.AfterOperationArgs;
@ -32,6 +33,7 @@ public class VerifyExistOrPush extends AbstractOperationServicePlugIn {
public void onPreparePropertys(PreparePropertysEventArgs e) { public void onPreparePropertys(PreparePropertysEventArgs e) {
super.onPreparePropertys(e); super.onPreparePropertys(e);
List<String> fieldKeys = e.getFieldKeys(); List<String> fieldKeys = e.getFieldKeys();
fieldKeys.addAll(this.billEntityType.getAllFields().keySet());
// fieldKeys.add("yem_masterid");//主数据内码 // fieldKeys.add("yem_masterid");//主数据内码
// fieldKeys.add("yem_version");//版本号 // fieldKeys.add("yem_version");//版本号
// fieldKeys.add("yem_effective");//已生效 // fieldKeys.add("yem_effective");//已生效
@ -66,6 +68,10 @@ public class VerifyExistOrPush extends AbstractOperationServicePlugIn {
e.setCancel(true); e.setCancel(true);
throw new KDBizException("当前单据没有下游单,不允许变更"); throw new KDBizException("当前单据没有下游单,不允许变更");
} }
DynamicObjectCollection yemEsSalescontracS = dataEntity.getDynamicObjectCollection("yem_creditdetail");
if (yemEsSalescontracS.size()>0) {
throw new KDBizException("信报明细分录存在分录,不允许变更!!!");
}
} }
//变更单未审核时不允许下推单据 //变更单未审核时不允许下推单据
// if ("push".equals(operationKey)) { // if ("push".equals(operationKey)) {