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