项目工序动态成本分析表二开优化
This commit is contained in:
parent
6333878a1e
commit
8f9a510b07
|
|
@ -645,18 +645,13 @@ public class CbsDynamicCostFormPluginExt extends AbstractFormPlugin implements B
|
||||||
protected void queryCostData(DynamicObject project, Map<String, BigDecimal> confirmCostMap, Map<String, BigDecimal> notSplitCostMap, Map<String, BigDecimal> notConfirmCostMap) {
|
protected void queryCostData(DynamicObject project, Map<String, BigDecimal> confirmCostMap, Map<String, BigDecimal> notSplitCostMap, Map<String, BigDecimal> notConfirmCostMap) {
|
||||||
Object zcgj_periodyear = this.getModel().getValue("zcgj_periodyear");
|
Object zcgj_periodyear = this.getModel().getValue("zcgj_periodyear");
|
||||||
int periodYear = 0;
|
int periodYear = 0;
|
||||||
if (zcgj_periodyear.equals("1")) {
|
|
||||||
periodYear = 2025;
|
if (zcgj_periodyear instanceof String) {
|
||||||
} else if (zcgj_periodyear.equals("2")) {
|
try {
|
||||||
periodYear = 2026;
|
periodYear = Integer.parseInt((String) zcgj_periodyear);
|
||||||
} else if (zcgj_periodyear.equals("3")) {
|
} catch (NumberFormatException ignored) {
|
||||||
periodYear = 2027;
|
throw new RuntimeException(ignored);
|
||||||
} else if (zcgj_periodyear.equals("4")) {
|
}
|
||||||
periodYear = 2028;
|
|
||||||
} else if (zcgj_periodyear.equals("5")) {
|
|
||||||
periodYear = 2029;
|
|
||||||
} else if (zcgj_periodyear.equals("6")) {
|
|
||||||
periodYear = 2030;
|
|
||||||
}
|
}
|
||||||
QFilter costFilter = new QFilter("project", "=", project.getPkValue());
|
QFilter costFilter = new QFilter("project", "=", project.getPkValue());
|
||||||
costFilter.and("billstatus", "in", new String[]{BillStatusEnum.AUDIT.getValue(), BillStatusEnum.SUBMIT.getValue()});
|
costFilter.and("billstatus", "in", new String[]{BillStatusEnum.AUDIT.getValue(), BillStatusEnum.SUBMIT.getValue()});
|
||||||
|
|
@ -825,7 +820,10 @@ public class CbsDynamicCostFormPluginExt extends AbstractFormPlugin implements B
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
DynamicObjectCollection equipmentCostBills = QueryServiceHelper.query("eceq_costsplit", "billstatus,settlesplitentity.settleid,settlesplitentity.costsplitentity.unitproject,settlesplitentity.costsplitentity.procbs,settlesplitentity.costsplitentity.splitamount", new QFilter[]{costFilter1});
|
QFilter costFilter2 = new QFilter("project", "=", project.getPkValue());
|
||||||
|
costFilter2.and("billstatus", "in", new String[]{BillStatusEnum.AUDIT.getValue(), BillStatusEnum.SUBMIT.getValue()});
|
||||||
|
costFilter2.and("splitperiod.periodyear", QCP.equals, periodYear);//会计期间-年度--二开添加
|
||||||
|
DynamicObjectCollection equipmentCostBills = QueryServiceHelper.query("eceq_costsplit", "billstatus,settlesplitentity.settleid,settlesplitentity.costsplitentity.unitproject,settlesplitentity.costsplitentity.procbs,settlesplitentity.costsplitentity.splitamount", new QFilter[]{costFilter2});
|
||||||
Set<Long> splitReferenceEqSettleSet = new HashSet(16);
|
Set<Long> splitReferenceEqSettleSet = new HashSet(16);
|
||||||
Iterator var79 = equipmentCostBills.iterator();
|
Iterator var79 = equipmentCostBills.iterator();
|
||||||
|
|
||||||
|
|
@ -1053,6 +1051,20 @@ public class CbsDynamicCostFormPluginExt extends AbstractFormPlugin implements B
|
||||||
aimCostFilter.and("unitproject", "in", unitProjectIds);
|
aimCostFilter.and("unitproject", "in", unitProjectIds);
|
||||||
}*///二开注释掉的
|
}*///二开注释掉的
|
||||||
|
|
||||||
|
if (zcgj_periodyear.equals("2025")) {
|
||||||
|
zcgj_periodyear = "1";
|
||||||
|
} else if (zcgj_periodyear.equals("2026")) {
|
||||||
|
zcgj_periodyear = "2";
|
||||||
|
} else if (zcgj_periodyear.equals("2027")) {
|
||||||
|
zcgj_periodyear = "3";
|
||||||
|
} else if (zcgj_periodyear.equals("2028")) {
|
||||||
|
zcgj_periodyear = "4";
|
||||||
|
} else if (zcgj_periodyear.equals("2029")) {
|
||||||
|
zcgj_periodyear = "5";
|
||||||
|
} else if (zcgj_periodyear.equals("2030")) {
|
||||||
|
zcgj_periodyear = "6";
|
||||||
|
}
|
||||||
|
|
||||||
aimCostFilter.and("isenable", "=", "1");
|
aimCostFilter.and("isenable", "=", "1");
|
||||||
aimCostFilter.and("zcgj_periodyear", "=", zcgj_periodyear);//二开添加
|
aimCostFilter.and("zcgj_periodyear", "=", zcgj_periodyear);//二开添加
|
||||||
DynamicObject[] aimCostBills = BusinessDataServiceHelper.load("ecco_aimcostbillcbs", "unitproject,treeentryentity,treeentryentity.cbs,treeentryentity.pdamount", new QFilter[]{aimCostFilter});
|
DynamicObject[] aimCostBills = BusinessDataServiceHelper.load("ecco_aimcostbillcbs", "unitproject,treeentryentity,treeentryentity.cbs,treeentryentity.pdamount", new QFilter[]{aimCostFilter});
|
||||||
|
|
@ -1343,6 +1355,19 @@ public class CbsDynamicCostFormPluginExt extends AbstractFormPlugin implements B
|
||||||
DynamicObject unitProject = (DynamicObject) this.getModel().getValue("unitproject", rowIndex);
|
DynamicObject unitProject = (DynamicObject) this.getModel().getValue("unitproject", rowIndex);
|
||||||
DynamicObject project = (DynamicObject) this.getModel().getValue("project");
|
DynamicObject project = (DynamicObject) this.getModel().getValue("project");
|
||||||
Object zcgj_periodyear = this.getModel().getValue("zcgj_periodyear");//年度-二开添加
|
Object zcgj_periodyear = this.getModel().getValue("zcgj_periodyear");//年度-二开添加
|
||||||
|
if (zcgj_periodyear.equals("2025")) {
|
||||||
|
zcgj_periodyear = "1";
|
||||||
|
} else if (zcgj_periodyear.equals("2026")) {
|
||||||
|
zcgj_periodyear = "2";
|
||||||
|
} else if (zcgj_periodyear.equals("2027")) {
|
||||||
|
zcgj_periodyear = "3";
|
||||||
|
} else if (zcgj_periodyear.equals("2028")) {
|
||||||
|
zcgj_periodyear = "4";
|
||||||
|
} else if (zcgj_periodyear.equals("2029")) {
|
||||||
|
zcgj_periodyear = "5";
|
||||||
|
} else if (zcgj_periodyear.equals("2030")) {
|
||||||
|
zcgj_periodyear = "6";
|
||||||
|
}
|
||||||
QFilter aimCostFilter = new QFilter("project", "=", project.getPkValue());
|
QFilter aimCostFilter = new QFilter("project", "=", project.getPkValue());
|
||||||
aimCostFilter.and("unitproject", "=", unitProject == null ? 0L : unitProject.getPkValue());
|
aimCostFilter.and("unitproject", "=", unitProject == null ? 0L : unitProject.getPkValue());
|
||||||
aimCostFilter.and("isenable", "=", "1");
|
aimCostFilter.and("isenable", "=", "1");
|
||||||
|
|
@ -1357,7 +1382,7 @@ public class CbsDynamicCostFormPluginExt extends AbstractFormPlugin implements B
|
||||||
|
|
||||||
protected void showPeriodDetailCost(int rowIndex, String splitType) {
|
protected void showPeriodDetailCost(int rowIndex, String splitType) {
|
||||||
Map<String, Object> paramMap = new HashMap();
|
Map<String, Object> paramMap = new HashMap();
|
||||||
Object zcgj_periodyear = this.getModel().getValue("zcgj_periodyear");//年度--二开添加
|
// Object zcgj_periodyear = this.getModel().getValue("zcgj_periodyear");//年度--二开添加
|
||||||
DynamicObject cbs = (DynamicObject) this.getModel().getValue("cbs", rowIndex);
|
DynamicObject cbs = (DynamicObject) this.getModel().getValue("cbs", rowIndex);
|
||||||
if (cbs != null && cbs.getBoolean("isleaf")) {
|
if (cbs != null && cbs.getBoolean("isleaf")) {
|
||||||
paramMap.put("projectId", this.getPageCache().get("queryProject"));
|
paramMap.put("projectId", this.getPageCache().get("queryProject"));
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue