Merge remote-tracking branch 'origin/main'
This commit is contained in:
commit
9b874d45cd
|
@ -35,15 +35,23 @@ public class PurDemandFormPlugin extends AbstractFormPlugin {
|
|||
String name = e.getProperty().getName();
|
||||
//根据组织携带项目
|
||||
if ("org".equals(name)) {
|
||||
updateRenovationProject();
|
||||
updateRenovationProjects();
|
||||
}
|
||||
}
|
||||
|
||||
private void updateRenovationProject() {
|
||||
DynamicObject org = (DynamicObject) this.getModel().getValue("org");
|
||||
DynamicObject renovation_proj = (DynamicObject)this.getModel().getValue("qeug_renovation_proj");
|
||||
// 只有在需求组织不为空 并且项目不为空的情况下才进行查询
|
||||
if (org != null && null == renovation_proj) {
|
||||
setRenovationProjectByOrg(org);
|
||||
}
|
||||
}
|
||||
|
||||
private void updateRenovationProjects() {
|
||||
DynamicObject org = (DynamicObject) this.getModel().getValue("org");
|
||||
// 只有在需求组织不为空的情况下才进行查询
|
||||
if (org != null) {
|
||||
if (org != null ) {
|
||||
setRenovationProjectByOrg(org);
|
||||
} else {
|
||||
// 组织为空,清空项目
|
||||
|
|
|
@ -69,12 +69,21 @@ public class PurPlanFormPlugin extends AbstractBillPlugIn implements HyperLinkCl
|
|||
String name = e.getProperty().getName();
|
||||
//根据组织携带项目
|
||||
if ("org".equals(name)) {
|
||||
updateRenovationProject();
|
||||
updateRenovationProjects();
|
||||
}
|
||||
}
|
||||
|
||||
private void updateRenovationProject() {
|
||||
DynamicObject org = (DynamicObject) this.getModel().getValue("org");
|
||||
DynamicObject purproject = (DynamicObject)this.getModel().getValue("purproject");
|
||||
// 只有在需求组织不为空的情况下才进行查询
|
||||
if (org != null && null == purproject) {
|
||||
setRenovationProjectByOrg(org);
|
||||
}
|
||||
}
|
||||
|
||||
private void updateRenovationProjects() {
|
||||
DynamicObject org = (DynamicObject) this.getModel().getValue("org");
|
||||
|
||||
// 只有在需求组织不为空的情况下才进行查询
|
||||
if (org != null) {
|
||||
|
|
|
@ -9,6 +9,8 @@ import kd.bos.entity.validate.AbstractValidator;
|
|||
import kd.bos.logging.Log;
|
||||
import kd.bos.logging.LogFactory;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
public class PurPlanSubmitOPPlugin extends AbstractOperationServicePlugIn {
|
||||
|
||||
private static final Log logger = LogFactory.getLog(PurPlanSubmitOPPlugin.class);
|
||||
|
@ -30,6 +32,21 @@ public class PurPlanSubmitOPPlugin extends AbstractOperationServicePlugIn {
|
|||
if (cgxuentry.isEmpty()) {
|
||||
this.addErrorMessage(extendedDataEntity, "采购需求明细不能为空,不允许提交。");
|
||||
}
|
||||
//采购计划明细
|
||||
BigDecimal cgxuentry_a = BigDecimal.ZERO;
|
||||
for (DynamicObject dynamicObject : cgxuentry) {
|
||||
cgxuentry_a = cgxuentry_a.add(dynamicObject.getBigDecimal("qeug_applyamount"));
|
||||
}
|
||||
//合约规划金额 entryentity
|
||||
DynamicObjectCollection entryentity = dataEntity.getDynamicObjectCollection("entryentity");
|
||||
BigDecimal cgxuentry_b = BigDecimal.ZERO;
|
||||
for (DynamicObject dynamicObject : entryentity) {
|
||||
cgxuentry_b = cgxuentry_b.add(dynamicObject.getBigDecimal("planamount"));
|
||||
}
|
||||
if (cgxuentry_a.compareTo(cgxuentry_b) > 0) { // 如果 cgxuentry_a 大于 cgxuentry_b
|
||||
this.addErrorMessage(extendedDataEntity, "采购计划明细中的申请金额大于合约规划金额,不允许提交。");
|
||||
}
|
||||
|
||||
}
|
||||
break;
|
||||
default:
|
||||
|
|
Loading…
Reference in New Issue