|
@@ -214,6 +214,63 @@ public class ExportUtilCalculate {
|
|
return schedule;
|
|
return schedule;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+
|
|
|
|
+ public static OtherExpenses getExpenses(OtherExpenses otherExpenses, ErpCredit erpCredit, List<MaintainData> maintainDataList){
|
|
|
|
+ DecimalFormat decimalFormat = new DecimalFormat("#0.00");
|
|
|
|
+ Double otherSupervisorFee = getExDouble(erpCredit.getOtherSupervisorFee());
|
|
|
|
+ Double otherDesignFee = getExDouble(erpCredit.getOtherDesignFee());
|
|
|
|
+ Double otherBuildLoan = getExDouble(erpCredit.getOtherBuildLoan());
|
|
|
|
+ Double otherLineDamages = getExDouble(erpCredit.getOtherLineDamages());
|
|
|
|
+ Double otherTotalFee = getExDouble(erpCredit.getOtherTotalFee());
|
|
|
|
+ Double deduction = getExDouble(erpCredit.getDeduction());
|
|
|
|
+ OtherExpenses otherActual = new OtherExpenses();
|
|
|
|
+ otherActual.setProjectName(erpCredit.getItemName());
|
|
|
|
+ otherActual.setProjectNumber(erpCredit.getItemId());
|
|
|
|
+ String format = decimalFormat.format(otherTotalFee - otherLineDamages - otherBuildLoan - otherDesignFee - otherSupervisorFee);
|
|
|
|
+ if (format.equals("-0.00")) {
|
|
|
|
+ format = format.replace("-", "");
|
|
|
|
+ }
|
|
|
|
+ otherActual.setManagementFunds(format);
|
|
|
|
+ otherActual.setSupervisionFee(decimalFormat.format(otherSupervisorFee));
|
|
|
|
+ otherActual.setDesignFee(decimalFormat.format(otherDesignFee));
|
|
|
|
+ otherActual.setLoanInterest(decimalFormat.format(otherBuildLoan));
|
|
|
|
+ otherActual.setDamages(decimalFormat.format(otherLineDamages));
|
|
|
|
+ otherActual.setTotal(decimalFormat.format(otherTotalFee));
|
|
|
|
+ otherActual.setDeduction(decimalFormat.format(deduction));
|
|
|
|
+ otherActual.setIncludingTax(decimalFormat.format(otherTotalFee + deduction));
|
|
|
|
+ /*OtherExpenses otherBudget = getScheduleBudget(schedule,erpCredit,maintainDataList);//得到预算合计费用
|
|
|
|
+ OtherExpenses otherActual = getScheduleActual(scheduleBudget,erpCredit);//得到实际费用
|
|
|
|
+ double addSubtractionLines = 0.0;//增加额
|
|
|
|
+ double addSubtractionRate1=0.0;//增减去率
|
|
|
|
+ //判断为空的条件
|
|
|
|
+ //如果实际合计金额为空 赋予初始值为0
|
|
|
|
+ if (null==schedule.getActualTotalFee()) {
|
|
|
|
+ schedule.setActualTotalFee("0");
|
|
|
|
+ }
|
|
|
|
+ //如果预算合计金额为空,赋予初始值0
|
|
|
|
+ if (null==schedule.getBudgetTotalFee()){
|
|
|
|
+ schedule.setBudgetTotalFee("0");
|
|
|
|
+ }
|
|
|
|
+ //增加率
|
|
|
|
+ addSubtractionLines=Double.parseDouble(schedule.getActualTotalFee())-Double.parseDouble(schedule.getBudgetTotalFee());
|
|
|
|
+ schedule.setAddSubtractionLines(decimalFormat.format(addSubtractionLines));//添加入郑家率
|
|
|
|
+ if (null==schedule.getBudgetTotalFee()) {//如果预算价值为空,赋初始值为1;
|
|
|
|
+ schedule.setAddSubtractionLines("1");
|
|
|
|
+ }
|
|
|
|
+ //计算增减率
|
|
|
|
+ addSubtractionRate1 = addSubtractionLines/Double.parseDouble(schedule.getBudgetTotalFee())*100;
|
|
|
|
+ schedule.setAddSubtractionRate(decimalFormat.format(addSubtractionRate1));*/
|
|
|
|
+ return otherActual;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ private static Double getExDouble(Double otherSupervisorFee) {
|
|
|
|
+ if (null == otherSupervisorFee) {
|
|
|
|
+ otherSupervisorFee = 0.0;
|
|
|
|
+ }
|
|
|
|
+ return otherSupervisorFee;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
/**
|
|
/**
|
|
* 其他费用明细表 实际费用
|
|
* 其他费用明细表 实际费用
|
|
* @param erpCreditList
|
|
* @param erpCreditList
|
|
@@ -1094,6 +1151,74 @@ public class ExportUtilCalculate {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * 其 他 费 用 明 细 表
|
|
|
|
+ * @param erpCreditList
|
|
|
|
+ * @param maintainDataList
|
|
|
|
+ * @return
|
|
|
|
+ */
|
|
|
|
+ public static List<OtherExpenses> getOtherExpenses(List<ErpCredit> erpCreditList, List<MaintainData> maintainDataList){
|
|
|
|
+ DecimalFormat decimalFormat = new DecimalFormat("#0.00");
|
|
|
|
+ String itemNameAll="合计";//工程名称
|
|
|
|
+ Double managementFunds=0.0;//项目管理经费
|
|
|
|
+ Double supervisionFee=0.0;//监理费
|
|
|
|
+ Double designFee=0.0;//设计费
|
|
|
|
+ Double loanInterest=0.0;//贷款利息
|
|
|
|
+ Double damages=0.0;//赔偿费
|
|
|
|
+ Double total=0.0;//合计
|
|
|
|
+ Double deduction=0.0;//抵扣增值税
|
|
|
|
+ Double includingTax=0.0;//实际含税投资合计
|
|
|
|
+ OtherExpenses otherExpenses = new OtherExpenses();
|
|
|
|
+ List<OtherExpenses> otherExpensesList = new ArrayList<OtherExpenses>();
|
|
|
|
+ OtherExpenses expenses = null;
|
|
|
|
+ if (null!=erpCreditList&&erpCreditList.size()>0){
|
|
|
|
+ for (ErpCredit erpCredit:erpCreditList){
|
|
|
|
+ expenses = new OtherExpenses();
|
|
|
|
+ expenses = getExpenses(expenses,erpCredit,maintainDataList);//得到一览表实际金额
|
|
|
|
+ otherExpensesList.add(expenses);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ for (OtherExpenses s:otherExpensesList){
|
|
|
|
+ if (null!=s.getManagementFunds()){
|
|
|
|
+ managementFunds+=Double.parseDouble(s.getManagementFunds());
|
|
|
|
+ otherExpenses.setManagementFunds(decimalFormat.format(managementFunds));
|
|
|
|
+ }
|
|
|
|
+ if (null!=s.getSupervisionFee()){
|
|
|
|
+ supervisionFee+=Double.parseDouble(s.getSupervisionFee());
|
|
|
|
+ otherExpenses.setSupervisionFee(decimalFormat.format(supervisionFee));
|
|
|
|
+ }
|
|
|
|
+ if (null!=s.getDesignFee()){
|
|
|
|
+ designFee+=Double.parseDouble(s.getDesignFee());
|
|
|
|
+ otherExpenses.setDesignFee(decimalFormat.format(designFee));
|
|
|
|
+ }
|
|
|
|
+ if (null!=s.getLoanInterest()){
|
|
|
|
+ loanInterest+=Double.parseDouble(s.getLoanInterest());
|
|
|
|
+ otherExpenses.setLoanInterest(decimalFormat.format(loanInterest));
|
|
|
|
+ }
|
|
|
|
+ if (null!=s.getDamages()){
|
|
|
|
+ damages+=Double.parseDouble(s.getDamages());
|
|
|
|
+ otherExpenses.setDamages(decimalFormat.format(damages));
|
|
|
|
+ }
|
|
|
|
+ if (null!=s.getTotal()){
|
|
|
|
+ total+=Double.parseDouble(s.getTotal());
|
|
|
|
+ otherExpenses.setTotal(decimalFormat.format(total));
|
|
|
|
+ }
|
|
|
|
+ if (null!=s.getDeduction()){
|
|
|
|
+ deduction+=Double.parseDouble(s.getDeduction());
|
|
|
|
+ otherExpenses.setDeduction(decimalFormat.format(deduction));
|
|
|
|
+ }
|
|
|
|
+ if (null!=s.getIncludingTax()){
|
|
|
|
+ includingTax+=Double.parseDouble(s.getIncludingTax());
|
|
|
|
+ otherExpenses.setIncludingTax(decimalFormat.format(includingTax));
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ otherExpenses.setProjectName(itemNameAll);
|
|
|
|
+ otherExpensesList.add(otherExpenses);
|
|
|
|
+ return otherExpensesList;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
/*
|
|
/*
|
|
设备费统计
|
|
设备费统计
|
|
*/
|
|
*/
|