feat:收款单校验取值调整

This commit is contained in:
zzs01@yunemao.com 2024-09-03 11:22:40 +08:00
parent ed3913face
commit c3d07166df
3 changed files with 13 additions and 2 deletions

View File

@ -700,7 +700,7 @@ public class GatheringEcit extends AbstractBillPlugIn implements BeforeF7SelectL
String[] noCheck = new String[]{"save", "delete", "refresh", "close", "modify", "new", "newentrya1", "copyentryrowa", "insertentrya", "deleteentrya1", "batchfillentrya", "newentryb", "insertentryb", "copyentryrowb", "deleteentryb", "batchfillentryb"}; String[] noCheck = new String[]{"save", "delete", "refresh", "close", "modify", "new", "newentrya1", "copyentryrowa", "insertentrya", "deleteentrya1", "batchfillentrya", "newentryb", "insertentryb", "copyentryrowb", "deleteentryb", "batchfillentryb"};
if (dataChanged && !Arrays.asList(noCheck).contains(operateKey) && ("yem_gathering".equals(pageId) || "yem_gathering_cw".equals(pageId))) { if (dataChanged && !Arrays.asList(noCheck).contains(operateKey) && ("yem_gathering".equals(pageId) || "yem_gathering_cw".equals(pageId))) {
throw new KDBizException("检测到单据内容更新,请保存后再进行操作!"); // throw new KDBizException("检测到单据内容更新,请保存后再进行操作!");
} }
if ("claim".equals(operateKey) || "changeclaim".equals(operateKey)) { if ("claim".equals(operateKey) || "changeclaim".equals(operateKey)) {

View File

@ -6,6 +6,7 @@ import kd.bos.dataentity.entity.DynamicObject;
import kd.bos.dataentity.entity.DynamicObjectCollection; import kd.bos.dataentity.entity.DynamicObjectCollection;
import kd.bos.entity.plugin.AbstractOperationServicePlugIn; import kd.bos.entity.plugin.AbstractOperationServicePlugIn;
import kd.bos.entity.plugin.AddValidatorsEventArgs; import kd.bos.entity.plugin.AddValidatorsEventArgs;
import kd.bos.entity.plugin.PreparePropertysEventArgs;
import kd.bos.entity.plugin.args.AfterOperationArgs; import kd.bos.entity.plugin.args.AfterOperationArgs;
import kd.bos.entity.plugin.args.EndOperationTransactionArgs; import kd.bos.entity.plugin.args.EndOperationTransactionArgs;
import kd.bos.entity.validate.AbstractValidator; import kd.bos.entity.validate.AbstractValidator;
@ -15,6 +16,8 @@ import kd.bos.servicehelper.BusinessDataServiceHelper;
import kd.bos.servicehelper.operation.SaveServiceHelper; import kd.bos.servicehelper.operation.SaveServiceHelper;
import org.omg.DynamicAny.DynAnyFactoryOperations; import org.omg.DynamicAny.DynAnyFactoryOperations;
import java.util.List;
/** /**
* @Description: TODO * @Description: TODO
@ -23,6 +26,14 @@ import org.omg.DynamicAny.DynAnyFactoryOperations;
*/ */
public class GatheringAuditOp extends AbstractOperationServicePlugIn { public class GatheringAuditOp extends AbstractOperationServicePlugIn {
@Override
public void onPreparePropertys(PreparePropertysEventArgs e) {
super.onPreparePropertys(e);
List<String> fieldKeys = e.getFieldKeys();
fieldKeys.addAll(this.billEntityType.getAllFields().keySet());
}
@Override @Override
public void onAddValidators(AddValidatorsEventArgs e) { public void onAddValidators(AddValidatorsEventArgs e) {
super.onAddValidators(e); super.onAddValidators(e);

View File

@ -31,7 +31,7 @@ public class GatheringAuditValidator extends AbstractValidator {
DynamicObject bill = temp.getDataEntity(); DynamicObject bill = temp.getDataEntity();
// BigDecimal claimamt = Bi gDecimal.ZERO; // BigDecimal claimamt = Bi gDecimal.ZERO;
// BigDecimal salcontractamt = BigDecimal.ZERO; // BigDecimal salcontractamt = BigDecimal.ZERO;
bill = BusinessDataServiceHelper.loadSingle(bill.getPkValue(), bill.getDynamicObjectType().getName()); // bill = BusinessDataServiceHelper.loadSingle(bill.getPkValue(), bill.getDynamicObjectType().getName());
DynamicObject billtype = bill.getDynamicObject("yem_billtype"); DynamicObject billtype = bill.getDynamicObject("yem_billtype");
if (YEM.isNotEmpty(billtype)) { if (YEM.isNotEmpty(billtype)) {