1 tahun lalu
induk
melakukan
eeae4139fd

+ 4 - 1
platform-dao/src/main/java/com/platform/dao/vo/export/preparation/ExportPreparationVO.java

@@ -55,7 +55,7 @@ public class ExportPreparationVO implements Serializable {
     /**
      * 报修时间
      */
-    @Excel(name = "申请时间", orderNum = "6")
+    @Excel(name = "报修时间", orderNum = "6")
     private LocalDateTime applyTime;
 
     /**
@@ -78,6 +78,9 @@ public class ExportPreparationVO implements Serializable {
     @Excel(name = "费用预算", orderNum = "9")
     private BigDecimal fee;
 
+    @Excel(name = "实际费用", orderNum = "10")
+    private BigDecimal actualFee;
+
 
 
 }

+ 5 - 1
platform-dao/src/main/java/com/platform/dao/vo/report/AllPreparationReportVO.java

@@ -34,9 +34,13 @@ public class AllPreparationReportVO implements Serializable {
     @Excel(name = "次数", orderNum = "3")
     private Integer num;
 
-    @Excel(name = "费用汇总", orderNum = "4")
+    @Excel(name = "费用预算汇总", orderNum = "4")
     private BigDecimal totalFee;
 
+    @Excel(name = "实际费用汇总", orderNum = "5")
+    private BigDecimal totalActualFee;
+
+
     /**
      * 明细列表
      */

+ 3 - 0
platform-rest/src/main/java/com/platform/rest/controller/preparation/PreparationController.java

@@ -247,12 +247,15 @@ public class PreparationController {
       throw new BusinessException("系统出错,请联系管理员!");
     }
     BigDecimal totalFee = new BigDecimal(0);
+    BigDecimal actualFee = new BigDecimal(0);
     for (PreparationVO vo:preparationVOS){
       totalFee = totalFee.add(vo.getFee());
+      actualFee = actualFee.add(vo.getActualFee()==null?new BigDecimal(0):vo.getActualFee());
     }
     PreparationVO preparationVO = new PreparationVO();
     preparationVO.setFee(totalFee);
     preparationVO.setId("费用汇总");
+    preparationVO.setActualFee(actualFee);
     preparationVOS.add(preparationVO);
     ExcelUtil.exportResponseDict(response, ExportPreparationVO.class, BeanConverterUtil.copyListProperties(preparationVOS, ExportPreparationVO.class), "建筑物报表统计导出");
   }

+ 3 - 0
platform-service/src/main/java/com/platform/service/preparation/impl/PreparationServiceImpl.java

@@ -185,6 +185,7 @@ public class PreparationServiceImpl extends BaseServiceImpl<PreparationMapper, P
 
         for (Map<String, LocalDateTime> map : monthStartAndEndList) {
             BigDecimal totalFee = new BigDecimal(0);
+            BigDecimal totalActualFee = new BigDecimal(0);
             int i = 0;
             AllPreparationReportVO vo = new AllPreparationReportVO();
             List<PreparationVO> detailList = new ArrayList<PreparationVO>();
@@ -199,10 +200,12 @@ public class PreparationServiceImpl extends BaseServiceImpl<PreparationMapper, P
                     }
                     detailList.add(preparationVO);
                     totalFee = totalFee.add(preparationVO.getFee()==null?new BigDecimal(0):preparationVO.getFee());
+                    totalActualFee = totalActualFee.add(preparationVO.getActualFee()==null?new BigDecimal(0):preparationVO.getActualFee());
                 }
             }
             vo.setTotalFee(totalFee);
             vo.setNum(i);
+            vo.setTotalActualFee(totalActualFee);
             vo.setDetailList(detailList);
             result.add(vo);
         }