Explorar o código

fix: 修复不动产维修相关接口错误

weijianghai hai 10 meses
pai
achega
38071ba2cf
Modificáronse 38 ficheiros con 2450 adicións e 252 borrados
  1. 2 1
      src/main/java/com/example/config/web/MyWebMvcConfigurer.java
  2. 1 1
      src/main/java/com/example/controller/WzBuildManageDetailsController.java
  3. 1 1
      src/main/java/com/example/controller/WzHouseContracController.java
  4. 1 1
      src/main/java/com/example/controller/WzHouseContractOutController.java
  5. 1 1
      src/main/java/com/example/controller/WzHouseLeaseInConController.java
  6. 213 213
      src/main/java/com/example/controller/WzHouseMaintenaCostController.java
  7. 1 1
      src/main/java/com/example/controller/WzHouseUseController.java
  8. 1 1
      src/main/java/com/example/controller/WzLandManageDetailsController.java
  9. 1 1
      src/main/java/com/example/controller/WzLowestUnitPriceController.java
  10. 1 1
      src/main/java/com/example/controller/WzRentHouseArrearsController.java
  11. 1 1
      src/main/java/com/example/controller/WzRentThreeMonthController.java
  12. 1 1
      src/main/java/com/example/controller/WzScoreRankingController.java
  13. 48 5
      src/main/java/com/example/controller/house/HouseWzHouseMaintenaCostController.java
  14. 176 0
      src/main/java/com/example/dao/house/HouseBuildingRepairDao.java
  15. 37 0
      src/main/java/com/example/dao/house/HouseRepairExceptionDao.java
  16. 248 0
      src/main/java/com/example/entity/house/BuildingRepairMonthPo.java
  17. 79 0
      src/main/java/com/example/entity/house/BuildingRepairStatPo.java
  18. 71 0
      src/main/java/com/example/enums/ListBuildingIdleRepairOrderEnum.java
  19. 191 0
      src/main/java/com/example/enums/ListBuildingRepairMonthOrderEnum.java
  20. 27 0
      src/main/java/com/example/pojo/bo/BuildingRepairStatBo.java
  21. 27 0
      src/main/java/com/example/pojo/bo/ListBuildingIdleRepairBo.java
  22. 31 0
      src/main/java/com/example/pojo/bo/ListBuildingRepairMonthBo.java
  23. 46 0
      src/main/java/com/example/pojo/dto/BuildingRepairStatDto.java
  24. 2 2
      src/main/java/com/example/pojo/dto/GetSiteStatDto.java
  25. 18 0
      src/main/java/com/example/pojo/dto/ListBuildingHighRepairDto.java
  26. 18 0
      src/main/java/com/example/pojo/dto/ListBuildingHighSporadicRepairDto.java
  27. 56 0
      src/main/java/com/example/pojo/dto/ListBuildingIdleRepairDto.java
  28. 63 0
      src/main/java/com/example/pojo/dto/ListBuildingRepairMonthDto.java
  29. 18 0
      src/main/java/com/example/pojo/dto/ListBuildingSameRepairFrequencyDto.java
  30. 0 3
      src/main/java/com/example/pojo/dto/ListSiteNumDto.java
  31. 42 0
      src/main/java/com/example/pojo/vo/BuildingRepairStatVo.java
  32. 62 0
      src/main/java/com/example/pojo/vo/ListBuildingIdleRepairVo.java
  33. 150 0
      src/main/java/com/example/pojo/vo/ListBuildingRepairMonthVo.java
  34. 1 1
      src/main/java/com/example/service/house/HouseSiteStatService.java
  35. 4 4
      src/main/java/com/example/service/house/HouseWzBuildManageDetailsService.java
  36. 1 1
      src/main/java/com/example/service/house/HouseWzBuildmanageAvageareaService.java
  37. 807 10
      src/main/java/com/example/service/house/HouseWzHouseMaintenaCostService.java
  38. 2 2
      src/main/java/com/example/service/house/HouseWzLandManageDetailsService.java

+ 2 - 1
src/main/java/com/example/config/web/MyWebMvcConfigurer.java

@@ -20,7 +20,8 @@ public class MyWebMvcConfigurer implements WebMvcConfigurer {
     @Override
     public void addInterceptors(InterceptorRegistry registry) {
         // 添加请求日志拦截
-        registry.addInterceptor(new RequestLogHandlerInterceptor(requestLogService)).addPathPatterns("/**").excludePathPatterns("/webjars/**", "/doc**", "/v3/**");
+        registry.addInterceptor(new RequestLogHandlerInterceptor(requestLogService))
+                .addPathPatterns("/**").excludePathPatterns("/webjars/**", "/doc**", "/v3/**", "/test/**");
     }
 
     /**

+ 1 - 1
src/main/java/com/example/controller/WzBuildManageDetailsController.java

@@ -364,7 +364,7 @@ public class WzBuildManageDetailsController {
             map.put("buildingNameAlias", buildingNameAlias);
         }
 
-        DateFormat df = new SimpleDateFormat("yyyyMMdd");
+        DateFormat df = new SimpleDateFormat("yyyyMMddHHmmss");
         ExcelExport ee1 ;
         //判定是闲置管理还是记录
         if (name.contains("自有房产")) {

+ 1 - 1
src/main/java/com/example/controller/WzHouseContracController.java

@@ -234,7 +234,7 @@ public class WzHouseContracController {
             map1.put("county",county);
         }
 
-        DateFormat df = new SimpleDateFormat("yyyyMMdd");
+        DateFormat df = new SimpleDateFormat("yyyyMMddHHmmss");
         ExcelExport ee1;
 
         //判定是闲置管理还是记录

+ 1 - 1
src/main/java/com/example/controller/WzHouseContractOutController.java

@@ -125,7 +125,7 @@ public class WzHouseContractOutController {
             map.put("county", county);
         }
 
-        DateFormat df = new SimpleDateFormat("yyyyMMdd");
+        DateFormat df = new SimpleDateFormat("yyyyMMddHHmmss");
         ExcelExport ee1 = new ExcelExport("报表" + df.format(new Date()));
 
         try {

+ 1 - 1
src/main/java/com/example/controller/WzHouseLeaseInConController.java

@@ -279,7 +279,7 @@ public class WzHouseLeaseInConController {
             map1.put("county",county);
         }
 
-        DateFormat df = new SimpleDateFormat("yyyyMMdd");
+        DateFormat df = new SimpleDateFormat("yyyyMMddHHmmss");
         ExcelExport ee1;
 
         //判定是闲置管理还是记录

+ 213 - 213
src/main/java/com/example/controller/WzHouseMaintenaCostController.java

@@ -46,39 +46,39 @@ public class WzHouseMaintenaCostController {
     @Autowired
     private WzStrategyService wzStrategyService;
 
-    /**
-     * 查看列表
-     */
-    @RequestMapping("/list")
-    @IgnoreAuth
-    public R list(@RequestBody PageMap pageMap) {
-        //查询列表数据
-        Query query = new Query(pageMap);
-        List<WzHouseMaintenaCostEntity> resultList = wzHouseMaintenaCostService.queryList(query);
-        Query query1 = new Query(pageMap);
-        int total = wzHouseMaintenaCostService.queryTotal(query1);
-        PageUtils pageUtil = new PageUtils(resultList, total, query.getLimit(), query.getPage());
-        return R.ok().put("page", pageUtil);
-    }
+//    /**
+//     * 查看列表
+//     */
+//    @RequestMapping("/list")
+//    @IgnoreAuth
+//    public R list(@RequestBody PageMap pageMap) {
+//        //查询列表数据
+//        Query query = new Query(pageMap);
+//        List<WzHouseMaintenaCostEntity> resultList = wzHouseMaintenaCostService.queryList(query);
+//        Query query1 = new Query(pageMap);
+//        int total = wzHouseMaintenaCostService.queryTotal(query1);
+//        PageUtils pageUtil = new PageUtils(resultList, total, query.getLimit(), query.getPage());
+//        return R.ok().put("page", pageUtil);
+//    }
 
-    /**
-     * 查看列表
-     */
-    @RequestMapping("/list1")
-    @IgnoreAuth
-    public R list1(@RequestBody PageMap pageMap) {
-        //查询列表数据
-        Query query = new Query(pageMap);
-        List<WzHouseMaintenaCostEntity> resultList = wzHouseMaintenaCostService.queryList1(query);
-        //每平方米维修单价
-        for (WzHouseMaintenaCostEntity wzHouseMaintenaCostEntity : resultList) {
-            wzHouseMaintenaCostEntity.setAveragePrice(formatDouble(wzHouseMaintenaCostEntity.getAveragePrice()));
-        }
-        Query query1 = new Query(pageMap);
-        int total = wzHouseMaintenaCostService.queryTotal1(query1);
-        PageUtils pageUtil = new PageUtils(resultList, total, query.getLimit(), query.getPage());
-        return R.ok().put("page", pageUtil);
-    }
+//    /**
+//     * 查看列表
+//     */
+//    @RequestMapping("/list1")
+//    @IgnoreAuth
+//    public R list1(@RequestBody PageMap pageMap) {
+//        //查询列表数据
+//        Query query = new Query(pageMap);
+//        List<WzHouseMaintenaCostEntity> resultList = wzHouseMaintenaCostService.queryList1(query);
+//        //每平方米维修单价
+//        for (WzHouseMaintenaCostEntity wzHouseMaintenaCostEntity : resultList) {
+//            wzHouseMaintenaCostEntity.setAveragePrice(formatDouble(wzHouseMaintenaCostEntity.getAveragePrice()));
+//        }
+//        Query query1 = new Query(pageMap);
+//        int total = wzHouseMaintenaCostService.queryTotal1(query1);
+//        PageUtils pageUtil = new PageUtils(resultList, total, query.getLimit(), query.getPage());
+//        return R.ok().put("page", pageUtil);
+//    }
 
 
     @RequestMapping("/queryVoList")
@@ -92,184 +92,184 @@ public class WzHouseMaintenaCostController {
         return R.ok().put("page", pageUtil);
     }
 
-    @RequestMapping("/queryEchart")
-    @IgnoreAuth
-    public R queryEchart(@RequestBody PageMap pageMap) {
-        //查询列表数据
-        List<WzHouseMaintenaCostEntity> alllist = wzHouseMaintenaCostService.queryList1(pageMap.getMap());
-        //全省节点
-        HouseCostVo province = new HouseCostVo();
-        province.setCounty("全省");
-        province.setCity("全省");
-
-        double aProjectCost = 0l;
-        double aSmallCost = 0l;
-        double aWarnCost = 0l;
-        double aProCost = 0l;
-        double aOtherCost = 0l;
-        double aAllCost = 0l;
-        //按地市进行划分
-        Map<String, List<WzHouseMaintenaCostEntity>> cityMap = new HashMap<>();
-        for (WzHouseMaintenaCostEntity entity : alllist) {
-            if (entity.getCity() == null) continue;
-            List<WzHouseMaintenaCostEntity> list;
-            if (cityMap.get(entity.getCity()) != null) {
-                list = cityMap.get(entity.getCity());
-                list.add(entity);
-            } else {
-                list = new ArrayList<>();
-                list.add(entity);
-            }
-            cityMap.put(entity.getCity(), list);
-        }
-        //按区进行划分
-        List<HouseCostVo> resultList = new ArrayList<>();
-        List<HouseCostVo> cityList = new ArrayList<>();
-        for (Map.Entry<String, List<WzHouseMaintenaCostEntity>> entry : cityMap.entrySet()) {
-            List<WzHouseMaintenaCostEntity> list = entry.getValue();
-            //县的Map集合
-            Map<String, List<WzHouseMaintenaCostEntity>> countyMap = new HashMap<>();
-            for (WzHouseMaintenaCostEntity leaveUseVo : list) {
-                if (countyMap.get(leaveUseVo.getCounty()) != null) {
-                    list = countyMap.get(leaveUseVo.getCounty());
-                    list.add(leaveUseVo);
-                } else {
-                    list = new ArrayList<>();
-                    list.add(leaveUseVo);
-                }
-                countyMap.put(leaveUseVo.getCounty(), list);
-            }
-
-            List<HouseCostVo> countyList = new ArrayList<>();
-            double cityProjectCost = 0l;
-            double citySmallCost = 0l;
-            double cityWarnCost = 0l;
-            double cityProCost = 0l;
-            double cityOtherCost = 0l;
-            double cityAllCost = 0l;
-            for (Map.Entry<String, List<WzHouseMaintenaCostEntity>> countyEntry : countyMap.entrySet()) {
-                double projectCost = 0l;
-                double smallCost = 0l;
-                double warnCost = 0l;
-                double proCost = 0l;
-                double otherCost = 0l;
-                double allCost = 0l;
-
-                HouseCostVo county = new HouseCostVo();
-                for (WzHouseMaintenaCostEntity leaveUseVo : countyEntry.getValue()) {
-                    county.setCity(leaveUseVo.getCounty());
-                    if (leaveUseVo.getRepairType().equals("项目制维修")) {
-                        projectCost += leaveUseVo.getErpCreditedAmount();
-                        cityProjectCost += leaveUseVo.getErpCreditedAmount();
-                        aProjectCost += leaveUseVo.getErpCreditedAmount();
-                        allCost +=leaveUseVo.getErpCreditedAmount();
-                        cityAllCost +=leaveUseVo.getErpCreditedAmount();
-                        aAllCost +=leaveUseVo.getErpCreditedAmount();
-                    } else if (leaveUseVo.getRepairType().equals("零星维修")) {
-                        smallCost += leaveUseVo.getErpCreditedAmount();
-                        citySmallCost += leaveUseVo.getErpCreditedAmount();
-                        aSmallCost += leaveUseVo.getErpCreditedAmount();
-                        allCost +=leaveUseVo.getErpCreditedAmount();
-                        cityAllCost +=leaveUseVo.getErpCreditedAmount();
-                        aAllCost +=leaveUseVo.getErpCreditedAmount();
-                    } else if (leaveUseVo.getRepairType().equals("应急维修")) {
-                        warnCost += leaveUseVo.getErpCreditedAmount();
-                        cityWarnCost += leaveUseVo.getErpCreditedAmount();
-                        aWarnCost += leaveUseVo.getErpCreditedAmount();
-                        allCost +=leaveUseVo.getErpCreditedAmount();
-                        cityAllCost +=leaveUseVo.getErpCreditedAmount();
-                        aAllCost +=leaveUseVo.getErpCreditedAmount();
-                    } else if (leaveUseVo.getRepairType().equals("安防费用")) {
-                        proCost += leaveUseVo.getErpCreditedAmount();
-                        cityProCost += leaveUseVo.getErpCreditedAmount();
-                        aProCost += leaveUseVo.getErpCreditedAmount();
-                        allCost +=leaveUseVo.getErpCreditedAmount();
-                        cityAllCost +=leaveUseVo.getErpCreditedAmount();
-                        aAllCost +=leaveUseVo.getErpCreditedAmount();
-                    } else {
-                        if(leaveUseVo.getRepairType().contains("预提冲销")){
-                            continue;
-                        }
-                        otherCost += leaveUseVo.getErpCreditedAmount();
-                        cityOtherCost += leaveUseVo.getErpCreditedAmount();
-                        aOtherCost += leaveUseVo.getErpCreditedAmount();
-                    }
-//                    allCost += projectCost + smallCost + warnCost + proCost + otherCost;
-//                    cityAllCost += cityProjectCost + citySmallCost + cityWarnCost + cityProCost + cityOtherCost;
-//                    aAllCost += aProjectCost + aSmallCost + aWarnCost + aProCost + aOtherCost;
-
-                }
-                county.setProjectCost(formatDouble(projectCost));
-                county.setProCost(formatDouble(proCost));
-                county.setOtherCost(formatDouble(otherCost));
-                county.setSmallCost(formatDouble(smallCost));
-                county.setWarnCost(formatDouble(warnCost));
-                county.setAllCost(formatDouble(allCost));
-                countyList.add(county);
-            }
-
-            List<HouseCostVo> orderCountyList = new ArrayList<>();
-            try {
-                //对countList 进行排序
-                String city = list.get(0).getCity();
-                if (city.contains("市")) {
-                    city = city.split("市")[0];
-                }
-                OtnAreaEntity area = otnAreaService.queryObject(city);
-                List<OtnAreaEntity> countyAreaList = otnAreaService.getCityOption(area.getId());
-                int i=0;
-                for (OtnAreaEntity otnAreaEntity : countyAreaList) {
-                    for (HouseCostVo wzCity : countyList) {
-                        if (otnAreaEntity.getName().equals(wzCity.getCity())) {
-                            i++;
-                            wzCity.setFlag(i%2==0);
-                            orderCountyList.add(wzCity);
-                        }
-                    }
-                }
-            } catch (Exception e) {
-                orderCountyList = countyList;
-                e.printStackTrace();
-            }
-
-            HouseCostVo parent = new HouseCostVo();
-            parent.setProCost(formatDouble(cityProCost));
-            parent.setWarnCost(formatDouble(cityWarnCost));
-            parent.setProjectCost(formatDouble(cityProjectCost));
-            parent.setOtherCost(formatDouble(cityOtherCost));
-            parent.setSmallCost(formatDouble(citySmallCost));
-            parent.setAllCost(formatDouble(cityAllCost));
-            parent.setCity(list.get(0).getCity());
-            parent.setChildren(orderCountyList);
-            cityList.add(parent);
-        }
-
-        //对cityList 进行排序
-        List<OtnAreaEntity> areaList = otnAreaService.getCityOption("018");
-        List<HouseCostVo> orderList = new ArrayList<>();
-        int i=0;
-        for (OtnAreaEntity otnAreaEntity : areaList) {
-            for (HouseCostVo wzCity : cityList) {
-                if (wzCity.getCity().contains(otnAreaEntity.getName())) {
-                    wzCity.setFlag(i%2==0);
-                    orderList.add(wzCity);
-                    i++;
-                }
-            }
-        }
-
-        province.setChildren(orderList);
-        province.setAllCost(formatDouble(aAllCost));
-        province.setSmallCost(formatDouble(aSmallCost));
-        province.setOtherCost(formatDouble(aOtherCost));
-        province.setProjectCost(formatDouble(aProjectCost));
-        province.setProCost(formatDouble(aProCost));
-        province.setWarnCost(formatDouble(aWarnCost));
-        resultList.add(province);
-
-        PageUtils pageUtil = new PageUtils(resultList, 0, 10, 10);
-        return R.ok().put("page", pageUtil);
-    }
+//    @RequestMapping("/queryEchart")
+//    @IgnoreAuth
+//    public R queryEchart(@RequestBody PageMap pageMap) {
+//        //查询列表数据
+//        List<WzHouseMaintenaCostEntity> alllist = wzHouseMaintenaCostService.queryList1(pageMap.getMap());
+//        //全省节点
+//        HouseCostVo province = new HouseCostVo();
+//        province.setCounty("全省");
+//        province.setCity("全省");
+//
+//        double aProjectCost = 0l;
+//        double aSmallCost = 0l;
+//        double aWarnCost = 0l;
+//        double aProCost = 0l;
+//        double aOtherCost = 0l;
+//        double aAllCost = 0l;
+//        //按地市进行划分
+//        Map<String, List<WzHouseMaintenaCostEntity>> cityMap = new HashMap<>();
+//        for (WzHouseMaintenaCostEntity entity : alllist) {
+//            if (entity.getCity() == null) continue;
+//            List<WzHouseMaintenaCostEntity> list;
+//            if (cityMap.get(entity.getCity()) != null) {
+//                list = cityMap.get(entity.getCity());
+//                list.add(entity);
+//            } else {
+//                list = new ArrayList<>();
+//                list.add(entity);
+//            }
+//            cityMap.put(entity.getCity(), list);
+//        }
+//        //按区进行划分
+//        List<HouseCostVo> resultList = new ArrayList<>();
+//        List<HouseCostVo> cityList = new ArrayList<>();
+//        for (Map.Entry<String, List<WzHouseMaintenaCostEntity>> entry : cityMap.entrySet()) {
+//            List<WzHouseMaintenaCostEntity> list = entry.getValue();
+//            //县的Map集合
+//            Map<String, List<WzHouseMaintenaCostEntity>> countyMap = new HashMap<>();
+//            for (WzHouseMaintenaCostEntity leaveUseVo : list) {
+//                if (countyMap.get(leaveUseVo.getCounty()) != null) {
+//                    list = countyMap.get(leaveUseVo.getCounty());
+//                    list.add(leaveUseVo);
+//                } else {
+//                    list = new ArrayList<>();
+//                    list.add(leaveUseVo);
+//                }
+//                countyMap.put(leaveUseVo.getCounty(), list);
+//            }
+//
+//            List<HouseCostVo> countyList = new ArrayList<>();
+//            double cityProjectCost = 0l;
+//            double citySmallCost = 0l;
+//            double cityWarnCost = 0l;
+//            double cityProCost = 0l;
+//            double cityOtherCost = 0l;
+//            double cityAllCost = 0l;
+//            for (Map.Entry<String, List<WzHouseMaintenaCostEntity>> countyEntry : countyMap.entrySet()) {
+//                double projectCost = 0l;
+//                double smallCost = 0l;
+//                double warnCost = 0l;
+//                double proCost = 0l;
+//                double otherCost = 0l;
+//                double allCost = 0l;
+//
+//                HouseCostVo county = new HouseCostVo();
+//                for (WzHouseMaintenaCostEntity leaveUseVo : countyEntry.getValue()) {
+//                    county.setCity(leaveUseVo.getCounty());
+//                    if (leaveUseVo.getRepairType().equals("项目制维修")) {
+//                        projectCost += leaveUseVo.getErpCreditedAmount();
+//                        cityProjectCost += leaveUseVo.getErpCreditedAmount();
+//                        aProjectCost += leaveUseVo.getErpCreditedAmount();
+//                        allCost +=leaveUseVo.getErpCreditedAmount();
+//                        cityAllCost +=leaveUseVo.getErpCreditedAmount();
+//                        aAllCost +=leaveUseVo.getErpCreditedAmount();
+//                    } else if (leaveUseVo.getRepairType().equals("零星维修")) {
+//                        smallCost += leaveUseVo.getErpCreditedAmount();
+//                        citySmallCost += leaveUseVo.getErpCreditedAmount();
+//                        aSmallCost += leaveUseVo.getErpCreditedAmount();
+//                        allCost +=leaveUseVo.getErpCreditedAmount();
+//                        cityAllCost +=leaveUseVo.getErpCreditedAmount();
+//                        aAllCost +=leaveUseVo.getErpCreditedAmount();
+//                    } else if (leaveUseVo.getRepairType().equals("应急维修")) {
+//                        warnCost += leaveUseVo.getErpCreditedAmount();
+//                        cityWarnCost += leaveUseVo.getErpCreditedAmount();
+//                        aWarnCost += leaveUseVo.getErpCreditedAmount();
+//                        allCost +=leaveUseVo.getErpCreditedAmount();
+//                        cityAllCost +=leaveUseVo.getErpCreditedAmount();
+//                        aAllCost +=leaveUseVo.getErpCreditedAmount();
+//                    } else if (leaveUseVo.getRepairType().equals("安防费用")) {
+//                        proCost += leaveUseVo.getErpCreditedAmount();
+//                        cityProCost += leaveUseVo.getErpCreditedAmount();
+//                        aProCost += leaveUseVo.getErpCreditedAmount();
+//                        allCost +=leaveUseVo.getErpCreditedAmount();
+//                        cityAllCost +=leaveUseVo.getErpCreditedAmount();
+//                        aAllCost +=leaveUseVo.getErpCreditedAmount();
+//                    } else {
+//                        if(leaveUseVo.getRepairType().contains("预提冲销")){
+//                            continue;
+//                        }
+//                        otherCost += leaveUseVo.getErpCreditedAmount();
+//                        cityOtherCost += leaveUseVo.getErpCreditedAmount();
+//                        aOtherCost += leaveUseVo.getErpCreditedAmount();
+//                    }
+////                    allCost += projectCost + smallCost + warnCost + proCost + otherCost;
+////                    cityAllCost += cityProjectCost + citySmallCost + cityWarnCost + cityProCost + cityOtherCost;
+////                    aAllCost += aProjectCost + aSmallCost + aWarnCost + aProCost + aOtherCost;
+//
+//                }
+//                county.setProjectCost(formatDouble(projectCost));
+//                county.setProCost(formatDouble(proCost));
+//                county.setOtherCost(formatDouble(otherCost));
+//                county.setSmallCost(formatDouble(smallCost));
+//                county.setWarnCost(formatDouble(warnCost));
+//                county.setAllCost(formatDouble(allCost));
+//                countyList.add(county);
+//            }
+//
+//            List<HouseCostVo> orderCountyList = new ArrayList<>();
+//            try {
+//                //对countList 进行排序
+//                String city = list.get(0).getCity();
+//                if (city.contains("市")) {
+//                    city = city.split("市")[0];
+//                }
+//                OtnAreaEntity area = otnAreaService.queryObject(city);
+//                List<OtnAreaEntity> countyAreaList = otnAreaService.getCityOption(area.getId());
+//                int i=0;
+//                for (OtnAreaEntity otnAreaEntity : countyAreaList) {
+//                    for (HouseCostVo wzCity : countyList) {
+//                        if (otnAreaEntity.getName().equals(wzCity.getCity())) {
+//                            i++;
+//                            wzCity.setFlag(i%2==0);
+//                            orderCountyList.add(wzCity);
+//                        }
+//                    }
+//                }
+//            } catch (Exception e) {
+//                orderCountyList = countyList;
+//                e.printStackTrace();
+//            }
+//
+//            HouseCostVo parent = new HouseCostVo();
+//            parent.setProCost(formatDouble(cityProCost));
+//            parent.setWarnCost(formatDouble(cityWarnCost));
+//            parent.setProjectCost(formatDouble(cityProjectCost));
+//            parent.setOtherCost(formatDouble(cityOtherCost));
+//            parent.setSmallCost(formatDouble(citySmallCost));
+//            parent.setAllCost(formatDouble(cityAllCost));
+//            parent.setCity(list.get(0).getCity());
+//            parent.setChildren(orderCountyList);
+//            cityList.add(parent);
+//        }
+//
+//        //对cityList 进行排序
+//        List<OtnAreaEntity> areaList = otnAreaService.getCityOption("018");
+//        List<HouseCostVo> orderList = new ArrayList<>();
+//        int i=0;
+//        for (OtnAreaEntity otnAreaEntity : areaList) {
+//            for (HouseCostVo wzCity : cityList) {
+//                if (wzCity.getCity().contains(otnAreaEntity.getName())) {
+//                    wzCity.setFlag(i%2==0);
+//                    orderList.add(wzCity);
+//                    i++;
+//                }
+//            }
+//        }
+//
+//        province.setChildren(orderList);
+//        province.setAllCost(formatDouble(aAllCost));
+//        province.setSmallCost(formatDouble(aSmallCost));
+//        province.setOtherCost(formatDouble(aOtherCost));
+//        province.setProjectCost(formatDouble(aProjectCost));
+//        province.setProCost(formatDouble(aProCost));
+//        province.setWarnCost(formatDouble(aWarnCost));
+//        resultList.add(province);
+//
+//        PageUtils pageUtil = new PageUtils(resultList, 0, 10, 10);
+//        return R.ok().put("page", pageUtil);
+//    }
 
     /**
      * 同维修内容频次统计
@@ -363,9 +363,9 @@ public class WzHouseMaintenaCostController {
             map.put("county", county);
         }
 
-        DateFormat df = new SimpleDateFormat("yyyyMMdd");
+        DateFormat df = new SimpleDateFormat("yyyyMMddHHmmss");
         ExcelExport ee1 = new ExcelExport("报表" + df.format(new Date()));
-        //判定是闲置管理还是详情
+        //判定是闲置管理还是记录
         if (name.contains("相同维修频次统计")) {
             ee1 = new ExcelExport("维修异常监控_相同维修频次统计" + df.format(new Date()));
             responseTab1(df, ee1, map);
@@ -391,7 +391,7 @@ public class WzHouseMaintenaCostController {
             responseTab6(df,ee1,map);
             ee1.export(response);
         }else if (name.contains("维修费详表")){
-            ee1 = new ExcelExport("房屋维修_维修费详情" + df.format(new Date()));
+            ee1 = new ExcelExport("房屋维修_维修费记录" + df.format(new Date()));
             responseTab7(df,ee1,map);
             ee1.export(response);
         }

+ 1 - 1
src/main/java/com/example/controller/WzHouseUseController.java

@@ -231,7 +231,7 @@ public class WzHouseUseController {
             map1.put("county",county);
         }
 
-        DateFormat df = new SimpleDateFormat("yyyyMMdd");
+        DateFormat df = new SimpleDateFormat("yyyyMMddHHmmss");
         ExcelExport ee1 = new ExcelExport("报表" + df.format(new Date()));
 
         //判定是闲置管理还是记录

+ 1 - 1
src/main/java/com/example/controller/WzLandManageDetailsController.java

@@ -352,7 +352,7 @@ public class WzLandManageDetailsController {
     @IgnoreAuth
     public void excel(String name,String buildingNameAlias,String city,String county, HttpServletResponse response) {
 
-        DateFormat df = new SimpleDateFormat("yyyyMMdd");
+        DateFormat df = new SimpleDateFormat("yyyyMMddHHmmss");
         ExcelExport ee1 = new ExcelExport("报表" + df.format(new Date()));
         Map<String,Object> map=new HashMap<>();
         if(buildingNameAlias!=null){

+ 1 - 1
src/main/java/com/example/controller/WzLowestUnitPriceController.java

@@ -86,7 +86,7 @@ public class WzLowestUnitPriceController {
         resultList = resultList.stream().sorted(Comparator.comparing(WzLowestUnitPriceEntity::getPrice)).collect(Collectors.toList());
         Collections.reverse(resultList);//反转顺序
 
-        DateFormat df = new SimpleDateFormat("yyyyMMdd");
+        DateFormat df = new SimpleDateFormat("yyyyMMddHHmmss");
         ExcelExport ee1 = new ExcelExport("出租监控_每类地段每平米出租单价最低TOP10" + df.format(new Date()));
 
         List<Object> colList;

+ 1 - 1
src/main/java/com/example/controller/WzRentHouseArrearsController.java

@@ -73,7 +73,7 @@ public class WzRentHouseArrearsController {
         }
         List<WzRentHouseArrearsEntity> resultList = wzRentHouseArrearsService.queryList(map);
 
-        DateFormat df = new SimpleDateFormat("yyyyMMdd");
+        DateFormat df = new SimpleDateFormat("yyyyMMddHHmmss");
         ExcelExport ee1 = new ExcelExport("出租监控_出租房屋欠费超5万元" + df.format(new Date()));
 
         List<Object> colList;

+ 1 - 1
src/main/java/com/example/controller/WzRentThreeMonthController.java

@@ -72,7 +72,7 @@ public class WzRentThreeMonthController {
         }
         List<WzRentThrMonthEntity> resultList = wzRentThreeMonthService.queryList(map);
 
-        DateFormat df = new SimpleDateFormat("yyyyMMdd");
+        DateFormat df = new SimpleDateFormat("yyyyMMddHHmmss");
         ExcelExport ee1 = new ExcelExport("出租监控_出租房屋连续3个月存在欠款" + df.format(new Date()));
 
         List<Object> colList;

+ 1 - 1
src/main/java/com/example/controller/WzScoreRankingController.java

@@ -158,7 +158,7 @@ public class WzScoreRankingController {
             map2.put("county",county);
         }
 
-        DateFormat df = new SimpleDateFormat("yyyyMMdd");
+        DateFormat df = new SimpleDateFormat("yyyyMMddHHmmss");
         ExcelExport ee1;
 
         //判定是闲置管理还是记录

+ 48 - 5
src/main/java/com/example/controller/house/HouseWzHouseMaintenaCostController.java

@@ -2,13 +2,19 @@ package com.example.controller.house;
 
 import com.example.common.PageVo;
 import com.example.common.Rsp;
+import com.example.pojo.dto.BuildingRepairStatDto;
 import com.example.pojo.dto.ListBuildingHighRepairDto;
 import com.example.pojo.dto.ListBuildingHighSporadicRepairDto;
+import com.example.pojo.dto.ListBuildingIdleRepairDto;
+import com.example.pojo.dto.ListBuildingRepairMonthDto;
 import com.example.pojo.dto.ListBuildingSameRepairFrequencyDto;
 import com.example.pojo.dto.ListSiteNameDto;
 import com.example.pojo.dto.ListSiteNumDto;
+import com.example.pojo.vo.BuildingRepairStatVo;
 import com.example.pojo.vo.ListBuildingHighRepairVo;
 import com.example.pojo.vo.ListBuildingHighSporadicRepairVo;
+import com.example.pojo.vo.ListBuildingIdleRepairVo;
+import com.example.pojo.vo.ListBuildingRepairMonthVo;
 import com.example.pojo.vo.ListBuildingSameRepairFrequencyVo;
 import com.example.service.house.HouseWzHouseMaintenaCostService;
 import io.swagger.v3.oas.annotations.Operation;
@@ -22,7 +28,7 @@ import org.springframework.web.bind.annotation.RestController;
 
 import javax.validation.Valid;
 
-@Tag(name = "不动产管理策略-维修异常监控")
+@Tag(name = "不动产维修")
 @Slf4j
 @RequestMapping("/house-car/house/dist/api/wzHouseMaintenaCost")
 @RestController
@@ -41,19 +47,20 @@ public class HouseWzHouseMaintenaCostController {
 
     @Operation(summary = "高总价统计导出")
     @GetMapping("/queryHighPriceExport")
-    public void queryHighPriceExport(@Valid ListBuildingHighRepairDto dto) {
+    public void queryHighPriceExport(@Valid ListBuildingHighRepairDto.ListBuildingHighRepairMapDTO dto) {
         houseWzHouseMaintenaCostService.queryHighPriceExport(dto);
     }
 
     @Operation(summary = "相同维修频次统计")
     @PostMapping("/queryHighFrequency")
-    public Rsp<PageVo<ListBuildingSameRepairFrequencyVo>> queryHighFrequency(@Valid @RequestBody ListBuildingSameRepairFrequencyDto dto) {
+    public Rsp<PageVo<ListBuildingSameRepairFrequencyVo>> queryHighFrequency(
+            @Valid @RequestBody ListBuildingSameRepairFrequencyDto dto) {
         return houseWzHouseMaintenaCostService.queryHighFrequency(dto);
     }
 
     @Operation(summary = "相同维修频次统计导出")
     @GetMapping("/queryHighFrequencyExport")
-    public void queryHighFrequencyExport(@Valid ListBuildingSameRepairFrequencyDto dto) {
+    public void queryHighFrequencyExport(@Valid ListBuildingSameRepairFrequencyDto.ListBuildingSameRepairFrequencyMapDTO dto) {
         houseWzHouseMaintenaCostService.queryHighFrequencyExport(dto);
     }
 
@@ -65,7 +72,7 @@ public class HouseWzHouseMaintenaCostController {
 
     @Operation(summary = "高额日常零星维修导出")
     @GetMapping("/queryDailyModifyExport")
-    public void queryDailyModifyExport(@Valid ListBuildingHighSporadicRepairDto dto) {
+    public void queryDailyModifyExport(@Valid ListBuildingHighSporadicRepairDto.ListBuildingHighSporadicRepairMapDTO dto) {
         houseWzHouseMaintenaCostService.queryDailyModifyExport(dto);
     }
 
@@ -80,4 +87,40 @@ public class HouseWzHouseMaintenaCostController {
     public Rsp<PageVo<String>> listSiteNum(@RequestBody ListSiteNumDto dto) {
         return houseWzHouseMaintenaCostService.listSiteNum(dto);
     }
+
+    @Operation(summary = "闲置不可用发生维修费")
+    @PostMapping("/list")
+    public Rsp<PageVo<ListBuildingIdleRepairVo>> listBuildingIdleRepair(@Valid @RequestBody ListBuildingIdleRepairDto dto) {
+        return houseWzHouseMaintenaCostService.listBuildingIdleRepair(dto);
+    }
+
+    @Operation(summary = "闲置不可用发生维修费导出")
+    @GetMapping("/buildingIdleRepairExport")
+    public void buildingIdleRepairExport(@Valid ListBuildingIdleRepairDto.ListBuildingIdleRepairDTO dto) {
+        houseWzHouseMaintenaCostService.buildingIdleRepairExport(dto);
+    }
+
+    @Operation(summary = "查询维修费统计")
+    @PostMapping("/queryEchart")
+    public Rsp<PageVo<BuildingRepairStatVo>> buildingRepairStat(@Valid @RequestBody BuildingRepairStatDto dto) {
+        return houseWzHouseMaintenaCostService.buildingRepairStat(dto);
+    }
+
+    @Operation(summary = "维修费统计导出")
+    @GetMapping("/buildingRepairStatExport")
+    public void buildingRepairStatExport(@Valid BuildingRepairStatDto.BuildingRepairStatMapDTO dto) {
+        houseWzHouseMaintenaCostService.buildingRepairStatExport(dto);
+    }
+
+    @Operation(summary = "查询维修费记录")
+    @PostMapping("/list1")
+    public Rsp<PageVo<ListBuildingRepairMonthVo>> listBuildingRepairMonth(@Valid @RequestBody ListBuildingRepairMonthDto dto) {
+        return houseWzHouseMaintenaCostService.listBuildingRepairMonth(dto);
+    }
+
+    @Operation(summary = "维修费记录导出")
+    @GetMapping("/listBuildingRepairMonthExport")
+    public void listBuildingRepairMonthExport(@Valid ListBuildingRepairMonthDto.ListBuildingRepairMonthMapDTO dto) {
+        houseWzHouseMaintenaCostService.listBuildingRepairMonthExport(dto);
+    }
 }

+ 176 - 0
src/main/java/com/example/dao/house/HouseBuildingRepairDao.java

@@ -0,0 +1,176 @@
+package com.example.dao.house;
+
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.example.entity.house.BuildingRepairMonthPo;
+import com.example.entity.house.BuildingRepairStatPo;
+import com.example.pojo.bo.BuildingRepairStatBo;
+import com.example.pojo.bo.ListBuildingRepairMonthBo;
+import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
+import org.apache.ibatis.annotations.Select;
+
+import java.util.List;
+
+@Mapper
+public interface HouseBuildingRepairDao {
+    @Select("""
+<script>
+with
+t101 as (
+select
+    area_no,
+    city_no,
+    sum(case when repair_type = '项目制维修' then final_cost else 0 end) as xmz,
+    sum(case when repair_type = '零星维修' then final_cost else 0 end) as lx,
+    sum(case when repair_type = '应急维修' then final_cost else 0 end) as yj,
+    sum(final_cost) as hj
+from
+    house.building_repair_month
+where
+    year_month <![CDATA[ >= ]]> #{dto.startYearMonth}
+    and year_month <![CDATA[ <= ]]> #{dto.endYearMonth}
+    and repair_type != '财务预提冲销'
+    and area_no is not null
+    and area_no != ''
+    and city_no is not null
+    and city_no != ''
+<if test="dto.areaNo != null and dto.areaNo != ''">
+  and area_no = #{dto.areaNo}
+</if>
+<if test="dto.cityNo != null and dto.cityNo != ''">
+  and city_no = #{dto.cityNo}
+</if>
+<if test="dto.investorName != null and dto.investorName != ''">
+  and investor_name = #{dto.investorName}
+</if>
+group by
+    area_no,
+    city_no
+),
+t102 as (
+select
+    b.id as area_no,
+    b."name" as area_name,
+    a.id as city_no,
+    a."name" as city_name,
+    coalesce(c.xmz, 0) as xmz,
+    coalesce(c.lx, 0) as lx,
+    coalesce(c.yj, 0) as yj,
+    coalesce(c.hj, 0) as hj
+from
+    common.organization a
+left join common.organization b on
+    a.parent_id = b.id
+left join t101 c on
+    a.id = c.city_no
+where
+    a.grade = 2
+    and a.unhide = 1
+<if test="dto.areaNo != null and dto.areaNo != ''">
+  and a.parent_id = #{dto.areaNo}
+</if>
+<if test="dto.cityNo != null and dto.cityNo != ''">
+  and a.id = #{dto.cityNo}
+</if>
+order by
+    b.order_num, a.order_num
+)
+select * from t102
+</script>
+""")
+    List<BuildingRepairStatPo> buildingRepairStat(@Param("dto") BuildingRepairStatBo dto);
+
+    /**
+     * 查询不动产自有房产维修
+     */
+    @Select("""
+<script>
+with
+t101 as (
+select
+a.year_month,
+a.repair_type,
+a.content_category,
+a.final_cost,
+a.investor_name,
+a.jz_jzid,
+a.area_no,
+a.area_name,
+a.city_no,
+a.city_name,
+a.site_id,
+a.site_name,
+a.site_num,
+b.building_name,
+b.building_id,
+b.first_unit,
+b.address,
+b.city_level,
+b.city_region,
+b.area_sector,
+b.has_land,
+b.housing_acquisition_rate,
+b.housing_source,
+b.acquisition_date,
+b.house_year_began,
+b.management_level,
+b.building_structure,
+b.total_floors,
+b.assets_num,
+b.assets_tag_num,
+b.usage_status,
+b.building_use,
+b.ownership_status,
+b.floor_area,
+b.building_area,
+b.building_area_self_use,
+b.building_area_rent,
+b.building_area_idle,
+b.building_area_unusable,
+b.usable_area,
+b.usable_area_self_use,
+b.usable_area_rent,
+b.usable_area_idle,
+b.usable_area_unusable,
+b.house_age,
+case
+    when (coalesce(b.building_area_self_use, 0) + coalesce(b.building_area_rent, 0)) = 0 then null
+    else round(a.final_cost / (coalesce(b.building_area_self_use, 0) + coalesce(b.building_area_rent, 0)),
+    2)
+end as repair_unit_price
+from
+    house.building_repair_month a
+left join house.building_month b on
+    a.jz_jzid = b.building_id
+    and a.year_month = b.year_month
+<choose>
+  <when test="dto.yearMonth != null">
+    where a.year_month = #{dto.yearMonth}
+  </when>
+  <otherwise>
+    where a.year_month = (select max(year_month) from house.building_repair_month)
+  </otherwise>
+</choose>
+and a.final_cost is not null
+<if test="dto.areaNo != null and dto.areaNo != ''">
+  and a.area_no = #{dto.areaNo}
+</if>
+<if test="dto.cityNo != null and dto.cityNo != ''">
+  and a.city_no = #{dto.cityNo}
+</if>
+<if test="dto.siteName != null and dto.siteName != ''">
+  and site_name = #{dto.siteName}
+</if>
+<if test="dto.siteNum != null and dto.siteNum != ''">
+  and site_num = #{dto.siteNum}
+</if>
+<if test="dto.investorName != null and dto.investorName != ''">
+  and a.investor_name = #{dto.investorName}
+</if>
+)
+select * from t101
+</script>
+""")
+    List<BuildingRepairMonthPo> listBuildingRepairMonth(Page<BuildingRepairMonthPo> page,
+                                                        @Param("dto") ListBuildingRepairMonthBo dto);
+}

+ 37 - 0
src/main/java/com/example/dao/house/HouseRepairExceptionDao.java

@@ -3,9 +3,11 @@ package com.example.dao.house;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.example.entity.house.HouseBuildingHighRepairPo;
 import com.example.entity.house.HouseBuildingHighSporadicRepairPo;
+import com.example.entity.house.HouseBuildingIdleRepairPo;
 import com.example.entity.house.HouseBuildingSameRepairFrequencyPo;
 import com.example.pojo.bo.ListBuildingHighRepairBo;
 import com.example.pojo.bo.ListBuildingHighSporadicRepairBo;
+import com.example.pojo.bo.ListBuildingIdleRepairBo;
 import com.example.pojo.bo.ListBuildingSameRepairFrequencyBo;
 import org.apache.ibatis.annotations.Mapper;
 import org.apache.ibatis.annotations.Param;
@@ -120,4 +122,39 @@ from house.building_high_sporadic_repair
 """)
     List<HouseBuildingHighSporadicRepairPo> ListBuildingHighSporadicRepair(
             Page<HouseBuildingHighSporadicRepairPo> page, @Param("dto") ListBuildingHighSporadicRepairBo dto);
+
+    /**
+     * 查询不动产自有房产闲置不可用发生维修费
+     */
+    @Select("""
+<script>
+select
+*
+from house.building_idle_repair
+<where>
+  <choose>
+    <when test="dto.yearMonth != null">
+      year_month = #{dto.yearMonth}
+    </when>
+    <otherwise>
+      year_month = (select max(year_month) from house.building_high_repair)
+    </otherwise>
+  </choose>
+  <if test="dto.areaNo != null and dto.areaNo != ''">
+    and area_no = #{dto.areaNo}
+  </if>
+  <if test="dto.cityNo != null and dto.cityNo != ''">
+    and city_no = #{dto.cityNo}
+  </if>
+  <if test="dto.siteNum != null and dto.siteNum != ''">
+    and site_num = #{dto.siteNum}
+  </if>
+  <if test="dto.siteName != null and dto.siteName != ''">
+    and site_name = #{dto.siteName}
+  </if>
+</where>
+</script>
+""")
+    List<HouseBuildingIdleRepairPo> listBuildingIdleRepair(Page<HouseBuildingIdleRepairPo> page,
+                                                           @Param("dto") ListBuildingIdleRepairBo dto);
 }

+ 248 - 0
src/main/java/com/example/entity/house/BuildingRepairMonthPo.java

@@ -0,0 +1,248 @@
+package com.example.entity.house;
+
+import lombok.Data;
+
+import java.math.BigDecimal;
+
+@Data
+public class BuildingRepairMonthPo {
+    /**
+     * 数据年月
+     */
+    private Integer yearMonth;
+
+    /**
+     * 建筑ID
+     */
+    private String buildingId;
+
+    /**
+     * 建筑id维修
+     */
+    private String jzJzid;
+
+    /**
+     * 资产所属单位(一级)
+     */
+    private String firstUnit;
+
+    /**
+     * 资产所属单位(二级)
+     */
+    private String secondUnit;
+
+    /**
+     * 资产所属单位(三级)
+     */
+    private String thirdUnit;
+
+    /**
+     * 局址编号
+     */
+    private String siteNum;
+
+    /**
+     * 局址别名
+     */
+    private String siteName;
+
+    /**
+     * 维修类型
+     */
+    private String repairType;
+
+    /**
+     * 维修内容分类
+     */
+    private String contentCategory;
+
+    /**
+     * 决算金额
+     */
+    private BigDecimal finalCost;
+
+    /**
+     * 标准地址
+     */
+    private String address;
+
+    /**
+     * 城市等级
+     */
+    private String cityLevel;
+
+    /**
+     * 城市区域
+     */
+    private String cityRegion;
+
+    /**
+     * 地段
+     */
+    private String areaSector;
+
+    /**
+     * 是否有土地资产
+     */
+    private String hasLand;
+
+    /**
+     * 局址ID
+     */
+    private String siteId;
+
+    /**
+     * 建筑别名
+     */
+    private String buildingName;
+
+    /**
+     * 得房率
+     */
+    private BigDecimal housingAcquisitionRate;
+
+    /**
+     * 房屋来源
+     */
+    private String housingSource;
+
+    /**
+     * 取得日期
+     */
+    private String acquisitionDate;
+
+    /**
+     * 房龄开始年份
+     */
+    private Integer houseYearBegan;
+
+    /**
+     * 投资主体
+     */
+    private String investorName;
+
+    /**
+     * 管理层级
+     */
+    private String managementLevel;
+
+    /**
+     * 房屋结构
+     */
+    private String buildingStructure;
+
+    /**
+     * 楼层总数
+     */
+    private String totalFloors;
+
+    /**
+     * 资产编号
+     */
+    private String assetsNum;
+
+    /**
+     * 资产标签号
+     */
+    private String assetsTagNum;
+
+    /**
+     * 使用状态
+     */
+    private String usageStatus;
+
+    /**
+     * 建筑用途
+     */
+    private String buildingUse;
+
+    /**
+     * 权属状态
+     */
+    private String ownershipStatus;
+
+    /**
+     * 建筑占地面积(㎡)
+     */
+    private BigDecimal floorArea;
+
+    /**
+     * 建筑面积(㎡)
+     */
+    private BigDecimal buildingArea;
+
+    /**
+     * 建筑面积-自用(㎡)
+     */
+    private BigDecimal buildingAreaSelfUse;
+
+    /**
+     * 建筑面积-出租(㎡)
+     */
+    private BigDecimal buildingAreaRent;
+
+    /**
+     * 建筑面积-闲置(㎡)
+     */
+    private BigDecimal buildingAreaIdle;
+
+    /**
+     * 建筑面积-不可使用(㎡)
+     */
+    private BigDecimal buildingAreaUnusable;
+
+    /**
+     * 使用面积(㎡)
+     */
+    private BigDecimal usableArea;
+
+    /**
+     * 使用面积-自用(㎡)
+     */
+    private BigDecimal usableAreaSelfUse;
+
+    /**
+     * 使用面积-出租(㎡)
+     */
+    private BigDecimal usableAreaRent;
+
+    /**
+     * 使用面积-闲置(㎡)
+     */
+    private BigDecimal usableAreaIdle;
+
+    /**
+     * 使用面积-不可使用(㎡)
+     */
+    private BigDecimal usableAreaUnusable;
+
+    /**
+     * 二级组织机构编码
+     */
+    private String areaNo;
+
+    /**
+     * 二级组织机构名称
+     */
+    private String areaName;
+
+    /**
+     * 三级组织机构编码
+     */
+    private String cityNo;
+
+    /**
+     * 三级组织机构名称
+     */
+    private String cityName;
+
+    /**
+     * 房龄
+     */
+    private Integer houseAge;
+
+    /**
+     * 每平米维修单价
+     */
+    private BigDecimal repairUnitPrice;
+}

+ 79 - 0
src/main/java/com/example/entity/house/BuildingRepairStatPo.java

@@ -0,0 +1,79 @@
+package com.example.entity.house;
+
+import lombok.Data;
+
+import java.math.BigDecimal;
+import java.util.ArrayList;
+import java.util.List;
+
+@Data
+public class BuildingRepairStatPo {
+    /**
+     * 二级组织机构编码
+     */
+    private String areaNo;
+    /**
+     * 二级组织机构名称
+     */
+    private String areaName;
+    /**
+     * 三级组织机构编码
+     */
+    private String cityNo;
+    /**
+     * 三级组织机构名称
+     */
+    private String cityName;
+    /**
+     * 项目制维修
+     */
+    private BigDecimal xmz;
+    /**
+     * 零星维修
+     */
+    private BigDecimal lx;
+    /**
+     * 应急维修
+     */
+    private BigDecimal yj;
+    /**
+     * 合计
+     */
+    private BigDecimal hj;
+    /**
+     * 子列表
+     */
+    private List<BuildingRepairStatPo> children;
+
+    public BuildingRepairStatPo() {
+        this.areaNo = "";
+        this.areaName = "";
+        this.cityNo = "";
+        this.cityName = "";
+        this.xmz = BigDecimal.ZERO;
+        this.lx = BigDecimal.ZERO;
+        this.yj = BigDecimal.ZERO;
+        this.hj = BigDecimal.ZERO;
+        this.children = new ArrayList<>();
+    }
+
+    public BuildingRepairStatPo(String areaNo, String areaName) {
+        this.areaNo = areaNo;
+        this.areaName = areaName;
+        this.cityNo = areaNo;
+        this.cityName = areaName;
+        this.xmz = BigDecimal.ZERO;
+        this.lx = BigDecimal.ZERO;
+        this.yj = BigDecimal.ZERO;
+        this.hj = BigDecimal.ZERO;
+        this.children = new ArrayList<>();
+    }
+
+    public void update(BuildingRepairStatPo po) {
+        this.xmz = this.xmz.add(po.xmz);
+        this.lx = this.lx.add(po.lx);
+        this.yj = this.yj.add(po.yj);
+        this.hj = this.hj.add(po.hj);
+        this.children.add(po);
+    }
+}

+ 71 - 0
src/main/java/com/example/enums/ListBuildingIdleRepairOrderEnum.java

@@ -0,0 +1,71 @@
+package com.example.enums;
+
+public enum ListBuildingIdleRepairOrderEnum {
+    /**
+     * 入账日期
+     */
+    statisticalMonth("year_month"),
+    /**
+     * 二级单位
+     */
+    city("area_name"),
+    /**
+     * 三级单位
+     */
+    county("city_name"),
+    /**
+     * 建筑别名
+     */
+    buildingAlias("building_name"),
+    /**
+     * 维修类型
+     */
+    repairType("repair_type"),
+    /**
+     * 维修内容
+     */
+    repairContent("repair_content"),
+    /**
+     * erp入账金额元
+     */
+    erpCreditedAmount("amount"),
+    /**
+     * 标准地址
+     */
+    standardAddress("address"),
+    /**
+     * 使用状态
+     */
+    useState("usage_status"),
+    /**
+     * 建筑面积
+     */
+    buildingArea("building_area"),
+    /**
+     * 建筑面积自用
+     */
+    buildingAreaUseArea("building_area_self_use"),
+    /**
+     * 建筑面积出租
+     */
+    buildingAreaRentArea("building_area_rent"),
+    /**
+     * 建筑面积闲置
+     */
+    buildingAreaIdelArea("building_area_idle"),
+    /**
+     * 建筑面积不可使用
+     */
+    buildingAreaUnavailable("building_area_unavailable"),
+    ;
+
+    private final String columnName;
+
+    ListBuildingIdleRepairOrderEnum(String columnName) {
+        this.columnName = columnName;
+    }
+
+    public String getColumnName() {
+        return columnName;
+    }
+}

+ 191 - 0
src/main/java/com/example/enums/ListBuildingRepairMonthOrderEnum.java

@@ -0,0 +1,191 @@
+package com.example.enums;
+
+public enum ListBuildingRepairMonthOrderEnum {
+    /**
+     * 一级单位
+     */
+    province("first_unit"),
+    /**
+     * 二级单位
+     */
+    city("area_name"),
+    /**
+     * 三级单位
+     */
+    county("city_name"),
+    /**
+     * 建筑id基本信息
+     */
+    buildingId("building_id"),
+    /**
+     * 建筑id维修
+     */
+    jzJzid("jz_jzid"),
+    /**
+     * 入账日期
+     */
+    statisticalMonth("year_month"),
+    /**
+     * 维修类型
+     */
+    repairType("repair_type"),
+    /**
+     * 维修内容
+     */
+    repairContent("content_category"),
+    /**
+     * erp入账金额元
+     */
+    erpCreditedAmount("final_cost"),
+    /**
+     * 每平方米维修单价
+     */
+    averagePrice("repair_unit_price"),
+    /**
+     * 局址编号
+     */
+    buildingAddressNumber("site_num"),
+    /**
+     * 局址别名
+     */
+    buildingNnameAlias("site_name"),
+    /**
+     * 标准地址
+     */
+    standardAddress("address"),
+    /**
+     * 城市等级
+     */
+    cityGrade("city_level"),
+    /**
+     * 城市区域
+     */
+    cityArea("city_region"),
+    /**
+     * 投资主体
+     */
+    investmentEntity("investor_name"),
+    /**
+     * 管理层级
+     */
+    managementHierarchy("management_level"),
+    /**
+     * 房屋结构
+     */
+    buildingStructure("building_structure"),
+    /**
+     * 使用状态
+     */
+    useState("usage_status"),
+    /**
+     * 建筑用途
+     */
+    buildingUse("building_use"),
+    /**
+     * 权属状态
+     */
+    ownershipStatus("ownership_status"),
+    /**
+     * 建筑别名
+     */
+    buildingAias("building_name"),
+    /**
+     * 建筑占地面积(㎡)
+     */
+    buildingFloorArea("floor_area"),
+    /**
+     * 建筑面积
+     */
+    buildingArea("building_area"),
+    /**
+     * 建筑面积自用
+     */
+    buildingAreaUseArea("building_area_self_use"),
+    /**
+     * 建筑面积出租
+     */
+    buildingAreaRentArea("building_area_rent"),
+    /**
+     * 建筑面积闲置
+     */
+    buildingAreaIdelArea("building_area_idle"),
+    /**
+     * 建筑面积不可使用
+     */
+    buildingAreaUnavailable("building_area_unusable"),
+    /**
+     * 使用面积(㎡)
+     */
+    useArea("usable_area"),
+    /**
+     * 使用面积-自用(㎡)
+     */
+    useAreaSelfUseArea("usable_area_self_use"),
+    /**
+     * 使用面积-出租(㎡)
+     */
+    useAreaRentArea("usable_area_rent"),
+    /**
+     * 使用面积-闲置(㎡)
+     */
+    useAreaIdelArea("usable_area_idle"),
+    /**
+     * 使用面积-不可使用(㎡)
+     */
+    useAreaUnavailableArea("usable_area_unusable"),
+    /**
+     * 得房率
+     */
+    housingAcquisitionRate("housing_acquisition_rate"),
+    /**
+     * 房屋来源
+     */
+    housingSource("housing_source"),
+    /**
+     * 取得日期
+     */
+    acquisitionDate("acquisition_date"),
+    /**
+     * 房龄开始年份
+     */
+    houseYearBegan("house_year_began"),
+    /**
+     * 房龄
+     */
+    houseAge("house_age"),
+    /**
+     * 楼层总数
+     */
+    totalFloors("total_floors"),
+    /**
+     * 资产编号
+     */
+    assetsNum("assets_num"),
+    /**
+     * 资产标签号
+     */
+    assetsTagNum("assets_tag_num"),
+    /**
+     * 地段
+     */
+    areaSector("area_sector"),
+    /**
+     * 是否有土地资产
+     */
+    hasLand("has_land"),
+    /**
+     * 局址id
+     */
+    siteId("site_id"),
+    ;
+
+    private final String columnName;
+
+    ListBuildingRepairMonthOrderEnum(String columnName) {
+        this.columnName = columnName;
+    }
+
+    public String getColumnName() {
+        return columnName;
+    }
+}

+ 27 - 0
src/main/java/com/example/pojo/bo/BuildingRepairStatBo.java

@@ -0,0 +1,27 @@
+package com.example.pojo.bo;
+
+import lombok.Data;
+
+@Data
+public class BuildingRepairStatBo {
+    /**
+     * 开始年月
+     */
+    private Integer startYearMonth;
+    /**
+     * 结束年月
+     */
+    private Integer endYearMonth;
+    /**
+     * 二级组织机构编码
+     */
+    private String areaNo;
+    /**
+     * 三级组织机构编码
+     */
+    private String cityNo;
+    /**
+     * 投资主体
+     */
+    private String investorName;
+}

+ 27 - 0
src/main/java/com/example/pojo/bo/ListBuildingIdleRepairBo.java

@@ -0,0 +1,27 @@
+package com.example.pojo.bo;
+
+import lombok.Data;
+
+@Data
+public class ListBuildingIdleRepairBo {
+    /**
+     * 账期
+     */
+    private Integer yearMonth;
+    /**
+     * 二级组织机构编码
+     */
+    private String areaNo;
+    /**
+     * 三级组织机构编码
+     */
+    private String cityNo;
+    /**
+     * 局址编号
+     */
+    private String siteNum;
+    /**
+     * 局址别名
+     */
+    private String siteName;
+}

+ 31 - 0
src/main/java/com/example/pojo/bo/ListBuildingRepairMonthBo.java

@@ -0,0 +1,31 @@
+package com.example.pojo.bo;
+
+import lombok.Data;
+
+@Data
+public class ListBuildingRepairMonthBo {
+    /**
+     * 账期
+     */
+    private Integer yearMonth;
+    /**
+     * 二级组织机构编码
+     */
+    private String areaNo;
+    /**
+     * 三级组织机构编码
+     */
+    private String cityNo;
+    /**
+     * 局址编号
+     */
+    private String siteNum;
+    /**
+     * 局址别名
+     */
+    private String siteName;
+    /**
+     * 投资主体
+     */
+    private String investorName;
+}

+ 46 - 0
src/main/java/com/example/pojo/dto/BuildingRepairStatDto.java

@@ -0,0 +1,46 @@
+package com.example.pojo.dto;
+
+import io.swagger.v3.oas.annotations.media.Schema;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+import org.springframework.util.StringUtils;
+
+import javax.validation.Valid;
+import javax.validation.constraints.NotNull;
+import java.net.URLDecoder;
+import java.nio.charset.StandardCharsets;
+
+@NoArgsConstructor
+@Data
+public class BuildingRepairStatDto {
+    @Valid
+    @NotNull
+    private BuildingRepairStatMapDTO map;
+
+    @NoArgsConstructor
+    @Data
+    public static class BuildingRepairStatMapDTO {
+        @Schema(description = "账期", example = "202312")
+        @NotNull
+        private Integer statisticalMonth1;
+        @Schema(description = "二级组织机构id")
+        private String city;
+        @Schema(description = "三级级组织机构id")
+        private String county;
+        @Schema(description = "投资主体")
+        private String investmentEntity;
+    }
+
+    public BuildingRepairStatDto(BuildingRepairStatMapDTO map) {
+        if (StringUtils.hasText(map.city)) {
+            map.city = URLDecoder.decode(map.city, StandardCharsets.UTF_8);
+        }
+        if (StringUtils.hasText(map.county)) {
+            map.county = URLDecoder.decode(map.county, StandardCharsets.UTF_8);
+        }
+        if (StringUtils.hasText(map.investmentEntity)) {
+            map.investmentEntity = URLDecoder.decode(map.investmentEntity, StandardCharsets.UTF_8);
+        }
+        this.map = map;
+    }
+}

+ 2 - 2
src/main/java/com/example/pojo/dto/GetSiteStatDto.java

@@ -17,14 +17,14 @@ public class GetSiteStatDto {
     @NotNull
     private GetSiteStatMapDTO map;
 
-    public GetSiteStatDto(GetSiteStatMapDTO dto) {
+    public GetSiteStatDto(GetSiteStatMapDTO map) {
         if (StringUtils.hasText(map.city)) {
             map.city = URLDecoder.decode(map.city, StandardCharsets.UTF_8);
         }
         if (StringUtils.hasText(map.county)) {
             map.county = URLDecoder.decode(map.county, StandardCharsets.UTF_8);
         }
-        this.map = dto;
+        this.map = map;
     }
 
     @NoArgsConstructor

+ 18 - 0
src/main/java/com/example/pojo/dto/ListBuildingHighRepairDto.java

@@ -6,13 +6,18 @@ import com.example.utils.Page;
 import io.swagger.v3.oas.annotations.media.Schema;
 import lombok.Data;
 import lombok.NoArgsConstructor;
+import org.springframework.util.StringUtils;
 
 import javax.validation.Valid;
+import javax.validation.constraints.NotNull;
+import java.net.URLDecoder;
+import java.nio.charset.StandardCharsets;
 
 @NoArgsConstructor
 @Data
 public class ListBuildingHighRepairDto {
     @Valid
+    @NotNull
     private Page page;
     @Valid
     private ListBuildingHighRepairMapDTO map;
@@ -35,4 +40,17 @@ public class ListBuildingHighRepairDto {
         @Schema(description = "局址编号")
         private String buildingAddressNumber;
     }
+
+    public ListBuildingHighRepairDto(ListBuildingHighRepairMapDTO map) {
+        if (StringUtils.hasText(map.city)) {
+            map.city = URLDecoder.decode(map.city, StandardCharsets.UTF_8);
+        }
+        if (StringUtils.hasText(map.county)) {
+            map.county = URLDecoder.decode(map.county, StandardCharsets.UTF_8);
+        }
+        if (StringUtils.hasText(map.buildingNameAlias)) {
+            map.buildingNameAlias = URLDecoder.decode(map.buildingNameAlias, StandardCharsets.UTF_8);
+        }
+        this.map = map;
+    }
 }

+ 18 - 0
src/main/java/com/example/pojo/dto/ListBuildingHighSporadicRepairDto.java

@@ -6,13 +6,18 @@ import com.example.utils.Page;
 import io.swagger.v3.oas.annotations.media.Schema;
 import lombok.Data;
 import lombok.NoArgsConstructor;
+import org.springframework.util.StringUtils;
 
 import javax.validation.Valid;
+import javax.validation.constraints.NotNull;
+import java.net.URLDecoder;
+import java.nio.charset.StandardCharsets;
 
 @NoArgsConstructor
 @Data
 public class ListBuildingHighSporadicRepairDto {
     @Valid
+    @NotNull
     private Page page;
     @Valid
     private ListBuildingHighSporadicRepairMapDTO map;
@@ -35,4 +40,17 @@ public class ListBuildingHighSporadicRepairDto {
         @Schema(description = "局址编号")
         private String buildingAddressNumber;
     }
+
+    public ListBuildingHighSporadicRepairDto(ListBuildingHighSporadicRepairMapDTO map) {
+        if (StringUtils.hasText(map.city)) {
+            map.city = URLDecoder.decode(map.city, StandardCharsets.UTF_8);
+        }
+        if (StringUtils.hasText(map.county)) {
+            map.county = URLDecoder.decode(map.county, StandardCharsets.UTF_8);
+        }
+        if (StringUtils.hasText(map.buildingNameAlias)) {
+            map.buildingNameAlias = URLDecoder.decode(map.buildingNameAlias, StandardCharsets.UTF_8);
+        }
+        this.map = map;
+    }
 }

+ 56 - 0
src/main/java/com/example/pojo/dto/ListBuildingIdleRepairDto.java

@@ -0,0 +1,56 @@
+package com.example.pojo.dto;
+
+import com.example.enums.ListBuildingIdleRepairOrderEnum;
+import com.example.enums.OrderEnum;
+import com.example.utils.Page;
+import io.swagger.v3.oas.annotations.media.Schema;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+import org.springframework.util.StringUtils;
+
+import javax.validation.Valid;
+import javax.validation.constraints.NotNull;
+import java.net.URLDecoder;
+import java.nio.charset.StandardCharsets;
+
+@NoArgsConstructor
+@Data
+public class ListBuildingIdleRepairDto {
+    @Valid
+    @NotNull
+    private Page page;
+    @Valid
+    private ListBuildingIdleRepairDTO map;
+
+    @NoArgsConstructor
+    @Data
+    public static class ListBuildingIdleRepairDTO {
+        @Schema(description = "账期", example = "202312")
+        private Integer statisticalMonth;
+        @Schema(description = "二级组织机构id")
+        private String city;
+        @Schema(description = "三级级组织机构id")
+        private String county;
+        @Schema(description = "排序字段")
+        private ListBuildingIdleRepairOrderEnum sidx;
+        @Schema(description = "排序方式")
+        private OrderEnum order;
+        @Schema(description = "局址别名")
+        private String buildingNameAlias;
+        @Schema(description = "局址编号")
+        private String buildingAddressNumber;
+    }
+
+    public ListBuildingIdleRepairDto(ListBuildingIdleRepairDTO map) {
+        if (StringUtils.hasText(map.city)) {
+            map.city = URLDecoder.decode(map.city, StandardCharsets.UTF_8);
+        }
+        if (StringUtils.hasText(map.county)) {
+            map.county = URLDecoder.decode(map.county, StandardCharsets.UTF_8);
+        }
+        if (StringUtils.hasText(map.buildingNameAlias)) {
+            map.buildingNameAlias = URLDecoder.decode(map.buildingNameAlias, StandardCharsets.UTF_8);
+        }
+        this.map = map;
+    }
+}

+ 63 - 0
src/main/java/com/example/pojo/dto/ListBuildingRepairMonthDto.java

@@ -0,0 +1,63 @@
+package com.example.pojo.dto;
+
+import com.example.enums.ListBuildingRepairMonthOrderEnum;
+import com.example.enums.OrderEnum;
+import com.example.utils.Page;
+import io.swagger.v3.oas.annotations.media.Schema;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+import org.springframework.util.StringUtils;
+
+import javax.validation.Valid;
+import javax.validation.constraints.NotNull;
+import java.net.URLDecoder;
+import java.nio.charset.StandardCharsets;
+
+@NoArgsConstructor
+@Data
+public class ListBuildingRepairMonthDto {
+    @Valid
+    @NotNull
+    private Page page;
+    @Valid
+    @NotNull
+    private ListBuildingRepairMonthMapDTO map;
+
+    @NoArgsConstructor
+    @Data
+    public static class ListBuildingRepairMonthMapDTO {
+        @Schema(description = "账期", example = "202312")
+        @NotNull
+        private Integer statisticalMonth;
+        @Schema(description = "二级组织机构id")
+        private String city;
+        @Schema(description = "三级级组织机构id")
+        private String county;
+        @Schema(description = "排序字段", example = "erpCreditedAmount")
+        private ListBuildingRepairMonthOrderEnum sidx;
+        @Schema(description = "排序方式", example = "desc")
+        private OrderEnum order;
+        @Schema(description = "局址别名")
+        private String alias;
+        @Schema(description = "局址编号")
+        private String code;
+        @Schema(description = "投资主体")
+        private String investmentEntity;
+    }
+
+    public ListBuildingRepairMonthDto(ListBuildingRepairMonthMapDTO map) {
+        if (StringUtils.hasText(map.city)) {
+            map.city = URLDecoder.decode(map.city, StandardCharsets.UTF_8);
+        }
+        if (StringUtils.hasText(map.county)) {
+            map.county = URLDecoder.decode(map.county, StandardCharsets.UTF_8);
+        }
+        if (StringUtils.hasText(map.alias)) {
+            map.alias = URLDecoder.decode(map.alias, StandardCharsets.UTF_8);
+        }
+        if (StringUtils.hasText(map.getInvestmentEntity())) {
+            map.investmentEntity = URLDecoder.decode(map.getInvestmentEntity(), StandardCharsets.UTF_8);
+        }
+        this.map = map;
+    }
+}

+ 18 - 0
src/main/java/com/example/pojo/dto/ListBuildingSameRepairFrequencyDto.java

@@ -6,13 +6,18 @@ import com.example.utils.Page;
 import io.swagger.v3.oas.annotations.media.Schema;
 import lombok.Data;
 import lombok.NoArgsConstructor;
+import org.springframework.util.StringUtils;
 
 import javax.validation.Valid;
+import javax.validation.constraints.NotNull;
+import java.net.URLDecoder;
+import java.nio.charset.StandardCharsets;
 
 @NoArgsConstructor
 @Data
 public class ListBuildingSameRepairFrequencyDto {
     @Valid
+    @NotNull
     private Page page;
     @Valid
     private ListBuildingSameRepairFrequencyMapDTO map;
@@ -35,4 +40,17 @@ public class ListBuildingSameRepairFrequencyDto {
         @Schema(description = "局址编号")
         private String buildingAddressNumber;
     }
+
+    public ListBuildingSameRepairFrequencyDto(ListBuildingSameRepairFrequencyMapDTO map) {
+        if (StringUtils.hasText(map.city)) {
+            map.city = URLDecoder.decode(map.city, StandardCharsets.UTF_8);
+        }
+        if (StringUtils.hasText(map.county)) {
+            map.county = URLDecoder.decode(map.county, StandardCharsets.UTF_8);
+        }
+        if (StringUtils.hasText(map.buildingNameAlias)) {
+            map.buildingNameAlias = URLDecoder.decode(map.buildingNameAlias, StandardCharsets.UTF_8);
+        }
+        this.map = map;
+    }
 }

+ 0 - 3
src/main/java/com/example/pojo/dto/ListSiteNumDto.java

@@ -21,9 +21,6 @@ public class ListSiteNumDto {
     @NoArgsConstructor
     @Data
     public static class ListSiteNumMapDTO {
-        @Schema(description = "账期", example = "202312")
-        @NotNull
-        private Integer statisticalMonth;
         @Schema(description = "二级组织机构id")
         private String city;
         @Schema(description = "三级级组织机构id")

+ 42 - 0
src/main/java/com/example/pojo/vo/BuildingRepairStatVo.java

@@ -0,0 +1,42 @@
+package com.example.pojo.vo;
+
+import com.example.entity.house.BuildingRepairStatPo;
+import io.swagger.v3.oas.annotations.media.Schema;
+import lombok.Data;
+
+import java.math.BigDecimal;
+import java.util.ArrayList;
+import java.util.List;
+
+@Data
+public class BuildingRepairStatVo {
+    @Schema(description = "单位名称")
+    private String city;
+    @Schema(description = "项目制维修")
+    private BigDecimal projectCost;
+    @Schema(description = "零星维修")
+    private BigDecimal smallCost;
+    @Schema(description = "应急维修")
+    private BigDecimal warnCost;
+    @Schema(description = "总计")
+    private BigDecimal allCost;
+    @Schema(description = "是否变色")
+    private Boolean flag;
+    private List<BuildingRepairStatVo> children;
+
+    public BuildingRepairStatVo(BuildingRepairStatPo po, Boolean flag) {
+        this.city = po.getCityName();
+        this.projectCost = po.getXmz();
+        this.smallCost = po.getLx();
+        this.warnCost = po.getYj();
+        this.allCost = po.getHj();
+        this.flag = flag;
+        this.children = new ArrayList<>();
+        List<BuildingRepairStatPo> list = po.getChildren();
+        int size = list.size();
+        for (int i = 0; i < size; i++) {
+            BuildingRepairStatPo t = list.get(i);
+            this.children.add(new BuildingRepairStatVo(t, flag == (i % 2 != 0)));
+        }
+    }
+}

+ 62 - 0
src/main/java/com/example/pojo/vo/ListBuildingIdleRepairVo.java

@@ -0,0 +1,62 @@
+package com.example.pojo.vo;
+
+import com.example.entity.house.HouseBuildingIdleRepairPo;
+import io.swagger.v3.oas.annotations.media.Schema;
+import lombok.Data;
+
+import java.math.BigDecimal;
+
+@Data
+public class ListBuildingIdleRepairVo {
+    @Schema(description = "入账日期")
+    private Integer statisticalMonth;
+    @Schema(description = "资产所属单位二级")
+    private String city;
+    @Schema(description = "资产所属单位三级")
+    private String county;
+    @Schema(description = "建筑别名")
+    private String buildingAlias;
+    @Schema(description = "维修类型")
+    private String repairType;
+    @Schema(description = "维修内容")
+    private String repairContent;
+    @Schema(description = "erp入账金额元")
+    private BigDecimal erpCreditedAmount;
+    @Schema(description = "标准地址")
+    private String standardAddress;
+    @Schema(description = "使用状态")
+    private String useState;
+    @Schema(description = "建筑面积㎡")
+    private BigDecimal buildingArea;
+    @Schema(description = "建筑面积自用㎡")
+    private BigDecimal buildingAreaUseArea;
+    @Schema(description = "建筑面积出租㎡")
+    private BigDecimal buildingAreaRentArea;
+    @Schema(description = "建筑面积闲置㎡")
+    private BigDecimal buildingAreaIdelArea;
+    @Schema(description = "建筑面积不可使用㎡")
+    private BigDecimal buildingAreaUnavailable;
+    @Schema(description = "局址编号")
+    private String buildingAddressNumber;
+    @Schema(description = "局址别名")
+    private String buildingNnameAlias;
+
+    public ListBuildingIdleRepairVo(HouseBuildingIdleRepairPo po) {
+        this.repairType = po.getRepairType();
+        this.repairContent = po.getRepairContent();
+        this.erpCreditedAmount = po.getAmount();
+        this.city = po.getAreaName();
+        this.county = po.getCityName();
+        this.standardAddress = po.getAddress();
+        this.buildingAlias = po.getBuildingName();
+        this.useState = po.getUsageStatus();
+        this.buildingArea = po.getBuildingArea();
+        this.buildingAreaUseArea = po.getBuildingAreaSelfUse();
+        this.buildingAreaRentArea = po.getBuildingAreaRent();
+        this.buildingAreaIdelArea = po.getBuildingAreaIdle();
+        this.buildingAreaUnavailable = po.getBuildingAreaUnusable();
+        this.statisticalMonth = po.getYearMonth();
+        this.buildingAddressNumber = po.getSiteNum();
+        this.buildingNnameAlias = po.getSiteName();
+    }
+}

+ 150 - 0
src/main/java/com/example/pojo/vo/ListBuildingRepairMonthVo.java

@@ -0,0 +1,150 @@
+package com.example.pojo.vo;
+
+import com.example.entity.house.BuildingRepairMonthPo;
+import io.swagger.v3.oas.annotations.media.Schema;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+import java.math.BigDecimal;
+import java.text.DecimalFormat;
+
+@Data
+@NoArgsConstructor
+public class ListBuildingRepairMonthVo {
+    @Schema(description = "建筑id基本信息")
+    private String buildingId;
+    @Schema(description = "建筑id维修")
+    private String jzJzid;
+    @Schema(description = "入账日期")
+    private Integer statisticalMonth;
+    @Schema(description = "维修类型")
+    private String repairType;
+    @Schema(description = "维修内容")
+    private String repairContent;
+    @Schema(description = "erp入账金额元")
+    private BigDecimal erpCreditedAmount;
+    @Schema(description = "每平方米维修单价")
+    private BigDecimal averagePrice;
+    @Schema(description = "资产所属单位一级")
+    private String province;
+    @Schema(description = "资产所属单位二级")
+    private String city;
+    @Schema(description = "资产所属单位三级")
+    private String county;
+    @Schema(description = "局址编号")
+    private String buildingAddressNumber;
+    @Schema(description = "局址别名")
+    private String buildingNnameAlias;
+    @Schema(description = "标准地址")
+    private String standardAddress;
+    @Schema(description = "城市等级")
+    private String cityGrade;
+    @Schema(description = "城市区域")
+    private String cityArea;
+    @Schema(description = "地段")
+    private String areaSector;
+    @Schema(description = "是否有土地资产")
+    private String hasLand;
+    @Schema(description = "局址id")
+    private String siteId;
+    @Schema(description = "建筑别名")
+    private String buildingName;
+    @Schema(description = "得房率")
+    private String housingAcquisitionRate;
+    @Schema(description = "房屋来源")
+    private String housingSource;
+    @Schema(description = "取得日期")
+    private String acquisitionDate;
+    @Schema(description = "房龄开始年份")
+    private Integer houseYearBegan;
+    @Schema(description = "投资主体")
+    private String investmentEntity;
+    @Schema(description = "管理层级")
+    private String managementHierarchy;
+    @Schema(description = "房屋结构")
+    private String buildingStructure;
+    @Schema(description = "楼层总数")
+    private String totalFloors;
+    @Schema(description = "资产编号")
+    private String assetsNum;
+    @Schema(description = "资产标签号")
+    private String assetsTagNum;
+    @Schema(description = "使用状态")
+    private String useState;
+    @Schema(description = "建筑用途")
+    private String buildingUse;
+    @Schema(description = "权属状态")
+    private String ownershipStatus;
+    @Schema(description = "建筑占地面积")
+    private BigDecimal buildingFloorArea;
+    @Schema(description = "建筑面积")
+    private BigDecimal buildingArea;
+    @Schema(description = "建筑面积自用")
+    private BigDecimal buildingAreaUseArea;
+    @Schema(description = "建筑面积出租")
+    private BigDecimal buildingAreaRentArea;
+    @Schema(description = "建筑面积闲置")
+    private BigDecimal buildingAreaIdelArea;
+    @Schema(description = "建筑面积不可使用")
+    private BigDecimal buildingAreaUnavailable;
+    @Schema(description = "使用面积")
+    private BigDecimal useArea;
+    @Schema(description = "使用面积自用")
+    private BigDecimal useAreaSelfUseArea;
+    @Schema(description = "使用面积出租")
+    private BigDecimal useAreaRentArea;
+    @Schema(description = "使用面积闲置")
+    private BigDecimal useAreaIdelArea;
+    @Schema(description = "使用面积不可使用")
+    private BigDecimal useAreaUnavailableArea;
+    @Schema(description = "房龄")
+    private Integer houseAge;
+
+    public ListBuildingRepairMonthVo(BuildingRepairMonthPo po) {
+        this.buildingId = po.getBuildingId();
+        this.jzJzid = po.getJzJzid();
+        this.statisticalMonth = po.getYearMonth();
+        this.repairType = po.getRepairType();
+        this.repairContent = po.getContentCategory();
+        this.erpCreditedAmount = po.getFinalCost();
+        this.averagePrice = po.getRepairUnitPrice();
+        this.province = po.getFirstUnit();
+        this.city = po.getAreaName();
+        this.county = po.getCityName();
+        this.buildingAddressNumber = po.getSiteNum();
+        this.buildingNnameAlias = po.getSiteName();
+        this.standardAddress = po.getAddress();
+        this.cityGrade = po.getCityLevel();
+        this.cityArea = po.getCityRegion();
+        this.areaSector = po.getAreaSector();
+        this.hasLand = po.getHasLand();
+        this.siteId = po.getSiteId();
+        this.buildingName = po.getBuildingName();
+        this.housingAcquisitionRate = po.getHousingAcquisitionRate() != null
+                ? new DecimalFormat("#.00%").format(po.getHousingAcquisitionRate()) : null;
+        this.housingSource = po.getHousingSource();
+        this.acquisitionDate = po.getAcquisitionDate();
+        this.houseYearBegan = po.getHouseYearBegan();
+        this.investmentEntity = po.getInvestorName();
+        this.managementHierarchy = po.getManagementLevel();
+        this.buildingStructure = po.getBuildingStructure();
+        this.totalFloors = po.getTotalFloors();
+        this.assetsNum = po.getAssetsNum();
+        this.assetsTagNum = po.getAssetsTagNum();
+        this.useState = po.getUsageStatus();
+        this.buildingUse = po.getBuildingUse();
+        this.ownershipStatus = po.getOwnershipStatus();
+        this.buildingFloorArea = po.getFloorArea();
+        this.buildingArea = po.getBuildingArea();
+        this.buildingAreaUseArea = po.getBuildingAreaSelfUse();
+        this.buildingAreaRentArea = po.getBuildingAreaRent();
+        this.buildingAreaIdelArea = po.getBuildingAreaIdle();
+        this.buildingAreaUnavailable = po.getBuildingAreaUnusable();
+        this.useArea = po.getUsableArea();
+        this.useAreaSelfUseArea = po.getUsableAreaSelfUse();
+        this.useAreaRentArea = po.getUsableAreaRent();
+        this.useAreaIdelArea = po.getUsableAreaIdle();
+        this.useAreaUnavailableArea = po.getUsableAreaUnusable();
+        this.houseAge = po.getHouseAge();
+    }
+}

+ 1 - 1
src/main/java/com/example/service/house/HouseSiteStatService.java

@@ -174,7 +174,7 @@ public class HouseSiteStatService {
             return;
         }
         String filename = "一房产局址一表"
-                + LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyyMMdd")) + ".xlsx";
+                + LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyyMMddHHmmss")) + ".xlsx";
         response.setHeader("Content-Disposition", "attachment;filename=" + URLEncodeUtil.encode(filename));
         response.setContentType("application/octet-stream");
         try (SXSSFWorkbook wb = new SXSSFWorkbook()) {

+ 4 - 4
src/main/java/com/example/service/house/HouseWzBuildManageDetailsService.java

@@ -87,7 +87,7 @@ public class HouseWzBuildManageDetailsService {
             return;
         }
         String filename = "房屋空置_空置1000平方米以上"
-                + LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyyMMdd")) + ".xlsx";
+                + LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyyMMddHHmmss")) + ".xlsx";
         response.setHeader("Content-Disposition", "attachment;filename=" + URLEncodeUtil.encode(filename));
         response.setContentType("application/octet-stream");
         try (SXSSFWorkbook wb = new SXSSFWorkbook()) {
@@ -489,7 +489,7 @@ public class HouseWzBuildManageDetailsService {
             return;
         }
         String filename = "房屋管理_房产记录"
-                + LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyyMMdd")) + ".xlsx";
+                + LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyyMMddHHmmss")) + ".xlsx";
         response.setHeader("Content-Disposition", "attachment;filename=" + URLEncodeUtil.encode(filename));
         response.setContentType("application/octet-stream");
         try (SXSSFWorkbook wb = new SXSSFWorkbook()) {
@@ -832,7 +832,7 @@ public class HouseWzBuildManageDetailsService {
             return;
         }
         String filename = "房屋管理_房龄统计"
-                + LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyyMMdd")) + ".xlsx";
+                + LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyyMMddHHmmss")) + ".xlsx";
         response.setHeader("Content-Disposition", "attachment;filename=" + URLEncodeUtil.encode(filename));
         response.setContentType("application/octet-stream");
         try (SXSSFWorkbook wb = new SXSSFWorkbook()) {
@@ -1121,7 +1121,7 @@ public class HouseWzBuildManageDetailsService {
             return;
         }
         String filename = "房屋管理_闲置管理"
-                + LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyyMMdd")) + ".xlsx";
+                + LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyyMMddHHmmss")) + ".xlsx";
         response.setHeader("Content-Disposition", "attachment;filename=" + URLEncodeUtil.encode(filename));
         response.setContentType("application/octet-stream");
         try (SXSSFWorkbook wb = new SXSSFWorkbook()) {

+ 1 - 1
src/main/java/com/example/service/house/HouseWzBuildmanageAvageareaService.java

@@ -96,7 +96,7 @@ public class HouseWzBuildmanageAvageareaService {
             return;
         }
         String filename = "房屋管理_自有房产人均办公面积"
-                + LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyyMMdd")) + ".xlsx";
+                + LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyyMMddHHmmss")) + ".xlsx";
         response.setHeader("Content-Disposition", "attachment;filename=" + URLEncodeUtil.encode(filename));
         response.setContentType("application/octet-stream");
         try (SXSSFWorkbook wb = new SXSSFWorkbook()) {

+ 807 - 10
src/main/java/com/example/service/house/HouseWzHouseMaintenaCostService.java

@@ -6,26 +6,41 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.example.common.PageVo;
 import com.example.common.Rsp;
 import com.example.dao.WzOtnAreaDao;
+import com.example.dao.house.HouseBuildingRepairDao;
 import com.example.dao.house.HouseRepairExceptionDao;
+import com.example.entity.house.BuildingRepairMonthPo;
+import com.example.entity.house.BuildingRepairStatPo;
 import com.example.entity.house.HouseBuildingHighRepairPo;
 import com.example.entity.house.HouseBuildingHighSporadicRepairPo;
+import com.example.entity.house.HouseBuildingIdleRepairPo;
 import com.example.entity.house.HouseBuildingSameRepairFrequencyPo;
 import com.example.entity.house.HouseSitePo;
 import com.example.enums.ListBuildingHighRepairOrderEnum;
 import com.example.enums.ListBuildingHighSporadicRepairOrderEnum;
+import com.example.enums.ListBuildingIdleRepairOrderEnum;
+import com.example.enums.ListBuildingRepairMonthOrderEnum;
 import com.example.enums.ListBuildingSameRepairFrequencyOrderEnum;
 import com.example.enums.OrderEnum;
+import com.example.pojo.bo.BuildingRepairStatBo;
 import com.example.pojo.bo.ListBuildingHighRepairBo;
 import com.example.pojo.bo.ListBuildingHighSporadicRepairBo;
+import com.example.pojo.bo.ListBuildingIdleRepairBo;
+import com.example.pojo.bo.ListBuildingRepairMonthBo;
 import com.example.pojo.bo.ListBuildingSameRepairFrequencyBo;
 import com.example.pojo.bo.ListHouseSiteBo;
+import com.example.pojo.dto.BuildingRepairStatDto;
 import com.example.pojo.dto.ListBuildingHighRepairDto;
 import com.example.pojo.dto.ListBuildingHighSporadicRepairDto;
+import com.example.pojo.dto.ListBuildingIdleRepairDto;
+import com.example.pojo.dto.ListBuildingRepairMonthDto;
 import com.example.pojo.dto.ListBuildingSameRepairFrequencyDto;
 import com.example.pojo.dto.ListSiteNameDto;
 import com.example.pojo.dto.ListSiteNumDto;
+import com.example.pojo.vo.BuildingRepairStatVo;
 import com.example.pojo.vo.ListBuildingHighRepairVo;
 import com.example.pojo.vo.ListBuildingHighSporadicRepairVo;
+import com.example.pojo.vo.ListBuildingIdleRepairVo;
+import com.example.pojo.vo.ListBuildingRepairMonthVo;
 import com.example.pojo.vo.ListBuildingSameRepairFrequencyVo;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.poi.ss.usermodel.Cell;
@@ -37,14 +52,18 @@ import org.apache.poi.ss.usermodel.VerticalAlignment;
 import org.apache.poi.xssf.streaming.SXSSFSheet;
 import org.apache.poi.xssf.streaming.SXSSFWorkbook;
 import org.springframework.stereotype.Service;
+import org.springframework.util.CollectionUtils;
 import org.springframework.util.StringUtils;
 import org.springframework.web.context.request.RequestContextHolder;
 import org.springframework.web.context.request.ServletRequestAttributes;
 
 import javax.servlet.http.HttpServletResponse;
+import java.time.LocalDate;
 import java.time.LocalDateTime;
 import java.time.format.DateTimeFormatter;
 import java.util.ArrayList;
+import java.util.Collections;
+import java.util.LinkedHashMap;
 import java.util.List;
 import java.util.concurrent.atomic.AtomicInteger;
 import java.util.stream.Stream;
@@ -54,10 +73,13 @@ import java.util.stream.Stream;
 public class HouseWzHouseMaintenaCostService {
     private final HouseRepairExceptionDao houseRepairExceptionDao;
     private final WzOtnAreaDao wzOtnAreaDao;
+    private final HouseBuildingRepairDao houseBuildingRepairDao;
 
-    public HouseWzHouseMaintenaCostService(HouseRepairExceptionDao houseRepairExceptionDao, WzOtnAreaDao wzOtnAreaDao) {
+    public HouseWzHouseMaintenaCostService(HouseRepairExceptionDao houseRepairExceptionDao, WzOtnAreaDao wzOtnAreaDao,
+                                           HouseBuildingRepairDao houseBuildingRepairDao) {
         this.houseRepairExceptionDao = houseRepairExceptionDao;
         this.wzOtnAreaDao = wzOtnAreaDao;
+        this.houseBuildingRepairDao = houseBuildingRepairDao;
     }
 
     public Rsp<PageVo<ListBuildingHighRepairVo>> queryHighPrice(ListBuildingHighRepairDto dto) {
@@ -71,7 +93,7 @@ public class HouseWzHouseMaintenaCostService {
         return Rsp.ok(pageVo);
     }
 
-    public void queryHighPriceExport(ListBuildingHighRepairDto dto) {
+    public void queryHighPriceExport(ListBuildingHighRepairDto.ListBuildingHighRepairMapDTO dto) {
         ServletRequestAttributes servletRequestAttributes = (ServletRequestAttributes) RequestContextHolder
                 .getRequestAttributes();
         if (servletRequestAttributes == null) {
@@ -82,11 +104,11 @@ public class HouseWzHouseMaintenaCostService {
             return;
         }
         String filename = "维修异常监控_高总价统计"
-                + LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyyMMdd")) + ".xlsx";
+                + LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyyMMddHHmmss")) + ".xlsx";
         response.setHeader("Content-Disposition", "attachment;filename=" + URLEncodeUtil.encode(filename));
         response.setContentType("application/octet-stream");
         try (SXSSFWorkbook wb = new SXSSFWorkbook()) {
-            writeQueryHighPrice(dto, wb);
+            writeQueryHighPrice(new ListBuildingHighRepairDto(dto), wb);
             wb.write(response.getOutputStream());
         } catch (Exception e) {
             log.error(e.getMessage(), e);
@@ -295,7 +317,7 @@ public class HouseWzHouseMaintenaCostService {
         return houseRepairExceptionDao.listBuildingSameRepairFrequency(page, bo);
     }
 
-    public void queryHighFrequencyExport(ListBuildingSameRepairFrequencyDto dto) {
+    public void queryHighFrequencyExport(ListBuildingSameRepairFrequencyDto.ListBuildingSameRepairFrequencyMapDTO dto) {
         ServletRequestAttributes servletRequestAttributes = (ServletRequestAttributes) RequestContextHolder
                 .getRequestAttributes();
         if (servletRequestAttributes == null) {
@@ -306,11 +328,11 @@ public class HouseWzHouseMaintenaCostService {
             return;
         }
         String filename = "维修异常监控_相同维修频次统计"
-                + LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyyMMdd")) + ".xlsx";
+                + LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyyMMddHHmmss")) + ".xlsx";
         response.setHeader("Content-Disposition", "attachment;filename=" + URLEncodeUtil.encode(filename));
         response.setContentType("application/octet-stream");
         try (SXSSFWorkbook wb = new SXSSFWorkbook()) {
-            writeQueryHighFrequency(dto, wb);
+            writeQueryHighFrequency(new ListBuildingSameRepairFrequencyDto(dto), wb);
             wb.write(response.getOutputStream());
         } catch (Exception e) {
             log.error(e.getMessage(), e);
@@ -450,7 +472,7 @@ public class HouseWzHouseMaintenaCostService {
         return houseRepairExceptionDao.ListBuildingHighSporadicRepair(page, bo);
     }
 
-    public void queryDailyModifyExport(ListBuildingHighSporadicRepairDto dto) {
+    public void queryDailyModifyExport(ListBuildingHighSporadicRepairDto.ListBuildingHighSporadicRepairMapDTO dto) {
         ServletRequestAttributes servletRequestAttributes = (ServletRequestAttributes) RequestContextHolder
                 .getRequestAttributes();
         if (servletRequestAttributes == null) {
@@ -461,11 +483,11 @@ public class HouseWzHouseMaintenaCostService {
             return;
         }
         String filename = "维修异常监控_高额日常零星维修"
-                + LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyyMMdd")) + ".xlsx";
+                + LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyyMMddHHmmss")) + ".xlsx";
         response.setHeader("Content-Disposition", "attachment;filename=" + URLEncodeUtil.encode(filename));
         response.setContentType("application/octet-stream");
         try (SXSSFWorkbook wb = new SXSSFWorkbook()) {
-            writeQueryDailyModify(dto, wb);
+            writeQueryDailyModify(new ListBuildingHighSporadicRepairDto(dto), wb);
             wb.write(response.getOutputStream());
         } catch (Exception e) {
             log.error(e.getMessage(), e);
@@ -586,4 +608,779 @@ public class HouseWzHouseMaintenaCostService {
         PageVo<String> pageVo = new PageVo<>(vos, page);
         return Rsp.ok(pageVo);
     }
+
+    public Rsp<PageVo<ListBuildingIdleRepairVo>> listBuildingIdleRepair(ListBuildingIdleRepairDto dto) {
+        Page<HouseBuildingIdleRepairPo> page = new Page<>(dto.getPage().getPageNum(), dto.getPage().getPageSize());
+        List<HouseBuildingIdleRepairPo> list = getHouseBuildingIdleRepairPos(dto, page);
+        List<ListBuildingIdleRepairVo> vos = new ArrayList<>();
+        for (HouseBuildingIdleRepairPo po : list) {
+            vos.add(new ListBuildingIdleRepairVo(po));
+        }
+        PageVo<ListBuildingIdleRepairVo> pageVo = new PageVo<>(vos, page);
+        return Rsp.ok(pageVo);
+    }
+
+    /**
+     * 查询不动产自有房产闲置不可用发生维修费
+     */
+    private List<HouseBuildingIdleRepairPo> getHouseBuildingIdleRepairPos(ListBuildingIdleRepairDto dto,
+                                                                          Page<HouseBuildingIdleRepairPo> page) {
+        ListBuildingIdleRepairBo bo = new ListBuildingIdleRepairBo();
+        if (dto.getMap() != null && dto.getMap().getStatisticalMonth() != null) {
+            bo.setYearMonth(dto.getMap().getStatisticalMonth());
+        }
+        if (dto.getMap() != null && StringUtils.hasText(dto.getMap().getCity()) && !"全省".equals(dto.getMap().getCity())) {
+            bo.setAreaNo(dto.getMap().getCity());
+        }
+        if (dto.getMap() != null && StringUtils.hasText(dto.getMap().getCounty())) {
+            bo.setCityNo(dto.getMap().getCounty());
+        }
+        if (dto.getMap() != null && StringUtils.hasText(dto.getMap().getBuildingAddressNumber())) {
+            bo.setSiteNum(dto.getMap().getBuildingAddressNumber());
+        }
+        if (dto.getMap() != null && StringUtils.hasText(dto.getMap().getBuildingNameAlias())) {
+            bo.setSiteName(dto.getMap().getBuildingNameAlias());
+        }
+        if (dto.getMap() != null && dto.getMap().getOrder() != null && dto.getMap().getSidx() != null) {
+            if (OrderEnum.asc.equals(dto.getMap().getOrder())) {
+                page.addOrder(OrderItem.asc(dto.getMap().getSidx().getColumnName()));
+            } else {
+                page.addOrder(OrderItem.desc(dto.getMap().getSidx().getColumnName()));
+            }
+        } else {
+            page.addOrder(OrderItem.desc(ListBuildingIdleRepairOrderEnum.erpCreditedAmount.getColumnName()));
+        }
+        return houseRepairExceptionDao.listBuildingIdleRepair(page, bo);
+    }
+
+    public void buildingIdleRepairExport(ListBuildingIdleRepairDto.ListBuildingIdleRepairDTO dto) {
+        ServletRequestAttributes servletRequestAttributes = (ServletRequestAttributes) RequestContextHolder
+                .getRequestAttributes();
+        if (servletRequestAttributes == null) {
+            return;
+        }
+        HttpServletResponse response = servletRequestAttributes.getResponse();
+        if (response == null) {
+            return;
+        }
+        String filename = "维修异常监控_闲置+不可用发生维修费"
+                + LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyyMMddHHmmss")) + ".xlsx";
+        response.setHeader("Content-Disposition", "attachment;filename=" + URLEncodeUtil.encode(filename));
+        response.setContentType("application/octet-stream");
+        try (SXSSFWorkbook wb = new SXSSFWorkbook()) {
+            writeBuildingIdleRepair(new ListBuildingIdleRepairDto(dto), wb);
+            wb.write(response.getOutputStream());
+        } catch (Exception e) {
+            log.error(e.getMessage(), e);
+        }
+    }
+
+    /**
+     * 写闲置不可用发生维修费文件
+     */
+    private void writeBuildingIdleRepair(ListBuildingIdleRepairDto dto, SXSSFWorkbook wb) {
+        Page<HouseBuildingIdleRepairPo> page = new Page<>(1, Long.MAX_VALUE);
+        List<HouseBuildingIdleRepairPo> list = getHouseBuildingIdleRepairPos(dto, page);
+        DataFormat dataFormat = wb.createDataFormat();
+        // 数字样式
+        CellStyle numberCellStyle = wb.createCellStyle();
+        numberCellStyle.setDataFormat(dataFormat.getFormat("#,##0.00"));
+        numberCellStyle.setAlignment(HorizontalAlignment.RIGHT);
+        // 默认样式
+        CellStyle baseCellStyle = wb.createCellStyle();
+        baseCellStyle.setAlignment(HorizontalAlignment.CENTER);
+        baseCellStyle.setVerticalAlignment(VerticalAlignment.CENTER);
+        SXSSFSheet sheet = wb.createSheet();
+        AtomicInteger rowIndex = new AtomicInteger(0);
+        // 表头
+        Row headerRow = sheet.createRow(rowIndex.getAndIncrement());
+        List<String> headers = Stream.of("入账日期", "二级单位", "三级单位", "局址编号", "局址别名", "建筑别名",
+                "维修类型", "维修内容", "erp入账金额元", "标准地址", "使用状态", "建筑面积㎡", "建筑面积自用㎡", "建筑面积出租㎡",
+                "建筑面积闲置㎡", "建筑面积不可使用㎡").toList();
+        int headerLength = headers.size();
+        for (int i = 0; i < headerLength; i++) {
+            Cell cell = headerRow.createCell(i);
+            cell.setCellValue(headers.get(i));
+            cell.setCellStyle(baseCellStyle);
+            // 根据内容长度设置列宽
+            int columnWidth = headers.get(i).length() * 256 * 2 + 256;
+            sheet.setColumnWidth(i, columnWidth);
+        }
+        // 数据
+        for (HouseBuildingIdleRepairPo po : list) {
+            AtomicInteger columnIndex = new AtomicInteger(0);
+            Row row = sheet.createRow(rowIndex.getAndIncrement());
+            // 入账日期
+            Cell yearMonthCell = row.createCell(columnIndex.getAndIncrement());
+            if (po.getYearMonth() != null) {
+                yearMonthCell.setCellValue(po.getYearMonth());
+            }
+            // 二级单位
+            Cell areaNameCell = row.createCell(columnIndex.getAndIncrement());
+            if (po.getAreaName() != null) {
+                areaNameCell.setCellValue(po.getAreaName());
+            }
+            // 三级单位
+            Cell cityNameCell = row.createCell(columnIndex.getAndIncrement());
+            if (po.getCityName() != null) {
+                cityNameCell.setCellValue(po.getCityName());
+            }
+            // 局址编号
+            Cell siteNumCell = row.createCell(columnIndex.getAndIncrement());
+            if (po.getSiteName() != null) {
+                siteNumCell.setCellValue(po.getSiteNum());
+            }
+            // 局址别名
+            Cell siteNameCell = row.createCell(columnIndex.getAndIncrement());
+            if (po.getSiteName() != null) {
+                siteNameCell.setCellValue(po.getSiteName());
+            }
+            // 建筑别名
+            Cell buildingNameCell = row.createCell(columnIndex.getAndIncrement());
+            if (po.getBuildingName() != null) {
+                buildingNameCell.setCellValue(po.getBuildingName());
+            }
+            // 维修类型
+            Cell repairTypeCell = row.createCell(columnIndex.getAndIncrement());
+            if (po.getRepairType() != null) {
+                repairTypeCell.setCellValue(po.getRepairType());
+            }
+            // 维修内容
+            Cell repairContentCell = row.createCell(columnIndex.getAndIncrement());
+            if (po.getRepairContent() != null) {
+                repairContentCell.setCellValue(po.getRepairContent());
+            }
+            // erp入账金额元
+            Cell amountCell = row.createCell(columnIndex.getAndIncrement());
+            if (po.getAmount() != null) {
+                amountCell.setCellValue(po.getAmount().doubleValue());
+            }
+            amountCell.setCellStyle(numberCellStyle);
+            // 标准地址
+            Cell addressCell = row.createCell(columnIndex.getAndIncrement());
+            if (po.getAddress() != null) {
+                addressCell.setCellValue(po.getAddress());
+            }
+            // 使用状态
+            Cell usageStatusCell = row.createCell(columnIndex.getAndIncrement());
+            if (po.getUsageStatus() != null) {
+                usageStatusCell.setCellValue(po.getUsageStatus());
+            }
+            // 建筑面积㎡
+            Cell buildingAreaCell = row.createCell(columnIndex.getAndIncrement());
+            if (po.getBuildingArea() != null) {
+                buildingAreaCell.setCellValue(po.getBuildingArea().doubleValue());
+            }
+            buildingAreaCell.setCellStyle(numberCellStyle);
+            // 建筑面积自用㎡
+            Cell buildingAreaSelfUseCell = row.createCell(columnIndex.getAndIncrement());
+            if (po.getBuildingAreaSelfUse() != null) {
+                buildingAreaSelfUseCell.setCellValue(po.getBuildingAreaSelfUse().doubleValue());
+            }
+            buildingAreaSelfUseCell.setCellStyle(numberCellStyle);
+            // 建筑面积出租㎡
+            Cell buildingAreaRentCell = row.createCell(columnIndex.getAndIncrement());
+            if (po.getBuildingAreaRent() != null) {
+                buildingAreaRentCell.setCellValue(po.getBuildingAreaRent().doubleValue());
+            }
+            buildingAreaRentCell.setCellStyle(numberCellStyle);
+            // 建筑面积闲置㎡
+            Cell buildingAreaIdleCell = row.createCell(columnIndex.getAndIncrement());
+            if (po.getBuildingAreaIdle() != null) {
+                buildingAreaIdleCell.setCellValue(po.getBuildingAreaIdle().doubleValue());
+            }
+            buildingAreaIdleCell.setCellStyle(numberCellStyle);
+            // 建筑面积不可使用㎡
+            Cell buildingAreaUnusableCell = row.createCell(columnIndex.getAndIncrement());
+            if (po.getBuildingAreaUnusable() != null) {
+                buildingAreaUnusableCell.setCellValue(po.getBuildingAreaUnusable().doubleValue());
+            }
+            buildingAreaUnusableCell.setCellStyle(numberCellStyle);
+        }
+    }
+
+    public Rsp<PageVo<BuildingRepairStatVo>> buildingRepairStat(BuildingRepairStatDto dto) {
+        BuildingRepairStatPo pos = getBuildingRepairStatPos(dto);
+        if (pos == null) {
+            return Rsp.ok();
+        }
+        BuildingRepairStatVo vo = new BuildingRepairStatVo(pos, false);
+        PageVo<BuildingRepairStatVo> pageVo = new PageVo<>(Collections.singletonList(vo));
+        return Rsp.ok(pageVo);
+    }
+
+    private BuildingRepairStatPo getBuildingRepairStatPos(BuildingRepairStatDto dto) {
+        Integer endYearMonth = dto.getMap().getStatisticalMonth1();
+        LocalDate endLocalDate = LocalDate.parse(endYearMonth + "01", DateTimeFormatter.ofPattern("yyyyMMdd"));
+        LocalDate startLocalDate = endLocalDate.withDayOfYear(1);
+        Integer startYearMonth = Integer.valueOf(startLocalDate.format(DateTimeFormatter.ofPattern("yyyyMM")));
+        BuildingRepairStatBo bo = new BuildingRepairStatBo();
+        bo.setStartYearMonth(startYearMonth);
+        bo.setEndYearMonth(endYearMonth);
+        if (StringUtils.hasText(dto.getMap().getCity()) && !"全省".equals(dto.getMap().getCity())) {
+            bo.setAreaNo(dto.getMap().getCity());
+        }
+        if (StringUtils.hasText(dto.getMap().getCounty())) {
+            bo.setCityNo(dto.getMap().getCounty());
+        }
+        if ("上市".equals(dto.getMap().getInvestmentEntity())) {
+            bo.setInvestorName("上市");
+        } else if ("存续".equals(dto.getMap().getInvestmentEntity())) {
+            bo.setInvestorName("存续");
+        }
+        // 查询三级单位统计
+        List<BuildingRepairStatPo> pos = houseBuildingRepairDao.buildingRepairStat(bo);
+        if (CollectionUtils.isEmpty(pos)) {
+            return null;
+        }
+        // 一级单位统计
+        BuildingRepairStatPo firstUnitPo = new BuildingRepairStatPo();
+        firstUnitPo.setAreaName("全省");
+        firstUnitPo.setCityName("全省");
+        LinkedHashMap<String, BuildingRepairStatPo> secondUnitPoMap = new LinkedHashMap<>();
+        // 二级单位统计
+        for (BuildingRepairStatPo po : pos) {
+            secondUnitPoMap.putIfAbsent(po.getAreaNo(),
+                    new BuildingRepairStatPo(po.getAreaNo(), po.getAreaName()));
+            BuildingRepairStatPo secondUnitPo = secondUnitPoMap.get(po.getAreaNo());
+            secondUnitPo.update(po);
+        }
+        for (BuildingRepairStatPo value : secondUnitPoMap.values()) {
+            firstUnitPo.update(value);
+        }
+        return firstUnitPo;
+    }
+
+    public void buildingRepairStatExport(BuildingRepairStatDto.BuildingRepairStatMapDTO dto) {
+        ServletRequestAttributes servletRequestAttributes = (ServletRequestAttributes) RequestContextHolder
+                .getRequestAttributes();
+        if (servletRequestAttributes == null) {
+            return;
+        }
+        HttpServletResponse response = servletRequestAttributes.getResponse();
+        if (response == null) {
+            return;
+        }
+        String filename = "房屋维修_维修费统计"
+                + LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyyMMddHHmmss")) + ".xlsx";
+        response.setHeader("Content-Disposition", "attachment;filename=" + URLEncodeUtil.encode(filename));
+        response.setContentType("application/octet-stream");
+        try (SXSSFWorkbook wb = new SXSSFWorkbook()) {
+            writeBuildingRepairStat(new BuildingRepairStatDto(dto), wb);
+            wb.write(response.getOutputStream());
+        } catch (Exception e) {
+            log.error(e.getMessage(), e);
+        }
+    }
+
+    /**
+     * 写维修费统计文件
+     */
+    private void writeBuildingRepairStat(BuildingRepairStatDto dto, SXSSFWorkbook wb) {
+        BuildingRepairStatPo firstPo = getBuildingRepairStatPos(dto);
+        DataFormat dataFormat = wb.createDataFormat();
+        // 数字样式
+        CellStyle numberCellStyle = wb.createCellStyle();
+        numberCellStyle.setDataFormat(dataFormat.getFormat("#,##0.00"));
+        numberCellStyle.setAlignment(HorizontalAlignment.RIGHT);
+        // 默认样式
+        CellStyle baseCellStyle = wb.createCellStyle();
+        baseCellStyle.setAlignment(HorizontalAlignment.CENTER);
+        baseCellStyle.setVerticalAlignment(VerticalAlignment.CENTER);
+        SXSSFSheet sheet = wb.createSheet();
+        AtomicInteger rowIndex = new AtomicInteger(0);
+        // 表头
+        Row headerRow = sheet.createRow(rowIndex.getAndIncrement());
+        List<String> headers = Stream.of("资产所属单位(一级)", "资产所属单位(二级)", "资产所属单位(三级)",
+                "项目制维修(元)", "零星维修(元)", "应急维修(元)", "总计(元)").toList();
+        int headerLength = headers.size();
+        for (int i = 0; i < headerLength; i++) {
+            Cell cell = headerRow.createCell(i);
+            cell.setCellValue(headers.get(i));
+            cell.setCellStyle(baseCellStyle);
+            // 根据内容长度设置列宽
+            int columnWidth = headers.get(i).length() * 256 * 2 + 256;
+            sheet.setColumnWidth(i, columnWidth);
+        }
+        if (firstPo == null) {
+            return;
+        }
+        // 数据
+        AtomicInteger columnIndex1 = new AtomicInteger(0);
+        // 一级单位统计
+        Row row1 = sheet.createRow(rowIndex.getAndIncrement());
+        // 资产所属单位(一级)
+        Cell firstUnitCell1 = row1.createCell(columnIndex1.getAndIncrement());
+        if (firstPo.getAreaName() != null) {
+            firstUnitCell1.setCellValue(firstPo.getAreaName());
+        }
+        // 二级单位
+        Cell areaNameCell1 = row1.createCell(columnIndex1.getAndIncrement());
+//        if (firstPo.getAreaName() != null) {
+//            areaNameCell1.setCellValue(firstPo.getAreaName());
+//        }
+        // 三级单位
+        Cell cityNameCell1 = row1.createCell(columnIndex1.getAndIncrement());
+//        if (firstPo.getCityName() != null) {
+//            cityNameCell1.setCellValue(firstPo.getCityName());
+//        }
+        // 项目制维修
+        Cell xmzCell1 = row1.createCell(columnIndex1.getAndIncrement());
+        if (firstPo.getXmz() != null) {
+            xmzCell1.setCellValue(firstPo.getXmz().doubleValue());
+        }
+        xmzCell1.setCellStyle(numberCellStyle);
+        // 零星维修
+        Cell lxCell1 = row1.createCell(columnIndex1.getAndIncrement());
+        if (firstPo.getLx() != null) {
+            lxCell1.setCellValue(firstPo.getLx().doubleValue());
+        }
+        lxCell1.setCellStyle(numberCellStyle);
+        // 应急维修
+        Cell yjCell1 = row1.createCell(columnIndex1.getAndIncrement());
+        if (firstPo.getYj() != null) {
+            yjCell1.setCellValue(firstPo.getYj().doubleValue());
+        }
+        yjCell1.setCellStyle(numberCellStyle);
+        // 总计
+        Cell hjCell1 = row1.createCell(columnIndex1.getAndIncrement());
+        if (firstPo.getHj() != null) {
+            hjCell1.setCellValue(firstPo.getHj().doubleValue());
+        }
+        hjCell1.setCellStyle(numberCellStyle);
+        // 二级单位统计
+        for (BuildingRepairStatPo secondPo : firstPo.getChildren()) {
+            AtomicInteger columnIndex2 = new AtomicInteger(0);
+            // 一级单位统计
+            Row row2 = sheet.createRow(rowIndex.getAndIncrement());
+            // 资产所属单位(一级)
+            Cell firstUnitCell2 = row2.createCell(columnIndex2.getAndIncrement());
+//            if (secondPo.getAreaName() != null) {
+//                firstUnitCell2.setCellValue(secondPo.getAreaName());
+//            }
+            // 二级单位
+            Cell areaNameCell2 = row2.createCell(columnIndex2.getAndIncrement());
+            if (secondPo.getAreaName() != null) {
+                areaNameCell2.setCellValue(secondPo.getAreaName());
+            }
+            // 三级单位
+            Cell cityNameCell2 = row2.createCell(columnIndex2.getAndIncrement());
+//            if (secondPo.getCityName() != null) {
+//                cityNameCell2.setCellValue(secondPo.getCityName());
+//            }
+            // 项目制维修
+            Cell xmzCell2 = row2.createCell(columnIndex2.getAndIncrement());
+            if (secondPo.getXmz() != null) {
+                xmzCell2.setCellValue(secondPo.getXmz().doubleValue());
+            }
+            xmzCell2.setCellStyle(numberCellStyle);
+            // 零星维修
+            Cell lxCell2 = row2.createCell(columnIndex2.getAndIncrement());
+            if (secondPo.getLx() != null) {
+                lxCell2.setCellValue(secondPo.getLx().doubleValue());
+            }
+            lxCell2.setCellStyle(numberCellStyle);
+            // 应急维修
+            Cell yjCell2 = row2.createCell(columnIndex2.getAndIncrement());
+            if (secondPo.getYj() != null) {
+                yjCell2.setCellValue(secondPo.getYj().doubleValue());
+            }
+            yjCell2.setCellStyle(numberCellStyle);
+            // 总计
+            Cell hjCell2 = row2.createCell(columnIndex2.getAndIncrement());
+            if (secondPo.getHj() != null) {
+                hjCell2.setCellValue(secondPo.getHj().doubleValue());
+            }
+            hjCell2.setCellStyle(numberCellStyle);
+            // 三级单位统计
+            for (BuildingRepairStatPo thirdPo : secondPo.getChildren()) {
+                AtomicInteger columnIndex3 = new AtomicInteger(0);
+                Row row3 = sheet.createRow(rowIndex.getAndIncrement());
+                // 资产所属单位(一级)
+                Cell firstUnitCell3 = row3.createCell(columnIndex3.getAndIncrement());
+//                if (thirdPo.getAreaName() != null) {
+//                    firstUnitCell3.setCellValue(thirdPo.getAreaName());
+//                }
+                // 二级单位
+                Cell areaNameCell3 = row3.createCell(columnIndex3.getAndIncrement());
+//                if (thirdPo.getAreaName() != null) {
+//                    areaNameCell3.setCellValue(thirdPo.getAreaName());
+//                }
+                // 三级单位
+                Cell cityNameCell3 = row3.createCell(columnIndex3.getAndIncrement());
+                if (thirdPo.getCityName() != null) {
+                    cityNameCell3.setCellValue(thirdPo.getCityName());
+                }
+                // 项目制维修
+                Cell xmzCell3 = row3.createCell(columnIndex3.getAndIncrement());
+                if (thirdPo.getXmz() != null) {
+                    xmzCell3.setCellValue(thirdPo.getXmz().doubleValue());
+                }
+                xmzCell3.setCellStyle(numberCellStyle);
+                // 零星维修
+                Cell lxCell3 = row3.createCell(columnIndex3.getAndIncrement());
+                if (thirdPo.getLx() != null) {
+                    lxCell3.setCellValue(thirdPo.getLx().doubleValue());
+                }
+                lxCell3.setCellStyle(numberCellStyle);
+                // 应急维修
+                Cell yjCell3 = row3.createCell(columnIndex3.getAndIncrement());
+                if (thirdPo.getYj() != null) {
+                    yjCell3.setCellValue(thirdPo.getYj().doubleValue());
+                }
+                yjCell3.setCellStyle(numberCellStyle);
+                // 总计
+                Cell hjCell3 = row3.createCell(columnIndex3.getAndIncrement());
+                if (thirdPo.getHj() != null) {
+                    hjCell3.setCellValue(thirdPo.getHj().doubleValue());
+                }
+                hjCell3.setCellStyle(numberCellStyle);
+            }
+        }
+    }
+
+    public Rsp<PageVo<ListBuildingRepairMonthVo>> listBuildingRepairMonth(ListBuildingRepairMonthDto dto) {
+        Page<BuildingRepairMonthPo> page = new Page<>(dto.getPage().getPageNum(), dto.getPage().getPageSize());
+        List<BuildingRepairMonthPo> list = getBuildingRepairMonthList(dto, page);
+        List<ListBuildingRepairMonthVo> vos = new ArrayList<>();
+        for (BuildingRepairMonthPo po : list) {
+            vos.add(new ListBuildingRepairMonthVo(po));
+        }
+        PageVo<ListBuildingRepairMonthVo> pageVo = new PageVo<>(vos, page);
+        return Rsp.ok(pageVo);
+    }
+
+    private List<BuildingRepairMonthPo> getBuildingRepairMonthList(ListBuildingRepairMonthDto dto,
+                                                                   Page<BuildingRepairMonthPo> page) {
+        ListBuildingRepairMonthBo bo = new ListBuildingRepairMonthBo();
+        if (dto.getMap() != null && dto.getMap().getStatisticalMonth() != null) {
+            bo.setYearMonth(dto.getMap().getStatisticalMonth());
+        }
+        if (dto.getMap() != null && StringUtils.hasText(dto.getMap().getCity()) && !"全省".equals(dto.getMap().getCity())) {
+            bo.setAreaNo(dto.getMap().getCity());
+        }
+        if (dto.getMap() != null && StringUtils.hasText(dto.getMap().getCounty())) {
+            bo.setCityNo(dto.getMap().getCounty());
+        }
+        if (dto.getMap() != null && StringUtils.hasText(dto.getMap().getCode())) {
+            bo.setSiteNum(dto.getMap().getCode());
+        }
+        if (dto.getMap() != null && StringUtils.hasText(dto.getMap().getAlias())) {
+            bo.setSiteName(dto.getMap().getAlias());
+        }
+        if (dto.getMap() != null && "上市".equals(dto.getMap().getInvestmentEntity())) {
+            bo.setInvestorName("上市");
+        } else if (dto.getMap() != null && "存续".equals(dto.getMap().getInvestmentEntity())) {
+            bo.setInvestorName("存续");
+        }
+        if (dto.getMap() != null && dto.getMap().getOrder() != null && dto.getMap().getSidx() != null) {
+            if (OrderEnum.asc.equals(dto.getMap().getOrder())) {
+                page.addOrder(OrderItem.asc(dto.getMap().getSidx().getColumnName()));
+            } else {
+                page.addOrder(OrderItem.desc(dto.getMap().getSidx().getColumnName()));
+            }
+        } else {
+            page.addOrder(OrderItem.desc(ListBuildingRepairMonthOrderEnum.erpCreditedAmount.getColumnName()));
+        }
+        return houseBuildingRepairDao.listBuildingRepairMonth(page, bo);
+    }
+
+    public void listBuildingRepairMonthExport(ListBuildingRepairMonthDto.ListBuildingRepairMonthMapDTO dto) {
+        ServletRequestAttributes servletRequestAttributes = (ServletRequestAttributes) RequestContextHolder
+                .getRequestAttributes();
+        if (servletRequestAttributes == null) {
+            return;
+        }
+        HttpServletResponse response = servletRequestAttributes.getResponse();
+        if (response == null) {
+            return;
+        }
+        String filename = "房屋维修_维修费记录"
+                + LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyyMMddHHmmss")) + ".xlsx";
+        response.setHeader("Content-Disposition", "attachment;filename=" + URLEncodeUtil.encode(filename));
+        response.setContentType("application/octet-stream");
+        try (SXSSFWorkbook wb = new SXSSFWorkbook()) {
+            writeListBuildingRepairMonth(new ListBuildingRepairMonthDto(dto), wb);
+            wb.write(response.getOutputStream());
+        } catch (Exception e) {
+            log.error(e.getMessage(), e);
+        }
+    }
+
+    private void writeListBuildingRepairMonth(ListBuildingRepairMonthDto dto, SXSSFWorkbook wb) {
+        Page<BuildingRepairMonthPo> page = new Page<>(1, Long.MAX_VALUE);
+        List<BuildingRepairMonthPo> list = getBuildingRepairMonthList(dto, page);
+        DataFormat dataFormat = wb.createDataFormat();
+        // 数字样式
+        CellStyle numberCellStyle = wb.createCellStyle();
+        numberCellStyle.setDataFormat(dataFormat.getFormat("#,##0.00"));
+        numberCellStyle.setAlignment(HorizontalAlignment.RIGHT);
+        // 默认样式
+        CellStyle baseCellStyle = wb.createCellStyle();
+        baseCellStyle.setAlignment(HorizontalAlignment.CENTER);
+        baseCellStyle.setVerticalAlignment(VerticalAlignment.CENTER);
+        // 百分比样式
+        CellStyle percentCellStyle = wb.createCellStyle();
+        percentCellStyle.setDataFormat(dataFormat.getFormat("0.00%"));
+        percentCellStyle.setAlignment(HorizontalAlignment.RIGHT);
+        SXSSFSheet sheet = wb.createSheet();
+        AtomicInteger rowIndex = new AtomicInteger(0);
+        // 表头
+        Row headerRow = sheet.createRow(rowIndex.getAndIncrement());
+        List<String> headers = Stream.of("建筑id基本信息", "建筑id维修", "入账日期", "维修类型", "维修内容",
+                "erp入账金额元", "每平米维修单价", "资产所属单位(一级)", "资产所属单位(二级)", "资产所属单位(三级)", "局址编号",
+                "局址别名", "标准地址", "城市等级", "城市区域",  "地段", "是否有土地资产", "局址id", "建筑别名", "得房率",
+                "房屋来源", "取得日期", "房龄开始年份", "房龄", "投资主体", "管理层级", "房屋结构", "楼层总数", "资产编号",
+                "资产标签号", "使用状态", "建筑用途", "权属状态", "建筑占地面积(㎡)", "建筑面积(㎡)", "建筑面积-自用(㎡)",
+                "建筑面积-出租(㎡)", "建筑面积-闲置(㎡)", "建筑面积-不可使用(㎡)", "使用面积(㎡)", "使用面积-自用(㎡)",
+                "使用面积-出租(㎡)", "使用面积-闲置(㎡)", "使用面积-不可使用(㎡)").toList();
+        int headerLength = headers.size();
+        for (int i = 0; i < headerLength; i++) {
+            Cell cell = headerRow.createCell(i);
+            cell.setCellValue(headers.get(i));
+            cell.setCellStyle(baseCellStyle);
+            // 根据内容长度设置列宽
+            int columnWidth = headers.get(i).length() * 256 * 2 + 256;
+            sheet.setColumnWidth(i, columnWidth);
+        }
+        // 数据
+        for (BuildingRepairMonthPo po : list) {
+            AtomicInteger columnIndex = new AtomicInteger(0);
+            Row row = sheet.createRow(rowIndex.getAndIncrement());
+            // 建筑id基本信息
+            Cell buildingIdCell = row.createCell(columnIndex.getAndIncrement());
+            if (po.getBuildingId() != null) {
+                buildingIdCell.setCellValue(po.getBuildingId());
+            }
+            // 建筑id维修
+            Cell jzJzidCell = row.createCell(columnIndex.getAndIncrement());
+            if (po.getJzJzid() != null) {
+                jzJzidCell.setCellValue(po.getJzJzid());
+            }
+            // 入账日期
+            Cell yearMonthCell = row.createCell(columnIndex.getAndIncrement());
+            if (po.getYearMonth() != null) {
+                yearMonthCell.setCellValue(po.getYearMonth());
+            }
+            // 维修类型
+            Cell repairTypeCell = row.createCell(columnIndex.getAndIncrement());
+            if (po.getRepairType() != null) {
+                repairTypeCell.setCellValue(po.getRepairType());
+            }
+            // 维修内容
+            Cell contentCategoryCell = row.createCell(columnIndex.getAndIncrement());
+            if (po.getContentCategory() != null) {
+                contentCategoryCell.setCellValue(po.getContentCategory());
+            }
+            // erp入账金额元
+            Cell finalCostCell = row.createCell(columnIndex.getAndIncrement());
+            if (po.getFinalCost() != null) {
+                finalCostCell.setCellValue(po.getFinalCost().doubleValue());
+            }
+            finalCostCell.setCellStyle(numberCellStyle);
+            // 每平米维修单价
+            Cell repairUnitPrice = row.createCell(columnIndex.getAndIncrement());
+            if (po.getRepairUnitPrice() != null) {
+                repairUnitPrice.setCellValue(po.getRepairUnitPrice().doubleValue());
+            }
+            repairUnitPrice.setCellStyle(numberCellStyle);
+            // 资产所属单位(一级)
+            Cell firstUnitCell = row.createCell(columnIndex.getAndIncrement());
+            if (po.getFirstUnit() != null) {
+                firstUnitCell.setCellValue(po.getFirstUnit());
+            }
+            // 二级单位
+            Cell areaNameCell = row.createCell(columnIndex.getAndIncrement());
+            if (po.getAreaName() != null) {
+                areaNameCell.setCellValue(po.getAreaName());
+            }
+            // 三级单位
+            Cell cityNameCell = row.createCell(columnIndex.getAndIncrement());
+            if (po.getCityName() != null) {
+                cityNameCell.setCellValue(po.getCityName());
+            }
+            // 局址编号
+            Cell siteNumCell = row.createCell(columnIndex.getAndIncrement());
+            if (po.getSiteName() != null) {
+                siteNumCell.setCellValue(po.getSiteNum());
+            }
+            // 局址别名
+            Cell siteNameCell = row.createCell(columnIndex.getAndIncrement());
+            if (po.getSiteName() != null) {
+                siteNameCell.setCellValue(po.getSiteName());
+            }
+            // 标准地址
+            Cell addressCell = row.createCell(columnIndex.getAndIncrement());
+            if (po.getAddress() != null) {
+                addressCell.setCellValue(po.getAddress());
+            }
+            // 城市等级
+            Cell cityLevel = row.createCell(columnIndex.getAndIncrement());
+            if (po.getCityLevel() != null) {
+                cityLevel.setCellValue(po.getCityLevel());
+            }
+            // 城市区域
+            Cell cityRegionCell = row.createCell(columnIndex.getAndIncrement());
+            if (po.getCityRegion() != null) {
+                cityRegionCell.setCellValue(po.getCityRegion());
+            }
+            // 地段
+            Cell areaSectorCell = row.createCell(columnIndex.getAndIncrement());
+            if (po.getAreaSector() != null) {
+                areaSectorCell.setCellValue(po.getAreaSector());
+            }
+            // 是否有土地资产
+            Cell hasLandCell = row.createCell(columnIndex.getAndIncrement());
+            if (po.getHasLand() != null) {
+                hasLandCell.setCellValue(po.getHasLand());
+            }
+            // 局址id
+            Cell siteIdCell = row.createCell(columnIndex.getAndIncrement());
+            if (po.getSiteId() != null) {
+                siteIdCell.setCellValue(po.getSiteId());
+            }
+            // 建筑别名
+            Cell buildingNameCell = row.createCell(columnIndex.getAndIncrement());
+            if (po.getBuildingName() != null) {
+                buildingNameCell.setCellValue(po.getBuildingName());
+            }
+            // 得房率
+            Cell housingAcquisitionRateCell = row.createCell(columnIndex.getAndIncrement());
+            if (po.getHousingAcquisitionRate() != null) {
+                housingAcquisitionRateCell.setCellValue(po.getHousingAcquisitionRate().doubleValue());
+            }
+            housingAcquisitionRateCell.setCellStyle(percentCellStyle);
+            // 房屋来源
+            Cell housingSourceCell = row.createCell(columnIndex.getAndIncrement());
+            if (po.getHousingSource() != null) {
+                housingSourceCell.setCellValue(po.getHousingSource());
+            }
+            // 取得日期
+            Cell acquisitionDateCell = row.createCell(columnIndex.getAndIncrement());
+            if (po.getAcquisitionDate() != null) {
+                acquisitionDateCell.setCellValue(po.getAcquisitionDate());
+            }
+            // 房龄开始年份
+            Cell houseYearBeganCell = row.createCell(columnIndex.getAndIncrement());
+            if (po.getHouseYearBegan() != null) {
+                houseYearBeganCell.setCellValue(po.getHouseYearBegan());
+            }
+            // 房龄
+            Cell houseAgeCell = row.createCell(columnIndex.getAndIncrement());
+            if (po.getHouseAge() != null) {
+                houseAgeCell.setCellValue(po.getHouseAge());
+            }
+            // 投资主体
+            Cell investorNameCell = row.createCell(columnIndex.getAndIncrement());
+            if (po.getInvestorName() != null) {
+                investorNameCell.setCellValue(po.getInvestorName());
+            }
+            // 管理层级
+            Cell managementLevelCell = row.createCell(columnIndex.getAndIncrement());
+            if (po.getManagementLevel() != null) {
+                managementLevelCell.setCellValue(po.getManagementLevel());
+            }
+            // 房屋结构
+            Cell buildingStructureCell = row.createCell(columnIndex.getAndIncrement());
+            if (po.getBuildingStructure() != null) {
+                buildingStructureCell.setCellValue(po.getBuildingStructure());
+            }
+            // 楼层总数
+            Cell totalFloorsCell = row.createCell(columnIndex.getAndIncrement());
+            if (po.getTotalFloors() != null) {
+                totalFloorsCell.setCellValue(po.getTotalFloors());
+            }
+            // 资产编号
+            Cell assetsNumCell = row.createCell(columnIndex.getAndIncrement());
+            if (po.getAssetsNum() != null) {
+                assetsNumCell.setCellValue(po.getAssetsNum());
+            }
+            // 资产标签号
+            Cell assetsTagNumCell = row.createCell(columnIndex.getAndIncrement());
+            if (po.getAssetsTagNum() != null) {
+                assetsTagNumCell.setCellValue(po.getAssetsTagNum());
+            }
+            // 使用状态
+            Cell usageStatusCell = row.createCell(columnIndex.getAndIncrement());
+            if (po.getUsageStatus() != null) {
+                usageStatusCell.setCellValue(po.getUsageStatus());
+            }
+            // 建筑用途
+            Cell buildingUseCell = row.createCell(columnIndex.getAndIncrement());
+            if (po.getBuildingUse() != null) {
+                buildingUseCell.setCellValue(po.getBuildingUse());
+            }
+            // 权属状态
+            Cell ownershipStatusCell = row.createCell(columnIndex.getAndIncrement());
+            if (po.getOwnershipStatus() != null) {
+                ownershipStatusCell.setCellValue(po.getOwnershipStatus());
+            }
+            // 建筑占地面积(㎡)
+            Cell floorAreaCell = row.createCell(columnIndex.getAndIncrement());
+            if (po.getFloorArea() != null) {
+                floorAreaCell.setCellValue(po.getFloorArea().doubleValue());
+            }
+            floorAreaCell.setCellStyle(numberCellStyle);
+            // 建筑面积(㎡)
+            Cell buildingAreaCell = row.createCell(columnIndex.getAndIncrement());
+            if (po.getBuildingArea() != null) {
+                buildingAreaCell.setCellValue(po.getBuildingArea().doubleValue());
+            }
+            buildingAreaCell.setCellStyle(numberCellStyle);
+            // 建筑面积-自用(㎡)
+            Cell buildingAreaSelfUseCell = row.createCell(columnIndex.getAndIncrement());
+            if (po.getBuildingAreaSelfUse() != null) {
+                buildingAreaSelfUseCell.setCellValue(po.getBuildingAreaSelfUse().doubleValue());
+            }
+            buildingAreaSelfUseCell.setCellStyle(numberCellStyle);
+            // 建筑面积-出租(㎡)
+            Cell buildingAreaRentCell = row.createCell(columnIndex.getAndIncrement());
+            if (po.getBuildingAreaRent() != null) {
+                buildingAreaRentCell.setCellValue(po.getBuildingAreaRent().doubleValue());
+            }
+            buildingAreaRentCell.setCellStyle(numberCellStyle);
+            // 建筑面积-闲置(㎡)
+            Cell buildingAreaIdleCell = row.createCell(columnIndex.getAndIncrement());
+            if (po.getBuildingAreaIdle() != null) {
+                buildingAreaIdleCell.setCellValue(po.getBuildingAreaIdle().doubleValue());
+            }
+            buildingAreaIdleCell.setCellStyle(numberCellStyle);
+            // 建筑面积-不可使用(㎡)
+            Cell buildingAreaUnusableCell = row.createCell(columnIndex.getAndIncrement());
+            if (po.getBuildingAreaUnusable() != null) {
+                buildingAreaUnusableCell.setCellValue(po.getBuildingAreaUnusable().doubleValue());
+            }
+            buildingAreaUnusableCell.setCellStyle(numberCellStyle);
+            // 使用面积(㎡)
+            Cell usableAreaCell = row.createCell(columnIndex.getAndIncrement());
+            if (po.getUsableArea() != null) {
+                usableAreaCell.setCellValue(po.getUsableArea().doubleValue());
+            }
+            usableAreaCell.setCellStyle(numberCellStyle);
+            // 使用面积-自用(㎡)
+            Cell usableAreaSelfUseCell = row.createCell(columnIndex.getAndIncrement());
+            if (po.getUsableAreaSelfUse() != null) {
+                usableAreaSelfUseCell.setCellValue(po.getUsableAreaSelfUse().doubleValue());
+            }
+            usableAreaSelfUseCell.setCellStyle(numberCellStyle);
+            // 使用面积-出租(㎡)
+            Cell usableAreaRentCell = row.createCell(columnIndex.getAndIncrement());
+            if (po.getUsableAreaRent() != null) {
+                usableAreaRentCell.setCellValue(po.getUsableAreaRent().doubleValue());
+            }
+            usableAreaRentCell.setCellStyle(numberCellStyle);
+            // 使用面积-闲置(㎡)
+            Cell usableAreaIdleCell = row.createCell(columnIndex.getAndIncrement());
+            if (po.getUsableAreaIdle() != null) {
+                usableAreaIdleCell.setCellValue(po.getUsableAreaIdle().doubleValue());
+            }
+            usableAreaIdleCell.setCellStyle(numberCellStyle);
+            // 使用面积-不可使用(㎡)
+            Cell usableAreaUnusableCell = row.createCell(columnIndex.getAndIncrement());
+            if (po.getUsableAreaUnusable() != null) {
+                usableAreaUnusableCell.setCellValue(po.getUsableAreaUnusable().doubleValue());
+            }
+            usableAreaUnusableCell.setCellStyle(numberCellStyle);
+        }
+    }
 }

+ 2 - 2
src/main/java/com/example/service/house/HouseWzLandManageDetailsService.java

@@ -144,7 +144,7 @@ public class HouseWzLandManageDetailsService {
             return;
         }
         String filename = "土地管理_闲置管理"
-                + LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyyMMdd")) + ".xlsx";
+                + LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyyMMddHHmmss")) + ".xlsx";
         response.setHeader("Content-Disposition", "attachment;filename=" + URLEncodeUtil.encode(filename));
         response.setContentType("application/octet-stream");
         try (SXSSFWorkbook wb = new SXSSFWorkbook()) {
@@ -410,7 +410,7 @@ public class HouseWzLandManageDetailsService {
             return;
         }
         String filename = "土地管理_土地记录"
-                + LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyyMMdd")) + ".xlsx";
+                + LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyyMMddHHmmss")) + ".xlsx";
         response.setHeader("Content-Disposition", "attachment;filename=" + URLEncodeUtil.encode(filename));
         response.setContentType("application/octet-stream");
         try (SXSSFWorkbook wb = new SXSSFWorkbook()) {