校验器bug优化
This commit is contained in:
parent
85169a3d9b
commit
49146f3849
|
@ -5,6 +5,7 @@ import kd.bos.dataentity.entity.DynamicObjectCollection;
|
||||||
import kd.bos.entity.ExtendedDataEntity;
|
import kd.bos.entity.ExtendedDataEntity;
|
||||||
import kd.bos.entity.validate.AbstractValidator;
|
import kd.bos.entity.validate.AbstractValidator;
|
||||||
import kd.bos.form.plugin.AbstractFormPlugin;
|
import kd.bos.form.plugin.AbstractFormPlugin;
|
||||||
|
import kd.bos.servicehelper.BusinessDataServiceHelper;
|
||||||
import kd.sdk.plugin.Plugin;
|
import kd.sdk.plugin.Plugin;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
|
@ -21,8 +22,10 @@ public class ProjectBillSubmitValidator extends AbstractValidator {
|
||||||
for (ExtendedDataEntity dataEntity : dataEntities) {
|
for (ExtendedDataEntity dataEntity : dataEntities) {
|
||||||
if (dataEntity != null) {
|
if (dataEntity != null) {
|
||||||
DynamicObject bill = dataEntity.getDataEntity();
|
DynamicObject bill = dataEntity.getDataEntity();
|
||||||
|
DynamicObject dynamicObject = BusinessDataServiceHelper.loadSingle( bill.getLong("id"), "repmd_projectbill");
|
||||||
|
if (null!=dynamicObject){
|
||||||
//产品构成
|
//产品构成
|
||||||
DynamicObjectCollection productEntry = bill.getDynamicObjectCollection("productentry");
|
DynamicObjectCollection productEntry = dynamicObject.getDynamicObjectCollection("productentry");
|
||||||
if (null != productEntry && productEntry.size() != 0) {
|
if (null != productEntry && productEntry.size() != 0) {
|
||||||
boolean hasBeenCalculated = true;
|
boolean hasBeenCalculated = true;
|
||||||
for (int i = 0; i < productEntry.size(); i++) {
|
for (int i = 0; i < productEntry.size(); i++) {
|
||||||
|
@ -48,4 +51,5 @@ public class ProjectBillSubmitValidator extends AbstractValidator {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue