diff --git a/code/zcdev/zcgj-zcdev-zcdev-fs/src/main/java/zcgj/zcdev/zcdev/fs/plugin/report/BudgetActuRptQueryPlugin.java b/code/zcdev/zcgj-zcdev-zcdev-fs/src/main/java/zcgj/zcdev/zcdev/fs/plugin/report/BudgetActuRptQueryPlugin.java index 54bd1a8..e68d7e7 100644 --- a/code/zcdev/zcgj-zcdev-zcdev-fs/src/main/java/zcgj/zcdev/zcdev/fs/plugin/report/BudgetActuRptQueryPlugin.java +++ b/code/zcdev/zcgj-zcdev-zcdev-fs/src/main/java/zcgj/zcdev/zcdev/fs/plugin/report/BudgetActuRptQueryPlugin.java @@ -140,6 +140,32 @@ public class BudgetActuRptQueryPlugin extends AbstractReportListDataPlugin { DataSet settlementDataSet = QueryServiceHelper.queryDataSet(this.getClass().getName() + Bill_ANNUAL_BUDGET, Bill_ANNUAL_BUDGET, selectSettlementFields.toString(), searchFilterList.toArray(new QFilter [] {}), null).orderBy(new String[]{DEV_KEY+"_user",DEV_KEY+"_year"}); + + //获取配置 + List searchFilterListConf = new ArrayList<>(); + searchFilterListConf.add(new QFilter(DEV_KEY+"_class", QCP.equals, "BudgetActuRptItem")); + DataSet repConf = QueryServiceHelper.queryDataSet(this.getClass().getName() + DEV_KEY+"_rep_conf", + DEV_KEY+"_rep_conf", "zcgj_class as class,number,zcgj_val1 as val1", searchFilterListConf.toArray(new QFilter [] {}), null); + + String FYF ="";//防疫费 + String PXF ="";//培训费 + String TXF ="";//通信费 + String YWZDF ="";//业务招待费 + + for (Row row : repConf) { + if("FYF".equals(row.getString("number"))){ + FYF = row.getString("val1"); + }else if("PXF".equals(row.getString("number"))){ + PXF = row.getString("val1"); + }else if("TXF".equals(row.getString("number"))){ + TXF = row.getString("val1"); + }else if("YWZDF".equals(row.getString("number"))){ + YWZDF = row.getString("val1"); + } + + } + + logger.info(">>> 人员预算单: " + settlementDataSet.toString()); for (Row row : settlementDataSet) { @@ -268,13 +294,13 @@ public class BudgetActuRptQueryPlugin extends AbstractReportListDataPlugin { String happendateStr = dateFormat.format(itemRow.getDate("happendate")); BigDecimal expenseamount = itemRow.getBigDecimal("expenseamount"); - if(itemnumber.startsWith("FYXM002-CUS.001")){//防疫费 + if(itemnumber.startsWith(FYF)){//防疫费 healthRealTotal = healthRealTotal.add(expenseamount); - }else if(itemnumber.startsWith("FYXM002-CUS.002")){//日常费用-通信费用 + }else if(itemnumber.startsWith(TXF)){//日常费用-通信费用 correspondenceTotal = correspondenceTotal.add(expenseamount); - }else if(itemnumber.startsWith("FYXM002-CUS.003")){//日常费用-培训费用 + }else if(itemnumber.startsWith(PXF)){//日常费用-培训费用 trainingTotal = trainingTotal.add(expenseamount); - }else if(itemnumber.startsWith("FYXM002-CUS.004")){//日常费用-业务招待费 + }else if(itemnumber.startsWith(YWZDF)){//日常费用-业务招待费 entertainTotal = entertainTotal.add(expenseamount); } }