工序成本预算单保存提交操作调整后单据添加版本号过滤条件
This commit is contained in:
parent
fbada4b273
commit
4a4b47fe23
|
@ -9,6 +9,8 @@ import kd.bos.entity.validate.AbstractValidator;
|
|||
import kd.bos.orm.query.QFilter;
|
||||
import kd.bos.servicehelper.BusinessDataServiceHelper;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
//工序成本预算单保存提交操作插件:验证项目和年份的组合是否已经存在(且只有一个)
|
||||
public class AimcostcbsBllSubmitOp extends AbstractOperationServicePlugIn {
|
||||
|
||||
|
@ -17,6 +19,7 @@ public class AimcostcbsBllSubmitOp extends AbstractOperationServicePlugIn {
|
|||
super.onPreparePropertys(e);
|
||||
e.getFieldKeys().add("zcgj_periodyear");//年份
|
||||
e.getFieldKeys().add("project");//项目
|
||||
e.getFieldKeys().add("versionno");//版本号
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -33,8 +36,10 @@ public class AimcostcbsBllSubmitOp extends AbstractOperationServicePlugIn {
|
|||
DynamicObject dataEntity = extendedDataEntity.getDataEntity();
|
||||
String zcgj_periodyear = dataEntity.getString("zcgj_periodyear");//年份
|
||||
DynamicObject project = dataEntity.getDynamicObject("project");//项目
|
||||
BigDecimal versionno = dataEntity.getBigDecimal("versionno");//版本号
|
||||
QFilter filter = new QFilter("zcgj_periodyear", "=", zcgj_periodyear);
|
||||
filter.and(new QFilter("project", "=", project.getPkValue()));
|
||||
filter.and(new QFilter("versionno", "=", versionno));
|
||||
DynamicObject ecco_aimcostbillcbs = BusinessDataServiceHelper.loadSingle("ecco_aimcostbillcbs", "id", new QFilter[]{filter});
|
||||
if (ecco_aimcostbillcbs != null) {
|
||||
if (dataEntity.getPkValue().equals(ecco_aimcostbillcbs.getPkValue())){
|
||||
|
|
Loading…
Reference in New Issue