Browse Source

fix: 修复综合评分排名错误

weijianghai 5 days ago
parent
commit
421829dab3
32 changed files with 4873 additions and 4296 deletions
  1. 955 987
      src/main/java/com/example/controller/gdc/WzBuildManageDetailsController.java
  2. 39 39
      src/main/java/com/example/controller/gdc/WzDataInspectionController.java
  3. 15 12
      src/main/java/com/example/controller/gdc/WzHouseArrearsManageController.java
  4. 10 6
      src/main/java/com/example/controller/gdc/WzHouseContracController.java
  5. 193 192
      src/main/java/com/example/controller/gdc/WzHouseContractCompareController.java
  6. 155 171
      src/main/java/com/example/controller/gdc/WzHouseContractInController.java
  7. 173 181
      src/main/java/com/example/controller/gdc/WzHouseContractOutController.java
  8. 193 192
      src/main/java/com/example/controller/gdc/WzHouseContractTopController.java
  9. 14 11
      src/main/java/com/example/controller/gdc/WzHouseCustomerController.java
  10. 216 216
      src/main/java/com/example/controller/gdc/WzHouseInCustomerController.java
  11. 725 722
      src/main/java/com/example/controller/gdc/WzHouseLeaseInConController.java
  12. 4 1
      src/main/java/com/example/controller/gdc/WzHouseMaintController.java
  13. 542 551
      src/main/java/com/example/controller/gdc/WzHouseMaintenaCostController.java
  14. 9 6
      src/main/java/com/example/controller/gdc/WzHouseMarketController.java
  15. 84 98
      src/main/java/com/example/controller/gdc/WzHouseUseController.java
  16. 498 521
      src/main/java/com/example/controller/gdc/WzLandManageDetailsController.java
  17. 4 1
      src/main/java/com/example/controller/gdc/WzLowestUnitPriceController.java
  18. 35 35
      src/main/java/com/example/controller/gdc/WzRemarkController.java
  19. 4 1
      src/main/java/com/example/controller/gdc/WzRentHouseArrearsController.java
  20. 4 1
      src/main/java/com/example/controller/gdc/WzRentThreeMonthController.java
  21. 249 268
      src/main/java/com/example/controller/gdc/WzScoreRankingController.java
  22. 1 1
      src/main/java/com/example/controller/gdc/WzStrategyController.java
  23. 1 1
      src/main/java/com/example/controller/gdc/WzUserController.java
  24. 41 0
      src/main/java/com/example/controller/house/HouseScoreRankingController.java
  25. 2 2
      src/main/java/com/example/dao/gdc/WzOtnAreaDao.java
  26. 270 0
      src/main/java/com/example/dao/house/HouseScoreRankingDao.java
  27. 49 0
      src/main/java/com/example/pojo/bo/ScoreRankingBo.java
  28. 38 0
      src/main/java/com/example/pojo/dto/ScoreRankingDto.java
  29. 46 0
      src/main/java/com/example/pojo/vo/ScoreRankingVo.java
  30. 224 0
      src/main/java/com/example/service/house/HouseScoreRankingService.java
  31. 1 1
      src/main/resources/application-prod.yml
  32. 79 79
      src/main/resources/com/example/dao/gdc/WzOtnAreaDao.xml

File diff suppressed because it is too large
+ 955 - 987
src/main/java/com/example/controller/gdc/WzBuildManageDetailsController.java


+ 39 - 39
src/main/java/com/example/controller/gdc/WzDataInspectionController.java

@@ -1,39 +1,39 @@
-package com.example.controller.gdc;
-
-import com.example.config.annotation.IgnoreAuth;
-import com.example.pojo.gdc.WzDataInspectionEntity;
-import com.example.service.gdc.WzDataInspectionService;
-import com.example.utils.PageMap;
-import com.example.utils.PageUtils;
-import com.example.utils.Query;
-import com.example.utils.R;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
-
-import java.util.List;
-
-/**
- * 房屋出租(合同管理)
- */
-@RestController
-@RequestMapping("/house-car/house/dist/api/WzDataInspection")
-public class WzDataInspectionController {
-
-    @Autowired
-    private WzDataInspectionService wzDataInspectionService;
-
-    @RequestMapping("/list")
-    @IgnoreAuth
-    public R list(@RequestBody PageMap pageMap) {
-        //查询列表数据
-        Query query = new Query(pageMap);
-        List<WzDataInspectionEntity> list = wzDataInspectionService.queryList(query);
-        Query query1 = new Query(pageMap);
-        int total = wzDataInspectionService.queryTotal(query1);
-        PageUtils pageUtil = new PageUtils(list, total, query.getLimit(), query.getPage());
-        return R.ok().put("page", pageUtil);
-    }
-
-}
+//package com.example.controller.gdc;
+//
+//import com.example.config.annotation.IgnoreAuth;
+//import com.example.pojo.gdc.WzDataInspectionEntity;
+//import com.example.service.gdc.WzDataInspectionService;
+//import com.example.utils.PageMap;
+//import com.example.utils.PageUtils;
+//import com.example.utils.Query;
+//import com.example.utils.R;
+//import org.springframework.beans.factory.annotation.Autowired;
+//import org.springframework.web.bind.annotation.RequestBody;
+//import org.springframework.web.bind.annotation.RequestMapping;
+//import org.springframework.web.bind.annotation.RestController;
+//
+//import java.util.List;
+//
+///**
+// * 房屋出租(合同管理)
+// */
+//@RestController
+//@RequestMapping("/house-car/house/dist/api/WzDataInspection")
+//public class WzDataInspectionController {
+//
+//    @Autowired
+//    private WzDataInspectionService wzDataInspectionService;
+//
+//    @RequestMapping("/list")
+//    @IgnoreAuth
+//    public R list(@RequestBody PageMap pageMap) {
+//        //查询列表数据
+//        Query query = new Query(pageMap);
+//        List<WzDataInspectionEntity> list = wzDataInspectionService.queryList(query);
+//        Query query1 = new Query(pageMap);
+//        int total = wzDataInspectionService.queryTotal(query1);
+//        PageUtils pageUtil = new PageUtils(list, total, query.getLimit(), query.getPage());
+//        return R.ok().put("page", pageUtil);
+//    }
+//
+//}

+ 15 - 12
src/main/java/com/example/controller/gdc/WzHouseArrearsManageController.java

@@ -21,7 +21,7 @@ import java.util.List;
 import java.util.Map;
 
 /**
- * 房屋出租(合同管理)
+ * 出租欠费管理
  */
 @RestController
 @RequestMapping("/house-car/house/dist/api/wzHouseArrearsManage")
@@ -32,17 +32,20 @@ public class WzHouseArrearsManageController {
     @Autowired
     private WzHouseArrearsManageService wzHouseArrearsManageService;
 
-    @RequestMapping("/list")
-    @IgnoreAuth
-    public R list(@RequestBody PageMap pageMap) {
-        //查询列表数据
-        Query query = new Query(pageMap);
-        List<WzHouseArrearsManageEntity> list = wzHouseArrearsManageService.queryList(query);
-        int total = wzHouseArrearsManageService.queryTotal(query);
-        PageUtils pageUtil = new PageUtils(list, 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<WzHouseArrearsManageEntity> list = wzHouseArrearsManageService.queryList(query);
+//        int total = wzHouseArrearsManageService.queryTotal(query);
+//        PageUtils pageUtil = new PageUtils(list, total, query.getLimit(), query.getPage());
+//        return R.ok().put("page", pageUtil);
+//    }
+
+    /**
+     * 出租欠费管理
+     */
     @RequestMapping("/echartList")
     @IgnoreAuth
     public R echartList(@RequestBody PageMap pageMap) {

+ 10 - 6
src/main/java/com/example/controller/gdc/WzHouseContracController.java

@@ -35,7 +35,7 @@ import java.util.List;
 import java.util.Map;
 
 /**
- * 房屋出租(合同管理)
+ * 出租合同统计
  */
 @RestController
 @RequestMapping("/house-car/house/dist/api/WzHouseContrac")
@@ -58,13 +58,17 @@ public class WzHouseContracController {
     @IgnoreAuth
     public R list(@RequestBody PageMap pageMap) {
         //查询列表数据
-        Query query = new Query(pageMap);
-        List<WzHouseContracEntity> list = wzHouseContracService.queryList(pageMap.getMap());
-        int total = wzHouseContracService.queryTotal(query);
-        PageUtils pageUtil = new PageUtils(list, total, query.getLimit(), query.getPage());
-        return R.ok().put("page", pageUtil);
+//        Query query = new Query(pageMap);
+//        List<WzHouseContracEntity> list = wzHouseContracService.queryList(pageMap.getMap());
+//        int total = wzHouseContracService.queryTotal(query);
+//        PageUtils pageUtil = new PageUtils(list, total, query.getLimit(), query.getPage());
+//        return R.ok().put("page", pageUtil);
+        return R.ok().put("page", null);
     }
 
+    /**
+     * 出租合同统计
+     */
     @RequestMapping("/echartList")
     @IgnoreAuth
     public R echartList(@RequestBody PageMap pageMap) {

+ 193 - 192
src/main/java/com/example/controller/gdc/WzHouseContractCompareController.java

@@ -1,38 +1,39 @@
-package com.example.controller.gdc;
-
-import com.example.config.annotation.IgnoreAuth;
-import com.example.pojo.gdc.OtnAreaEntity;
-import com.example.pojo.gdc.WzHouseContractInEntity;
-import com.example.pojo.gdc.vo.contract.RentInVo;
-import com.example.service.gdc.WzHouseContractCompareService;
-import com.example.service.gdc.WzOtnAreaService;
-import com.example.utils.PageMap;
-import com.example.utils.PageUtils;
-import com.example.utils.Query;
-import com.example.utils.R;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
-
-import java.text.DecimalFormat;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-/**
- * 房屋出租(合同管理)
- */
-@RestController
-@RequestMapping("/house-car/house/dist/api/WzHouseContractCompare")
-public class WzHouseContractCompareController {
-
-    @Autowired
-    private WzOtnAreaService otnAreaService;
-    @Autowired
-    private WzHouseContractCompareService wzHouseContractCompareService;
-
+//package com.example.controller.gdc;
+//
+//import com.example.config.annotation.IgnoreAuth;
+//import com.example.pojo.gdc.OtnAreaEntity;
+//import com.example.pojo.gdc.WzHouseContractCompareEntity;
+//import com.example.pojo.gdc.WzHouseContractInEntity;
+//import com.example.pojo.gdc.vo.contract.RentInVo;
+//import com.example.service.gdc.WzHouseContractCompareService;
+//import com.example.service.gdc.WzOtnAreaService;
+//import com.example.utils.PageMap;
+//import com.example.utils.PageUtils;
+//import com.example.utils.Query;
+//import com.example.utils.R;
+//import org.springframework.beans.factory.annotation.Autowired;
+//import org.springframework.web.bind.annotation.RequestBody;
+//import org.springframework.web.bind.annotation.RequestMapping;
+//import org.springframework.web.bind.annotation.RestController;
+//
+//import java.text.DecimalFormat;
+//import java.util.ArrayList;
+//import java.util.HashMap;
+//import java.util.List;
+//import java.util.Map;
+//
+///**
+// * 房屋出租(合同管理)
+// */
+//@RestController
+//@RequestMapping("/house-car/house/dist/api/WzHouseContractCompare")
+//public class WzHouseContractCompareController {
+//
+//    @Autowired
+//    private WzOtnAreaService otnAreaService;
+//    @Autowired
+//    private WzHouseContractCompareService wzHouseContractCompareService;
+//
 //    @RequestMapping("/list")
 //    @IgnoreAuth
 //    public R list(@RequestBody PageMap pageMap) {
@@ -44,160 +45,160 @@ public class WzHouseContractCompareController {
 //        PageUtils pageUtil = new PageUtils(list, total, query.getLimit(), query.getPage());
 //        return R.ok().put("page", pageUtil);
 //    }
-
-    @RequestMapping("/echartList")
-    @IgnoreAuth
-    public R echartList(@RequestBody PageMap pageMap) {
-        //查询列表数据
-        Query query = new Query(pageMap);
-        List<WzHouseContractInEntity> alllist = wzHouseContractCompareService.queryList(pageMap.getMap());
-
-        //全省节点
-        RentInVo province=new RentInVo();
-        province.setCounty("全省");
-        province.setCity("全省");
-
-        int aContractNum=0;
-        double aMoney=0l;
-        double aAvage=0l;
-        double aRentArea=0l;
-        //按地市进行划分
-        Map<String,List<WzHouseContractInEntity>> cityMap=new HashMap<>();
-        for (WzHouseContractInEntity entity : alllist) {
-            if(entity.getCity()==null) continue;
-            List<WzHouseContractInEntity> 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<RentInVo> resultList=new ArrayList<>();
-        List<RentInVo> cityList=new ArrayList<>();
-        for(Map.Entry<String,List<WzHouseContractInEntity>> entry:cityMap.entrySet()){
-            List<WzHouseContractInEntity> list=entry.getValue();
-            //县的Map集合
-            Map<String,List<WzHouseContractInEntity>> countyMap=new HashMap<>();
-            for (WzHouseContractInEntity 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<RentInVo> countyList=new ArrayList<>();
-            int cityContractNum=0;
-            double cityMoney=0l;
-            double cityRentArea=0l;
-            double cityAverage=0l;
-            for (Map.Entry<String,List<WzHouseContractInEntity>> countyEntry : countyMap.entrySet()) {
-                int contractNum=0;
-                double money=0l;
-                double average=0l;
-                double rentArea=0l;
-
-                RentInVo county=new RentInVo();
-                for (WzHouseContractInEntity leaveUseVo : countyEntry.getValue()) {
-                    county.setCity(leaveUseVo.getCounty());
-                    contractNum+=1;
-                    rentArea+=leaveUseVo.getSelfUseBuildingArea();
-                    money+=leaveUseVo.getContractAmountIncludingTax();
-
-                    cityContractNum+=1;
-                    cityRentArea+=leaveUseVo.getSelfUseBuildingArea();
-                    cityMoney+=leaveUseVo.getContractAmountIncludingTax();
-
-                    aContractNum+=1;
-                    aRentArea+=leaveUseVo.getSelfUseBuildingArea();
-                    aMoney+=leaveUseVo.getContractAmountIncludingTax();
-                }
-                county.setContractNum(contractNum);
-                county.setRentArea(formatDouble(rentArea));
-                county.setMoney(formatDouble(money));
-                if(rentArea==0){
-                    county.setAverage(0);
-                }else{
-                    county.setAverage(formatDouble(money/rentArea));
-                }
-
-                countyList.add(county);
-            }
-
-            List<RentInVo> 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());
-                for (OtnAreaEntity otnAreaEntity : countyAreaList) {
-                    for (RentInVo wzCity : countyList) {
-                        if(wzCity.getCity().contains(otnAreaEntity.getName())){
-                            orderCountyList.add(wzCity);
-                        }
-                    }
-                }
-            }catch (Exception e){
-                orderCountyList=countyList;
-                e.printStackTrace();
-            }
-
-            RentInVo parent=new RentInVo();
-            parent.setContractNum(cityContractNum);
-            parent.setMoney(formatDouble(cityMoney));
-            parent.setCity(list.get(0).getCity());
-            parent.setChildren(orderCountyList);
-            parent.setRentArea(formatDouble(cityRentArea));
-            if(cityRentArea==0){
-                parent.setAverage(0);
-            }else{
-                parent.setAverage(formatDouble(cityMoney/cityRentArea));
-            }
-            cityList.add(parent);
-        }
-
-        //对cityList 进行排序
-        List<OtnAreaEntity> areaList=otnAreaService.getCityOption("018");
-        List<RentInVo> orderList=new ArrayList<>();
-        for (OtnAreaEntity otnAreaEntity : areaList) {
-            for (RentInVo wzCity : cityList) {
-                if(wzCity.getCity().contains(otnAreaEntity.getName())){
-                    orderList.add(wzCity);
-                }
-            }
-        }
-
-        province.setChildren(orderList);
-        province.setMoney(formatDouble(aMoney));
-        province.setContractNum(aContractNum);
-        province.setAverage(formatDouble(aMoney/aRentArea));
-        province.setRentArea(formatDouble(aRentArea));
-        resultList.add(province);
-
-        int total = wzHouseContractCompareService.queryTotal(query);
-        PageUtils pageUtil = new PageUtils(resultList, total, query.getLimit(), query.getPage());
-        return R.ok().put("page", pageUtil);
-    }
-
-    public double formatDouble(double num){
-        double avera=0;
-        try{
-            DecimalFormat format2 = new DecimalFormat("#.00");
-            String str2 = format2.format(num);
-            avera = Double.parseDouble(str2);
-        }catch (Exception e){
-            e.printStackTrace();
-        }
-        return avera;
-    }
-}
+//
+//    @RequestMapping("/echartList")
+//    @IgnoreAuth
+//    public R echartList(@RequestBody PageMap pageMap) {
+//        //查询列表数据
+//        Query query = new Query(pageMap);
+//        List<WzHouseContractInEntity> alllist = wzHouseContractCompareService.queryList(pageMap.getMap());
+//
+//        //全省节点
+//        RentInVo province=new RentInVo();
+//        province.setCounty("全省");
+//        province.setCity("全省");
+//
+//        int aContractNum=0;
+//        double aMoney=0l;
+//        double aAvage=0l;
+//        double aRentArea=0l;
+//        //按地市进行划分
+//        Map<String,List<WzHouseContractInEntity>> cityMap=new HashMap<>();
+//        for (WzHouseContractInEntity entity : alllist) {
+//            if(entity.getCity()==null) continue;
+//            List<WzHouseContractInEntity> 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<RentInVo> resultList=new ArrayList<>();
+//        List<RentInVo> cityList=new ArrayList<>();
+//        for(Map.Entry<String,List<WzHouseContractInEntity>> entry:cityMap.entrySet()){
+//            List<WzHouseContractInEntity> list=entry.getValue();
+//            //县的Map集合
+//            Map<String,List<WzHouseContractInEntity>> countyMap=new HashMap<>();
+//            for (WzHouseContractInEntity 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<RentInVo> countyList=new ArrayList<>();
+//            int cityContractNum=0;
+//            double cityMoney=0l;
+//            double cityRentArea=0l;
+//            double cityAverage=0l;
+//            for (Map.Entry<String,List<WzHouseContractInEntity>> countyEntry : countyMap.entrySet()) {
+//                int contractNum=0;
+//                double money=0l;
+//                double average=0l;
+//                double rentArea=0l;
+//
+//                RentInVo county=new RentInVo();
+//                for (WzHouseContractInEntity leaveUseVo : countyEntry.getValue()) {
+//                    county.setCity(leaveUseVo.getCounty());
+//                    contractNum+=1;
+//                    rentArea+=leaveUseVo.getSelfUseBuildingArea();
+//                    money+=leaveUseVo.getContractAmountIncludingTax();
+//
+//                    cityContractNum+=1;
+//                    cityRentArea+=leaveUseVo.getSelfUseBuildingArea();
+//                    cityMoney+=leaveUseVo.getContractAmountIncludingTax();
+//
+//                    aContractNum+=1;
+//                    aRentArea+=leaveUseVo.getSelfUseBuildingArea();
+//                    aMoney+=leaveUseVo.getContractAmountIncludingTax();
+//                }
+//                county.setContractNum(contractNum);
+//                county.setRentArea(formatDouble(rentArea));
+//                county.setMoney(formatDouble(money));
+//                if(rentArea==0){
+//                    county.setAverage(0);
+//                }else{
+//                    county.setAverage(formatDouble(money/rentArea));
+//                }
+//
+//                countyList.add(county);
+//            }
+//
+//            List<RentInVo> 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());
+//                for (OtnAreaEntity otnAreaEntity : countyAreaList) {
+//                    for (RentInVo wzCity : countyList) {
+//                        if(wzCity.getCity().contains(otnAreaEntity.getName())){
+//                            orderCountyList.add(wzCity);
+//                        }
+//                    }
+//                }
+//            }catch (Exception e){
+//                orderCountyList=countyList;
+//                e.printStackTrace();
+//            }
+//
+//            RentInVo parent=new RentInVo();
+//            parent.setContractNum(cityContractNum);
+//            parent.setMoney(formatDouble(cityMoney));
+//            parent.setCity(list.get(0).getCity());
+//            parent.setChildren(orderCountyList);
+//            parent.setRentArea(formatDouble(cityRentArea));
+//            if(cityRentArea==0){
+//                parent.setAverage(0);
+//            }else{
+//                parent.setAverage(formatDouble(cityMoney/cityRentArea));
+//            }
+//            cityList.add(parent);
+//        }
+//
+//        //对cityList 进行排序
+//        List<OtnAreaEntity> areaList=otnAreaService.getCityOption("018");
+//        List<RentInVo> orderList=new ArrayList<>();
+//        for (OtnAreaEntity otnAreaEntity : areaList) {
+//            for (RentInVo wzCity : cityList) {
+//                if(wzCity.getCity().contains(otnAreaEntity.getName())){
+//                    orderList.add(wzCity);
+//                }
+//            }
+//        }
+//
+//        province.setChildren(orderList);
+//        province.setMoney(formatDouble(aMoney));
+//        province.setContractNum(aContractNum);
+//        province.setAverage(formatDouble(aMoney/aRentArea));
+//        province.setRentArea(formatDouble(aRentArea));
+//        resultList.add(province);
+//
+//        int total = wzHouseContractCompareService.queryTotal(query);
+//        PageUtils pageUtil = new PageUtils(resultList, total, query.getLimit(), query.getPage());
+//        return R.ok().put("page", pageUtil);
+//    }
+//
+//    public double formatDouble(double num){
+//        double avera=0;
+//        try{
+//            DecimalFormat format2 = new DecimalFormat("#.00");
+//            String str2 = format2.format(num);
+//            avera = Double.parseDouble(str2);
+//        }catch (Exception e){
+//            e.printStackTrace();
+//        }
+//        return avera;
+//    }
+//}

+ 155 - 171
src/main/java/com/example/controller/gdc/WzHouseContractInController.java

@@ -1,37 +1,20 @@
 package com.example.controller.gdc;
 
 import com.example.config.annotation.IgnoreAuth;
-import com.example.pojo.gdc.OtnAreaEntity;
-import com.example.pojo.gdc.WzHouseContractInEntity;
-import com.example.pojo.gdc.vo.contract.RentInVo;
-import com.example.service.gdc.WzHouseContractInService;
-import com.example.service.gdc.WzOtnAreaService;
 import com.example.utils.PageMap;
-import com.example.utils.PageUtils;
-import com.example.utils.Query;
 import com.example.utils.R;
-import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.RequestBody;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RestController;
 
-import java.text.DecimalFormat;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-/**
- * 房屋出租(合同管理)
- */
 @RestController
 @RequestMapping("/house-car/house/dist/api/WzHouseContractIn")
 public class WzHouseContractInController {
 
-    @Autowired
-    private WzOtnAreaService otnAreaService;
-    @Autowired
-    private WzHouseContractInService wzHouseContractInService;
+//    @Autowired
+//    private WzOtnAreaService otnAreaService;
+//    @Autowired
+//    private WzHouseContractInService wzHouseContractInService;
 
 //    @RequestMapping("/list")
 //    @IgnoreAuth
@@ -48,156 +31,157 @@ public class WzHouseContractInController {
     @RequestMapping("/echartList")
     @IgnoreAuth
     public R echartList(@RequestBody PageMap pageMap) {
-        //查询列表数据
-        Query query = new Query(pageMap);
-        List<WzHouseContractInEntity> alllist = wzHouseContractInService.queryList(pageMap.getMap());
-
-        //全省节点
-        RentInVo province=new RentInVo();
-        province.setCounty("全省");
-        province.setCity("全省");
-
-        int aContractNum=0;
-        double aMoney=0l;
-        double aAvage=0l;
-        double aRentArea=0l;
-        //按地市进行划分
-        Map<String,List<WzHouseContractInEntity>> cityMap=new HashMap<>();
-        for (WzHouseContractInEntity entity : alllist) {
-            if(entity.getCity()==null) continue;
-            List<WzHouseContractInEntity> 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<RentInVo> resultList=new ArrayList<>();
-        List<RentInVo> cityList=new ArrayList<>();
-        for(Map.Entry<String,List<WzHouseContractInEntity>> entry:cityMap.entrySet()){
-            List<WzHouseContractInEntity> list=entry.getValue();
-            //县的Map集合
-            Map<String,List<WzHouseContractInEntity>> countyMap=new HashMap<>();
-            for (WzHouseContractInEntity 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<RentInVo> countyList=new ArrayList<>();
-            int cityContractNum=0;
-            double cityMoney=0l;
-            double cityRentArea=0l;
-            double cityAverage=0l;
-            for (Map.Entry<String,List<WzHouseContractInEntity>> countyEntry : countyMap.entrySet()) {
-                int contractNum=0;
-                double money=0l;
-                double average=0l;
-                double rentArea=0l;
-
-                RentInVo county=new RentInVo();
-                for (WzHouseContractInEntity leaveUseVo : countyEntry.getValue()) {
-                    county.setCity(leaveUseVo.getCounty());
-                    contractNum+=1;
-                    rentArea+=leaveUseVo.getSelfUseBuildingArea();
-                    money+=leaveUseVo.getContractAmountIncludingTax();
-
-                    cityContractNum+=1;
-                    cityRentArea+=leaveUseVo.getSelfUseBuildingArea();
-                    cityMoney+=leaveUseVo.getContractAmountIncludingTax();
-
-                    aContractNum+=1;
-                    aRentArea+=leaveUseVo.getSelfUseBuildingArea();
-                    aMoney+=leaveUseVo.getContractAmountIncludingTax();
-                }
-                county.setContractNum(contractNum);
-                county.setRentArea(formatDouble(rentArea));
-                county.setMoney(formatDouble(money));
-                if(rentArea==0){
-                    county.setAverage(0);
-                }else{
-                    county.setAverage(formatDouble(money/rentArea));
-                }
-
-                countyList.add(county);
-            }
-
-            List<RentInVo> 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());
-                for (OtnAreaEntity otnAreaEntity : countyAreaList) {
-                    for (RentInVo wzCity : countyList) {
-                        if(wzCity.getCity().contains(otnAreaEntity.getName())){
-                            orderCountyList.add(wzCity);
-                        }
-                    }
-                }
-            }catch (Exception e){
-                orderCountyList=countyList;
-                e.printStackTrace();
-            }
-
-            RentInVo parent=new RentInVo();
-            parent.setContractNum(cityContractNum);
-            parent.setMoney(formatDouble(cityMoney));
-            parent.setCity(list.get(0).getCity());
-            parent.setChildren(orderCountyList);
-            parent.setRentArea(formatDouble(cityRentArea));
-            if(cityRentArea==0){
-                parent.setAverage(0);
-            }else{
-                parent.setAverage(formatDouble(cityMoney/cityRentArea));
-            }
-            cityList.add(parent);
-        }
-
-        //对cityList 进行排序
-        List<OtnAreaEntity> areaList=otnAreaService.getCityOption("018");
-        List<RentInVo> orderList=new ArrayList<>();
-        for (OtnAreaEntity otnAreaEntity : areaList) {
-            for (RentInVo wzCity : cityList) {
-                if(wzCity.getCity().contains(otnAreaEntity.getName())){
-                    orderList.add(wzCity);
-                }
-            }
-        }
-
-        province.setChildren(orderList);
-        province.setMoney(formatDouble(aMoney));
-        province.setContractNum(aContractNum);
-        province.setAverage(formatDouble(aMoney/aRentArea));
-        province.setRentArea(formatDouble(aRentArea));
-        resultList.add(province);
-
-        int total = wzHouseContractInService.queryTotal(query);
-        PageUtils pageUtil = new PageUtils(resultList, total, query.getLimit(), query.getPage());
-        return R.ok().put("page", pageUtil);
+//        //查询列表数据
+//        Query query = new Query(pageMap);
+//        List<WzHouseContractInEntity> alllist = wzHouseContractInService.queryList(pageMap.getMap());
+//
+//        //全省节点
+//        RentInVo province=new RentInVo();
+//        province.setCounty("全省");
+//        province.setCity("全省");
+//
+//        int aContractNum=0;
+//        double aMoney=0l;
+//        double aAvage=0l;
+//        double aRentArea=0l;
+//        //按地市进行划分
+//        Map<String,List<WzHouseContractInEntity>> cityMap=new HashMap<>();
+//        for (WzHouseContractInEntity entity : alllist) {
+//            if(entity.getCity()==null) continue;
+//            List<WzHouseContractInEntity> 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<RentInVo> resultList=new ArrayList<>();
+//        List<RentInVo> cityList=new ArrayList<>();
+//        for(Map.Entry<String,List<WzHouseContractInEntity>> entry:cityMap.entrySet()){
+//            List<WzHouseContractInEntity> list=entry.getValue();
+//            //县的Map集合
+//            Map<String,List<WzHouseContractInEntity>> countyMap=new HashMap<>();
+//            for (WzHouseContractInEntity 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<RentInVo> countyList=new ArrayList<>();
+//            int cityContractNum=0;
+//            double cityMoney=0l;
+//            double cityRentArea=0l;
+//            double cityAverage=0l;
+//            for (Map.Entry<String,List<WzHouseContractInEntity>> countyEntry : countyMap.entrySet()) {
+//                int contractNum=0;
+//                double money=0l;
+//                double average=0l;
+//                double rentArea=0l;
+//
+//                RentInVo county=new RentInVo();
+//                for (WzHouseContractInEntity leaveUseVo : countyEntry.getValue()) {
+//                    county.setCity(leaveUseVo.getCounty());
+//                    contractNum+=1;
+//                    rentArea+=leaveUseVo.getSelfUseBuildingArea();
+//                    money+=leaveUseVo.getContractAmountIncludingTax();
+//
+//                    cityContractNum+=1;
+//                    cityRentArea+=leaveUseVo.getSelfUseBuildingArea();
+//                    cityMoney+=leaveUseVo.getContractAmountIncludingTax();
+//
+//                    aContractNum+=1;
+//                    aRentArea+=leaveUseVo.getSelfUseBuildingArea();
+//                    aMoney+=leaveUseVo.getContractAmountIncludingTax();
+//                }
+//                county.setContractNum(contractNum);
+//                county.setRentArea(formatDouble(rentArea));
+//                county.setMoney(formatDouble(money));
+//                if(rentArea==0){
+//                    county.setAverage(0);
+//                }else{
+//                    county.setAverage(formatDouble(money/rentArea));
+//                }
+//
+//                countyList.add(county);
+//            }
+//
+//            List<RentInVo> 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());
+//                for (OtnAreaEntity otnAreaEntity : countyAreaList) {
+//                    for (RentInVo wzCity : countyList) {
+//                        if(wzCity.getCity().contains(otnAreaEntity.getName())){
+//                            orderCountyList.add(wzCity);
+//                        }
+//                    }
+//                }
+//            }catch (Exception e){
+//                orderCountyList=countyList;
+//                e.printStackTrace();
+//            }
+//
+//            RentInVo parent=new RentInVo();
+//            parent.setContractNum(cityContractNum);
+//            parent.setMoney(formatDouble(cityMoney));
+//            parent.setCity(list.get(0).getCity());
+//            parent.setChildren(orderCountyList);
+//            parent.setRentArea(formatDouble(cityRentArea));
+//            if(cityRentArea==0){
+//                parent.setAverage(0);
+//            }else{
+//                parent.setAverage(formatDouble(cityMoney/cityRentArea));
+//            }
+//            cityList.add(parent);
+//        }
+//
+//        //对cityList 进行排序
+//        List<OtnAreaEntity> areaList=otnAreaService.getCityOption("018");
+//        List<RentInVo> orderList=new ArrayList<>();
+//        for (OtnAreaEntity otnAreaEntity : areaList) {
+//            for (RentInVo wzCity : cityList) {
+//                if(wzCity.getCity().contains(otnAreaEntity.getName())){
+//                    orderList.add(wzCity);
+//                }
+//            }
+//        }
+//
+//        province.setChildren(orderList);
+//        province.setMoney(formatDouble(aMoney));
+//        province.setContractNum(aContractNum);
+//        province.setAverage(formatDouble(aMoney/aRentArea));
+//        province.setRentArea(formatDouble(aRentArea));
+//        resultList.add(province);
+//
+//        int total = wzHouseContractInService.queryTotal(query);
+//        PageUtils pageUtil = new PageUtils(resultList, total, query.getLimit(), query.getPage());
+//        return R.ok().put("page", pageUtil);
+        return R.ok().put("page", null);
     }
 
-    public double formatDouble(double num){
-        double avera=0;
-        try{
-            DecimalFormat format2 = new DecimalFormat("#.00");
-            String str2 = format2.format(num);
-            avera = Double.parseDouble(str2);
-        }catch (Exception e){
-            e.printStackTrace();
-        }
-        return avera;
-    }
+//    public double formatDouble(double num){
+//        double avera=0;
+//        try{
+//            DecimalFormat format2 = new DecimalFormat("#.00");
+//            String str2 = format2.format(num);
+//            avera = Double.parseDouble(str2);
+//        }catch (Exception e){
+//            e.printStackTrace();
+//        }
+//        return avera;
+//    }
 }

+ 173 - 181
src/main/java/com/example/controller/gdc/WzHouseContractOutController.java

@@ -1,32 +1,21 @@
 package com.example.controller.gdc;
 
 import com.example.config.annotation.IgnoreAuth;
-import com.example.pojo.gdc.WzHouseContracEntity;
 import com.example.pojo.gdc.WzHouseContractOutEntity;
 import com.example.service.gdc.WzHouseContractOutService;
 import com.example.utils.PageMap;
 import com.example.utils.PageUtils;
 import com.example.utils.Query;
 import com.example.utils.R;
-import com.example.utils.excel.ExcelExport;
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.RequestBody;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RestController;
 
-import javax.servlet.http.HttpServletResponse;
-import java.text.DateFormat;
-import java.text.DecimalFormat;
-import java.text.SimpleDateFormat;
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.HashMap;
 import java.util.List;
-import java.util.Map;
 
 /**
- * 房屋出租(合同管理)
+ * 出租合同记录
  */
 @RestController
 @RequestMapping("/house-car/house/dist/api/WzHouseContractOut")
@@ -35,6 +24,9 @@ public class WzHouseContractOutController {
     @Autowired
     private WzHouseContractOutService wzHouseContractOutService;
 
+    /**
+     * 出租合同记录
+     */
     @RequestMapping("/list")
     @IgnoreAuth
     public R list(@RequestBody PageMap pageMap) {
@@ -47,178 +39,178 @@ public class WzHouseContractOutController {
         return R.ok().put("page", pageUtil);
     }
 
-    @RequestMapping("/echartList")
-    @IgnoreAuth
-    public R echartList(@RequestBody PageMap pageMap) {
-        //查询列表数据
-        Query query = new Query(pageMap);
-        List<WzHouseContracEntity> wzHouseContracEntityList = wzHouseContractOutService.queryList(pageMap.getMap());
-
-        WzHouseContracEntity province=new WzHouseContracEntity();
-        province.setCity("全省");
-
-        Map<String,List<WzHouseContracEntity>> map=new HashMap<>();
-        for (WzHouseContracEntity leaveUseVo : wzHouseContracEntityList) {
-            List<WzHouseContracEntity> list;
-            if(map.get(leaveUseVo.getCity())!=null){
-                list=map.get(leaveUseVo.getCity());
-                list.add(leaveUseVo);
-            }else{
-                list=new ArrayList<>();
-                list.add(leaveUseVo);
-            }
-            map.put(leaveUseVo.getCity(),list);
-        }
-        List<WzHouseContracEntity> resultList=new ArrayList<>();
-        List<WzHouseContracEntity> cityList=new ArrayList<>();
-
-        double allContractQuantity=0l;
-        double allNoTaxContractAmount=0l;
-        double allRentArea=0l;
-        double allUnitPricePerSquareMeter=0l;
-
-        for(Map.Entry<String,List<WzHouseContracEntity>> entry:map.entrySet()){
-            List<WzHouseContracEntity> list=entry.getValue();
-            double contractQuantity=0l;
-            double noTaxContractAmount=0l;
-            double rentArea=0l;
-            double unitPricePerSquareMeter=0l;
-            for (WzHouseContracEntity leaveUseVo : list) {
-                contractQuantity+=leaveUseVo.getContractQuantity();
-                noTaxContractAmount+=leaveUseVo.getNoTaxContractAmount();
-                rentArea+=leaveUseVo.getRentArea();
-                unitPricePerSquareMeter+=leaveUseVo.getUnitPricePerSquareMeter();
-
-                allContractQuantity+=leaveUseVo.getContractQuantity();
-                allNoTaxContractAmount+=leaveUseVo.getNoTaxContractAmount();
-                allRentArea+=leaveUseVo.getRentArea();
-                allUnitPricePerSquareMeter+=leaveUseVo.getUnitPricePerSquareMeter();
-            }
-            cityList.add(list.get(0));
-        }
-        province.setContractQuantity(allContractQuantity);
-        province.setNoTaxContractAmount(formatDouble(allNoTaxContractAmount));
-        province.setRentArea(allRentArea);
-        province.setUnitPricePerSquareMeter(allUnitPricePerSquareMeter);
-        province.setChildren(cityList);
-        resultList.add(province);
-
-        int total = wzHouseContractOutService.queryTotal(query);
-        PageUtils pageUtil = new PageUtils(resultList, total, query.getLimit(), query.getPage());
-        return R.ok().put("page", pageUtil);
-    }
+//    @RequestMapping("/echartList")
+//    @IgnoreAuth
+//    public R echartList(@RequestBody PageMap pageMap) {
+//        //查询列表数据
+//        Query query = new Query(pageMap);
+//        List<WzHouseContracEntity> wzHouseContracEntityList = wzHouseContractOutService.queryList(pageMap.getMap());
+//
+//        WzHouseContracEntity province=new WzHouseContracEntity();
+//        province.setCity("全省");
+//
+//        Map<String,List<WzHouseContracEntity>> map=new HashMap<>();
+//        for (WzHouseContracEntity leaveUseVo : wzHouseContracEntityList) {
+//            List<WzHouseContracEntity> list;
+//            if(map.get(leaveUseVo.getCity())!=null){
+//                list=map.get(leaveUseVo.getCity());
+//                list.add(leaveUseVo);
+//            }else{
+//                list=new ArrayList<>();
+//                list.add(leaveUseVo);
+//            }
+//            map.put(leaveUseVo.getCity(),list);
+//        }
+//        List<WzHouseContracEntity> resultList=new ArrayList<>();
+//        List<WzHouseContracEntity> cityList=new ArrayList<>();
+//
+//        double allContractQuantity=0l;
+//        double allNoTaxContractAmount=0l;
+//        double allRentArea=0l;
+//        double allUnitPricePerSquareMeter=0l;
+//
+//        for(Map.Entry<String,List<WzHouseContracEntity>> entry:map.entrySet()){
+//            List<WzHouseContracEntity> list=entry.getValue();
+//            double contractQuantity=0l;
+//            double noTaxContractAmount=0l;
+//            double rentArea=0l;
+//            double unitPricePerSquareMeter=0l;
+//            for (WzHouseContracEntity leaveUseVo : list) {
+//                contractQuantity+=leaveUseVo.getContractQuantity();
+//                noTaxContractAmount+=leaveUseVo.getNoTaxContractAmount();
+//                rentArea+=leaveUseVo.getRentArea();
+//                unitPricePerSquareMeter+=leaveUseVo.getUnitPricePerSquareMeter();
+//
+//                allContractQuantity+=leaveUseVo.getContractQuantity();
+//                allNoTaxContractAmount+=leaveUseVo.getNoTaxContractAmount();
+//                allRentArea+=leaveUseVo.getRentArea();
+//                allUnitPricePerSquareMeter+=leaveUseVo.getUnitPricePerSquareMeter();
+//            }
+//            cityList.add(list.get(0));
+//        }
+//        province.setContractQuantity(allContractQuantity);
+//        province.setNoTaxContractAmount(formatDouble(allNoTaxContractAmount));
+//        province.setRentArea(allRentArea);
+//        province.setUnitPricePerSquareMeter(allUnitPricePerSquareMeter);
+//        province.setChildren(cityList);
+//        resultList.add(province);
+//
+//        int total = wzHouseContractOutService.queryTotal(query);
+//        PageUtils pageUtil = new PageUtils(resultList, total, query.getLimit(), query.getPage());
+//        return R.ok().put("page", pageUtil);
+//    }
 
     /**
      * 清单excel
      */
-    @GetMapping("/excel")
-    @IgnoreAuth
-    public void excel(String name,String buildingNameAlias,String city,String county, HttpServletResponse response) {
-        Map<String, Object> map = new HashMap<>();
-        if (buildingNameAlias != null) {
-            map.put("buildingNameAlias", buildingNameAlias);
-        }
-        if (city != null) {
-            map.put("city", city);
-        }
-        if (county != null) {
-            map.put("county", county);
-        }
-
-        DateFormat df = new SimpleDateFormat("yyyyMMddHHmmss");
-        ExcelExport ee1 = new ExcelExport("报表" + df.format(new Date()));
-
-        try {
-            List<WzHouseContractOutEntity> list = wzHouseContractOutService.queryList(map);
-            List<Object> colList;
-            List<Object[]> allList = new ArrayList();
-            for (int i = 0; i < list.size(); i++) {
-                colList = new ArrayList();
-                colList.add(list.get(i).getContractNumber());
-                colList.add(list.get(i).getContractSerialNumber());
-                colList.add(list.get(i).getCreateDate());
-                colList.add(list.get(i).getContractStatus());
-                colList.add(list.get(i).getContractName());
-                colList.add(list.get(i).getUndertakingDepartment());
-                colList.add(list.get(i).getUndertaker());
-                colList.add(list.get(i).getContactNumber());
-                colList.add(list.get(i).getOurSubject());
-                colList.add(list.get(i).getFullNameOfThTenant());
-                colList.add(list.get(i).getContractType());
-                colList.add(list.get(i).getContractDescription());
-                colList.add(list.get(i).getExcludingValueAddedTaxContractAmount());
-                colList.add(list.get(i).getContractAmountIncludingVat());
-                colList.add(list.get(i).getRate());
-                colList.add(list.get(i).getPriceIncreaseMechanism());
-                colList.add(list.get(i).getRenPaymentMethod());
-                colList.add(list.get(i).getLeaseCategory());
-                colList.add(list.get(i).getRentFreeStartDate());
-                colList.add(list.get(i).getRentFreeEndDate());
-                colList.add(list.get(i).getRentalStartDate());
-                colList.add(list.get(i).getRentalEndDate());
-                colList.add(list.get(i).getContractLeaseTerm());
-                colList.add(list.get(i).getContractRentalArea());
-                colList.add(list.get(i).getDebt());
-                colList.add(list.get(i).getEndTime());
-                colList.add(list.get(i).getEndReason());
-                colList.add(list.get(i).getSubordinateUnits());
-                colList.add(list.get(i).getResourceType());
-                colList.add(list.get(i).getBuildingAlias());
-                allList.add(colList.toArray());
-            }
-
-            String[] header = new String[]{
-                    "合同编号",
-                    "合同流水号",
-                    "创建日期",
-                    "合同状态",
-                    "合同名称",
-                    "承办部门",
-                    "承办人",
-                    "联系电话",
-                    "我方主体",
-                    "合同类型",
-                    "投资主体",
-                    "合同说明",
-                    "含增值税合同金额",
-                    "不含增值税合同额",
-                    "税率",
-                    "涨价机制",
-                    "交租方式",
-                    "租赁类别",
-                    "免租期起始日期",
-                    "免租期终止日期",
-                    "出租起始日期",
-                    "出租终止日期",
-                    "合同租期(月数)",
-                    "合同出租面积",
-                    "房屋实际产权",
-                    "是否有欠款",
-                    "终止时间",
-                    "终止原因",
-                    "所属单位",
-                    "资源类型",
-                    "建筑/土地别名"
-            };
-            ee1.addSheetByArray(df.format(new Date()) + "清单", allList, header);
-            ee1.export(response);
-        } catch (Exception e) {
-            e.printStackTrace();
-        }
-
-    }
-
-
-    public double formatDouble(double num){
-        double avera=0l;
-        try{
-            DecimalFormat format2 = new DecimalFormat("#.00");
-            String str2 = format2.format(num);
-            avera = Double.parseDouble(str2);
-        }catch (Exception e){
-            e.printStackTrace();
-        }
-        return avera;
-    }
+//    @GetMapping("/excel")
+//    @IgnoreAuth
+//    public void excel(String name,String buildingNameAlias,String city,String county, HttpServletResponse response) {
+//        Map<String, Object> map = new HashMap<>();
+//        if (buildingNameAlias != null) {
+//            map.put("buildingNameAlias", buildingNameAlias);
+//        }
+//        if (city != null) {
+//            map.put("city", city);
+//        }
+//        if (county != null) {
+//            map.put("county", county);
+//        }
+//
+//        DateFormat df = new SimpleDateFormat("yyyyMMddHHmmss");
+//        ExcelExport ee1 = new ExcelExport("报表" + df.format(new Date()));
+//
+//        try {
+//            List<WzHouseContractOutEntity> list = wzHouseContractOutService.queryList(map);
+//            List<Object> colList;
+//            List<Object[]> allList = new ArrayList();
+//            for (int i = 0; i < list.size(); i++) {
+//                colList = new ArrayList();
+//                colList.add(list.get(i).getContractNumber());
+//                colList.add(list.get(i).getContractSerialNumber());
+//                colList.add(list.get(i).getCreateDate());
+//                colList.add(list.get(i).getContractStatus());
+//                colList.add(list.get(i).getContractName());
+//                colList.add(list.get(i).getUndertakingDepartment());
+//                colList.add(list.get(i).getUndertaker());
+//                colList.add(list.get(i).getContactNumber());
+//                colList.add(list.get(i).getOurSubject());
+//                colList.add(list.get(i).getFullNameOfThTenant());
+//                colList.add(list.get(i).getContractType());
+//                colList.add(list.get(i).getContractDescription());
+//                colList.add(list.get(i).getExcludingValueAddedTaxContractAmount());
+//                colList.add(list.get(i).getContractAmountIncludingVat());
+//                colList.add(list.get(i).getRate());
+//                colList.add(list.get(i).getPriceIncreaseMechanism());
+//                colList.add(list.get(i).getRenPaymentMethod());
+//                colList.add(list.get(i).getLeaseCategory());
+//                colList.add(list.get(i).getRentFreeStartDate());
+//                colList.add(list.get(i).getRentFreeEndDate());
+//                colList.add(list.get(i).getRentalStartDate());
+//                colList.add(list.get(i).getRentalEndDate());
+//                colList.add(list.get(i).getContractLeaseTerm());
+//                colList.add(list.get(i).getContractRentalArea());
+//                colList.add(list.get(i).getDebt());
+//                colList.add(list.get(i).getEndTime());
+//                colList.add(list.get(i).getEndReason());
+//                colList.add(list.get(i).getSubordinateUnits());
+//                colList.add(list.get(i).getResourceType());
+//                colList.add(list.get(i).getBuildingAlias());
+//                allList.add(colList.toArray());
+//            }
+//
+//            String[] header = new String[]{
+//                    "合同编号",
+//                    "合同流水号",
+//                    "创建日期",
+//                    "合同状态",
+//                    "合同名称",
+//                    "承办部门",
+//                    "承办人",
+//                    "联系电话",
+//                    "我方主体",
+//                    "合同类型",
+//                    "投资主体",
+//                    "合同说明",
+//                    "含增值税合同金额",
+//                    "不含增值税合同额",
+//                    "税率",
+//                    "涨价机制",
+//                    "交租方式",
+//                    "租赁类别",
+//                    "免租期起始日期",
+//                    "免租期终止日期",
+//                    "出租起始日期",
+//                    "出租终止日期",
+//                    "合同租期(月数)",
+//                    "合同出租面积",
+//                    "房屋实际产权",
+//                    "是否有欠款",
+//                    "终止时间",
+//                    "终止原因",
+//                    "所属单位",
+//                    "资源类型",
+//                    "建筑/土地别名"
+//            };
+//            ee1.addSheetByArray(df.format(new Date()) + "清单", allList, header);
+//            ee1.export(response);
+//        } catch (Exception e) {
+//            e.printStackTrace();
+//        }
+//
+//    }
+
+
+//    public double formatDouble(double num){
+//        double avera=0l;
+//        try{
+//            DecimalFormat format2 = new DecimalFormat("#.00");
+//            String str2 = format2.format(num);
+//            avera = Double.parseDouble(str2);
+//        }catch (Exception e){
+//            e.printStackTrace();
+//        }
+//        return avera;
+//    }
 
 }

+ 193 - 192
src/main/java/com/example/controller/gdc/WzHouseContractTopController.java

@@ -1,38 +1,39 @@
-package com.example.controller.gdc;
-
-import com.example.config.annotation.IgnoreAuth;
-import com.example.pojo.gdc.OtnAreaEntity;
-import com.example.pojo.gdc.WzHouseContractInEntity;
-import com.example.pojo.gdc.vo.contract.RentInVo;
-import com.example.service.gdc.WzHouseContractTopService;
-import com.example.service.gdc.WzOtnAreaService;
-import com.example.utils.PageMap;
-import com.example.utils.PageUtils;
-import com.example.utils.Query;
-import com.example.utils.R;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
-
-import java.text.DecimalFormat;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-/**
- * 房屋出租(合同管理)
- */
-@RestController
-@RequestMapping("/house-car/house/dist/api/WzHouseContractTop")
-public class WzHouseContractTopController {
-
-    @Autowired
-    private WzOtnAreaService otnAreaService;
-    @Autowired
-    private WzHouseContractTopService wzHouseContractTopService;
-
+//package com.example.controller.gdc;
+//
+//import com.example.config.annotation.IgnoreAuth;
+//import com.example.pojo.gdc.OtnAreaEntity;
+//import com.example.pojo.gdc.WzHouseContractInEntity;
+//import com.example.pojo.gdc.WzHouseContractTopEntity;
+//import com.example.pojo.gdc.vo.contract.RentInVo;
+//import com.example.service.gdc.WzHouseContractTopService;
+//import com.example.service.gdc.WzOtnAreaService;
+//import com.example.utils.PageMap;
+//import com.example.utils.PageUtils;
+//import com.example.utils.Query;
+//import com.example.utils.R;
+//import org.springframework.beans.factory.annotation.Autowired;
+//import org.springframework.web.bind.annotation.RequestBody;
+//import org.springframework.web.bind.annotation.RequestMapping;
+//import org.springframework.web.bind.annotation.RestController;
+//
+//import java.text.DecimalFormat;
+//import java.util.ArrayList;
+//import java.util.HashMap;
+//import java.util.List;
+//import java.util.Map;
+//
+///**
+// * 房屋出租(合同管理)
+// */
+//@RestController
+//@RequestMapping("/house-car/house/dist/api/WzHouseContractTop")
+//public class WzHouseContractTopController {
+//
+//    @Autowired
+//    private WzOtnAreaService otnAreaService;
+//    @Autowired
+//    private WzHouseContractTopService wzHouseContractTopService;
+//
 //    @RequestMapping("/list")
 //    @IgnoreAuth
 //    public R list(@RequestBody PageMap pageMap) {
@@ -51,160 +52,160 @@ public class WzHouseContractTopController {
 //        PageUtils pageUtil = new PageUtils(list, total, query.getLimit(), query.getPage());
 //        return R.ok().put("page", pageUtil);
 //    }
-
-    @RequestMapping("/echartList")
-    @IgnoreAuth
-    public R echartList(@RequestBody PageMap pageMap) {
-        //查询列表数据
-        Query query = new Query(pageMap);
-        List<WzHouseContractInEntity> alllist = wzHouseContractTopService.queryList(pageMap.getMap());
-
-        //全省节点
-        RentInVo province=new RentInVo();
-        province.setCounty("全省");
-        province.setCity("全省");
-
-        int aContractNum=0;
-        double aMoney=0l;
-        double aAvage=0l;
-        double aRentArea=0l;
-        //按地市进行划分
-        Map<String,List<WzHouseContractInEntity>> cityMap=new HashMap<>();
-        for (WzHouseContractInEntity entity : alllist) {
-            if(entity.getCity()==null) continue;
-            List<WzHouseContractInEntity> 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<RentInVo> resultList=new ArrayList<>();
-        List<RentInVo> cityList=new ArrayList<>();
-        for(Map.Entry<String,List<WzHouseContractInEntity>> entry:cityMap.entrySet()){
-            List<WzHouseContractInEntity> list=entry.getValue();
-            //县的Map集合
-            Map<String,List<WzHouseContractInEntity>> countyMap=new HashMap<>();
-            for (WzHouseContractInEntity 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<RentInVo> countyList=new ArrayList<>();
-            int cityContractNum=0;
-            double cityMoney=0l;
-            double cityRentArea=0l;
-            double cityAverage=0l;
-            for (Map.Entry<String,List<WzHouseContractInEntity>> countyEntry : countyMap.entrySet()) {
-                int contractNum=0;
-                double money=0l;
-                double average=0l;
-                double rentArea=0l;
-
-                RentInVo county=new RentInVo();
-                for (WzHouseContractInEntity leaveUseVo : countyEntry.getValue()) {
-                    county.setCity(leaveUseVo.getCounty());
-                    contractNum+=1;
-                    rentArea+=leaveUseVo.getSelfUseBuildingArea();
-                    money+=leaveUseVo.getContractAmountIncludingTax();
-
-                    cityContractNum+=1;
-                    cityRentArea+=leaveUseVo.getSelfUseBuildingArea();
-                    cityMoney+=leaveUseVo.getContractAmountIncludingTax();
-
-                    aContractNum+=1;
-                    aRentArea+=leaveUseVo.getSelfUseBuildingArea();
-                    aMoney+=leaveUseVo.getContractAmountIncludingTax();
-                }
-                county.setContractNum(contractNum);
-                county.setRentArea(formatDouble(rentArea));
-                county.setMoney(formatDouble(money));
-                if(rentArea==0){
-                    county.setAverage(0);
-                }else{
-                    county.setAverage(formatDouble(money/rentArea));
-                }
-
-                countyList.add(county);
-            }
-
-            List<RentInVo> 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());
-                for (OtnAreaEntity otnAreaEntity : countyAreaList) {
-                    for (RentInVo wzCity : countyList) {
-                        if(wzCity.getCity().contains(otnAreaEntity.getName())){
-                            orderCountyList.add(wzCity);
-                        }
-                    }
-                }
-            }catch (Exception e){
-                orderCountyList=countyList;
-                e.printStackTrace();
-            }
-
-            RentInVo parent=new RentInVo();
-            parent.setContractNum(cityContractNum);
-            parent.setMoney(formatDouble(cityMoney));
-            parent.setCity(list.get(0).getCity());
-            parent.setChildren(orderCountyList);
-            parent.setRentArea(formatDouble(cityRentArea));
-            if(cityRentArea==0){
-                parent.setAverage(0);
-            }else{
-                parent.setAverage(formatDouble(cityMoney/cityRentArea));
-            }
-            cityList.add(parent);
-        }
-
-        //对cityList 进行排序
-        List<OtnAreaEntity> areaList=otnAreaService.getCityOption("018");
-        List<RentInVo> orderList=new ArrayList<>();
-        for (OtnAreaEntity otnAreaEntity : areaList) {
-            for (RentInVo wzCity : cityList) {
-                if(wzCity.getCity().contains(otnAreaEntity.getName())){
-                    orderList.add(wzCity);
-                }
-            }
-        }
-
-        province.setChildren(orderList);
-        province.setMoney(formatDouble(aMoney));
-        province.setContractNum(aContractNum);
-        province.setAverage(formatDouble(aMoney/aRentArea));
-        province.setRentArea(formatDouble(aRentArea));
-        resultList.add(province);
-
-        int total = wzHouseContractTopService.queryTotal(query);
-        PageUtils pageUtil = new PageUtils(resultList, total, query.getLimit(), query.getPage());
-        return R.ok().put("page", pageUtil);
-    }
-
-    public double formatDouble(double num){
-        double avera=0;
-        try{
-            DecimalFormat format2 = new DecimalFormat("#.00");
-            String str2 = format2.format(num);
-            avera = Double.parseDouble(str2);
-        }catch (Exception e){
-            e.printStackTrace();
-        }
-        return avera;
-    }
-}
+//
+//    @RequestMapping("/echartList")
+//    @IgnoreAuth
+//    public R echartList(@RequestBody PageMap pageMap) {
+//        //查询列表数据
+//        Query query = new Query(pageMap);
+//        List<WzHouseContractInEntity> alllist = wzHouseContractTopService.queryList(pageMap.getMap());
+//
+//        //全省节点
+//        RentInVo province=new RentInVo();
+//        province.setCounty("全省");
+//        province.setCity("全省");
+//
+//        int aContractNum=0;
+//        double aMoney=0l;
+//        double aAvage=0l;
+//        double aRentArea=0l;
+//        //按地市进行划分
+//        Map<String,List<WzHouseContractInEntity>> cityMap=new HashMap<>();
+//        for (WzHouseContractInEntity entity : alllist) {
+//            if(entity.getCity()==null) continue;
+//            List<WzHouseContractInEntity> 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<RentInVo> resultList=new ArrayList<>();
+//        List<RentInVo> cityList=new ArrayList<>();
+//        for(Map.Entry<String,List<WzHouseContractInEntity>> entry:cityMap.entrySet()){
+//            List<WzHouseContractInEntity> list=entry.getValue();
+//            //县的Map集合
+//            Map<String,List<WzHouseContractInEntity>> countyMap=new HashMap<>();
+//            for (WzHouseContractInEntity 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<RentInVo> countyList=new ArrayList<>();
+//            int cityContractNum=0;
+//            double cityMoney=0l;
+//            double cityRentArea=0l;
+//            double cityAverage=0l;
+//            for (Map.Entry<String,List<WzHouseContractInEntity>> countyEntry : countyMap.entrySet()) {
+//                int contractNum=0;
+//                double money=0l;
+//                double average=0l;
+//                double rentArea=0l;
+//
+//                RentInVo county=new RentInVo();
+//                for (WzHouseContractInEntity leaveUseVo : countyEntry.getValue()) {
+//                    county.setCity(leaveUseVo.getCounty());
+//                    contractNum+=1;
+//                    rentArea+=leaveUseVo.getSelfUseBuildingArea();
+//                    money+=leaveUseVo.getContractAmountIncludingTax();
+//
+//                    cityContractNum+=1;
+//                    cityRentArea+=leaveUseVo.getSelfUseBuildingArea();
+//                    cityMoney+=leaveUseVo.getContractAmountIncludingTax();
+//
+//                    aContractNum+=1;
+//                    aRentArea+=leaveUseVo.getSelfUseBuildingArea();
+//                    aMoney+=leaveUseVo.getContractAmountIncludingTax();
+//                }
+//                county.setContractNum(contractNum);
+//                county.setRentArea(formatDouble(rentArea));
+//                county.setMoney(formatDouble(money));
+//                if(rentArea==0){
+//                    county.setAverage(0);
+//                }else{
+//                    county.setAverage(formatDouble(money/rentArea));
+//                }
+//
+//                countyList.add(county);
+//            }
+//
+//            List<RentInVo> 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());
+//                for (OtnAreaEntity otnAreaEntity : countyAreaList) {
+//                    for (RentInVo wzCity : countyList) {
+//                        if(wzCity.getCity().contains(otnAreaEntity.getName())){
+//                            orderCountyList.add(wzCity);
+//                        }
+//                    }
+//                }
+//            }catch (Exception e){
+//                orderCountyList=countyList;
+//                e.printStackTrace();
+//            }
+//
+//            RentInVo parent=new RentInVo();
+//            parent.setContractNum(cityContractNum);
+//            parent.setMoney(formatDouble(cityMoney));
+//            parent.setCity(list.get(0).getCity());
+//            parent.setChildren(orderCountyList);
+//            parent.setRentArea(formatDouble(cityRentArea));
+//            if(cityRentArea==0){
+//                parent.setAverage(0);
+//            }else{
+//                parent.setAverage(formatDouble(cityMoney/cityRentArea));
+//            }
+//            cityList.add(parent);
+//        }
+//
+//        //对cityList 进行排序
+//        List<OtnAreaEntity> areaList=otnAreaService.getCityOption("018");
+//        List<RentInVo> orderList=new ArrayList<>();
+//        for (OtnAreaEntity otnAreaEntity : areaList) {
+//            for (RentInVo wzCity : cityList) {
+//                if(wzCity.getCity().contains(otnAreaEntity.getName())){
+//                    orderList.add(wzCity);
+//                }
+//            }
+//        }
+//
+//        province.setChildren(orderList);
+//        province.setMoney(formatDouble(aMoney));
+//        province.setContractNum(aContractNum);
+//        province.setAverage(formatDouble(aMoney/aRentArea));
+//        province.setRentArea(formatDouble(aRentArea));
+//        resultList.add(province);
+//
+//        int total = wzHouseContractTopService.queryTotal(query);
+//        PageUtils pageUtil = new PageUtils(resultList, total, query.getLimit(), query.getPage());
+//        return R.ok().put("page", pageUtil);
+//    }
+//
+//    public double formatDouble(double num){
+//        double avera=0;
+//        try{
+//            DecimalFormat format2 = new DecimalFormat("#.00");
+//            String str2 = format2.format(num);
+//            avera = Double.parseDouble(str2);
+//        }catch (Exception e){
+//            e.printStackTrace();
+//        }
+//        return avera;
+//    }
+//}

+ 14 - 11
src/main/java/com/example/controller/gdc/WzHouseCustomerController.java

@@ -20,7 +20,7 @@ import java.util.List;
 import java.util.Map;
 
 /**
- * 房屋出租(合同管理)
+ * 出租客户管理
  */
 @RestController
 @RequestMapping("/house-car/house/dist/api/wzHouseCustomer")
@@ -31,17 +31,20 @@ public class WzHouseCustomerController {
     @Autowired
     private WzOtnAreaService otnAreaService;
 
-    @RequestMapping("/list")
-    @IgnoreAuth
-    public R list(@RequestBody PageMap pageMap) {
-        //查询列表数据
-        Query query = new Query(pageMap);
-        List<WzHouseCustomerEntity> list = wzHouseCustomerService.queryList(query);
-        int total = wzHouseCustomerService.queryTotal(query);
-        PageUtils pageUtil = new PageUtils(list, 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<WzHouseCustomerEntity> list = wzHouseCustomerService.queryList(query);
+//        int total = wzHouseCustomerService.queryTotal(query);
+//        PageUtils pageUtil = new PageUtils(list, total, query.getLimit(), query.getPage());
+//        return R.ok().put("page", pageUtil);
+//    }
 
+    /**
+     * 出租客户管理
+     */
     @RequestMapping("/echartList")
     @IgnoreAuth
     public R echartList(@RequestBody PageMap pageMap) {

+ 216 - 216
src/main/java/com/example/controller/gdc/WzHouseInCustomerController.java

@@ -1,216 +1,216 @@
-package com.example.controller.gdc;
-
-import com.example.config.annotation.IgnoreAuth;
-import com.example.pojo.gdc.OtnAreaEntity;
-import com.example.pojo.gdc.WzHouseInCustomerEntity;
-import com.example.service.gdc.WzHouseInCustomerService;
-import com.example.service.gdc.WzOtnAreaService;
-import com.example.utils.PageMap;
-import com.example.utils.PageUtils;
-import com.example.utils.Query;
-import com.example.utils.R;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-
-/**
- * 房屋租入(客户管理)
- */
-@RestController
-@RequestMapping("/house-car/house/dist/api/wzHouseInCustomer")
-public class WzHouseInCustomerController {
-
-    @Autowired
-    private WzHouseInCustomerService wzHouseInCustomerService;
-
-    @Autowired
-    private WzOtnAreaService otnAreaService;
-
-    @RequestMapping("/echartList")
-    @IgnoreAuth
-    public R echartList(@RequestBody PageMap pageMap) {
-
-        List<WzHouseInCustomerEntity> resultList = new ArrayList<>();
-
-        //查询列表数据
-        Query query = new Query(pageMap);
-        List<WzHouseInCustomerEntity> wzHouseInCustomerEntityList = wzHouseInCustomerService.queryList(query);
-
-        Map<String, List<WzHouseInCustomerEntity>> cityMap = new HashMap<>();
-        for (WzHouseInCustomerEntity wzHouseInCustomer : wzHouseInCustomerEntityList) {
-            List<WzHouseInCustomerEntity> list;
-            if (cityMap.get(wzHouseInCustomer.getStandardAddressLevel2()) != null) {
-                list = cityMap.get(wzHouseInCustomer.getStandardAddressLevel2());
-                list.add(wzHouseInCustomer);
-            } else {
-                list = new ArrayList<>();
-                list.add(wzHouseInCustomer);
-            }
-            cityMap.put(wzHouseInCustomer.getStandardAddressLevel2(), list);
-        }
-
-        Integer allPerson = 0;                           // 个人
-        Integer allPersonPrivate = 0;                    // 私企
-        Integer allStateOwnedEnterprises = 0;            // 国企
-        Integer allGovernment = 0;                       // 政府
-        Integer allVillageAndTownColletive = 0;          // 村镇集体
-        Integer allAllNum = 0;                           // 总计
-        List<WzHouseInCustomerEntity> cityList = new ArrayList<>();
-        for (Map.Entry<String, List<WzHouseInCustomerEntity>> entry : cityMap.entrySet()) {
-            List<WzHouseInCustomerEntity> list = entry.getValue();
-            if (list.get(0).getStandardAddressLevel2().equals("全省")) {
-                continue;
-            }
-
-            //县的Map集合
-            Map<String, List<WzHouseInCustomerEntity>> countyMap = new HashMap<>();
-            for (WzHouseInCustomerEntity leaveUseVo : list) {
-                if (leaveUseVo.getStandardAddressLevel3() == null || leaveUseVo.getStandardAddressLevel3().equals("")) {
-                    continue;
-                }
-                if (countyMap.get(leaveUseVo.getStandardAddressLevel3()) != null) {
-                    list = countyMap.get(leaveUseVo.getStandardAddressLevel3());
-                    list.add(leaveUseVo);
-                } else {
-                    list = new ArrayList<>();
-                    list.add(leaveUseVo);
-                }
-                countyMap.put(leaveUseVo.getStandardAddressLevel3(), list);
-            }
-            Integer cityPerson = 0;                           // 个人
-            Integer cityPersonPrivate = 0;                    // 私企
-            Integer cityStateOwnedEnterprises = 0;            // 国企
-            Integer cityGovernment = 0;                       // 政府
-            Integer cityVillageAndTownColletive = 0;          // 村镇集体
-            Integer cityAllNum = 0;                           // 总计
-            List<WzHouseInCustomerEntity> countyList=new ArrayList<>();
-            for (Map.Entry<String, List<WzHouseInCustomerEntity>> countyEntry : countyMap.entrySet()) {
-                Integer person = 0;                           // 个人
-                Integer personPrivate = 0;                    // 私企
-                Integer stateOwnedEnterprises = 0;            // 国企
-                Integer government = 0;                       // 政府
-                Integer villageAndTownColletive = 0;          // 村镇集体
-                Integer allNum = 0;                           // 总计
-                for (WzHouseInCustomerEntity wzHouseInCustomerEntity : countyEntry.getValue()) {
-                    if(wzHouseInCustomerEntity.getPersonal()!=null&&!wzHouseInCustomerEntity.getPersonal().equals("")){
-                        person+=Integer.parseInt(wzHouseInCustomerEntity.getPersonal());
-                        cityPerson+=Integer.parseInt(wzHouseInCustomerEntity.getPersonal());
-                        allPerson+=Integer.parseInt(wzHouseInCustomerEntity.getPersonal());
-                        allNum+=Integer.parseInt(wzHouseInCustomerEntity.getPersonal());
-                        cityAllNum+=Integer.parseInt(wzHouseInCustomerEntity.getPersonal());
-                        allAllNum+=Integer.parseInt(wzHouseInCustomerEntity.getPersonal());
-                    }
-                    if(wzHouseInCustomerEntity.getPrivateEnterprise()!=null&&!wzHouseInCustomerEntity.getPrivateEnterprise().equals("")){
-                        personPrivate+=Integer.parseInt(wzHouseInCustomerEntity.getPrivateEnterprise());
-                        cityPersonPrivate+=Integer.parseInt(wzHouseInCustomerEntity.getPrivateEnterprise());
-                        allPersonPrivate+=Integer.parseInt(wzHouseInCustomerEntity.getPrivateEnterprise());
-                        allNum+=Integer.parseInt(wzHouseInCustomerEntity.getPrivateEnterprise());
-                        cityAllNum+=Integer.parseInt(wzHouseInCustomerEntity.getPrivateEnterprise());
-                        allAllNum+=Integer.parseInt(wzHouseInCustomerEntity.getPrivateEnterprise());
-                    }
-                    if(wzHouseInCustomerEntity.getStateOwnedEnterprise()!=null&&!wzHouseInCustomerEntity.getStateOwnedEnterprise().equals("")){
-                        stateOwnedEnterprises+=Integer.parseInt(wzHouseInCustomerEntity.getStateOwnedEnterprise());
-                        cityStateOwnedEnterprises+=Integer.parseInt(wzHouseInCustomerEntity.getStateOwnedEnterprise());
-                        allStateOwnedEnterprises+=Integer.parseInt(wzHouseInCustomerEntity.getStateOwnedEnterprise());
-                        allNum+=Integer.parseInt(wzHouseInCustomerEntity.getStateOwnedEnterprise());
-                        cityAllNum+=Integer.parseInt(wzHouseInCustomerEntity.getStateOwnedEnterprise());
-                        allAllNum+=Integer.parseInt(wzHouseInCustomerEntity.getStateOwnedEnterprise());
-                    }
-                    if(wzHouseInCustomerEntity.getGovernment()!=null&&!wzHouseInCustomerEntity.getGovernment().equals("")){
-                        government+=Integer.parseInt(wzHouseInCustomerEntity.getGovernment());
-                        cityGovernment+=Integer.parseInt(wzHouseInCustomerEntity.getGovernment());
-                        allGovernment+=Integer.parseInt(wzHouseInCustomerEntity.getGovernment());
-                        allNum+=Integer.parseInt(wzHouseInCustomerEntity.getGovernment());
-                        cityAllNum+=Integer.parseInt(wzHouseInCustomerEntity.getGovernment());
-                        allAllNum+=Integer.parseInt(wzHouseInCustomerEntity.getGovernment());
-                    }
-                    if(wzHouseInCustomerEntity.getVillageAndTownColletive()!=null&&!wzHouseInCustomerEntity.getVillageAndTownColletive().equals("")){
-                        villageAndTownColletive+=Integer.parseInt(wzHouseInCustomerEntity.getVillageAndTownColletive());
-                        cityVillageAndTownColletive+=Integer.parseInt(wzHouseInCustomerEntity.getVillageAndTownColletive());
-                        allVillageAndTownColletive+=Integer.parseInt(wzHouseInCustomerEntity.getVillageAndTownColletive());
-                        allNum+=Integer.parseInt(wzHouseInCustomerEntity.getVillageAndTownColletive());
-                        cityAllNum+=Integer.parseInt(wzHouseInCustomerEntity.getVillageAndTownColletive());
-                        allAllNum+=Integer.parseInt(wzHouseInCustomerEntity.getVillageAndTownColletive());
-                    }
-                }
-                WzHouseInCustomerEntity wzHouseInCustomerEntity = countyEntry.getValue().get(0);
-                wzHouseInCustomerEntity.setPersonal(person+"");
-                wzHouseInCustomerEntity.setGovernment(government+"");
-                wzHouseInCustomerEntity.setPrivateEnterprise(personPrivate+"");
-                wzHouseInCustomerEntity.setStateOwnedEnterprise(stateOwnedEnterprises+"");
-                wzHouseInCustomerEntity.setVillageAndTownColletive(villageAndTownColletive+"");
-                wzHouseInCustomerEntity.setAllNum(allNum+"");
-                wzHouseInCustomerEntity.setStandardAddressLevel2(wzHouseInCustomerEntity.getStandardAddressLevel3());
-                countyList.add(wzHouseInCustomerEntity);
-            }
-
-            List<WzHouseInCustomerEntity> orderCountyList=new ArrayList<>();
-            try{
-                //对countList 进行排序
-                String city=list.get(0).getStandardAddressLevel2();
-                if(city.contains("市")){
-                    city=city.split("市")[0];
-                }
-                OtnAreaEntity area=otnAreaService.queryObject(city);
-                List<OtnAreaEntity> countyAreaList=otnAreaService.getCityOption(area.getId());
-                for (OtnAreaEntity otnAreaEntity : countyAreaList) {
-                    for (WzHouseInCustomerEntity wzCity : countyList) {
-                        if(wzCity.getStandardAddressLevel3().contains(otnAreaEntity.getName())){
-                            orderCountyList.add(wzCity);
-                        }
-                    }
-                }
-            }catch (Exception e){
-                orderCountyList=countyList;
-                e.printStackTrace();
-            }
-
-            //城市的统计
-            WzHouseInCustomerEntity cityObject=new WzHouseInCustomerEntity();
-            cityObject.setStandardAddressLevel2(entry.getKey());
-            cityObject.setStandardAddressLevel3(entry.getKey());
-            cityObject.setPersonal(cityPerson+"");
-            cityObject.setPrivateEnterprise(cityPersonPrivate+"");
-            cityObject.setGovernment(cityGovernment+"");
-            cityObject.setStateOwnedEnterprise(cityStateOwnedEnterprises+"");
-            cityObject.setVillageAndTownColletive(cityVillageAndTownColletive+"");
-            cityObject.setAllNum(cityAllNum+"");
-            cityObject.setChildren(orderCountyList);
-            cityList.add(cityObject);
-        }
-
-        //对cityList 进行排序
-        List<OtnAreaEntity> areaList=otnAreaService.getCityOption("018");
-        List<WzHouseInCustomerEntity> orderList=new ArrayList<>();
-        for (OtnAreaEntity otnAreaEntity : areaList) {
-            for (WzHouseInCustomerEntity wzCity : cityList) {
-                if(wzCity.getStandardAddressLevel2().contains(otnAreaEntity.getName())){
-                    orderList.add(wzCity);
-                }
-            }
-        }
-
-        //城市的统计
-        WzHouseInCustomerEntity provinceObject=new WzHouseInCustomerEntity();
-        provinceObject.setStandardAddressLevel2("全省");
-        provinceObject.setStandardAddressLevel3("全省");
-        provinceObject.setPersonal(allPerson+"");
-        provinceObject.setPrivateEnterprise(allPersonPrivate+"");
-        provinceObject.setGovernment(allGovernment+"");
-        provinceObject.setStateOwnedEnterprise(allStateOwnedEnterprises+"");
-        provinceObject.setVillageAndTownColletive(allVillageAndTownColletive+"");
-        provinceObject.setAllNum(allAllNum+"");
-        provinceObject.setChildren(orderList);
-        resultList.add(provinceObject);
-        PageUtils pageUtil = new PageUtils(resultList, 0, query.getLimit(), query.getPage());
-        return R.ok().put("page", pageUtil);
-    }
-
-}
+//package com.example.controller.gdc;
+//
+//import com.example.config.annotation.IgnoreAuth;
+//import com.example.pojo.gdc.OtnAreaEntity;
+//import com.example.pojo.gdc.WzHouseInCustomerEntity;
+//import com.example.service.gdc.WzHouseInCustomerService;
+//import com.example.service.gdc.WzOtnAreaService;
+//import com.example.utils.PageMap;
+//import com.example.utils.PageUtils;
+//import com.example.utils.Query;
+//import com.example.utils.R;
+//import org.springframework.beans.factory.annotation.Autowired;
+//import org.springframework.web.bind.annotation.RequestBody;
+//import org.springframework.web.bind.annotation.RequestMapping;
+//import org.springframework.web.bind.annotation.RestController;
+//
+//import java.util.ArrayList;
+//import java.util.HashMap;
+//import java.util.List;
+//import java.util.Map;
+//
+//
+///**
+// * 房屋租入(客户管理)
+// */
+//@RestController
+//@RequestMapping("/house-car/house/dist/api/wzHouseInCustomer")
+//public class WzHouseInCustomerController {
+//
+//    @Autowired
+//    private WzHouseInCustomerService wzHouseInCustomerService;
+//
+//    @Autowired
+//    private WzOtnAreaService otnAreaService;
+//
+//    @RequestMapping("/echartList")
+//    @IgnoreAuth
+//    public R echartList(@RequestBody PageMap pageMap) {
+//
+//        List<WzHouseInCustomerEntity> resultList = new ArrayList<>();
+//
+//        //查询列表数据
+//        Query query = new Query(pageMap);
+//        List<WzHouseInCustomerEntity> wzHouseInCustomerEntityList = wzHouseInCustomerService.queryList(query);
+//
+//        Map<String, List<WzHouseInCustomerEntity>> cityMap = new HashMap<>();
+//        for (WzHouseInCustomerEntity wzHouseInCustomer : wzHouseInCustomerEntityList) {
+//            List<WzHouseInCustomerEntity> list;
+//            if (cityMap.get(wzHouseInCustomer.getStandardAddressLevel2()) != null) {
+//                list = cityMap.get(wzHouseInCustomer.getStandardAddressLevel2());
+//                list.add(wzHouseInCustomer);
+//            } else {
+//                list = new ArrayList<>();
+//                list.add(wzHouseInCustomer);
+//            }
+//            cityMap.put(wzHouseInCustomer.getStandardAddressLevel2(), list);
+//        }
+//
+//        Integer allPerson = 0;                           // 个人
+//        Integer allPersonPrivate = 0;                    // 私企
+//        Integer allStateOwnedEnterprises = 0;            // 国企
+//        Integer allGovernment = 0;                       // 政府
+//        Integer allVillageAndTownColletive = 0;          // 村镇集体
+//        Integer allAllNum = 0;                           // 总计
+//        List<WzHouseInCustomerEntity> cityList = new ArrayList<>();
+//        for (Map.Entry<String, List<WzHouseInCustomerEntity>> entry : cityMap.entrySet()) {
+//            List<WzHouseInCustomerEntity> list = entry.getValue();
+//            if (list.get(0).getStandardAddressLevel2().equals("全省")) {
+//                continue;
+//            }
+//
+//            //县的Map集合
+//            Map<String, List<WzHouseInCustomerEntity>> countyMap = new HashMap<>();
+//            for (WzHouseInCustomerEntity leaveUseVo : list) {
+//                if (leaveUseVo.getStandardAddressLevel3() == null || leaveUseVo.getStandardAddressLevel3().equals("")) {
+//                    continue;
+//                }
+//                if (countyMap.get(leaveUseVo.getStandardAddressLevel3()) != null) {
+//                    list = countyMap.get(leaveUseVo.getStandardAddressLevel3());
+//                    list.add(leaveUseVo);
+//                } else {
+//                    list = new ArrayList<>();
+//                    list.add(leaveUseVo);
+//                }
+//                countyMap.put(leaveUseVo.getStandardAddressLevel3(), list);
+//            }
+//            Integer cityPerson = 0;                           // 个人
+//            Integer cityPersonPrivate = 0;                    // 私企
+//            Integer cityStateOwnedEnterprises = 0;            // 国企
+//            Integer cityGovernment = 0;                       // 政府
+//            Integer cityVillageAndTownColletive = 0;          // 村镇集体
+//            Integer cityAllNum = 0;                           // 总计
+//            List<WzHouseInCustomerEntity> countyList=new ArrayList<>();
+//            for (Map.Entry<String, List<WzHouseInCustomerEntity>> countyEntry : countyMap.entrySet()) {
+//                Integer person = 0;                           // 个人
+//                Integer personPrivate = 0;                    // 私企
+//                Integer stateOwnedEnterprises = 0;            // 国企
+//                Integer government = 0;                       // 政府
+//                Integer villageAndTownColletive = 0;          // 村镇集体
+//                Integer allNum = 0;                           // 总计
+//                for (WzHouseInCustomerEntity wzHouseInCustomerEntity : countyEntry.getValue()) {
+//                    if(wzHouseInCustomerEntity.getPersonal()!=null&&!wzHouseInCustomerEntity.getPersonal().equals("")){
+//                        person+=Integer.parseInt(wzHouseInCustomerEntity.getPersonal());
+//                        cityPerson+=Integer.parseInt(wzHouseInCustomerEntity.getPersonal());
+//                        allPerson+=Integer.parseInt(wzHouseInCustomerEntity.getPersonal());
+//                        allNum+=Integer.parseInt(wzHouseInCustomerEntity.getPersonal());
+//                        cityAllNum+=Integer.parseInt(wzHouseInCustomerEntity.getPersonal());
+//                        allAllNum+=Integer.parseInt(wzHouseInCustomerEntity.getPersonal());
+//                    }
+//                    if(wzHouseInCustomerEntity.getPrivateEnterprise()!=null&&!wzHouseInCustomerEntity.getPrivateEnterprise().equals("")){
+//                        personPrivate+=Integer.parseInt(wzHouseInCustomerEntity.getPrivateEnterprise());
+//                        cityPersonPrivate+=Integer.parseInt(wzHouseInCustomerEntity.getPrivateEnterprise());
+//                        allPersonPrivate+=Integer.parseInt(wzHouseInCustomerEntity.getPrivateEnterprise());
+//                        allNum+=Integer.parseInt(wzHouseInCustomerEntity.getPrivateEnterprise());
+//                        cityAllNum+=Integer.parseInt(wzHouseInCustomerEntity.getPrivateEnterprise());
+//                        allAllNum+=Integer.parseInt(wzHouseInCustomerEntity.getPrivateEnterprise());
+//                    }
+//                    if(wzHouseInCustomerEntity.getStateOwnedEnterprise()!=null&&!wzHouseInCustomerEntity.getStateOwnedEnterprise().equals("")){
+//                        stateOwnedEnterprises+=Integer.parseInt(wzHouseInCustomerEntity.getStateOwnedEnterprise());
+//                        cityStateOwnedEnterprises+=Integer.parseInt(wzHouseInCustomerEntity.getStateOwnedEnterprise());
+//                        allStateOwnedEnterprises+=Integer.parseInt(wzHouseInCustomerEntity.getStateOwnedEnterprise());
+//                        allNum+=Integer.parseInt(wzHouseInCustomerEntity.getStateOwnedEnterprise());
+//                        cityAllNum+=Integer.parseInt(wzHouseInCustomerEntity.getStateOwnedEnterprise());
+//                        allAllNum+=Integer.parseInt(wzHouseInCustomerEntity.getStateOwnedEnterprise());
+//                    }
+//                    if(wzHouseInCustomerEntity.getGovernment()!=null&&!wzHouseInCustomerEntity.getGovernment().equals("")){
+//                        government+=Integer.parseInt(wzHouseInCustomerEntity.getGovernment());
+//                        cityGovernment+=Integer.parseInt(wzHouseInCustomerEntity.getGovernment());
+//                        allGovernment+=Integer.parseInt(wzHouseInCustomerEntity.getGovernment());
+//                        allNum+=Integer.parseInt(wzHouseInCustomerEntity.getGovernment());
+//                        cityAllNum+=Integer.parseInt(wzHouseInCustomerEntity.getGovernment());
+//                        allAllNum+=Integer.parseInt(wzHouseInCustomerEntity.getGovernment());
+//                    }
+//                    if(wzHouseInCustomerEntity.getVillageAndTownColletive()!=null&&!wzHouseInCustomerEntity.getVillageAndTownColletive().equals("")){
+//                        villageAndTownColletive+=Integer.parseInt(wzHouseInCustomerEntity.getVillageAndTownColletive());
+//                        cityVillageAndTownColletive+=Integer.parseInt(wzHouseInCustomerEntity.getVillageAndTownColletive());
+//                        allVillageAndTownColletive+=Integer.parseInt(wzHouseInCustomerEntity.getVillageAndTownColletive());
+//                        allNum+=Integer.parseInt(wzHouseInCustomerEntity.getVillageAndTownColletive());
+//                        cityAllNum+=Integer.parseInt(wzHouseInCustomerEntity.getVillageAndTownColletive());
+//                        allAllNum+=Integer.parseInt(wzHouseInCustomerEntity.getVillageAndTownColletive());
+//                    }
+//                }
+//                WzHouseInCustomerEntity wzHouseInCustomerEntity = countyEntry.getValue().get(0);
+//                wzHouseInCustomerEntity.setPersonal(person+"");
+//                wzHouseInCustomerEntity.setGovernment(government+"");
+//                wzHouseInCustomerEntity.setPrivateEnterprise(personPrivate+"");
+//                wzHouseInCustomerEntity.setStateOwnedEnterprise(stateOwnedEnterprises+"");
+//                wzHouseInCustomerEntity.setVillageAndTownColletive(villageAndTownColletive+"");
+//                wzHouseInCustomerEntity.setAllNum(allNum+"");
+//                wzHouseInCustomerEntity.setStandardAddressLevel2(wzHouseInCustomerEntity.getStandardAddressLevel3());
+//                countyList.add(wzHouseInCustomerEntity);
+//            }
+//
+//            List<WzHouseInCustomerEntity> orderCountyList=new ArrayList<>();
+//            try{
+//                //对countList 进行排序
+//                String city=list.get(0).getStandardAddressLevel2();
+//                if(city.contains("市")){
+//                    city=city.split("市")[0];
+//                }
+//                OtnAreaEntity area=otnAreaService.queryObject(city);
+//                List<OtnAreaEntity> countyAreaList=otnAreaService.getCityOption(area.getId());
+//                for (OtnAreaEntity otnAreaEntity : countyAreaList) {
+//                    for (WzHouseInCustomerEntity wzCity : countyList) {
+//                        if(wzCity.getStandardAddressLevel3().contains(otnAreaEntity.getName())){
+//                            orderCountyList.add(wzCity);
+//                        }
+//                    }
+//                }
+//            }catch (Exception e){
+//                orderCountyList=countyList;
+//                e.printStackTrace();
+//            }
+//
+//            //城市的统计
+//            WzHouseInCustomerEntity cityObject=new WzHouseInCustomerEntity();
+//            cityObject.setStandardAddressLevel2(entry.getKey());
+//            cityObject.setStandardAddressLevel3(entry.getKey());
+//            cityObject.setPersonal(cityPerson+"");
+//            cityObject.setPrivateEnterprise(cityPersonPrivate+"");
+//            cityObject.setGovernment(cityGovernment+"");
+//            cityObject.setStateOwnedEnterprise(cityStateOwnedEnterprises+"");
+//            cityObject.setVillageAndTownColletive(cityVillageAndTownColletive+"");
+//            cityObject.setAllNum(cityAllNum+"");
+//            cityObject.setChildren(orderCountyList);
+//            cityList.add(cityObject);
+//        }
+//
+//        //对cityList 进行排序
+//        List<OtnAreaEntity> areaList=otnAreaService.getCityOption("018");
+//        List<WzHouseInCustomerEntity> orderList=new ArrayList<>();
+//        for (OtnAreaEntity otnAreaEntity : areaList) {
+//            for (WzHouseInCustomerEntity wzCity : cityList) {
+//                if(wzCity.getStandardAddressLevel2().contains(otnAreaEntity.getName())){
+//                    orderList.add(wzCity);
+//                }
+//            }
+//        }
+//
+//        //城市的统计
+//        WzHouseInCustomerEntity provinceObject=new WzHouseInCustomerEntity();
+//        provinceObject.setStandardAddressLevel2("全省");
+//        provinceObject.setStandardAddressLevel3("全省");
+//        provinceObject.setPersonal(allPerson+"");
+//        provinceObject.setPrivateEnterprise(allPersonPrivate+"");
+//        provinceObject.setGovernment(allGovernment+"");
+//        provinceObject.setStateOwnedEnterprise(allStateOwnedEnterprises+"");
+//        provinceObject.setVillageAndTownColletive(allVillageAndTownColletive+"");
+//        provinceObject.setAllNum(allAllNum+"");
+//        provinceObject.setChildren(orderList);
+//        resultList.add(provinceObject);
+//        PageUtils pageUtil = new PageUtils(resultList, 0, query.getLimit(), query.getPage());
+//        return R.ok().put("page", pageUtil);
+//    }
+//
+//}

+ 725 - 722
src/main/java/com/example/controller/gdc/WzHouseLeaseInConController.java

@@ -1,69 +1,72 @@
-package com.example.controller.gdc;
-
-import com.example.config.annotation.IgnoreAuth;
-import com.example.pojo.gdc.OtnAreaEntity;
-import com.example.pojo.gdc.WzHouseContracEntity;
-import com.example.pojo.gdc.WzHouseContractCompareEntity;
-import com.example.pojo.gdc.WzHouseContractInEntity;
-import com.example.pojo.gdc.WzHouseContractTopEntity;
-import com.example.pojo.gdc.WzHouseLeaseInConEntity;
-import com.example.pojo.gdc.WzHouseUseEntity;
-import com.example.pojo.gdc.vo.WzHouseUseVo;
-import com.example.service.gdc.WzHouseContractCompareService;
-import com.example.service.gdc.WzHouseContractInService;
-import com.example.service.gdc.WzHouseContractTopService;
-import com.example.service.gdc.WzHouseLeaseInConService;
-import com.example.service.gdc.WzHouseUseService;
-import com.example.service.gdc.WzOtnAreaService;
-import com.example.utils.PageMap;
-import com.example.utils.PageUtils;
-import com.example.utils.Query;
-import com.example.utils.R;
-import com.example.utils.excel.ExcelExport;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
-
-import java.text.DateFormat;
-import java.text.DecimalFormat;
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-/**
- * 房屋租入(合同管理)
- */
-@RestController
-@RequestMapping("/house-car/house/dist/api/WzHouseLeaseInCon")
-public class WzHouseLeaseInConController {
-
-    @Autowired
-    private WzHouseContractTopService wzHouseContractTopService;
-    @Autowired
-    private WzHouseContractCompareService wzHouseContractCompareService;
-    @Autowired
-    private WzHouseLeaseInConService wzHouseLeaseInConService;
-    @Autowired
-    private WzHouseContractInService wzHouseContractInService;
-    @Autowired
-    private WzHouseUseService wzHouseUseService;
-    @Autowired
-    private WzOtnAreaService otnAreaService;
-
-    @RequestMapping("/list")
-    @IgnoreAuth
-    public R list(@RequestBody PageMap pageMap) {
-        //查询列表数据
-        Query query = new Query(pageMap);
-        List<WzHouseContracEntity> list = wzHouseLeaseInConService.queryList(pageMap.getMap());
-        int total = wzHouseLeaseInConService.queryTotal(query);
-        PageUtils pageUtil = new PageUtils(list, total, query.getLimit(), query.getPage());
-        return R.ok().put("page", pageUtil);
-    }
-
+//package com.example.controller.gdc;
+//
+//import com.example.config.annotation.IgnoreAuth;
+//import com.example.pojo.gdc.OtnAreaEntity;
+//import com.example.pojo.gdc.WzHouseContracEntity;
+//import com.example.pojo.gdc.WzHouseContractCompareEntity;
+//import com.example.pojo.gdc.WzHouseContractInEntity;
+//import com.example.pojo.gdc.WzHouseContractTopEntity;
+//import com.example.pojo.gdc.WzHouseLeaseInConEntity;
+//import com.example.pojo.gdc.WzHouseUseEntity;
+//import com.example.pojo.gdc.vo.WzHouseUseVo;
+//import com.example.service.gdc.WzHouseContractCompareService;
+//import com.example.service.gdc.WzHouseContractInService;
+//import com.example.service.gdc.WzHouseContractTopService;
+//import com.example.service.gdc.WzHouseLeaseInConService;
+//import com.example.service.gdc.WzHouseUseService;
+//import com.example.service.gdc.WzOtnAreaService;
+//import com.example.utils.PageMap;
+//import com.example.utils.PageUtils;
+//import com.example.utils.Query;
+//import com.example.utils.R;
+//import com.example.utils.excel.ExcelExport;
+//import org.springframework.beans.factory.annotation.Autowired;
+//import org.springframework.web.bind.annotation.GetMapping;
+//import org.springframework.web.bind.annotation.RequestBody;
+//import org.springframework.web.bind.annotation.RequestMapping;
+//import org.springframework.web.bind.annotation.RestController;
+//
+//import javax.servlet.http.HttpServletResponse;
+//import java.text.DateFormat;
+//import java.text.DecimalFormat;
+//import java.text.SimpleDateFormat;
+//import java.util.ArrayList;
+//import java.util.Date;
+//import java.util.HashMap;
+//import java.util.List;
+//import java.util.Map;
+//
+///**
+// * 房屋租入(合同管理)
+// */
+//@RestController
+//@RequestMapping("/house-car/house/dist/api/WzHouseLeaseInCon")
+//public class WzHouseLeaseInConController {
+//
+//    @Autowired
+//    private WzHouseContractTopService wzHouseContractTopService;
+//    @Autowired
+//    private WzHouseContractCompareService wzHouseContractCompareService;
+//    @Autowired
+//    private WzHouseLeaseInConService wzHouseLeaseInConService;
+//    @Autowired
+//    private WzHouseContractInService wzHouseContractInService;
+//    @Autowired
+//    private WzHouseUseService wzHouseUseService;
+//    @Autowired
+//    private WzOtnAreaService otnAreaService;
+//
+//    @RequestMapping("/list")
+//    @IgnoreAuth
+//    public R list(@RequestBody PageMap pageMap) {
+//        //查询列表数据
+//        Query query = new Query(pageMap);
+//        List<WzHouseContracEntity> list = wzHouseLeaseInConService.queryList(pageMap.getMap());
+//        int total = wzHouseLeaseInConService.queryTotal(query);
+//        PageUtils pageUtil = new PageUtils(list, total, query.getLimit(), query.getPage());
+//        return R.ok().put("page", pageUtil);
+//    }
+//
 //    @RequestMapping("/echartList")
 //    @IgnoreAuth
 //    public R echartList(@RequestBody PageMap pageMap) {
@@ -255,7 +258,7 @@ public class WzHouseLeaseInConController {
 //        PageUtils pageUtil = new PageUtils(resultList, total, query.getLimit(), query.getPage());
 //        return R.ok().put("page", pageUtil);
 //    }
-
+//
 //    /**
 //     * 清单excel
 //     */
@@ -302,658 +305,658 @@ public class WzHouseLeaseInConController {
 //            ee1.export(response);
 //        }
 //    }
-
-    public void responseTab1(DateFormat df, ExcelExport ee1, Map<String, Object> map1){
-        //查询列表数据
-        List<WzHouseLeaseInConEntity> wzHouseContracEntityList = wzHouseLeaseInConService.queryList(map1);
-
-        Map<String,List<WzHouseLeaseInConEntity>> cityMap=new HashMap<>();
-        for (WzHouseLeaseInConEntity leaveUseVo : wzHouseContracEntityList) {
-            List<WzHouseLeaseInConEntity> list;
-            if(cityMap.get(leaveUseVo.getStandardAddressLevel2())!=null){
-                list=cityMap.get(leaveUseVo.getStandardAddressLevel2());
-                list.add(leaveUseVo);
-            }else{
-                list=new ArrayList<>();
-                list.add(leaveUseVo);
-            }
-            cityMap.put(leaveUseVo.getStandardAddressLevel2(),list);
-        }
-
-        List<WzHouseLeaseInConEntity> resultList=new ArrayList<>();
-        List<WzHouseLeaseInConEntity> cityList=new ArrayList<>();
-
-        double allContractQuantity=0l;            // 租入合同数量
-        double allNoTaxContractAmount=0l;         // 合同总金额(含税)(元)
-        double allRentArea=0l;                    // 总计面积(平米)
-        double allUnitPricePerSquareMeter=0l;     // 每平米单价
-
-        double allbusinessAreaSquaMete=0l;            //营业面积(平米)
-        double allofficeAreaSquaMete=0l;              //办公面积(平米)
-        double allcommunicationRoomAreaSquaMete=0l;  //通信机房面积(平米)
-        double allotherUsageAreaSquaMete=0l;         //其他用途面积(平米)
-
-        int cityNum=0;
-        for(Map.Entry<String,List<WzHouseLeaseInConEntity>> entry:cityMap.entrySet()){
-            List<WzHouseLeaseInConEntity> list=entry.getValue();
-
-            if (list.get(0).getStandardAddressLevel3().equals("全省")) {
-                continue;
-            }
-            //县的Map集合
-            Map<String, List<WzHouseLeaseInConEntity>> countyMap = new HashMap<>();
-            for (WzHouseLeaseInConEntity leaveUseVo : list) {
-                if (leaveUseVo.getStandardAddressLevel3() == null || leaveUseVo.getStandardAddressLevel3().equals("")) {
-                    continue;
-                }
-                if (countyMap.get(leaveUseVo.getStandardAddressLevel3()) != null) {
-                    list = countyMap.get(leaveUseVo.getStandardAddressLevel3());
-                    list.add(leaveUseVo);
-                } else {
-                    list = new ArrayList<>();
-                    list.add(leaveUseVo);
-                }
-                countyMap.put(leaveUseVo.getStandardAddressLevel3(), list);
-            }
-
-            double cityContractQuantity=0l;
-            double cityNoTaxContractAmount=0l;
-            double cityRentArea=0l;
-            double cityUnitPricePerSquareMeter=0l;
-
-            double citybusinessAreaSquaMete=0l;            //营业面积(平米)
-            double cityofficeAreaSquaMete=0l;              //办公面积(平米)
-            double citycommunicationRoomAreaSquaMete=0l;  //通信机房面积(平米)
-            double cityotherUsageAreaSquaMete=0l;         //其他用途面积(平米)
-            List<WzHouseLeaseInConEntity> countyList=new ArrayList<>();
-            for (Map.Entry<String, List<WzHouseLeaseInConEntity>> countyEntry : countyMap.entrySet()) {
-                double contractQuantity=0l;
-                double noTaxContractAmount=0l;
-                double rentArea=0l;
-                double unitPricePerSquareMeter=0l;
-
-                double businessAreaSquaMete=0l;            //营业面积(平米)
-                double officeAreaSquaMete=0l;              //办公面积(平米)
-                double communicationRoomAreaSquaMete=0l;  //通信机房面积(平米)
-                double otherUsageAreaSquaMete=0l;         //其他用途面积(平米)
-                for (WzHouseLeaseInConEntity leaveUseVo : countyEntry.getValue()) {
-                    contractQuantity+=leaveUseVo.getLeaInContracQuantity();
-                    noTaxContractAmount+=leaveUseVo.getTotalContrAmount();
-                    rentArea+=leaveUseVo.getTotalAreaSquaMete();
-                    unitPricePerSquareMeter+=leaveUseVo.getUnitPricePerSquareMeter();
-                    businessAreaSquaMete+= leaveUseVo.getBusinessAreaSquaMete();
-                    officeAreaSquaMete+=leaveUseVo.getOfficeAreaSquaMete();
-                    communicationRoomAreaSquaMete+=leaveUseVo.getCommunicationRoomAreaSquaMete();
-                    otherUsageAreaSquaMete+=leaveUseVo.getOtherUsageAreaSquaMete();
-
-                    cityContractQuantity+=leaveUseVo.getLeaInContracQuantity();
-                    cityNoTaxContractAmount+=leaveUseVo.getTotalContrAmount();
-                    cityRentArea+=leaveUseVo.getTotalAreaSquaMete();
-                    cityUnitPricePerSquareMeter+=leaveUseVo.getUnitPricePerSquareMeter();
-                    citybusinessAreaSquaMete+= leaveUseVo.getBusinessAreaSquaMete();
-                    cityofficeAreaSquaMete+=leaveUseVo.getOfficeAreaSquaMete();
-                    citycommunicationRoomAreaSquaMete+=leaveUseVo.getCommunicationRoomAreaSquaMete();
-                    cityotherUsageAreaSquaMete+=leaveUseVo.getOtherUsageAreaSquaMete();
-
-                    allContractQuantity+=leaveUseVo.getLeaInContracQuantity();
-                    allNoTaxContractAmount+=leaveUseVo.getTotalContrAmount();
-                    allRentArea+=leaveUseVo.getTotalAreaSquaMete();
-                    allUnitPricePerSquareMeter+=leaveUseVo.getUnitPricePerSquareMeter();
-                    allbusinessAreaSquaMete+= leaveUseVo.getBusinessAreaSquaMete();
-                    allofficeAreaSquaMete+=leaveUseVo.getOfficeAreaSquaMete();
-                    allcommunicationRoomAreaSquaMete+=leaveUseVo.getCommunicationRoomAreaSquaMete();
-                    allotherUsageAreaSquaMete+=leaveUseVo.getOtherUsageAreaSquaMete();
-                }
-                WzHouseLeaseInConEntity wzHouseInCustomerEntity = new WzHouseLeaseInConEntity();
-                wzHouseInCustomerEntity.setLeaInContracQuantity(formatDouble(contractQuantity));
-                wzHouseInCustomerEntity.setStandardAddressLevel2(countyEntry.getKey());
-                wzHouseInCustomerEntity.setTotalContrAmount(formatDouble(noTaxContractAmount));
-                wzHouseInCustomerEntity.setTotalAreaSquaMete(formatDouble(rentArea));
-                wzHouseInCustomerEntity.setUnitPricePerSquareMeter(formatDouble(unitPricePerSquareMeter));
-                wzHouseInCustomerEntity.setBusinessAreaSquaMete(formatDouble(businessAreaSquaMete));
-                wzHouseInCustomerEntity.setOfficeAreaSquaMete(formatDouble(officeAreaSquaMete));
-                wzHouseInCustomerEntity.setCommunicationRoomAreaSquaMete(formatDouble(communicationRoomAreaSquaMete));
-                wzHouseInCustomerEntity.setOtherUsageAreaSquaMete(formatDouble(otherUsageAreaSquaMete));
-                countyList.add(wzHouseInCustomerEntity);
-            }
-            List<WzHouseLeaseInConEntity> orderCountyList=new ArrayList<>();
-            try{
-                //对countList 进行排序
-                String city=list.get(0).getStandardAddressLevel2();
-                if(city.contains("市")){
-                    city=city.split("市")[0];
-                }
-                OtnAreaEntity area=otnAreaService.queryObject(city);
-                List<OtnAreaEntity> countyAreaList=otnAreaService.getCityOption(area.getId());
-                for (OtnAreaEntity otnAreaEntity : countyAreaList) {
-                    for (WzHouseLeaseInConEntity wzCity : countyList) {
-                        if(wzCity.getStandardAddressLevel2().contains(otnAreaEntity.getName())){
-                            orderCountyList.add(wzCity);
-                        }
-                    }
-                }
-            }catch (Exception e){
-                orderCountyList=countyList;
-                e.printStackTrace();
-            }
-
-            WzHouseLeaseInConEntity wzHouseInCustomerEntity = new WzHouseLeaseInConEntity();
-            wzHouseInCustomerEntity.setStandardAddressLevel2(entry.getKey());
-            wzHouseInCustomerEntity.setLeaInContracQuantity(formatDouble(cityContractQuantity));
-            wzHouseInCustomerEntity.setTotalContrAmount(formatDouble(cityNoTaxContractAmount));
-            wzHouseInCustomerEntity.setTotalAreaSquaMete(formatDouble(cityRentArea));
-            wzHouseInCustomerEntity.setBusinessAreaSquaMete(formatDouble(citybusinessAreaSquaMete));
-            wzHouseInCustomerEntity.setOfficeAreaSquaMete(formatDouble(cityofficeAreaSquaMete));
-            wzHouseInCustomerEntity.setCommunicationRoomAreaSquaMete(formatDouble(citycommunicationRoomAreaSquaMete));
-            wzHouseInCustomerEntity.setOtherUsageAreaSquaMete(formatDouble(cityotherUsageAreaSquaMete));
-            double num=cityUnitPricePerSquareMeter/countyMap.size();
-            cityNum+=countyMap.size();
-            wzHouseInCustomerEntity.setUnitPricePerSquareMeter(formatDouble(num));
-            wzHouseInCustomerEntity.setChildren(orderCountyList);
-            cityList.add(wzHouseInCustomerEntity);
-        }
-
-
-        //对cityList 进行排序
-        List<OtnAreaEntity> areaList=otnAreaService.getCityOption("018");
-        List<WzHouseLeaseInConEntity> orderList=new ArrayList<>();
-        for (OtnAreaEntity otnAreaEntity : areaList) {
-            for (WzHouseLeaseInConEntity wzCity : cityList) {
-                if(wzCity.getStandardAddressLevel2().contains(otnAreaEntity.getName())){
-                    orderList.add(wzCity);
-                }
-            }
-        }
-
-        WzHouseLeaseInConEntity province=new WzHouseLeaseInConEntity();
-        province.setStandardAddressLevel2("全省");
-        province.setLeaInContracQuantity(formatDouble(allContractQuantity));
-        province.setTotalContrAmount(formatDouble(allNoTaxContractAmount));
-        province.setTotalAreaSquaMete(formatDouble(allRentArea));
-        if(cityList.size()!=0){
-            province.setUnitPricePerSquareMeter(formatDouble(allUnitPricePerSquareMeter/cityNum ));
-        }
-        province.setBusinessAreaSquaMete(formatDouble(allbusinessAreaSquaMete));
-        province.setOfficeAreaSquaMete(formatDouble(allofficeAreaSquaMete));
-        province.setCommunicationRoomAreaSquaMete(formatDouble(allcommunicationRoomAreaSquaMete));
-        province.setOtherUsageAreaSquaMete(formatDouble(allotherUsageAreaSquaMete));
-        province.setChildren(orderList);
-        resultList.add(province);
-
-
-        List<Object> colList=new ArrayList();;
-        List<Object[]> allList = new ArrayList();
-        for (int i = 0; i < resultList.size(); i++) {
-
-            if(resultList.get(i).getStandardAddressLevel2().contains("省")){
-                colList = new ArrayList();
-                colList.add(resultList.get(i).getStandardAddressLevel2());
-                colList.add("");
-                colList.add("");
-                colList.add(WzHouseMaintenaCostController.toThousands(resultList.get(i).getLeaInContracQuantity(),false));
-                colList.add(WzHouseMaintenaCostController.toThousands(resultList.get(i).getTotalContrAmount(),true));
-                colList.add(WzHouseMaintenaCostController.toThousands(resultList.get(i).getUnitPricePerSquareMeter(),true));
-                colList.add(WzHouseMaintenaCostController.toThousands(resultList.get(i).getBusinessAreaSquaMete(),true));
-                colList.add(WzHouseMaintenaCostController.toThousands(resultList.get(i).getOfficeAreaSquaMete(),true));
-                colList.add(WzHouseMaintenaCostController.toThousands(resultList.get(i).getCommunicationRoomAreaSquaMete(),true));
-                colList.add(WzHouseMaintenaCostController.toThousands(resultList.get(i).getOtherUsageAreaSquaMete(),true));
-                colList.add(WzHouseMaintenaCostController.toThousands(resultList.get(i).getTotalAreaSquaMete(),true));
-                allList.add(colList.toArray());
-
-                //处理城市的
-                List<WzHouseLeaseInConEntity> cityList1=resultList.get(i).getChildren();
-                for (WzHouseLeaseInConEntity floorNoUserVo : cityList1) {
-                    colList = new ArrayList();
-                    colList.add("");
-                    colList.add(floorNoUserVo.getStandardAddressLevel2());
-                    colList.add("");
-                    colList.add(WzHouseMaintenaCostController.toThousands(floorNoUserVo.getLeaInContracQuantity(),false));
-                    colList.add(WzHouseMaintenaCostController.toThousands(floorNoUserVo.getTotalContrAmount(),true));
-                    colList.add(WzHouseMaintenaCostController.toThousands(floorNoUserVo.getUnitPricePerSquareMeter(),true));
-                    colList.add(WzHouseMaintenaCostController.toThousands(floorNoUserVo.getBusinessAreaSquaMete(),true));
-                    colList.add(WzHouseMaintenaCostController.toThousands(floorNoUserVo.getOfficeAreaSquaMete(),true));
-                    colList.add(WzHouseMaintenaCostController.toThousands(floorNoUserVo.getCommunicationRoomAreaSquaMete(),true));
-                    colList.add(WzHouseMaintenaCostController.toThousands(floorNoUserVo.getOtherUsageAreaSquaMete(),true));
-                    colList.add(WzHouseMaintenaCostController.toThousands(floorNoUserVo.getTotalAreaSquaMete(),true));
-                    allList.add(colList.toArray());
-                    //处理县城的
-                    List<WzHouseLeaseInConEntity> countyList1 = floorNoUserVo.getChildren();
-                    for (WzHouseLeaseInConEntity noUserVo : countyList1) {
-                        colList = new ArrayList();
-                        colList.add("");
-                        colList.add("");
-                        colList.add(noUserVo.getStandardAddressLevel2());
-                        colList.add(WzHouseMaintenaCostController.toThousands(noUserVo.getLeaInContracQuantity(),false));
-                        colList.add(WzHouseMaintenaCostController.toThousands(noUserVo.getTotalContrAmount(),true));
-                        colList.add(WzHouseMaintenaCostController.toThousands(noUserVo.getUnitPricePerSquareMeter(),true));
-                        colList.add(WzHouseMaintenaCostController.toThousands(noUserVo.getBusinessAreaSquaMete(),true));
-                        colList.add(WzHouseMaintenaCostController.toThousands(noUserVo.getOfficeAreaSquaMete(),true));
-                        colList.add(WzHouseMaintenaCostController.toThousands(noUserVo.getCommunicationRoomAreaSquaMete(),true));
-                        colList.add(WzHouseMaintenaCostController.toThousands(noUserVo.getOtherUsageAreaSquaMete(),true));
-                        colList.add(WzHouseMaintenaCostController.toThousands(noUserVo.getTotalAreaSquaMete(),true));
-                        allList.add(colList.toArray());
-                    }
-                }
-            }
-        }
-        String[] header = new String[]{
-                "资产所属单位(一级)",
-                "资产所属单位(二级)",
-                "资产所属单位(三级)",
-                "租入合同数量",
-                "合同年金额(含税) (元)",
-                "每平米单价(元)",
-                "营业面积(平米)",
-                "办公面积(平米)",
-                "通信机房面积(元)",
-                "其他用途面积(平米)",
-                "总计面积(平米)"
-        };
-        ee1.addSheetByArray(df.format(new Date()) + "清单", allList, header);
-    }
-
-    public void responseTab2(DateFormat df, ExcelExport ee1, Map<String, Object> map1){
-        //查询列表数据
-        List<WzHouseUseEntity> wzHouseContracEntityList = wzHouseUseService.queryList(map1);
-
-        Map<String,List<WzHouseUseEntity>> cityMap=new HashMap<>();
-        for (WzHouseUseEntity leaveUseVo : wzHouseContracEntityList) {
-            List<WzHouseUseEntity> list;
-            if(cityMap.get(leaveUseVo.getCity())!=null){
-                list=cityMap.get(leaveUseVo.getCity());
-                list.add(leaveUseVo);
-            }else{
-                list=new ArrayList<>();
-                list.add(leaveUseVo);
-            }
-            cityMap.put(leaveUseVo.getCity(),list);
-        }
-
-        List<WzHouseUseVo> resultList=new ArrayList<>();
-        List<WzHouseUseVo> cityList=new ArrayList<>();
-
-        int allyingYe=0;
-        int allbanGong=0;
-        int alltongXin=0;
-        int allother=0;
-        int allall=0;
-        for(Map.Entry<String,List<WzHouseUseEntity>> entry:cityMap.entrySet()){
-            List<WzHouseUseEntity> list=entry.getValue();
-
-            if (list.get(0).getCounty().equals("全省")) {
-                continue;
-            }
-            //县的Map集合
-            Map<String, List<WzHouseUseEntity>> countyMap = new HashMap<>();
-            for (WzHouseUseEntity leaveUseVo : list) {
-                if (leaveUseVo.getCounty() == null || leaveUseVo.getCounty().equals("")) {
-                    continue;
-                }
-                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);
-            }
-
-            int cityyingYe=0;
-            int citybanGong=0;
-            int citytongXin=0;
-            int cityother=0;
-            int cityall=0;
-            List<WzHouseUseVo> countyList=new ArrayList<>();
-            for (Map.Entry<String, List<WzHouseUseEntity>> countyEntry : countyMap.entrySet()) {
-                int yingYe=0;
-                int banGong=0;
-                int tongXin=0;
-                int other=0;
-                int all=0;
-                for (WzHouseUseEntity leaveUseVo : countyEntry.getValue()) {
-                    if(leaveUseVo.getRentalUse()!=null){
-                        if(leaveUseVo.getRentalUse().equals("通信设施机房")){
-                            tongXin+=1;
-                            citytongXin+=1;
-                            alltongXin+=1;
-                        }
-                        else if(leaveUseVo.getRentalUse().equals("营业")){
-                            yingYe+=1;
-                            cityyingYe+=1;
-                            allyingYe+=1;
-                        }
-                        else if(leaveUseVo.getRentalUse().equals("其他租入用途")){
-                            other+=1;
-                            cityother+=1;
-                            allother+=1;
-                        }
-                        else if(leaveUseVo.getRentalUse().equals("办公")){
-                            banGong+=1;
-                            citybanGong+=1;
-                            allbanGong+=1;
-                        }
-                        all+=1;
-                        cityall+=1;
-                        allall+=1;
-                    }
-                }
-                WzHouseUseVo wzHouseInCustomerEntity = new WzHouseUseVo();
-                wzHouseInCustomerEntity.setYingYe(yingYe);
-                wzHouseInCustomerEntity.setCity(countyEntry.getKey());
-                wzHouseInCustomerEntity.setBanGong(banGong);
-                wzHouseInCustomerEntity.setAll(all);
-                wzHouseInCustomerEntity.setTongXin(tongXin);
-                wzHouseInCustomerEntity.setOther(other);
-                countyList.add(wzHouseInCustomerEntity);
-            }
-            List<WzHouseUseVo> 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());
-                for (OtnAreaEntity otnAreaEntity : countyAreaList) {
-                    for (WzHouseUseVo wzCity : countyList) {
-                        if(wzCity.getCity().contains(otnAreaEntity.getName())){
-                            orderCountyList.add(wzCity);
-                        }
-                    }
-                }
-            }catch (Exception e){
-                orderCountyList=countyList;
-                e.printStackTrace();
-            }
-
-            WzHouseUseVo wzHouseInCustomerEntity = new WzHouseUseVo();
-            wzHouseInCustomerEntity.setCity(entry.getKey());
-            wzHouseInCustomerEntity.setYingYe(cityyingYe);
-            wzHouseInCustomerEntity.setBanGong(citybanGong);
-            wzHouseInCustomerEntity.setAll(cityall);
-            wzHouseInCustomerEntity.setTongXin(citytongXin);
-            wzHouseInCustomerEntity.setOther(cityother);
-            wzHouseInCustomerEntity.setChildren(orderCountyList);
-            cityList.add(wzHouseInCustomerEntity);
-        }
-
-
-        //对cityList 进行排序
-        List<OtnAreaEntity> areaList=otnAreaService.getCityOption("018");
-        List<WzHouseUseVo> orderList=new ArrayList<>();
-        for (OtnAreaEntity otnAreaEntity : areaList) {
-            for (WzHouseUseVo wzCity : cityList) {
-                if(wzCity.getCity().contains(otnAreaEntity.getName())){
-                    orderList.add(wzCity);
-                }
-            }
-        }
-
-        WzHouseUseVo province=new WzHouseUseVo();
-        province.setCity("全省");
-        province.setYingYe(allyingYe);
-        province.setBanGong(allbanGong);
-        province.setAll(allall);
-        province.setTongXin(alltongXin);
-        province.setOther(allother);
-        province.setChildren(orderList);
-        resultList.add(province);
-
-        List<Object> colList=new ArrayList();;
-        List<Object[]> allList = new ArrayList();
-        for (int i = 0; i < resultList.size(); i++) {
-
-            if(resultList.get(i).getCity().contains("省")){
-                colList = new ArrayList();
-                colList.add(resultList.get(i).getCity());
-                colList.add("");
-                colList.add("");
-                colList.add(resultList.get(i).getYingYe());
-                colList.add(resultList.get(i).getBanGong());
-                colList.add(resultList.get(i).getTongXin());
-                colList.add(resultList.get(i).getOther());
-                colList.add(resultList.get(i).getAll());
-                allList.add(colList.toArray());
-
-                //处理城市的
-                List<WzHouseUseVo> cityList1=resultList.get(i).getChildren();
-                for (WzHouseUseVo floorNoUserVo : cityList1) {
-                    colList = new ArrayList();
-                    colList.add("");
-                    colList.add(floorNoUserVo.getCity());
-                    colList.add("");
-                    colList.add(floorNoUserVo.getYingYe());
-                    colList.add(floorNoUserVo.getBanGong());
-                    colList.add(floorNoUserVo.getTongXin());
-                    colList.add(floorNoUserVo.getOther());
-                    colList.add(floorNoUserVo.getAll());
-                    allList.add(colList.toArray());
-                    //处理县城的
-                    List<WzHouseUseVo> countyList1 = floorNoUserVo.getChildren();
-                    for (WzHouseUseVo noUserVo : countyList1) {
-                        colList = new ArrayList();
-                        colList.add("");
-                        colList.add("");
-                        colList.add(noUserVo.getCity());
-                        colList.add(noUserVo.getYingYe());
-                        colList.add(noUserVo.getBanGong());
-                        colList.add(noUserVo.getTongXin());
-                        colList.add(noUserVo.getOther());
-                        colList.add(noUserVo.getAll());
-                        allList.add(colList.toArray());
-                    }
-                }
-            }
-        }
-        String[] header = new String[]{
-                "资产所属单位(一级)",
-                "资产所属单位(二级)",
-                "资产所属单位(三级)",
-                "营业",
-                "办公",
-                "通信设施机房",
-                "其他租入用途",
-                "总计"
-        };
-        ee1.addSheetByArray(df.format(new Date()) + "清单", allList, header);
-
-    }
-
-    public void responseTab3(DateFormat df, ExcelExport ee1, Map<String, Object> map1){
-
-        List<WzHouseContractTopEntity> resultList = wzHouseContractTopService.queryList(map1);
-
-        List<Object> colList=new ArrayList();;
-        List<Object[]> allList = new ArrayList();
-        for (int i = 0; i < resultList.size(); i++) {
-            colList = new ArrayList();
-            colList.add(resultList.get(i).getCity());
-            colList.add(resultList.get(i).getCounty());
-            colList.add(resultList.get(i).getUseTheProLine());
-            colList.add(resultList.get(i).getLeaseInPracticalUse());
-            colList.add(resultList.get(i).getDescriptionOfOtherUsesOfTheLease());
-            colList.add(resultList.get(i).getCityArea());
-            colList.add(resultList.get(i).getDistrict());
-            colList.add(WzHouseMaintenaCostController.toThousands(resultList.get(i).getContractAmountIncludingTax(),true));
-            colList.add(WzHouseMaintenaCostController.toThousands(resultList.get(i).getRentalBuildingArea(),true));
-            colList.add(WzHouseMaintenaCostController.toThousands(resultList.get(i).getHireTime(),false));
-            colList.add(WzHouseMaintenaCostController.toThousands(resultList.get(i).getTotalMonthlyRent(),true));
-            colList.add(resultList.get(i).getContractNumber());
-            colList.add(resultList.get(i).getContractName());
-            allList.add(colList.toArray());
-        }
-        String[] header = new String[]{
-                "使用单位隶属的地市级公司",
-                "使用单位隶属的区县级公司",
-                "使用专业线",
-                "租入实际用途",
-                "租入其他用途说明",
-                "城市区域",
-                "地段",
-                "合同总金额(含税)(元)",
-                "租入建筑面积(平米)",
-                "租期(年)",
-                "每平米月租金",
-                "合同编号",
-                "合同名称"
-        };
-        ee1.addSheetByArray(df.format(new Date()) + "清单", allList, header);
-    }
-
-    public void responseTab4(DateFormat df, ExcelExport ee1, Map<String, Object> map1){
-        List<WzHouseContractCompareEntity> resultList = wzHouseContractCompareService.queryList(map1);
-
-        List<Object> colList=new ArrayList();;
-        List<Object[]> allList = new ArrayList();
-        for (int i = 0; i < resultList.size(); i++) {
-            colList = new ArrayList();
-            colList.add(resultList.get(i).getCity());
-            colList.add(resultList.get(i).getCounty());
-            colList.add(resultList.get(i).getUseTheProLine());
-            colList.add(resultList.get(i).getLeaseInPracticalUse());
-            colList.add(resultList.get(i).getDescriptionOfOtherUsesOfTheLease());
-            colList.add(resultList.get(i).getCityArea());
-            colList.add(resultList.get(i).getDistrict());
-            colList.add(WzHouseMaintenaCostController.toThousands(resultList.get(i).getContractAmountIncludingTax(),true));
-            colList.add(WzHouseMaintenaCostController.toThousands(resultList.get(i).getRentalBuildingArea(),true));
-            colList.add(WzHouseMaintenaCostController.toThousands(resultList.get(i).getHireTime(),false));
-            colList.add(WzHouseMaintenaCostController.toThousands(resultList.get(i).getTotalMonthlyRent(),true));
-            colList.add(resultList.get(i).getContractNumber());
-            colList.add(resultList.get(i).getContractName());
-            allList.add(colList.toArray());
-        }
-        String[] header = new String[]{
-                "使用单位隶属的地市级公司",
-                "使用单位隶属的区县级公司",
-                "使用专业线",
-                "租入实际用途",
-                "租入其他用途说明",
-                "城市区域",
-                "地段",
-                "合同总金额(含税)(元)",
-                "租入建筑面积(平米)",
-                "租期(年)",
-                "每平米月租金",
-                "合同编号",
-                "合同名称"
-        };
-        ee1.addSheetByArray(df.format(new Date()) + "清单", allList, header);
-    }
-
-    public void responseTab5(DateFormat df, ExcelExport ee1, Map<String, Object> map1){
-
-        List<WzHouseContractInEntity> resultList = wzHouseContractInService.queryList(map1);
-
-        List<Object> colList=new ArrayList();;
-        List<Object[]> allList = new ArrayList();
-        for (int i = 0; i < resultList.size(); i++) {
-            colList = new ArrayList();
-            colList.add(resultList.get(i).getImportTime());
-            colList.add(resultList.get(i).getInvestmentEntities());
-            colList.add(resultList.get(i).getTheNameOfTheRentedProperty());
-            colList.add(resultList.get(i).getFormOfLease());
-            colList.add(resultList.get(i).getStandardAddressLevel_1());
-            colList.add(resultList.get(i).getStandardAddressLevel_2());
-            colList.add(resultList.get(i).getStandardAddressLevel_3());
-            colList.add(resultList.get(i).getHouseNumber());
-            colList.add(resultList.get(i).getCityArea());
-            colList.add(resultList.get(i).getDistrict());
-            colList.add(resultList.get(i).getBuildingLongitude());
-            colList.add(resultList.get(i).getBuildingDimension());
-            colList.add(WzHouseMaintenaCostController.toThousands(resultList.get(i).getRentalBuildingArea(),true));
-            colList.add(WzHouseMaintenaCostController.toThousands(resultList.get(i).getRentalUsableArea(),true));
-            colList.add(resultList.get(i).getInvestmentEntities());
-            colList.add(resultList.get(i).getUseTheUnitsHierarchy());
-            colList.add(resultList.get(i).getCity());
-            colList.add(resultList.get(i).getCounty());
-            colList.add(resultList.get(i).getUseTheProLine());
-            colList.add(resultList.get(i).getLeaseInPracticalUse());
-            colList.add(resultList.get(i).getDescriptionOfOtherUsesOfTheLease());
-            colList.add(WzHouseMaintenaCostController.toThousands(resultList.get(i).getSelfUseBuildingArea(),true));
-            colList.add(WzHouseMaintenaCostController.toThousands(resultList.get(i).getSubleaseBuildingArea(),true));
-            colList.add(resultList.get(i).getFirstHireTime());
-            colList.add(resultList.get(i).getUseDepartments());
-            colList.add(resultList.get(i).getContacts());
-            colList.add(resultList.get(i).getContactNumber());
-            colList.add(WzHouseMaintenaCostController.toThousands(resultList.get(i).getTotalMonthlyRent(),true));
-            colList.add(resultList.get(i).getContractNumber());
-            colList.add(resultList.get(i).getContractName());
-            colList.add(resultList.get(i).getContractType());
-            colList.add(resultList.get(i).getSignTime());
-            colList.add(resultList.get(i).getOurContractingEntity());
-            colList.add(resultList.get(i).getLessorName());
-            colList.add(WzHouseMaintenaCostController.toThousands(resultList.get(i).getContractAmountIncludingTax(),true));
-            colList.add(WzHouseMaintenaCostController.toThousands(resultList.get(i).getValueAddedTaxAmount(),true));
-            colList.add(resultList.get(i).getEffectiveTimeOfContract());
-            colList.add(resultList.get(i).getTerminationTimeOfContract());
-            colList.add(resultList.get(i).getUndertakingDepartment());
-            colList.add(WzHouseMaintenaCostController.toThousands(resultList.get(i).getSelfUseArea(),true));
-            colList.add(WzHouseMaintenaCostController.toThousands(resultList.get(i).getIdleUseArea(),true));
-            colList.add(WzHouseMaintenaCostController.toThousands(resultList.get(i).getRentalUseArea(),true));
-            colList.add(WzHouseMaintenaCostController.toThousands(resultList.get(i).getRentalUsableArea(),true));
-            allList.add(colList.toArray());
-        }
-        String[] header = new String[]{
-                "导入时间",
-                "房屋所有权人属性",
-                "租入房屋名称",
-                "租入形式",
-                "标准地址(一级)",
-                "标准地址(二级)",
-                "标准地址(三级)",
-                "街/路/村门牌号",
-                "城市区域",
-                "地段",
-                "地址经度坐标",
-                "地址纬度坐标",
-                "租入建筑面积(平米)",
-                "租入使用面积(平米)",
-                "投资主体",
-                "使用单位层级",
-                "使用单位隶属的省级公司",
-                "使用单位隶属的地市级公司",
-                "使用单位隶属的区县级公司",
-                "使用专业线",
-                "租入实际用途",
-                "租入其他用途说明",
-                "自用建筑面积(平米)",
-                "转租建筑面积(平米)",
-                "首次租用时间",
-                "使用部门",
-                "联系人",
-                "联系电话",
-                "月租金(不含税)(元)",
-                "合同编号",
-                "合同名称",
-                "合同类型",
-                "签订时间",
-                "我方签约主体",
-                "出租方名称",
-                "合同总金额(含税)(元)",
-                "增值税金额(元)",
-                "租入开始时间(合同生效时间)",
-                "租入终止时间(合同终止时间)",
-                "承办部门",
-                "自用面积(使用)",
-                "闲置面积(使用)",
-                "出租面积(使用)",
-                "不可使用面积(使用)"
-        };
-        ee1.addSheetByArray(df.format(new Date()) + "清单", allList, header);
-    }
-
-    public double formatDouble(double num){
-        double avera=0l;
-        try{
-            DecimalFormat format2 = new DecimalFormat("#.00");
-            String str2 = format2.format(num);
-            avera = Double.parseDouble(str2);
-        }catch (Exception e){
-            e.printStackTrace();
-        }
-        return avera;
-    }
-
-}
+//
+//    public void responseTab1(DateFormat df, ExcelExport ee1, Map<String, Object> map1){
+//        //查询列表数据
+//        List<WzHouseLeaseInConEntity> wzHouseContracEntityList = wzHouseLeaseInConService.queryList(map1);
+//
+//        Map<String,List<WzHouseLeaseInConEntity>> cityMap=new HashMap<>();
+//        for (WzHouseLeaseInConEntity leaveUseVo : wzHouseContracEntityList) {
+//            List<WzHouseLeaseInConEntity> list;
+//            if(cityMap.get(leaveUseVo.getStandardAddressLevel2())!=null){
+//                list=cityMap.get(leaveUseVo.getStandardAddressLevel2());
+//                list.add(leaveUseVo);
+//            }else{
+//                list=new ArrayList<>();
+//                list.add(leaveUseVo);
+//            }
+//            cityMap.put(leaveUseVo.getStandardAddressLevel2(),list);
+//        }
+//
+//        List<WzHouseLeaseInConEntity> resultList=new ArrayList<>();
+//        List<WzHouseLeaseInConEntity> cityList=new ArrayList<>();
+//
+//        double allContractQuantity=0l;            // 租入合同数量
+//        double allNoTaxContractAmount=0l;         // 合同总金额(含税)(元)
+//        double allRentArea=0l;                    // 总计面积(平米)
+//        double allUnitPricePerSquareMeter=0l;     // 每平米单价
+//
+//        double allbusinessAreaSquaMete=0l;            //营业面积(平米)
+//        double allofficeAreaSquaMete=0l;              //办公面积(平米)
+//        double allcommunicationRoomAreaSquaMete=0l;  //通信机房面积(平米)
+//        double allotherUsageAreaSquaMete=0l;         //其他用途面积(平米)
+//
+//        int cityNum=0;
+//        for(Map.Entry<String,List<WzHouseLeaseInConEntity>> entry:cityMap.entrySet()){
+//            List<WzHouseLeaseInConEntity> list=entry.getValue();
+//
+//            if (list.get(0).getStandardAddressLevel3().equals("全省")) {
+//                continue;
+//            }
+//            //县的Map集合
+//            Map<String, List<WzHouseLeaseInConEntity>> countyMap = new HashMap<>();
+//            for (WzHouseLeaseInConEntity leaveUseVo : list) {
+//                if (leaveUseVo.getStandardAddressLevel3() == null || leaveUseVo.getStandardAddressLevel3().equals("")) {
+//                    continue;
+//                }
+//                if (countyMap.get(leaveUseVo.getStandardAddressLevel3()) != null) {
+//                    list = countyMap.get(leaveUseVo.getStandardAddressLevel3());
+//                    list.add(leaveUseVo);
+//                } else {
+//                    list = new ArrayList<>();
+//                    list.add(leaveUseVo);
+//                }
+//                countyMap.put(leaveUseVo.getStandardAddressLevel3(), list);
+//            }
+//
+//            double cityContractQuantity=0l;
+//            double cityNoTaxContractAmount=0l;
+//            double cityRentArea=0l;
+//            double cityUnitPricePerSquareMeter=0l;
+//
+//            double citybusinessAreaSquaMete=0l;            //营业面积(平米)
+//            double cityofficeAreaSquaMete=0l;              //办公面积(平米)
+//            double citycommunicationRoomAreaSquaMete=0l;  //通信机房面积(平米)
+//            double cityotherUsageAreaSquaMete=0l;         //其他用途面积(平米)
+//            List<WzHouseLeaseInConEntity> countyList=new ArrayList<>();
+//            for (Map.Entry<String, List<WzHouseLeaseInConEntity>> countyEntry : countyMap.entrySet()) {
+//                double contractQuantity=0l;
+//                double noTaxContractAmount=0l;
+//                double rentArea=0l;
+//                double unitPricePerSquareMeter=0l;
+//
+//                double businessAreaSquaMete=0l;            //营业面积(平米)
+//                double officeAreaSquaMete=0l;              //办公面积(平米)
+//                double communicationRoomAreaSquaMete=0l;  //通信机房面积(平米)
+//                double otherUsageAreaSquaMete=0l;         //其他用途面积(平米)
+//                for (WzHouseLeaseInConEntity leaveUseVo : countyEntry.getValue()) {
+//                    contractQuantity+=leaveUseVo.getLeaInContracQuantity();
+//                    noTaxContractAmount+=leaveUseVo.getTotalContrAmount();
+//                    rentArea+=leaveUseVo.getTotalAreaSquaMete();
+//                    unitPricePerSquareMeter+=leaveUseVo.getUnitPricePerSquareMeter();
+//                    businessAreaSquaMete+= leaveUseVo.getBusinessAreaSquaMete();
+//                    officeAreaSquaMete+=leaveUseVo.getOfficeAreaSquaMete();
+//                    communicationRoomAreaSquaMete+=leaveUseVo.getCommunicationRoomAreaSquaMete();
+//                    otherUsageAreaSquaMete+=leaveUseVo.getOtherUsageAreaSquaMete();
+//
+//                    cityContractQuantity+=leaveUseVo.getLeaInContracQuantity();
+//                    cityNoTaxContractAmount+=leaveUseVo.getTotalContrAmount();
+//                    cityRentArea+=leaveUseVo.getTotalAreaSquaMete();
+//                    cityUnitPricePerSquareMeter+=leaveUseVo.getUnitPricePerSquareMeter();
+//                    citybusinessAreaSquaMete+= leaveUseVo.getBusinessAreaSquaMete();
+//                    cityofficeAreaSquaMete+=leaveUseVo.getOfficeAreaSquaMete();
+//                    citycommunicationRoomAreaSquaMete+=leaveUseVo.getCommunicationRoomAreaSquaMete();
+//                    cityotherUsageAreaSquaMete+=leaveUseVo.getOtherUsageAreaSquaMete();
+//
+//                    allContractQuantity+=leaveUseVo.getLeaInContracQuantity();
+//                    allNoTaxContractAmount+=leaveUseVo.getTotalContrAmount();
+//                    allRentArea+=leaveUseVo.getTotalAreaSquaMete();
+//                    allUnitPricePerSquareMeter+=leaveUseVo.getUnitPricePerSquareMeter();
+//                    allbusinessAreaSquaMete+= leaveUseVo.getBusinessAreaSquaMete();
+//                    allofficeAreaSquaMete+=leaveUseVo.getOfficeAreaSquaMete();
+//                    allcommunicationRoomAreaSquaMete+=leaveUseVo.getCommunicationRoomAreaSquaMete();
+//                    allotherUsageAreaSquaMete+=leaveUseVo.getOtherUsageAreaSquaMete();
+//                }
+//                WzHouseLeaseInConEntity wzHouseInCustomerEntity = new WzHouseLeaseInConEntity();
+//                wzHouseInCustomerEntity.setLeaInContracQuantity(formatDouble(contractQuantity));
+//                wzHouseInCustomerEntity.setStandardAddressLevel2(countyEntry.getKey());
+//                wzHouseInCustomerEntity.setTotalContrAmount(formatDouble(noTaxContractAmount));
+//                wzHouseInCustomerEntity.setTotalAreaSquaMete(formatDouble(rentArea));
+//                wzHouseInCustomerEntity.setUnitPricePerSquareMeter(formatDouble(unitPricePerSquareMeter));
+//                wzHouseInCustomerEntity.setBusinessAreaSquaMete(formatDouble(businessAreaSquaMete));
+//                wzHouseInCustomerEntity.setOfficeAreaSquaMete(formatDouble(officeAreaSquaMete));
+//                wzHouseInCustomerEntity.setCommunicationRoomAreaSquaMete(formatDouble(communicationRoomAreaSquaMete));
+//                wzHouseInCustomerEntity.setOtherUsageAreaSquaMete(formatDouble(otherUsageAreaSquaMete));
+//                countyList.add(wzHouseInCustomerEntity);
+//            }
+//            List<WzHouseLeaseInConEntity> orderCountyList=new ArrayList<>();
+//            try{
+//                //对countList 进行排序
+//                String city=list.get(0).getStandardAddressLevel2();
+//                if(city.contains("市")){
+//                    city=city.split("市")[0];
+//                }
+//                OtnAreaEntity area=otnAreaService.queryObject(city);
+//                List<OtnAreaEntity> countyAreaList=otnAreaService.getCityOption(area.getId());
+//                for (OtnAreaEntity otnAreaEntity : countyAreaList) {
+//                    for (WzHouseLeaseInConEntity wzCity : countyList) {
+//                        if(wzCity.getStandardAddressLevel2().contains(otnAreaEntity.getName())){
+//                            orderCountyList.add(wzCity);
+//                        }
+//                    }
+//                }
+//            }catch (Exception e){
+//                orderCountyList=countyList;
+//                e.printStackTrace();
+//            }
+//
+//            WzHouseLeaseInConEntity wzHouseInCustomerEntity = new WzHouseLeaseInConEntity();
+//            wzHouseInCustomerEntity.setStandardAddressLevel2(entry.getKey());
+//            wzHouseInCustomerEntity.setLeaInContracQuantity(formatDouble(cityContractQuantity));
+//            wzHouseInCustomerEntity.setTotalContrAmount(formatDouble(cityNoTaxContractAmount));
+//            wzHouseInCustomerEntity.setTotalAreaSquaMete(formatDouble(cityRentArea));
+//            wzHouseInCustomerEntity.setBusinessAreaSquaMete(formatDouble(citybusinessAreaSquaMete));
+//            wzHouseInCustomerEntity.setOfficeAreaSquaMete(formatDouble(cityofficeAreaSquaMete));
+//            wzHouseInCustomerEntity.setCommunicationRoomAreaSquaMete(formatDouble(citycommunicationRoomAreaSquaMete));
+//            wzHouseInCustomerEntity.setOtherUsageAreaSquaMete(formatDouble(cityotherUsageAreaSquaMete));
+//            double num=cityUnitPricePerSquareMeter/countyMap.size();
+//            cityNum+=countyMap.size();
+//            wzHouseInCustomerEntity.setUnitPricePerSquareMeter(formatDouble(num));
+//            wzHouseInCustomerEntity.setChildren(orderCountyList);
+//            cityList.add(wzHouseInCustomerEntity);
+//        }
+//
+//
+//        //对cityList 进行排序
+//        List<OtnAreaEntity> areaList=otnAreaService.getCityOption("018");
+//        List<WzHouseLeaseInConEntity> orderList=new ArrayList<>();
+//        for (OtnAreaEntity otnAreaEntity : areaList) {
+//            for (WzHouseLeaseInConEntity wzCity : cityList) {
+//                if(wzCity.getStandardAddressLevel2().contains(otnAreaEntity.getName())){
+//                    orderList.add(wzCity);
+//                }
+//            }
+//        }
+//
+//        WzHouseLeaseInConEntity province=new WzHouseLeaseInConEntity();
+//        province.setStandardAddressLevel2("全省");
+//        province.setLeaInContracQuantity(formatDouble(allContractQuantity));
+//        province.setTotalContrAmount(formatDouble(allNoTaxContractAmount));
+//        province.setTotalAreaSquaMete(formatDouble(allRentArea));
+//        if(cityList.size()!=0){
+//            province.setUnitPricePerSquareMeter(formatDouble(allUnitPricePerSquareMeter/cityNum ));
+//        }
+//        province.setBusinessAreaSquaMete(formatDouble(allbusinessAreaSquaMete));
+//        province.setOfficeAreaSquaMete(formatDouble(allofficeAreaSquaMete));
+//        province.setCommunicationRoomAreaSquaMete(formatDouble(allcommunicationRoomAreaSquaMete));
+//        province.setOtherUsageAreaSquaMete(formatDouble(allotherUsageAreaSquaMete));
+//        province.setChildren(orderList);
+//        resultList.add(province);
+//
+//
+//        List<Object> colList=new ArrayList();;
+//        List<Object[]> allList = new ArrayList();
+//        for (int i = 0; i < resultList.size(); i++) {
+//
+//            if(resultList.get(i).getStandardAddressLevel2().contains("省")){
+//                colList = new ArrayList();
+//                colList.add(resultList.get(i).getStandardAddressLevel2());
+//                colList.add("");
+//                colList.add("");
+//                colList.add(WzHouseMaintenaCostController.toThousands(resultList.get(i).getLeaInContracQuantity(),false));
+//                colList.add(WzHouseMaintenaCostController.toThousands(resultList.get(i).getTotalContrAmount(),true));
+//                colList.add(WzHouseMaintenaCostController.toThousands(resultList.get(i).getUnitPricePerSquareMeter(),true));
+//                colList.add(WzHouseMaintenaCostController.toThousands(resultList.get(i).getBusinessAreaSquaMete(),true));
+//                colList.add(WzHouseMaintenaCostController.toThousands(resultList.get(i).getOfficeAreaSquaMete(),true));
+//                colList.add(WzHouseMaintenaCostController.toThousands(resultList.get(i).getCommunicationRoomAreaSquaMete(),true));
+//                colList.add(WzHouseMaintenaCostController.toThousands(resultList.get(i).getOtherUsageAreaSquaMete(),true));
+//                colList.add(WzHouseMaintenaCostController.toThousands(resultList.get(i).getTotalAreaSquaMete(),true));
+//                allList.add(colList.toArray());
+//
+//                //处理城市的
+//                List<WzHouseLeaseInConEntity> cityList1=resultList.get(i).getChildren();
+//                for (WzHouseLeaseInConEntity floorNoUserVo : cityList1) {
+//                    colList = new ArrayList();
+//                    colList.add("");
+//                    colList.add(floorNoUserVo.getStandardAddressLevel2());
+//                    colList.add("");
+//                    colList.add(WzHouseMaintenaCostController.toThousands(floorNoUserVo.getLeaInContracQuantity(),false));
+//                    colList.add(WzHouseMaintenaCostController.toThousands(floorNoUserVo.getTotalContrAmount(),true));
+//                    colList.add(WzHouseMaintenaCostController.toThousands(floorNoUserVo.getUnitPricePerSquareMeter(),true));
+//                    colList.add(WzHouseMaintenaCostController.toThousands(floorNoUserVo.getBusinessAreaSquaMete(),true));
+//                    colList.add(WzHouseMaintenaCostController.toThousands(floorNoUserVo.getOfficeAreaSquaMete(),true));
+//                    colList.add(WzHouseMaintenaCostController.toThousands(floorNoUserVo.getCommunicationRoomAreaSquaMete(),true));
+//                    colList.add(WzHouseMaintenaCostController.toThousands(floorNoUserVo.getOtherUsageAreaSquaMete(),true));
+//                    colList.add(WzHouseMaintenaCostController.toThousands(floorNoUserVo.getTotalAreaSquaMete(),true));
+//                    allList.add(colList.toArray());
+//                    //处理县城的
+//                    List<WzHouseLeaseInConEntity> countyList1 = floorNoUserVo.getChildren();
+//                    for (WzHouseLeaseInConEntity noUserVo : countyList1) {
+//                        colList = new ArrayList();
+//                        colList.add("");
+//                        colList.add("");
+//                        colList.add(noUserVo.getStandardAddressLevel2());
+//                        colList.add(WzHouseMaintenaCostController.toThousands(noUserVo.getLeaInContracQuantity(),false));
+//                        colList.add(WzHouseMaintenaCostController.toThousands(noUserVo.getTotalContrAmount(),true));
+//                        colList.add(WzHouseMaintenaCostController.toThousands(noUserVo.getUnitPricePerSquareMeter(),true));
+//                        colList.add(WzHouseMaintenaCostController.toThousands(noUserVo.getBusinessAreaSquaMete(),true));
+//                        colList.add(WzHouseMaintenaCostController.toThousands(noUserVo.getOfficeAreaSquaMete(),true));
+//                        colList.add(WzHouseMaintenaCostController.toThousands(noUserVo.getCommunicationRoomAreaSquaMete(),true));
+//                        colList.add(WzHouseMaintenaCostController.toThousands(noUserVo.getOtherUsageAreaSquaMete(),true));
+//                        colList.add(WzHouseMaintenaCostController.toThousands(noUserVo.getTotalAreaSquaMete(),true));
+//                        allList.add(colList.toArray());
+//                    }
+//                }
+//            }
+//        }
+//        String[] header = new String[]{
+//                "资产所属单位(一级)",
+//                "资产所属单位(二级)",
+//                "资产所属单位(三级)",
+//                "租入合同数量",
+//                "合同年金额(含税) (元)",
+//                "每平米单价(元)",
+//                "营业面积(平米)",
+//                "办公面积(平米)",
+//                "通信机房面积(元)",
+//                "其他用途面积(平米)",
+//                "总计面积(平米)"
+//        };
+//        ee1.addSheetByArray(df.format(new Date()) + "清单", allList, header);
+//    }
+//
+//    public void responseTab2(DateFormat df, ExcelExport ee1, Map<String, Object> map1){
+//        //查询列表数据
+//        List<WzHouseUseEntity> wzHouseContracEntityList = wzHouseUseService.queryList(map1);
+//
+//        Map<String,List<WzHouseUseEntity>> cityMap=new HashMap<>();
+//        for (WzHouseUseEntity leaveUseVo : wzHouseContracEntityList) {
+//            List<WzHouseUseEntity> list;
+//            if(cityMap.get(leaveUseVo.getCity())!=null){
+//                list=cityMap.get(leaveUseVo.getCity());
+//                list.add(leaveUseVo);
+//            }else{
+//                list=new ArrayList<>();
+//                list.add(leaveUseVo);
+//            }
+//            cityMap.put(leaveUseVo.getCity(),list);
+//        }
+//
+//        List<WzHouseUseVo> resultList=new ArrayList<>();
+//        List<WzHouseUseVo> cityList=new ArrayList<>();
+//
+//        int allyingYe=0;
+//        int allbanGong=0;
+//        int alltongXin=0;
+//        int allother=0;
+//        int allall=0;
+//        for(Map.Entry<String,List<WzHouseUseEntity>> entry:cityMap.entrySet()){
+//            List<WzHouseUseEntity> list=entry.getValue();
+//
+//            if (list.get(0).getCounty().equals("全省")) {
+//                continue;
+//            }
+//            //县的Map集合
+//            Map<String, List<WzHouseUseEntity>> countyMap = new HashMap<>();
+//            for (WzHouseUseEntity leaveUseVo : list) {
+//                if (leaveUseVo.getCounty() == null || leaveUseVo.getCounty().equals("")) {
+//                    continue;
+//                }
+//                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);
+//            }
+//
+//            int cityyingYe=0;
+//            int citybanGong=0;
+//            int citytongXin=0;
+//            int cityother=0;
+//            int cityall=0;
+//            List<WzHouseUseVo> countyList=new ArrayList<>();
+//            for (Map.Entry<String, List<WzHouseUseEntity>> countyEntry : countyMap.entrySet()) {
+//                int yingYe=0;
+//                int banGong=0;
+//                int tongXin=0;
+//                int other=0;
+//                int all=0;
+//                for (WzHouseUseEntity leaveUseVo : countyEntry.getValue()) {
+//                    if(leaveUseVo.getRentalUse()!=null){
+//                        if(leaveUseVo.getRentalUse().equals("通信设施机房")){
+//                            tongXin+=1;
+//                            citytongXin+=1;
+//                            alltongXin+=1;
+//                        }
+//                        else if(leaveUseVo.getRentalUse().equals("营业")){
+//                            yingYe+=1;
+//                            cityyingYe+=1;
+//                            allyingYe+=1;
+//                        }
+//                        else if(leaveUseVo.getRentalUse().equals("其他租入用途")){
+//                            other+=1;
+//                            cityother+=1;
+//                            allother+=1;
+//                        }
+//                        else if(leaveUseVo.getRentalUse().equals("办公")){
+//                            banGong+=1;
+//                            citybanGong+=1;
+//                            allbanGong+=1;
+//                        }
+//                        all+=1;
+//                        cityall+=1;
+//                        allall+=1;
+//                    }
+//                }
+//                WzHouseUseVo wzHouseInCustomerEntity = new WzHouseUseVo();
+//                wzHouseInCustomerEntity.setYingYe(yingYe);
+//                wzHouseInCustomerEntity.setCity(countyEntry.getKey());
+//                wzHouseInCustomerEntity.setBanGong(banGong);
+//                wzHouseInCustomerEntity.setAll(all);
+//                wzHouseInCustomerEntity.setTongXin(tongXin);
+//                wzHouseInCustomerEntity.setOther(other);
+//                countyList.add(wzHouseInCustomerEntity);
+//            }
+//            List<WzHouseUseVo> 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());
+//                for (OtnAreaEntity otnAreaEntity : countyAreaList) {
+//                    for (WzHouseUseVo wzCity : countyList) {
+//                        if(wzCity.getCity().contains(otnAreaEntity.getName())){
+//                            orderCountyList.add(wzCity);
+//                        }
+//                    }
+//                }
+//            }catch (Exception e){
+//                orderCountyList=countyList;
+//                e.printStackTrace();
+//            }
+//
+//            WzHouseUseVo wzHouseInCustomerEntity = new WzHouseUseVo();
+//            wzHouseInCustomerEntity.setCity(entry.getKey());
+//            wzHouseInCustomerEntity.setYingYe(cityyingYe);
+//            wzHouseInCustomerEntity.setBanGong(citybanGong);
+//            wzHouseInCustomerEntity.setAll(cityall);
+//            wzHouseInCustomerEntity.setTongXin(citytongXin);
+//            wzHouseInCustomerEntity.setOther(cityother);
+//            wzHouseInCustomerEntity.setChildren(orderCountyList);
+//            cityList.add(wzHouseInCustomerEntity);
+//        }
+//
+//
+//        //对cityList 进行排序
+//        List<OtnAreaEntity> areaList=otnAreaService.getCityOption("018");
+//        List<WzHouseUseVo> orderList=new ArrayList<>();
+//        for (OtnAreaEntity otnAreaEntity : areaList) {
+//            for (WzHouseUseVo wzCity : cityList) {
+//                if(wzCity.getCity().contains(otnAreaEntity.getName())){
+//                    orderList.add(wzCity);
+//                }
+//            }
+//        }
+//
+//        WzHouseUseVo province=new WzHouseUseVo();
+//        province.setCity("全省");
+//        province.setYingYe(allyingYe);
+//        province.setBanGong(allbanGong);
+//        province.setAll(allall);
+//        province.setTongXin(alltongXin);
+//        province.setOther(allother);
+//        province.setChildren(orderList);
+//        resultList.add(province);
+//
+//        List<Object> colList=new ArrayList();;
+//        List<Object[]> allList = new ArrayList();
+//        for (int i = 0; i < resultList.size(); i++) {
+//
+//            if(resultList.get(i).getCity().contains("省")){
+//                colList = new ArrayList();
+//                colList.add(resultList.get(i).getCity());
+//                colList.add("");
+//                colList.add("");
+//                colList.add(resultList.get(i).getYingYe());
+//                colList.add(resultList.get(i).getBanGong());
+//                colList.add(resultList.get(i).getTongXin());
+//                colList.add(resultList.get(i).getOther());
+//                colList.add(resultList.get(i).getAll());
+//                allList.add(colList.toArray());
+//
+//                //处理城市的
+//                List<WzHouseUseVo> cityList1=resultList.get(i).getChildren();
+//                for (WzHouseUseVo floorNoUserVo : cityList1) {
+//                    colList = new ArrayList();
+//                    colList.add("");
+//                    colList.add(floorNoUserVo.getCity());
+//                    colList.add("");
+//                    colList.add(floorNoUserVo.getYingYe());
+//                    colList.add(floorNoUserVo.getBanGong());
+//                    colList.add(floorNoUserVo.getTongXin());
+//                    colList.add(floorNoUserVo.getOther());
+//                    colList.add(floorNoUserVo.getAll());
+//                    allList.add(colList.toArray());
+//                    //处理县城的
+//                    List<WzHouseUseVo> countyList1 = floorNoUserVo.getChildren();
+//                    for (WzHouseUseVo noUserVo : countyList1) {
+//                        colList = new ArrayList();
+//                        colList.add("");
+//                        colList.add("");
+//                        colList.add(noUserVo.getCity());
+//                        colList.add(noUserVo.getYingYe());
+//                        colList.add(noUserVo.getBanGong());
+//                        colList.add(noUserVo.getTongXin());
+//                        colList.add(noUserVo.getOther());
+//                        colList.add(noUserVo.getAll());
+//                        allList.add(colList.toArray());
+//                    }
+//                }
+//            }
+//        }
+//        String[] header = new String[]{
+//                "资产所属单位(一级)",
+//                "资产所属单位(二级)",
+//                "资产所属单位(三级)",
+//                "营业",
+//                "办公",
+//                "通信设施机房",
+//                "其他租入用途",
+//                "总计"
+//        };
+//        ee1.addSheetByArray(df.format(new Date()) + "清单", allList, header);
+//
+//    }
+//
+//    public void responseTab3(DateFormat df, ExcelExport ee1, Map<String, Object> map1){
+//
+//        List<WzHouseContractTopEntity> resultList = wzHouseContractTopService.queryList(map1);
+//
+//        List<Object> colList=new ArrayList();;
+//        List<Object[]> allList = new ArrayList();
+//        for (int i = 0; i < resultList.size(); i++) {
+//            colList = new ArrayList();
+//            colList.add(resultList.get(i).getCity());
+//            colList.add(resultList.get(i).getCounty());
+//            colList.add(resultList.get(i).getUseTheProLine());
+//            colList.add(resultList.get(i).getLeaseInPracticalUse());
+//            colList.add(resultList.get(i).getDescriptionOfOtherUsesOfTheLease());
+//            colList.add(resultList.get(i).getCityArea());
+//            colList.add(resultList.get(i).getDistrict());
+//            colList.add(WzHouseMaintenaCostController.toThousands(resultList.get(i).getContractAmountIncludingTax(),true));
+//            colList.add(WzHouseMaintenaCostController.toThousands(resultList.get(i).getRentalBuildingArea(),true));
+//            colList.add(WzHouseMaintenaCostController.toThousands(resultList.get(i).getHireTime(),false));
+//            colList.add(WzHouseMaintenaCostController.toThousands(resultList.get(i).getTotalMonthlyRent(),true));
+//            colList.add(resultList.get(i).getContractNumber());
+//            colList.add(resultList.get(i).getContractName());
+//            allList.add(colList.toArray());
+//        }
+//        String[] header = new String[]{
+//                "使用单位隶属的地市级公司",
+//                "使用单位隶属的区县级公司",
+//                "使用专业线",
+//                "租入实际用途",
+//                "租入其他用途说明",
+//                "城市区域",
+//                "地段",
+//                "合同总金额(含税)(元)",
+//                "租入建筑面积(平米)",
+//                "租期(年)",
+//                "每平米月租金",
+//                "合同编号",
+//                "合同名称"
+//        };
+//        ee1.addSheetByArray(df.format(new Date()) + "清单", allList, header);
+//    }
+//
+//    public void responseTab4(DateFormat df, ExcelExport ee1, Map<String, Object> map1){
+//        List<WzHouseContractCompareEntity> resultList = wzHouseContractCompareService.queryList(map1);
+//
+//        List<Object> colList=new ArrayList();;
+//        List<Object[]> allList = new ArrayList();
+//        for (int i = 0; i < resultList.size(); i++) {
+//            colList = new ArrayList();
+//            colList.add(resultList.get(i).getCity());
+//            colList.add(resultList.get(i).getCounty());
+//            colList.add(resultList.get(i).getUseTheProLine());
+//            colList.add(resultList.get(i).getLeaseInPracticalUse());
+//            colList.add(resultList.get(i).getDescriptionOfOtherUsesOfTheLease());
+//            colList.add(resultList.get(i).getCityArea());
+//            colList.add(resultList.get(i).getDistrict());
+//            colList.add(WzHouseMaintenaCostController.toThousands(resultList.get(i).getContractAmountIncludingTax(),true));
+//            colList.add(WzHouseMaintenaCostController.toThousands(resultList.get(i).getRentalBuildingArea(),true));
+//            colList.add(WzHouseMaintenaCostController.toThousands(resultList.get(i).getHireTime(),false));
+//            colList.add(WzHouseMaintenaCostController.toThousands(resultList.get(i).getTotalMonthlyRent(),true));
+//            colList.add(resultList.get(i).getContractNumber());
+//            colList.add(resultList.get(i).getContractName());
+//            allList.add(colList.toArray());
+//        }
+//        String[] header = new String[]{
+//                "使用单位隶属的地市级公司",
+//                "使用单位隶属的区县级公司",
+//                "使用专业线",
+//                "租入实际用途",
+//                "租入其他用途说明",
+//                "城市区域",
+//                "地段",
+//                "合同总金额(含税)(元)",
+//                "租入建筑面积(平米)",
+//                "租期(年)",
+//                "每平米月租金",
+//                "合同编号",
+//                "合同名称"
+//        };
+//        ee1.addSheetByArray(df.format(new Date()) + "清单", allList, header);
+//    }
+//
+//    public void responseTab5(DateFormat df, ExcelExport ee1, Map<String, Object> map1){
+//
+//        List<WzHouseContractInEntity> resultList = wzHouseContractInService.queryList(map1);
+//
+//        List<Object> colList=new ArrayList();;
+//        List<Object[]> allList = new ArrayList();
+//        for (int i = 0; i < resultList.size(); i++) {
+//            colList = new ArrayList();
+//            colList.add(resultList.get(i).getImportTime());
+//            colList.add(resultList.get(i).getInvestmentEntities());
+//            colList.add(resultList.get(i).getTheNameOfTheRentedProperty());
+//            colList.add(resultList.get(i).getFormOfLease());
+//            colList.add(resultList.get(i).getStandardAddressLevel_1());
+//            colList.add(resultList.get(i).getStandardAddressLevel_2());
+//            colList.add(resultList.get(i).getStandardAddressLevel_3());
+//            colList.add(resultList.get(i).getHouseNumber());
+//            colList.add(resultList.get(i).getCityArea());
+//            colList.add(resultList.get(i).getDistrict());
+//            colList.add(resultList.get(i).getBuildingLongitude());
+//            colList.add(resultList.get(i).getBuildingDimension());
+//            colList.add(WzHouseMaintenaCostController.toThousands(resultList.get(i).getRentalBuildingArea(),true));
+//            colList.add(WzHouseMaintenaCostController.toThousands(resultList.get(i).getRentalUsableArea(),true));
+//            colList.add(resultList.get(i).getInvestmentEntities());
+//            colList.add(resultList.get(i).getUseTheUnitsHierarchy());
+//            colList.add(resultList.get(i).getCity());
+//            colList.add(resultList.get(i).getCounty());
+//            colList.add(resultList.get(i).getUseTheProLine());
+//            colList.add(resultList.get(i).getLeaseInPracticalUse());
+//            colList.add(resultList.get(i).getDescriptionOfOtherUsesOfTheLease());
+//            colList.add(WzHouseMaintenaCostController.toThousands(resultList.get(i).getSelfUseBuildingArea(),true));
+//            colList.add(WzHouseMaintenaCostController.toThousands(resultList.get(i).getSubleaseBuildingArea(),true));
+//            colList.add(resultList.get(i).getFirstHireTime());
+//            colList.add(resultList.get(i).getUseDepartments());
+//            colList.add(resultList.get(i).getContacts());
+//            colList.add(resultList.get(i).getContactNumber());
+//            colList.add(WzHouseMaintenaCostController.toThousands(resultList.get(i).getTotalMonthlyRent(),true));
+//            colList.add(resultList.get(i).getContractNumber());
+//            colList.add(resultList.get(i).getContractName());
+//            colList.add(resultList.get(i).getContractType());
+//            colList.add(resultList.get(i).getSignTime());
+//            colList.add(resultList.get(i).getOurContractingEntity());
+//            colList.add(resultList.get(i).getLessorName());
+//            colList.add(WzHouseMaintenaCostController.toThousands(resultList.get(i).getContractAmountIncludingTax(),true));
+//            colList.add(WzHouseMaintenaCostController.toThousands(resultList.get(i).getValueAddedTaxAmount(),true));
+//            colList.add(resultList.get(i).getEffectiveTimeOfContract());
+//            colList.add(resultList.get(i).getTerminationTimeOfContract());
+//            colList.add(resultList.get(i).getUndertakingDepartment());
+//            colList.add(WzHouseMaintenaCostController.toThousands(resultList.get(i).getSelfUseArea(),true));
+//            colList.add(WzHouseMaintenaCostController.toThousands(resultList.get(i).getIdleUseArea(),true));
+//            colList.add(WzHouseMaintenaCostController.toThousands(resultList.get(i).getRentalUseArea(),true));
+//            colList.add(WzHouseMaintenaCostController.toThousands(resultList.get(i).getRentalUsableArea(),true));
+//            allList.add(colList.toArray());
+//        }
+//        String[] header = new String[]{
+//                "导入时间",
+//                "房屋所有权人属性",
+//                "租入房屋名称",
+//                "租入形式",
+//                "标准地址(一级)",
+//                "标准地址(二级)",
+//                "标准地址(三级)",
+//                "街/路/村门牌号",
+//                "城市区域",
+//                "地段",
+//                "地址经度坐标",
+//                "地址纬度坐标",
+//                "租入建筑面积(平米)",
+//                "租入使用面积(平米)",
+//                "投资主体",
+//                "使用单位层级",
+//                "使用单位隶属的省级公司",
+//                "使用单位隶属的地市级公司",
+//                "使用单位隶属的区县级公司",
+//                "使用专业线",
+//                "租入实际用途",
+//                "租入其他用途说明",
+//                "自用建筑面积(平米)",
+//                "转租建筑面积(平米)",
+//                "首次租用时间",
+//                "使用部门",
+//                "联系人",
+//                "联系电话",
+//                "月租金(不含税)(元)",
+//                "合同编号",
+//                "合同名称",
+//                "合同类型",
+//                "签订时间",
+//                "我方签约主体",
+//                "出租方名称",
+//                "合同总金额(含税)(元)",
+//                "增值税金额(元)",
+//                "租入开始时间(合同生效时间)",
+//                "租入终止时间(合同终止时间)",
+//                "承办部门",
+//                "自用面积(使用)",
+//                "闲置面积(使用)",
+//                "出租面积(使用)",
+//                "不可使用面积(使用)"
+//        };
+//        ee1.addSheetByArray(df.format(new Date()) + "清单", allList, header);
+//    }
+//
+//    public double formatDouble(double num){
+//        double avera=0l;
+//        try{
+//            DecimalFormat format2 = new DecimalFormat("#.00");
+//            String str2 = format2.format(num);
+//            avera = Double.parseDouble(str2);
+//        }catch (Exception e){
+//            e.printStackTrace();
+//        }
+//        return avera;
+//    }
+//
+//}

+ 4 - 1
src/main/java/com/example/controller/gdc/WzHouseMaintController.java

@@ -19,7 +19,7 @@ import java.util.ArrayList;
 import java.util.List;
 
 /**
- * 房屋出租(合同管理)
+ * 房产3年无维修
  */
 @RestController
 @RequestMapping("/house-car/house/dist/api/WzHouseMaint")
@@ -30,6 +30,9 @@ public class WzHouseMaintController {
     @Autowired
     private WzOtnAreaService otnAreaService;
 
+    /**
+     * 房产3年无维修
+     */
     @RequestMapping("/list")
     @IgnoreAuth
     public R list(@RequestBody PageMap pageMap) {

+ 542 - 551
src/main/java/com/example/controller/gdc/WzHouseMaintenaCostController.java

@@ -3,29 +3,18 @@ package com.example.controller.gdc;
 import com.example.config.annotation.IgnoreAuth;
 import com.example.pojo.gdc.OtnAreaEntity;
 import com.example.pojo.gdc.WzHouseMaintEntity;
-import com.example.pojo.gdc.WzHouseMaintenaCostEntity;
-import com.example.pojo.gdc.vo.DailyModifyVo;
-import com.example.pojo.gdc.vo.HighFrequencyVo;
-import com.example.pojo.gdc.vo.housecost.HouseCostVo;
 import com.example.service.gdc.WzHouseMaintService;
 import com.example.service.gdc.WzHouseMaintenaCostService;
 import com.example.service.gdc.WzOtnAreaService;
-import com.example.service.gdc.WzStrategyService;
-import com.example.utils.PageMap;
-import com.example.utils.PageUtils;
-import com.example.utils.Query;
-import com.example.utils.R;
 import com.example.utils.excel.ExcelExport;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.RequestBody;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RestController;
 
 import javax.servlet.http.HttpServletResponse;
 import java.math.BigDecimal;
 import java.text.DateFormat;
-import java.text.DecimalFormat;
 import java.text.SimpleDateFormat;
 import java.util.ArrayList;
 import java.util.Date;
@@ -43,8 +32,8 @@ public class WzHouseMaintenaCostController {
     private WzHouseMaintenaCostService wzHouseMaintenaCostService;
     @Autowired
     private WzHouseMaintService wzHouseMaintService;
-    @Autowired
-    private WzStrategyService wzStrategyService;
+//    @Autowired
+//    private WzStrategyService wzStrategyService;
 
 //    /**
 //     * 查看列表
@@ -81,16 +70,16 @@ public class WzHouseMaintenaCostController {
 //    }
 
 
-    @RequestMapping("/queryVoList")
-    @IgnoreAuth
-    public R queryVoList(@RequestBody PageMap pageMap) {
-        //查询列表数据
-        Query query = new Query(pageMap);
-        List<WzHouseMaintenaCostEntity> resultList = wzHouseMaintenaCostService.queryList(query);
-        int total = wzHouseMaintenaCostService.queryTotal(query);
-        PageUtils pageUtil = new PageUtils(resultList, total, query.getLimit(), query.getPage());
-        return R.ok().put("page", pageUtil);
-    }
+//    @RequestMapping("/queryVoList")
+//    @IgnoreAuth
+//    public R queryVoList(@RequestBody PageMap pageMap) {
+//        //查询列表数据
+//        Query query = new Query(pageMap);
+//        List<WzHouseMaintenaCostEntity> resultList = wzHouseMaintenaCostService.queryList(query);
+//        int total = wzHouseMaintenaCostService.queryTotal(query);
+//        PageUtils pageUtil = new PageUtils(resultList, total, query.getLimit(), query.getPage());
+//        return R.ok().put("page", pageUtil);
+//    }
 
 //    @RequestMapping("/queryEchart")
 //    @IgnoreAuth
@@ -327,7 +316,7 @@ public class WzHouseMaintenaCostController {
 
 
     /**
-     * 清单excel
+     * 维修异常监控_房产3年无维修清单excel
      */
     @GetMapping("/excel")
     @IgnoreAuth
@@ -366,221 +355,223 @@ public class WzHouseMaintenaCostController {
         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);
-            ee1.export(response);
-        } else if (name.contains("高总价统计")) {
-            ee1 = new ExcelExport("维修异常监控_高总价统计" + df.format(new Date()));
-            responseTab2(df,ee1,map);
-            ee1.export(response);
-        } else if (name.contains("高额日常零星维修")) {
-            ee1 = new ExcelExport("维修异常监控_高额日常零星维修" + df.format(new Date()));
-            responseTab3(df,ee1,map);
-            ee1.export(response);
-        } else if (name.contains("不可用发生维修费")) {
-            ee1 = new ExcelExport("维修异常监控_闲置+不可用发生维修费" + df.format(new Date()));
-            responseTab4(df,ee1,map);
-            ee1.export(response);
-        } else if (name.contains("房产3年无维修")) {
+//        if (name.contains("相同维修频次统计")) {
+//            ee1 = new ExcelExport("维修异常监控_相同维修频次统计" + df.format(new Date()));
+//            responseTab1(df, ee1, map);
+//            ee1.export(response);
+//        } else if (name.contains("高总价统计")) {
+//            ee1 = new ExcelExport("维修异常监控_高总价统计" + df.format(new Date()));
+//            responseTab2(df,ee1,map);
+//            ee1.export(response);
+//        } else if (name.contains("高额日常零星维修")) {
+//            ee1 = new ExcelExport("维修异常监控_高额日常零星维修" + df.format(new Date()));
+//            responseTab3(df,ee1,map);
+//            ee1.export(response);
+//        } else if (name.contains("不可用发生维修费")) {
+//            ee1 = new ExcelExport("维修异常监控_闲置+不可用发生维修费" + df.format(new Date()));
+//            responseTab4(df,ee1,map);
+//            ee1.export(response);
+//        } else
+        if (name.contains("房产3年无维修")) {
             ee1 = new ExcelExport("维修异常监控_房产3年无维修" + df.format(new Date()));
             responseTab5(df,ee1,map);
             ee1.export(response);
-        } else if (name.contains("维修费统计")){
-            ee1 = new ExcelExport("房屋维修_维修费统计" + df.format(new Date()));
-            responseTab6(df,ee1,map);
-            ee1.export(response);
-        }else if (name.contains("维修费详表")){
-            ee1 = new ExcelExport("房屋维修_维修费记录" + df.format(new Date()));
-            responseTab7(df,ee1,map);
-            ee1.export(response);
         }
+//        else if (name.contains("维修费统计")){
+//            ee1 = new ExcelExport("房屋维修_维修费统计" + df.format(new Date()));
+//            responseTab6(df,ee1,map);
+//            ee1.export(response);
+//        }else if (name.contains("维修费详表")){
+//            ee1 = new ExcelExport("房屋维修_维修费记录" + df.format(new Date()));
+//            responseTab7(df,ee1,map);
+//            ee1.export(response);
+//        }
     }
 
-    public void responseTab1(DateFormat df, ExcelExport ee1, Map<String, Object> map1) {
-        Query query = new Query(map1);
-        List<HighFrequencyVo> resultList = wzHouseMaintenaCostService.queryHighFrequency(query);
-
-        Query query1 = new Query(map1);
-        query1.put("sidx","num");
-        query1.put("order","desc");
-        query1.put("limit",20);
-        query1.put("page",1);
-        query1.put("offset",0);
-        List<HighFrequencyVo> allhighPriceList = wzHouseMaintenaCostService.queryHighFrequency(query1);
-
-        int j=1;
-        for (HighFrequencyVo highFrequencyVo : allhighPriceList) {
-            highFrequencyVo.setOrder(j);
-            j++;
-        }
-        for (HighFrequencyVo highFrequencyVo : resultList) {
-            for (HighFrequencyVo item : allhighPriceList) {
-                if(item.getBuildingAlias()==null&&highFrequencyVo.getBuildingAlias()!=null){
-                    continue;
-                }
-                if(item.getBuildingAlias()!=null&&highFrequencyVo.getBuildingAlias()==null){
-                    continue;
-                }
-                if(item.getCity()==null&&highFrequencyVo.getCity()!=null){
-                    continue;
-                }
-                if(item.getCity()!=null&&highFrequencyVo.getCity()==null){
-                    continue;
-                }
-                if(item.getRepairType()==null&&highFrequencyVo.getRepairType()!=null){
-                    continue;
-                }
-                if(item.getRepairType()!=null&&highFrequencyVo.getRepairType()==null){
-                    continue;
-                }
-                if(((item.getCity()==null&&highFrequencyVo.getCity()==null)||item.getCity().equals(highFrequencyVo.getCity()))
-                        &&((item.getBuildingAlias()==null&&highFrequencyVo.getBuildingAlias()==null)||item.getBuildingAlias().equals(highFrequencyVo.getBuildingAlias()))
-                        &&((item.getRepairType()==null&&highFrequencyVo.getRepairType()==null)||item.getRepairType().equals(highFrequencyVo.getRepairType()))){
-                    highFrequencyVo.setOrder(item.getOrder());
-                    break;
-                }
-            }
-        }
-        List<Object> colList = new ArrayList();;
-        List<Object[]> allList = new ArrayList();
-        for (int i = 0; i < resultList.size(); i++) {
-            colList = new ArrayList();
-            colList.add(resultList.get(i).getCity());
-            colList.add(resultList.get(i).getBuildingAlias());
-            colList.add(resultList.get(i).getRepairType());
-            colList.add(resultList.get(i).getTime());
-            colList.add(resultList.get(i).getNum());
-            colList.add(resultList.get(i).getOrder());
-            allList.add(colList.toArray());
-
-        }
-        String[] header = new String[]{
-                "单位",
-                "维修建筑",
-                "维修类型",
-                "时间",
-                "发生频率",
-                "排名"
-        };
-        ee1.addSheetByArray(df.format(new Date()) + "清单", allList, header);
-    }
+//    public void responseTab1(DateFormat df, ExcelExport ee1, Map<String, Object> map1) {
+//        Query query = new Query(map1);
+//        List<HighFrequencyVo> resultList = wzHouseMaintenaCostService.queryHighFrequency(query);
+//
+//        Query query1 = new Query(map1);
+//        query1.put("sidx","num");
+//        query1.put("order","desc");
+//        query1.put("limit",20);
+//        query1.put("page",1);
+//        query1.put("offset",0);
+//        List<HighFrequencyVo> allhighPriceList = wzHouseMaintenaCostService.queryHighFrequency(query1);
+//
+//        int j=1;
+//        for (HighFrequencyVo highFrequencyVo : allhighPriceList) {
+//            highFrequencyVo.setOrder(j);
+//            j++;
+//        }
+//        for (HighFrequencyVo highFrequencyVo : resultList) {
+//            for (HighFrequencyVo item : allhighPriceList) {
+//                if(item.getBuildingAlias()==null&&highFrequencyVo.getBuildingAlias()!=null){
+//                    continue;
+//                }
+//                if(item.getBuildingAlias()!=null&&highFrequencyVo.getBuildingAlias()==null){
+//                    continue;
+//                }
+//                if(item.getCity()==null&&highFrequencyVo.getCity()!=null){
+//                    continue;
+//                }
+//                if(item.getCity()!=null&&highFrequencyVo.getCity()==null){
+//                    continue;
+//                }
+//                if(item.getRepairType()==null&&highFrequencyVo.getRepairType()!=null){
+//                    continue;
+//                }
+//                if(item.getRepairType()!=null&&highFrequencyVo.getRepairType()==null){
+//                    continue;
+//                }
+//                if(((item.getCity()==null&&highFrequencyVo.getCity()==null)||item.getCity().equals(highFrequencyVo.getCity()))
+//                        &&((item.getBuildingAlias()==null&&highFrequencyVo.getBuildingAlias()==null)||item.getBuildingAlias().equals(highFrequencyVo.getBuildingAlias()))
+//                        &&((item.getRepairType()==null&&highFrequencyVo.getRepairType()==null)||item.getRepairType().equals(highFrequencyVo.getRepairType()))){
+//                    highFrequencyVo.setOrder(item.getOrder());
+//                    break;
+//                }
+//            }
+//        }
+//        List<Object> colList = new ArrayList();;
+//        List<Object[]> allList = new ArrayList();
+//        for (int i = 0; i < resultList.size(); i++) {
+//            colList = new ArrayList();
+//            colList.add(resultList.get(i).getCity());
+//            colList.add(resultList.get(i).getBuildingAlias());
+//            colList.add(resultList.get(i).getRepairType());
+//            colList.add(resultList.get(i).getTime());
+//            colList.add(resultList.get(i).getNum());
+//            colList.add(resultList.get(i).getOrder());
+//            allList.add(colList.toArray());
+//
+//        }
+//        String[] header = new String[]{
+//                "单位",
+//                "维修建筑",
+//                "维修类型",
+//                "时间",
+//                "发生频率",
+//                "排名"
+//        };
+//        ee1.addSheetByArray(df.format(new Date()) + "清单", allList, header);
+//    }
     /**
      *  高总价维修统计
      */
-    public void responseTab2(DateFormat df, ExcelExport ee1, Map<String, Object> map1) {
-        Query query = new Query(map1);
-        List<WzHouseMaintenaCostEntity> resultList = wzHouseMaintenaCostService.queryHighPrice(query);
-        List<Object> colList;
-        List<Object[]> allList = new ArrayList();
-        for (int i = 0; i < resultList.size(); i++) {
-            colList = new ArrayList();
-            colList.add(resultList.get(i).getStatisticalMonth());
-            colList.add(resultList.get(i).getCity());
-            colList.add(resultList.get(i).getCounty());
-            colList.add(resultList.get(i).getBuildingAlias());
-            colList.add(resultList.get(i).getRepairType());
-            colList.add(resultList.get(i).getRepairContent());
-            colList.add(WzHouseMaintenaCostController.toThousands(resultList.get(i).getErpCreditedAmount(),true));
-            colList.add(resultList.get(i).getStandardAddress());
-            colList.add(resultList.get(i).getBuildingUse());
-            colList.add(WzHouseMaintenaCostController.toThousands(resultList.get(i).getBuildingArea(),true));
-            colList.add(WzHouseMaintenaCostController.toThousands(resultList.get(i).getBuildingAreaUseArea(),true));
-            colList.add(WzHouseMaintenaCostController.toThousands(resultList.get(i).getBuildingAreaRentArea(),true));
-            colList.add(WzHouseMaintenaCostController.toThousands(resultList.get(i).getBuildingAreaUnavailable(),true));
-            allList.add(colList.toArray());
-        }
-        String[] header = new String[]{
-                "入账日期",
-                "二级单位",
-                "三级单位",
-                "建筑别名",
-                "维修类型",
-                "维修内容",
-                "erp入账金额元",
-                "标准地址",
-                "建筑用途",
-                "建筑面积㎡",
-                "建筑面积自用㎡",
-                "建筑面积出租㎡",
-                "建筑面积闲置㎡"
-        };
-        ee1.addSheetByArray(df.format(new Date()) + "清单", allList, header);
-    }
-
-    public void responseTab3(DateFormat df, ExcelExport ee1, Map<String, Object> map1) {
-        map1.put("repairType", "零星维修");
-        map1.put("erpCreditedAmount", 10000);
-        Query query=new Query(map1);
-        List<DailyModifyVo> resultList = wzHouseMaintenaCostService.queryDailyModify(query);
-
-        List<Object> colList = new ArrayList();;
-        List<Object[]> allList = new ArrayList();
-        for (int i = 0; i < resultList.size(); i++) {
-            colList = new ArrayList();
-            colList.add(resultList.get(i).getCity());
-            colList.add(resultList.get(i).getBuildingAlias());
-            colList.add(resultList.get(i).getDate());
-            colList.add(resultList.get(i).getRepairType());
-            colList.add(resultList.get(i).getRepairContent());
-            colList.add(WzHouseMaintenaCostController.toThousands(resultList.get(i).getErpMoney(),true));
-            colList.add(resultList.get(i).getNum());
-            allList.add(colList.toArray());
-
-        }
-        String[] header = new String[]{
-                "单位",
-                "维修建筑",
-                "维修时间",
-                "维修类型",
-                "维修内容",
-                "维修金额",
-                "本年超万元次数"
-        };
-        ee1.addSheetByArray(df.format(new Date()) + "清单", allList, header);
-    }
+//    public void responseTab2(DateFormat df, ExcelExport ee1, Map<String, Object> map1) {
+//        Query query = new Query(map1);
+//        List<WzHouseMaintenaCostEntity> resultList = wzHouseMaintenaCostService.queryHighPrice(query);
+//        List<Object> colList;
+//        List<Object[]> allList = new ArrayList();
+//        for (int i = 0; i < resultList.size(); i++) {
+//            colList = new ArrayList();
+//            colList.add(resultList.get(i).getStatisticalMonth());
+//            colList.add(resultList.get(i).getCity());
+//            colList.add(resultList.get(i).getCounty());
+//            colList.add(resultList.get(i).getBuildingAlias());
+//            colList.add(resultList.get(i).getRepairType());
+//            colList.add(resultList.get(i).getRepairContent());
+//            colList.add(WzHouseMaintenaCostController.toThousands(resultList.get(i).getErpCreditedAmount(),true));
+//            colList.add(resultList.get(i).getStandardAddress());
+//            colList.add(resultList.get(i).getBuildingUse());
+//            colList.add(WzHouseMaintenaCostController.toThousands(resultList.get(i).getBuildingArea(),true));
+//            colList.add(WzHouseMaintenaCostController.toThousands(resultList.get(i).getBuildingAreaUseArea(),true));
+//            colList.add(WzHouseMaintenaCostController.toThousands(resultList.get(i).getBuildingAreaRentArea(),true));
+//            colList.add(WzHouseMaintenaCostController.toThousands(resultList.get(i).getBuildingAreaUnavailable(),true));
+//            allList.add(colList.toArray());
+//        }
+//        String[] header = new String[]{
+//                "入账日期",
+//                "二级单位",
+//                "三级单位",
+//                "建筑别名",
+//                "维修类型",
+//                "维修内容",
+//                "erp入账金额元",
+//                "标准地址",
+//                "建筑用途",
+//                "建筑面积㎡",
+//                "建筑面积自用㎡",
+//                "建筑面积出租㎡",
+//                "建筑面积闲置㎡"
+//        };
+//        ee1.addSheetByArray(df.format(new Date()) + "清单", allList, header);
+//    }
 
-    public void responseTab4(DateFormat df, ExcelExport ee1, Map<String, Object> map1) {
-        List<WzHouseMaintenaCostEntity> resultList = wzHouseMaintenaCostService.queryList(map1);
-        List<Object> colList = new ArrayList();;
-        List<Object[]> allList = new ArrayList();
-        for (int i = 0; i < resultList.size(); i++) {
-            colList = new ArrayList();
-            colList.add(resultList.get(i).getStatisticalMonth());
-            colList.add(resultList.get(i).getCity());
-            colList.add(resultList.get(i).getCounty());
-            colList.add(resultList.get(i).getBuildingAlias());
-            colList.add(resultList.get(i).getRepairType());
-            colList.add(resultList.get(i).getRepairContent());
-            colList.add(WzHouseMaintenaCostController.toThousands(resultList.get(i).getErpCreditedAmount(),true));
-            colList.add(resultList.get(i).getStandardAddress());
-            colList.add(resultList.get(i).getUseState());
-            colList.add(WzHouseMaintenaCostController.toThousands(resultList.get(i).getBuildingArea(),true));
-            colList.add(WzHouseMaintenaCostController.toThousands(resultList.get(i).getBuildingAreaUseArea(),true));
-            colList.add(WzHouseMaintenaCostController.toThousands(resultList.get(i).getBuildingAreaRentArea(),true));
-            colList.add(WzHouseMaintenaCostController.toThousands(resultList.get(i).getBuildingAreaIdelArea(),true));
-            colList.add(WzHouseMaintenaCostController.toThousands(resultList.get(i).getBuildingAreaUnavailable(),true));
-            allList.add(colList.toArray());
+//    public void responseTab3(DateFormat df, ExcelExport ee1, Map<String, Object> map1) {
+//        map1.put("repairType", "零星维修");
+//        map1.put("erpCreditedAmount", 10000);
+//        Query query=new Query(map1);
+//        List<DailyModifyVo> resultList = wzHouseMaintenaCostService.queryDailyModify(query);
+//
+//        List<Object> colList = new ArrayList();;
+//        List<Object[]> allList = new ArrayList();
+//        for (int i = 0; i < resultList.size(); i++) {
+//            colList = new ArrayList();
+//            colList.add(resultList.get(i).getCity());
+//            colList.add(resultList.get(i).getBuildingAlias());
+//            colList.add(resultList.get(i).getDate());
+//            colList.add(resultList.get(i).getRepairType());
+//            colList.add(resultList.get(i).getRepairContent());
+//            colList.add(WzHouseMaintenaCostController.toThousands(resultList.get(i).getErpMoney(),true));
+//            colList.add(resultList.get(i).getNum());
+//            allList.add(colList.toArray());
+//
+//        }
+//        String[] header = new String[]{
+//                "单位",
+//                "维修建筑",
+//                "维修时间",
+//                "维修类型",
+//                "维修内容",
+//                "维修金额",
+//                "本年超万元次数"
+//        };
+//        ee1.addSheetByArray(df.format(new Date()) + "清单", allList, header);
+//    }
 
-        }
-        String[] header = new String[]{
-                "入账日期",
-                "二级单位",
-                "三级单位",
-                "建筑别名",
-                "维修类型",
-                "维修内容",
-                "erp入账金额元",
-                "标准地址",
-                "使用状态",
-                "建筑面积㎡",
-                "建筑面积自用㎡",
-                "建筑面积出租㎡",
-                "建筑面积闲置㎡",
-                "建筑面积不可使用㎡"
-        };
-        ee1.addSheetByArray(df.format(new Date()) + "清单", allList, header);
-    }
+//    public void responseTab4(DateFormat df, ExcelExport ee1, Map<String, Object> map1) {
+//        List<WzHouseMaintenaCostEntity> resultList = wzHouseMaintenaCostService.queryList(map1);
+//        List<Object> colList = new ArrayList();;
+//        List<Object[]> allList = new ArrayList();
+//        for (int i = 0; i < resultList.size(); i++) {
+//            colList = new ArrayList();
+//            colList.add(resultList.get(i).getStatisticalMonth());
+//            colList.add(resultList.get(i).getCity());
+//            colList.add(resultList.get(i).getCounty());
+//            colList.add(resultList.get(i).getBuildingAlias());
+//            colList.add(resultList.get(i).getRepairType());
+//            colList.add(resultList.get(i).getRepairContent());
+//            colList.add(WzHouseMaintenaCostController.toThousands(resultList.get(i).getErpCreditedAmount(),true));
+//            colList.add(resultList.get(i).getStandardAddress());
+//            colList.add(resultList.get(i).getUseState());
+//            colList.add(WzHouseMaintenaCostController.toThousands(resultList.get(i).getBuildingArea(),true));
+//            colList.add(WzHouseMaintenaCostController.toThousands(resultList.get(i).getBuildingAreaUseArea(),true));
+//            colList.add(WzHouseMaintenaCostController.toThousands(resultList.get(i).getBuildingAreaRentArea(),true));
+//            colList.add(WzHouseMaintenaCostController.toThousands(resultList.get(i).getBuildingAreaIdelArea(),true));
+//            colList.add(WzHouseMaintenaCostController.toThousands(resultList.get(i).getBuildingAreaUnavailable(),true));
+//            allList.add(colList.toArray());
+//
+//        }
+//        String[] header = new String[]{
+//                "入账日期",
+//                "二级单位",
+//                "三级单位",
+//                "建筑别名",
+//                "维修类型",
+//                "维修内容",
+//                "erp入账金额元",
+//                "标准地址",
+//                "使用状态",
+//                "建筑面积㎡",
+//                "建筑面积自用㎡",
+//                "建筑面积出租㎡",
+//                "建筑面积闲置㎡",
+//                "建筑面积不可使用㎡"
+//        };
+//        ee1.addSheetByArray(df.format(new Date()) + "清单", allList, header);
+//    }
 
     public void responseTab5(DateFormat df, ExcelExport ee1, Map<String, Object> map1) {
         List<WzHouseMaintEntity> list = wzHouseMaintService.queryList(map1);
@@ -676,20 +667,20 @@ public class WzHouseMaintenaCostController {
     /**
      * 闲置+不可用发生维修费
      */
-    @RequestMapping("/queryHappenCost")
-    @IgnoreAuth
-    public R queryHappenCost(@RequestBody PageMap pageMap) {
-        Query query = new Query(pageMap);
-        query.put("useAreaSelfUseArea", 0);
-        query.put("useAreaRentArea", 0);
-        List<WzHouseMaintenaCostEntity> highPriceList = wzHouseMaintenaCostService.queryList(query);
-        Query query1 = new Query(pageMap);
-        query1.put("useAreaSelfUseArea", 0);
-        query1.put("useAreaRentArea", 0);
-        int total = wzHouseMaintenaCostService.queryTotal(query1);
-        PageUtils pageUtil = new PageUtils(highPriceList, total, 10, 10);
-        return R.ok().put("page", pageUtil);
-    }
+//    @RequestMapping("/queryHappenCost")
+//    @IgnoreAuth
+//    public R queryHappenCost(@RequestBody PageMap pageMap) {
+//        Query query = new Query(pageMap);
+//        query.put("useAreaSelfUseArea", 0);
+//        query.put("useAreaRentArea", 0);
+//        List<WzHouseMaintenaCostEntity> highPriceList = wzHouseMaintenaCostService.queryList(query);
+//        Query query1 = new Query(pageMap);
+//        query1.put("useAreaSelfUseArea", 0);
+//        query1.put("useAreaRentArea", 0);
+//        int total = wzHouseMaintenaCostService.queryTotal(query1);
+//        PageUtils pageUtil = new PageUtils(highPriceList, total, 10, 10);
+//        return R.ok().put("page", pageUtil);
+//    }
 
 //    /**
 //     * 获取局址别名
@@ -722,317 +713,317 @@ public class WzHouseMaintenaCostController {
 //        return R.ok().put("page", pageUtil);
 //    }
 
-    public void responseTab6(DateFormat df, ExcelExport ee1, Map<String, Object> map1){
-        List<WzHouseMaintenaCostEntity> alllist = wzHouseMaintenaCostService.queryList1(map1);
-        //全省节点
-        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<>();
-        for (OtnAreaEntity otnAreaEntity : areaList) {
-            for (HouseCostVo wzCity : cityList) {
-                if (wzCity.getCity().contains(otnAreaEntity.getName())) {
-                    orderList.add(wzCity);
-                }
-            }
-        }
-
-        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);
-
-        List<Object> colList=new ArrayList();;
-        List<Object[]> allList = new ArrayList();
-        for (int i = 0; i < resultList.size(); i++) {
-
-            if(resultList.get(i).getCity().contains("省")){
-                colList = new ArrayList();
-                colList.add(resultList.get(i).getCity());
-                colList.add("");
-                colList.add("");
-                colList.add(WzHouseMaintenaCostController.toThousands(resultList.get(i).getProjectCost(),true));
-                colList.add(WzHouseMaintenaCostController.toThousands(resultList.get(i).getSmallCost(),true));
-                colList.add(WzHouseMaintenaCostController.toThousands(resultList.get(i).getWarnCost(),true));
-                colList.add(WzHouseMaintenaCostController.toThousands(resultList.get(i).getAllCost(),true));
-                allList.add(colList.toArray());
-
-                //处理城市的
-                List<HouseCostVo> cityList1=resultList.get(i).getChildren();
-                for (HouseCostVo floorNoUserVo : cityList1) {
-                    colList = new ArrayList();
-                    colList.add("");
-                    colList.add(floorNoUserVo.getCity());
-                    colList.add("");
-                    colList.add(WzHouseMaintenaCostController.toThousands(floorNoUserVo.getProjectCost(),true));
-                    colList.add(WzHouseMaintenaCostController.toThousands(floorNoUserVo.getSmallCost(),true));
-                    colList.add(WzHouseMaintenaCostController.toThousands(floorNoUserVo.getWarnCost(),true));
-                    colList.add(WzHouseMaintenaCostController.toThousands(floorNoUserVo.getAllCost(),true));
-                    allList.add(colList.toArray());
-                    //处理县城的
-                    List<HouseCostVo> countyList1 = floorNoUserVo.getChildren();
-                    for (HouseCostVo noUserVo : countyList1) {
-                        colList = new ArrayList();
-                        colList.add("");
-                        colList.add("");
-                        colList.add(noUserVo.getCity());
-                        colList.add(WzHouseMaintenaCostController.toThousands(noUserVo.getProjectCost(),true));
-                        colList.add(WzHouseMaintenaCostController.toThousands(noUserVo.getSmallCost(),true));
-                        colList.add(WzHouseMaintenaCostController.toThousands(noUserVo.getWarnCost(),true));
-                        colList.add(WzHouseMaintenaCostController.toThousands(noUserVo.getAllCost(),true));
-                        allList.add(colList.toArray());
-                    }
-                }
-            }
-        }
-        String[] header = new String[]{
-                "资产所属单位(一级)",
-                "资产所属单位(二级)",
-                "资产所属单位(三级)",
-                "项目制维修(元)",
-                "零星维修(元)",
-                "应急维修(元)",
-                "总计(元)"
-        };
-        ee1.addSheetByArray("房屋维修_维修费统计"+df.format(new Date()) + "清单", allList, header);
-
-    }
-
-    public void responseTab7(DateFormat df, ExcelExport ee1, Map<String, Object> map1){
-
-        List<WzHouseMaintenaCostEntity> resultList = wzHouseMaintenaCostService.queryList1(map1);
-        //每平方米维修单价
-        for (WzHouseMaintenaCostEntity wzHouseMaintenaCostEntity : resultList) {
-            wzHouseMaintenaCostEntity.setAveragePrice(formatDouble(wzHouseMaintenaCostEntity.dealPrice(wzHouseMaintenaCostEntity)));
-        }
-
-        List<Object> colList;
-        List<Object[]> allList = new ArrayList();
-        for (int i = 0; i < resultList.size(); i++) {
-            colList = new ArrayList();
-            colList.add(resultList.get(i).getBuildingId());
-            colList.add(resultList.get(i).getStatisticalMonth());
-            colList.add(resultList.get(i).getRepairType());
-            colList.add(resultList.get(i).getRepairContent());
-            colList.add(WzHouseMaintenaCostController.toThousands(resultList.get(i).getErpCreditedAmount(),true));
-            colList.add(WzHouseMaintenaCostController.toThousands(resultList.get(i).getAveragePrice(),true));
-            colList.add(resultList.get(i).getCity());
-            colList.add(resultList.get(i).getCounty());
-            colList.add(resultList.get(i).getBuildingAddressNumber());
-            colList.add(resultList.get(i).getBuildingNnameAlias());
-            colList.add(resultList.get(i).getStandardAddress());
-            colList.add(resultList.get(i).getCityGrade());
-            colList.add(resultList.get(i).getCityArea());
-            colList.add(resultList.get(i).getInvestmentEntity());
-            colList.add(resultList.get(i).getManagementHierarchy());
-            colList.add(resultList.get(i).getBuildingStructure());
-            colList.add(resultList.get(i).getUseState());
-            colList.add(resultList.get(i).getBuildingUse());
-            colList.add(resultList.get(i).getOwnershipStatus());
-            colList.add(WzHouseMaintenaCostController.toThousands(resultList.get(i).getBuildingFloorArea(),true));
-            colList.add(WzHouseMaintenaCostController.toThousands(resultList.get(i).getBuildingArea(),true));
-            colList.add(WzHouseMaintenaCostController.toThousands(resultList.get(i).getBuildingAreaUseArea(),true));
-            colList.add(WzHouseMaintenaCostController.toThousands(resultList.get(i).getBuildingAreaRentArea(),true));
-            colList.add(WzHouseMaintenaCostController.toThousands(resultList.get(i).getBuildingAreaIdelArea(),true));
-            colList.add(WzHouseMaintenaCostController.toThousands(resultList.get(i).getBuildingAreaUnavailable(),true));
-            colList.add(WzHouseMaintenaCostController.toThousands(resultList.get(i).getUseArea(),true));
-            colList.add(WzHouseMaintenaCostController.toThousands(resultList.get(i).getUseAreaSelfUseArea(),true));
-            colList.add(WzHouseMaintenaCostController.toThousands(resultList.get(i).getUseAreaRentArea(),true));
-            colList.add(WzHouseMaintenaCostController.toThousands(resultList.get(i).getUseAreaIdelArea(),true));
-            colList.add(WzHouseMaintenaCostController.toThousands(resultList.get(i).getUseAreaUnavailableArea(),true));
-            allList.add(colList.toArray());
-        }
-        String[] header = new String[]{
-                "建筑id基本信息",
-                "入账日期",
-                "维修类型",
-                "维修内容",
-                "erp入账金额元",
-                "每平方米维修单价",
-                "资产所属单位二级",
-                "资产所属单位三级",
-                "局址编号",
-                "局址别名",
-                "标准地址",
-                "城市等级",
-                "城市区域",
-                "投资主体",
-                "管理层级",
-                "房屋结构",
-                "使用状况",
-                "建筑用途",
-                "权属状态",
-                "建筑占地面积㎡",
-                "建筑面积㎡",
-                "建筑面积自用㎡",
-                "建筑面积出租㎡",
-                "建筑面积闲置㎡",
-                "建筑面积不可使用㎡",
-                "使用面积㎡",
-                "使用面积自用㎡",
-                "使用面积出租㎡",
-                "使用面积闲置㎡",
-                "使用面积不可使用㎡"
-        };
-        ee1.addSheetByArray(df.format(new Date()) + "清单", allList, header);
-    }
+//    public void responseTab6(DateFormat df, ExcelExport ee1, Map<String, Object> map1){
+//        List<WzHouseMaintenaCostEntity> alllist = wzHouseMaintenaCostService.queryList1(map1);
+//        //全省节点
+//        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<>();
+//        for (OtnAreaEntity otnAreaEntity : areaList) {
+//            for (HouseCostVo wzCity : cityList) {
+//                if (wzCity.getCity().contains(otnAreaEntity.getName())) {
+//                    orderList.add(wzCity);
+//                }
+//            }
+//        }
+//
+//        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);
+//
+//        List<Object> colList=new ArrayList();;
+//        List<Object[]> allList = new ArrayList();
+//        for (int i = 0; i < resultList.size(); i++) {
+//
+//            if(resultList.get(i).getCity().contains("省")){
+//                colList = new ArrayList();
+//                colList.add(resultList.get(i).getCity());
+//                colList.add("");
+//                colList.add("");
+//                colList.add(WzHouseMaintenaCostController.toThousands(resultList.get(i).getProjectCost(),true));
+//                colList.add(WzHouseMaintenaCostController.toThousands(resultList.get(i).getSmallCost(),true));
+//                colList.add(WzHouseMaintenaCostController.toThousands(resultList.get(i).getWarnCost(),true));
+//                colList.add(WzHouseMaintenaCostController.toThousands(resultList.get(i).getAllCost(),true));
+//                allList.add(colList.toArray());
+//
+//                //处理城市的
+//                List<HouseCostVo> cityList1=resultList.get(i).getChildren();
+//                for (HouseCostVo floorNoUserVo : cityList1) {
+//                    colList = new ArrayList();
+//                    colList.add("");
+//                    colList.add(floorNoUserVo.getCity());
+//                    colList.add("");
+//                    colList.add(WzHouseMaintenaCostController.toThousands(floorNoUserVo.getProjectCost(),true));
+//                    colList.add(WzHouseMaintenaCostController.toThousands(floorNoUserVo.getSmallCost(),true));
+//                    colList.add(WzHouseMaintenaCostController.toThousands(floorNoUserVo.getWarnCost(),true));
+//                    colList.add(WzHouseMaintenaCostController.toThousands(floorNoUserVo.getAllCost(),true));
+//                    allList.add(colList.toArray());
+//                    //处理县城的
+//                    List<HouseCostVo> countyList1 = floorNoUserVo.getChildren();
+//                    for (HouseCostVo noUserVo : countyList1) {
+//                        colList = new ArrayList();
+//                        colList.add("");
+//                        colList.add("");
+//                        colList.add(noUserVo.getCity());
+//                        colList.add(WzHouseMaintenaCostController.toThousands(noUserVo.getProjectCost(),true));
+//                        colList.add(WzHouseMaintenaCostController.toThousands(noUserVo.getSmallCost(),true));
+//                        colList.add(WzHouseMaintenaCostController.toThousands(noUserVo.getWarnCost(),true));
+//                        colList.add(WzHouseMaintenaCostController.toThousands(noUserVo.getAllCost(),true));
+//                        allList.add(colList.toArray());
+//                    }
+//                }
+//            }
+//        }
+//        String[] header = new String[]{
+//                "资产所属单位(一级)",
+//                "资产所属单位(二级)",
+//                "资产所属单位(三级)",
+//                "项目制维修(元)",
+//                "零星维修(元)",
+//                "应急维修(元)",
+//                "总计(元)"
+//        };
+//        ee1.addSheetByArray("房屋维修_维修费统计"+df.format(new Date()) + "清单", allList, header);
+//
+//    }
+//
+//    public void responseTab7(DateFormat df, ExcelExport ee1, Map<String, Object> map1){
+//
+//        List<WzHouseMaintenaCostEntity> resultList = wzHouseMaintenaCostService.queryList1(map1);
+//        //每平方米维修单价
+//        for (WzHouseMaintenaCostEntity wzHouseMaintenaCostEntity : resultList) {
+//            wzHouseMaintenaCostEntity.setAveragePrice(formatDouble(wzHouseMaintenaCostEntity.dealPrice(wzHouseMaintenaCostEntity)));
+//        }
+//
+//        List<Object> colList;
+//        List<Object[]> allList = new ArrayList();
+//        for (int i = 0; i < resultList.size(); i++) {
+//            colList = new ArrayList();
+//            colList.add(resultList.get(i).getBuildingId());
+//            colList.add(resultList.get(i).getStatisticalMonth());
+//            colList.add(resultList.get(i).getRepairType());
+//            colList.add(resultList.get(i).getRepairContent());
+//            colList.add(WzHouseMaintenaCostController.toThousands(resultList.get(i).getErpCreditedAmount(),true));
+//            colList.add(WzHouseMaintenaCostController.toThousands(resultList.get(i).getAveragePrice(),true));
+//            colList.add(resultList.get(i).getCity());
+//            colList.add(resultList.get(i).getCounty());
+//            colList.add(resultList.get(i).getBuildingAddressNumber());
+//            colList.add(resultList.get(i).getBuildingNnameAlias());
+//            colList.add(resultList.get(i).getStandardAddress());
+//            colList.add(resultList.get(i).getCityGrade());
+//            colList.add(resultList.get(i).getCityArea());
+//            colList.add(resultList.get(i).getInvestmentEntity());
+//            colList.add(resultList.get(i).getManagementHierarchy());
+//            colList.add(resultList.get(i).getBuildingStructure());
+//            colList.add(resultList.get(i).getUseState());
+//            colList.add(resultList.get(i).getBuildingUse());
+//            colList.add(resultList.get(i).getOwnershipStatus());
+//            colList.add(WzHouseMaintenaCostController.toThousands(resultList.get(i).getBuildingFloorArea(),true));
+//            colList.add(WzHouseMaintenaCostController.toThousands(resultList.get(i).getBuildingArea(),true));
+//            colList.add(WzHouseMaintenaCostController.toThousands(resultList.get(i).getBuildingAreaUseArea(),true));
+//            colList.add(WzHouseMaintenaCostController.toThousands(resultList.get(i).getBuildingAreaRentArea(),true));
+//            colList.add(WzHouseMaintenaCostController.toThousands(resultList.get(i).getBuildingAreaIdelArea(),true));
+//            colList.add(WzHouseMaintenaCostController.toThousands(resultList.get(i).getBuildingAreaUnavailable(),true));
+//            colList.add(WzHouseMaintenaCostController.toThousands(resultList.get(i).getUseArea(),true));
+//            colList.add(WzHouseMaintenaCostController.toThousands(resultList.get(i).getUseAreaSelfUseArea(),true));
+//            colList.add(WzHouseMaintenaCostController.toThousands(resultList.get(i).getUseAreaRentArea(),true));
+//            colList.add(WzHouseMaintenaCostController.toThousands(resultList.get(i).getUseAreaIdelArea(),true));
+//            colList.add(WzHouseMaintenaCostController.toThousands(resultList.get(i).getUseAreaUnavailableArea(),true));
+//            allList.add(colList.toArray());
+//        }
+//        String[] header = new String[]{
+//                "建筑id基本信息",
+//                "入账日期",
+//                "维修类型",
+//                "维修内容",
+//                "erp入账金额元",
+//                "每平方米维修单价",
+//                "资产所属单位二级",
+//                "资产所属单位三级",
+//                "局址编号",
+//                "局址别名",
+//                "标准地址",
+//                "城市等级",
+//                "城市区域",
+//                "投资主体",
+//                "管理层级",
+//                "房屋结构",
+//                "使用状况",
+//                "建筑用途",
+//                "权属状态",
+//                "建筑占地面积㎡",
+//                "建筑面积㎡",
+//                "建筑面积自用㎡",
+//                "建筑面积出租㎡",
+//                "建筑面积闲置㎡",
+//                "建筑面积不可使用㎡",
+//                "使用面积㎡",
+//                "使用面积自用㎡",
+//                "使用面积出租㎡",
+//                "使用面积闲置㎡",
+//                "使用面积不可使用㎡"
+//        };
+//        ee1.addSheetByArray(df.format(new Date()) + "清单", allList, header);
+//    }
 
 
-    public double formatDouble(double num) {
-        DecimalFormat format2 = new DecimalFormat("#.00");
-        String str2 = format2.format(num);
-        double avera = Double.parseDouble(str2);
-        return avera;
-    }
+//    public double formatDouble(double num) {
+//        DecimalFormat format2 = new DecimalFormat("#.00");
+//        String str2 = format2.format(num);
+//        double avera = Double.parseDouble(str2);
+//        return avera;
+//    }
 
     public static String toThousands(Object number,boolean flag) {
         if(number==null){

+ 9 - 6
src/main/java/com/example/controller/gdc/WzHouseMarketController.java

@@ -15,7 +15,7 @@ import org.springframework.web.bind.annotation.RestController;
 import java.util.List;
 
 /**
- * 房屋出租(合同管理)
+ * 市场调查
  */
 @RestController
 @RequestMapping("/house-car/house/dist/api/wzHouseMarket")
@@ -24,6 +24,9 @@ public class WzHouseMarketController {
     @Autowired
     private WzHouseMarketService wzHouseMarketService;
 
+    /**
+     * 市场调查
+     */
     @RequestMapping("/list")
     @IgnoreAuth
     public R list(@RequestBody PageMap pageMap) {
@@ -35,9 +38,9 @@ public class WzHouseMarketController {
         return R.ok().put("page", pageUtil);
     }
 
-    @RequestMapping("/echartList")
-    @IgnoreAuth
-    public R echartList(@RequestBody PageMap pageMap) {
+//    @RequestMapping("/echartList")
+//    @IgnoreAuth
+//    public R echartList(@RequestBody PageMap pageMap) {
 //        //查询列表数据
 //        Query query = new Query(pageMap);
 //        List<WzHouseMarketEntity> wzHouseContracEntityList = wzHouseMarketService.queryList(query);
@@ -120,7 +123,7 @@ public class WzHouseMarketController {
 //        int total = wzHouseMarketService.queryTotal(query);
 //        PageUtils pageUtil = new PageUtils(resultList, total, query.getLimit(), query.getPage());
 //        return R.ok().put("page", pageUtil);
-        return null;
-    }
+//        return null;
+//    }
 
 }

+ 84 - 98
src/main/java/com/example/controller/gdc/WzHouseUseController.java

@@ -1,51 +1,37 @@
-package com.example.controller.gdc;
-
-import com.example.config.annotation.IgnoreAuth;
-import com.example.pojo.gdc.WzHouseUseEntity;
-import com.example.service.gdc.WzHouseUseService;
-import com.example.service.gdc.WzOtnAreaService;
-import com.example.utils.PageMap;
-import com.example.utils.PageUtils;
-import com.example.utils.Query;
-import com.example.utils.R;
-import com.example.utils.excel.ExcelExport;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
-
-import javax.servlet.http.HttpServletResponse;
-import java.text.DateFormat;
-import java.text.DecimalFormat;
-import java.text.SimpleDateFormat;
-import java.util.Date;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-/**
- * 房屋租入(租入用途管理)
- */
-@RestController
-@RequestMapping("/house-car/house/dist/api/WzHouseUse")
-public class WzHouseUseController {
-
-    @Autowired
-    private WzHouseUseService wzHouseUseService;
-    @Autowired
-    private WzOtnAreaService otnAreaService;
+//package com.example.controller.gdc;
+//
+//import com.example.service.gdc.WzHouseUseService;
+//import com.example.utils.excel.ExcelExport;
+//import org.springframework.beans.factory.annotation.Autowired;
+//import org.springframework.web.bind.annotation.RequestMapping;
+//import org.springframework.web.bind.annotation.RestController;
+//
+//import java.text.DateFormat;
+//import java.text.DecimalFormat;
+//import java.util.Map;
+//
+///**
+// * 房屋租入(租入用途管理)
+// */
+//@RestController
+//@RequestMapping("/house-car/house/dist/api/WzHouseUse")
+//public class WzHouseUseController {
+//
+//    @Autowired
+//    private WzHouseUseService wzHouseUseService;
+//    @Autowired
+//    private WzOtnAreaService otnAreaService;
 
-    @RequestMapping("/list")
-    @IgnoreAuth
-    public R list(@RequestBody PageMap pageMap) {
-        //查询列表数据
-        Query query = new Query(pageMap);
-        List<WzHouseUseEntity> list = wzHouseUseService.queryList(pageMap.getMap());
-        int total = wzHouseUseService.queryTotal(query);
-        PageUtils pageUtil = new PageUtils(list, 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<WzHouseUseEntity> list = wzHouseUseService.queryList(pageMap.getMap());
+//        int total = wzHouseUseService.queryTotal(query);
+//        PageUtils pageUtil = new PageUtils(list, total, query.getLimit(), query.getPage());
+//        return R.ok().put("page", pageUtil);
+//    }
 
 //    @RequestMapping("/echartList")
 //    @IgnoreAuth
@@ -211,37 +197,37 @@ public class WzHouseUseController {
 //        return R.ok().put("page", pageUtil);
 //    }
 
-    /**
-     * 清单excel
-     */
-    @GetMapping("/excel")
-    @IgnoreAuth
-    public void excel(String name,String buildingNameAlias,String city,String county, HttpServletResponse response) {
-        Map<String,Object> map1=new HashMap<>();
-        if(buildingNameAlias!=null){
-            map1.put("buildingNameAlias",buildingNameAlias);
-        }
-        if(city!=null){
-            map1.put("city",city);
-        }
-        if(county!=null){
-            map1.put("county",county);
-        }
-
-        DateFormat df = new SimpleDateFormat("yyyyMMddHHmmss");
-        ExcelExport ee1 = new ExcelExport("报表" + df.format(new Date()));
-
-        //判定是闲置管理还是记录
-        if(name.contains("出租合同统计")){
-//            responseTab1(df,ee1,map1);
-            ee1.export(response);
-        }else if(name.contains("出租合同记录")){
-            responseTab2(df,ee1,map1);
-            ee1.export(response);
-        }
-
-
-    }
+//    /**
+//     * 清单excel
+//     */
+//    @GetMapping("/excel")
+//    @IgnoreAuth
+//    public void excel(String name,String buildingNameAlias,String city,String county, HttpServletResponse response) {
+//        Map<String,Object> map1=new HashMap<>();
+//        if(buildingNameAlias!=null){
+//            map1.put("buildingNameAlias",buildingNameAlias);
+//        }
+//        if(city!=null){
+//            map1.put("city",city);
+//        }
+//        if(county!=null){
+//            map1.put("county",county);
+//        }
+//
+//        DateFormat df = new SimpleDateFormat("yyyyMMddHHmmss");
+//        ExcelExport ee1 = new ExcelExport("报表" + df.format(new Date()));
+//
+//        //判定是闲置管理还是记录
+//        if(name.contains("出租合同统计")){
+////            responseTab1(df,ee1,map1);
+//            ee1.export(response);
+//        }else if(name.contains("出租合同记录")){
+//            responseTab2(df,ee1,map1);
+//            ee1.export(response);
+//        }
+//
+//
+//    }
 
 //    public void responseTab1(DateFormat df, ExcelExport ee1, Map<String, Object> map1){
 //        List<WzHouseUseEntity> wzHouseContracEntityList = wzHouseUseService.queryList(map1);
@@ -335,23 +321,23 @@ public class WzHouseUseController {
 //        ee1.addSheetByArray(df.format(new Date()) + "清单", allList, header);
 //    }
 
-    public void responseTab2(DateFormat df, ExcelExport ee1, Map<String, Object> map1){
-
-
-
-
-    }
-
-    public double formatDouble(double num){
-        double avera=0l;
-        try{
-            DecimalFormat format2 = new DecimalFormat("#.00");
-            String str2 = format2.format(num);
-            avera = Double.parseDouble(str2);
-        }catch (Exception e){
-            e.printStackTrace();
-        }
-        return avera;
-    }
-
-}
+//    public void responseTab2(DateFormat df, ExcelExport ee1, Map<String, Object> map1){
+//
+//
+//
+//
+//    }
+//
+//    public double formatDouble(double num){
+//        double avera=0l;
+//        try{
+//            DecimalFormat format2 = new DecimalFormat("#.00");
+//            String str2 = format2.format(num);
+//            avera = Double.parseDouble(str2);
+//        }catch (Exception e){
+//            e.printStackTrace();
+//        }
+//        return avera;
+//    }
+//
+//}

File diff suppressed because it is too large
+ 498 - 521
src/main/java/com/example/controller/gdc/WzLandManageDetailsController.java


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

@@ -28,7 +28,7 @@ import java.util.Map;
 import java.util.stream.Collectors;
 
 /**
- * 房屋出租(合同管理)
+ * 每类地段每平米出租单价最低TOP10
  */
 @RestController
 @RequestMapping("/house-car/house/dist/api/wzLowestUnitPrice")
@@ -37,6 +37,9 @@ public class WzLowestUnitPriceController {
     @Autowired
     private WzLowestUnitPriceService wzLowestUnitPriceService;
 
+    /**
+     * 每类地段每平米出租单价最低TOP10
+     */
     @RequestMapping("/list")
     @IgnoreAuth
     public R list(@RequestBody PageMap pageMap) {

+ 35 - 35
src/main/java/com/example/controller/gdc/WzRemarkController.java

@@ -1,35 +1,35 @@
-package com.example.controller.gdc;
-
-import com.example.config.annotation.IgnoreAuth;
-import com.example.pojo.gdc.WzRemarkEntity;
-import com.example.service.gdc.WzRemarkService;
-import com.example.utils.PageMap;
-import com.example.utils.Query;
-import com.example.utils.R;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
-
-import java.util.List;
-
-/**
- * 房屋出租(合同管理)
- */
-@RestController
-@RequestMapping("/house-car/house/dist/api/wzRemark")
-public class WzRemarkController {
-
-    @Autowired
-    private WzRemarkService wzRemarkService;
-
-    @RequestMapping("/list")
-    @IgnoreAuth
-    public R list(@RequestBody PageMap pageMap) {
-        //查询列表数据
-        Query query = new Query(pageMap);
-        List<WzRemarkEntity> list = wzRemarkService.queryList(query);
-        return R.ok().put("list", list);
-    }
-
-}
+//package com.example.controller.gdc;
+//
+//import com.example.config.annotation.IgnoreAuth;
+//import com.example.pojo.gdc.WzRemarkEntity;
+//import com.example.service.gdc.WzRemarkService;
+//import com.example.utils.PageMap;
+//import com.example.utils.Query;
+//import com.example.utils.R;
+//import org.springframework.beans.factory.annotation.Autowired;
+//import org.springframework.web.bind.annotation.RequestBody;
+//import org.springframework.web.bind.annotation.RequestMapping;
+//import org.springframework.web.bind.annotation.RestController;
+//
+//import java.util.List;
+//
+///**
+// * 房屋出租(合同管理)
+// */
+//@RestController
+//@RequestMapping("/house-car/house/dist/api/wzRemark")
+//public class WzRemarkController {
+//
+//    @Autowired
+//    private WzRemarkService wzRemarkService;
+//
+//    @RequestMapping("/list")
+//    @IgnoreAuth
+//    public R list(@RequestBody PageMap pageMap) {
+//        //查询列表数据
+//        Query query = new Query(pageMap);
+//        List<WzRemarkEntity> list = wzRemarkService.queryList(query);
+//        return R.ok().put("list", list);
+//    }
+//
+//}

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

@@ -24,7 +24,7 @@ import java.util.List;
 import java.util.Map;
 
 /**
- * 房屋出租(合同管理)
+ * 出租监控_出租房屋欠费超5万元
  */
 @RestController
 @RequestMapping("/house-car/house/dist/api/wzRentHouseArrears")
@@ -33,6 +33,9 @@ public class WzRentHouseArrearsController {
     @Autowired
     private WzRentHouseArrearsService wzRentHouseArrearsService;
 
+    /**
+     * 出租监控_出租房屋欠费超5万元
+     */
     @RequestMapping("/list")
     @IgnoreAuth
     public R list(@RequestBody PageMap pageMap) {

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

@@ -24,7 +24,7 @@ import java.util.List;
 import java.util.Map;
 
 /**
- * 房屋出租(合同管理)
+ * 出租监控_出租房屋连续3个月存在欠款
  */
 @RestController
 @RequestMapping("/house-car/house/dist/api/wzRentThreeMonth")
@@ -33,6 +33,9 @@ public class WzRentThreeMonthController {
     @Autowired
     private WzRentThreeMonthService wzRentThreeMonthService;
 
+    /**
+     * 出租监控_出租房屋连续3个月存在欠款
+     */
     @RequestMapping("/list")
     @IgnoreAuth
     public R list(@RequestBody PageMap pageMap) {

+ 249 - 268
src/main/java/com/example/controller/gdc/WzScoreRankingController.java

@@ -1,271 +1,252 @@
-package com.example.controller.gdc;
-
-import com.example.config.annotation.IgnoreAuth;
-import com.example.pojo.gdc.OtnAreaEntity;
-import com.example.pojo.gdc.WzHouseContracEntity;
-import com.example.pojo.gdc.WzScoreRankingEntity;
-import com.example.pojo.gdc.WzScoreVo;
-import com.example.pojo.gdc.vo.housemanager.LeaveUseVo;
-import com.example.service.gdc.WzBuildManageDetailsService;
-import com.example.service.gdc.WzHouseContracService;
-import com.example.service.gdc.WzHouseMaintenaCostService;
-import com.example.service.gdc.WzOtnAreaService;
-import com.example.service.gdc.WzScoreRankingService;
-import com.example.utils.PageMap;
-import com.example.utils.PageUtils;
-import com.example.utils.Query;
-import com.example.utils.R;
-import com.example.utils.excel.ExcelExport;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
-
-import javax.servlet.http.HttpServletResponse;
-import java.text.DateFormat;
-import java.text.SimpleDateFormat;
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-/**
- * 房屋出租(合同管理)
- */
-@RestController
-@RequestMapping("/house-car/house/dist/api/wzScoreRanking")
-public class WzScoreRankingController {
-
-    @Autowired
-    private WzScoreRankingService wzScoreRankingService;
-
-    @Autowired
-    private WzOtnAreaService otnAreaService;
-
-    @Autowired
-    private WzBuildManageDetailsService wzBuildManageDetailsService;
-    @Autowired
-    private WzHouseContracService wzHouseContracService;
-    @Autowired
-    private WzHouseMaintenaCostService wzHouseMaintenaCostService;
-
-    @RequestMapping("/list")
-    @IgnoreAuth
-    public R list(@RequestBody PageMap pageMap) {
-        //查询列表数据
-        Query query = new Query(pageMap);
-        Query query1 = new Query(pageMap);
-        Query query2 = new Query(pageMap);
-        //闲置率
-        List<LeaveUseVo> ideaRateList=wzBuildManageDetailsService.queryLeaveUseList(query);
-        //出租欠费率
-        List<WzHouseContracEntity> rentArreList=wzHouseContracService.dealHouseContracList(query1);
-        //维修
-        List<WzScoreVo> scoreList= wzHouseMaintenaCostService.queryDailyModifyByScore(query2);
-
-        List<LeaveUseVo> ideaList=new ArrayList<>();
-        if(ideaRateList.size()>0){
-            ideaList=ideaRateList.get(0).getChildren();
-        }
-        List<WzHouseContracEntity> rentList=new ArrayList<>();
-        if(rentArreList.size()>0){
-            rentList   =rentArreList.get(0).getChildren();
-        }
-        List<WzScoreVo> scoreVoList=new ArrayList<>();
-        if(scoreList.size()>0){
-            scoreVoList=scoreList.get(0).getChildren();
-            if(rentList.size()>0){
-                scoreList.get(0).setUnitPricePerSquareMeter(rentList.get(0).getUnitPricePerSquareMeter());
-                scoreList.get(0).setRArrearsRate(rentList.get(0).getAverage());
-            }
-           if(ideaList.size()>0){
-               scoreList.get(0).setIdleRate(ideaList.get(0).getAverage());
-               scoreList.get(0).setRAbleRate(ideaList.get(0).getRentAverage());
-           }
-        }
-        for (WzScoreVo wzScoreVo : scoreVoList) {
-            for(LeaveUseVo useVo:ideaList){
-                if(wzScoreVo.getCity().equals(useVo.getCity())){
-                    wzScoreVo.setIdleRate(useVo.getAverage());
-                    wzScoreVo.setRAbleRate(useVo.getRentAverage());
-                    break;
-                }
-            }
-            for(WzHouseContracEntity con:rentList){
-                if(wzScoreVo.getCity().equals(con.getCity())){
-                    wzScoreVo.setRArrearsRate(con.getAverage());
-                    wzScoreVo.setUnitPricePerSquareMeter(con.getUnitPricePerSquareMeter());
-                    break;
-                }
-            }
-        }
-        PageUtils pageUtil = new PageUtils(scoreList, 0, query.getLimit(), query.getPage());
-        return R.ok().put("page", pageUtil);
-    }
-
-
-
-    @RequestMapping("/echartList")
-    @IgnoreAuth
-    public R echartList(@RequestBody PageMap pageMap) {
-        //查询列表数据
-        Query query = new Query(pageMap);
-        List<WzScoreRankingEntity> list = wzScoreRankingService.queryList(query);
-        List<WzScoreRankingEntity> allList=new ArrayList<>();
-        for (WzScoreRankingEntity wzScoreRankingEntity : list) {
-            if(wzScoreRankingEntity.getCity()!=null){
-                allList.add(wzScoreRankingEntity);
-            }
-        }
-        //对cityList 进行排序
-        List<OtnAreaEntity> areaList=otnAreaService.getCityOption("018");
-        List<WzScoreRankingEntity> orderList=new ArrayList<>();
-        for (OtnAreaEntity otnAreaEntity : areaList) {
-            for (WzScoreRankingEntity wzCity : allList) {
-                if(wzCity.getCity().contains(otnAreaEntity.getName())){
-                    orderList.add(wzCity);
-                }
-            }
-        }
-        PageUtils pageUtil = new PageUtils(orderList, 0, query.getLimit(), query.getPage());
-        return R.ok().put("page", pageUtil);
-    }
+//package com.example.controller.gdc;
+//
+//import com.example.service.gdc.WzBuildManageDetailsService;
+//import com.example.service.gdc.WzHouseContracService;
+//import com.example.service.gdc.WzHouseMaintenaCostService;
+//import com.example.service.gdc.WzOtnAreaService;
+//import com.example.service.gdc.WzScoreRankingService;
+//import org.springframework.beans.factory.annotation.Autowired;
+//import org.springframework.web.bind.annotation.RequestMapping;
+//import org.springframework.web.bind.annotation.RestController;
+//
+///**
+// * 房屋出租(合同管理)
+// */
+//@RestController
+//@RequestMapping("/house-car/house/dist/api/wzScoreRanking")
+//public class WzScoreRankingController {
+//
+//    @Autowired
+//    private WzScoreRankingService wzScoreRankingService;
+//
+//    @Autowired
+//    private WzOtnAreaService otnAreaService;
+//
+//    @Autowired
+//    private WzBuildManageDetailsService wzBuildManageDetailsService;
+//    @Autowired
+//    private WzHouseContracService wzHouseContracService;
+//    @Autowired
+//    private WzHouseMaintenaCostService wzHouseMaintenaCostService;
 
     /**
-     * 清单excel
+     * 综合评价
      */
-    @GetMapping("/excel")
-    @IgnoreAuth
-    public void excel(String name,String statisticalMonth,String city,String county, HttpServletResponse response) {
-        Map<String,Object> map0=new HashMap<>();
-        Map<String,Object> map1=new HashMap<>();
-        Map<String,Object> map2=new HashMap<>();
-        if(statisticalMonth!=null){
-            map0.put("statisticalMonth",statisticalMonth);
-            map1.put("statisticalMonth",statisticalMonth);
-            map2.put("statisticalMonth",statisticalMonth);
-        }
-        if(city!=null){
-            map0.put("city",city);
-            map1.put("city",city);
-            map2.put("city",city);
-        }
-        if(county!=null){
-            map0.put("county",county);
-            map1.put("county",county);
-            map2.put("county",county);
-        }
-
-        DateFormat df = new SimpleDateFormat("yyyyMMddHHmmss");
-        ExcelExport ee1;
-
-        //判定是闲置管理还是记录
-        if(name.contains("综合评价总分排名")){
-            ee1 = new ExcelExport("综合评价总分排名" + df.format(new Date()));
-            responseTab1(df,ee1,map0,map1,map2);
-            ee1.export(response);
-        }else{
-            ee1 = new ExcelExport("综合评价总分排名" + df.format(new Date()));
-            responseTab1(df,ee1,map0,map1,map2);
-            ee1.export(response);
-        }
-    }
-
-    public void responseTab1(DateFormat df, ExcelExport ee1, Map<String, Object> map0, Map<String, Object> map1, Map<String, Object> map2){
-
-        //闲置率
-        List<LeaveUseVo> ideaRateList=wzBuildManageDetailsService.queryLeaveUseList(map0);
-        //出租欠费率
-        List<WzHouseContracEntity> rentArreList=wzHouseContracService.dealHouseContracList(map1);
-        //维修
-        List<WzScoreVo> resultList= wzHouseMaintenaCostService.queryDailyModifyByScore(map2);
-
-        List<LeaveUseVo> ideaList=new ArrayList<>();
-        if(ideaRateList.size()>0){
-            ideaList=ideaRateList.get(0).getChildren();
-        }
-        List<WzHouseContracEntity> rentList=new ArrayList<>();
-        if(rentArreList.size()>0){
-            rentList   =rentArreList.get(0).getChildren();
-        }
-        List<WzScoreVo> scoreVoList=new ArrayList<>();
-        if(resultList.size()>0){
-            scoreVoList=resultList.get(0).getChildren();
-            if(rentList.size()>0){
-                resultList.get(0).setUnitPricePerSquareMeter(rentList.get(0).getUnitPricePerSquareMeter());
-                resultList.get(0).setRArrearsRate(rentList.get(0).getAverage());
-            }
-            if(ideaList.size()>0){
-                resultList.get(0).setIdleRate(ideaList.get(0).getAverage());
-                resultList.get(0).setRAbleRate(ideaList.get(0).getRentAverage());
-            }
-        }
-        for (WzScoreVo wzScoreVo : scoreVoList) {
-            for(LeaveUseVo useVo:ideaList){
-                if(wzScoreVo.getCity().equals(useVo.getCity())){
-                    wzScoreVo.setIdleRate(useVo.getAverage());
-                    wzScoreVo.setRAbleRate(useVo.getRentAverage());
-                    break;
-                }
-            }
-            for(WzHouseContracEntity con:rentList){
-                if(wzScoreVo.getCity().equals(con.getCity())){
-                    wzScoreVo.setRArrearsRate(con.getAverage());
-                    wzScoreVo.setUnitPricePerSquareMeter(con.getUnitPricePerSquareMeter());
-                    break;
-                }
-            }
-        }
-
-        List<Object> colList=new ArrayList();;
-        List<Object[]> allList = new ArrayList();
-        for (int i = 0; i < resultList.size(); i++) {
-
-            if(resultList.get(i).getCity().contains("省")){
-                colList = new ArrayList();
-                colList.add(resultList.get(i).getCity());
-                colList.add("");
-                colList.add(WzHouseMaintenaCostController.toThousands(resultList.get(i).getIdleRate(),true)+"%");
-                colList.add(WzHouseMaintenaCostController.toThousands(resultList.get(i).getRAbleRate(),true)+"%");
-                colList.add(WzHouseMaintenaCostController.toThousands(resultList.get(i).getRArrearsRate(),true)+"%");
-                colList.add(WzHouseMaintenaCostController.toThousands(resultList.get(i).getUnitPricePerSquareMeter(),true));
-                colList.add(WzHouseMaintenaCostController.toThousands(resultList.get(i).getDailyNum(),false));
-                colList.add(WzHouseMaintenaCostController.toThousands(resultList.get(i).getHighNum(),false));
-                allList.add(colList.toArray());
-
-                //处理城市的
-                List<WzScoreVo> cityList1=resultList.get(i).getChildren();
-                for (WzScoreVo floorNoUserVo : cityList1) {
-                    colList = new ArrayList();
-                    colList.add("");
-                    colList.add(floorNoUserVo.getCity());
-                    colList.add(WzHouseMaintenaCostController.toThousands(floorNoUserVo.getIdleRate(),true)+"%");
-                    colList.add(WzHouseMaintenaCostController.toThousands(floorNoUserVo.getRAbleRate(),true)+"%");
-                    colList.add(WzHouseMaintenaCostController.toThousands(floorNoUserVo.getRArrearsRate(),true)+"%");
-                    colList.add(WzHouseMaintenaCostController.toThousands(floorNoUserVo.getUnitPricePerSquareMeter(),true));
-                    colList.add(WzHouseMaintenaCostController.toThousands(floorNoUserVo.getDailyNum(),false));
-                    colList.add(WzHouseMaintenaCostController.toThousands(floorNoUserVo.getHighNum(),false));
-                    allList.add(colList.toArray());
-
-                }
-            }
-        }
-        String[] header = new String[]{
-                "资产所属单位(一级)",
-                "资产所属单位(二级)",
-                "闲置率=出/(出+闲)",
-                "可出租率=(出+闲)/(自+出+闲)",
-                "出租欠费率=欠费合同/合同总数",
-                "每平方单价=不含税总价/租期/面积",
-                "大于万元零星维修次数",
-                "高频(大于每月1次)维修建筑数",
-                "总分",
-                "排名"
-        };
-        ee1.addSheetByArray(df.format(new Date()) + "清单", allList, header);
-    }
-
-
-}
+//    @RequestMapping("/list")
+//    @IgnoreAuth
+//    public R list(@RequestBody PageMap pageMap) {
+//        //查询列表数据
+//        Query query = new Query(pageMap);
+//        Query query1 = new Query(pageMap);
+//        Query query2 = new Query(pageMap);
+//        //闲置率
+//        List<LeaveUseVo> ideaRateList=wzBuildManageDetailsService.queryLeaveUseList(query);
+//        //出租欠费率
+//        List<WzHouseContracEntity> rentArreList=wzHouseContracService.dealHouseContracList(query1);
+//        //维修
+//        List<WzScoreVo> scoreList= wzHouseMaintenaCostService.queryDailyModifyByScore(query2);
+//
+//        List<LeaveUseVo> ideaList=new ArrayList<>();
+//        if(ideaRateList.size()>0){
+//            ideaList=ideaRateList.get(0).getChildren();
+//        }
+//        List<WzHouseContracEntity> rentList=new ArrayList<>();
+//        if(rentArreList.size()>0){
+//            rentList   =rentArreList.get(0).getChildren();
+//        }
+//        List<WzScoreVo> scoreVoList=new ArrayList<>();
+//        if(scoreList.size()>0){
+//            scoreVoList=scoreList.get(0).getChildren();
+//            if(rentList.size()>0){
+//                scoreList.get(0).setUnitPricePerSquareMeter(rentList.get(0).getUnitPricePerSquareMeter());
+//                scoreList.get(0).setRArrearsRate(rentList.get(0).getAverage());
+//            }
+//           if(ideaList.size()>0){
+//               scoreList.get(0).setIdleRate(ideaList.get(0).getAverage());
+//               scoreList.get(0).setRAbleRate(ideaList.get(0).getRentAverage());
+//           }
+//        }
+//        for (WzScoreVo wzScoreVo : scoreVoList) {
+//            for(LeaveUseVo useVo:ideaList){
+//                if(wzScoreVo.getCity().equals(useVo.getCity())){
+//                    wzScoreVo.setIdleRate(useVo.getAverage());
+//                    wzScoreVo.setRAbleRate(useVo.getRentAverage());
+//                    break;
+//                }
+//            }
+//            for(WzHouseContracEntity con:rentList){
+//                if(wzScoreVo.getCity().equals(con.getCity())){
+//                    wzScoreVo.setRArrearsRate(con.getAverage());
+//                    wzScoreVo.setUnitPricePerSquareMeter(con.getUnitPricePerSquareMeter());
+//                    break;
+//                }
+//            }
+//        }
+//        PageUtils pageUtil = new PageUtils(scoreList, 0, query.getLimit(), query.getPage());
+//        return R.ok().put("page", pageUtil);
+//    }
+
+
+
+//    @RequestMapping("/echartList")
+//    @IgnoreAuth
+//    public R echartList(@RequestBody PageMap pageMap) {
+//        //查询列表数据
+//        Query query = new Query(pageMap);
+//        List<WzScoreRankingEntity> list = wzScoreRankingService.queryList(query);
+//        List<WzScoreRankingEntity> allList=new ArrayList<>();
+//        for (WzScoreRankingEntity wzScoreRankingEntity : list) {
+//            if(wzScoreRankingEntity.getCity()!=null){
+//                allList.add(wzScoreRankingEntity);
+//            }
+//        }
+//        //对cityList 进行排序
+//        List<OtnAreaEntity> areaList=otnAreaService.getCityOption("018");
+//        List<WzScoreRankingEntity> orderList=new ArrayList<>();
+//        for (OtnAreaEntity otnAreaEntity : areaList) {
+//            for (WzScoreRankingEntity wzCity : allList) {
+//                if(wzCity.getCity().contains(otnAreaEntity.getName())){
+//                    orderList.add(wzCity);
+//                }
+//            }
+//        }
+//        PageUtils pageUtil = new PageUtils(orderList, 0, query.getLimit(), query.getPage());
+//        return R.ok().put("page", pageUtil);
+//    }
+
+//    /**
+//     * 清单excel
+//     */
+//    @GetMapping("/excel")
+//    @IgnoreAuth
+//    public void excel(String name,String statisticalMonth,String city,String county, HttpServletResponse response) {
+//        Map<String,Object> map0=new HashMap<>();
+//        Map<String,Object> map1=new HashMap<>();
+//        Map<String,Object> map2=new HashMap<>();
+//        if(statisticalMonth!=null){
+//            map0.put("statisticalMonth",statisticalMonth);
+//            map1.put("statisticalMonth",statisticalMonth);
+//            map2.put("statisticalMonth",statisticalMonth);
+//        }
+//        if(city!=null){
+//            map0.put("city",city);
+//            map1.put("city",city);
+//            map2.put("city",city);
+//        }
+//        if(county!=null){
+//            map0.put("county",county);
+//            map1.put("county",county);
+//            map2.put("county",county);
+//        }
+//
+//        DateFormat df = new SimpleDateFormat("yyyyMMddHHmmss");
+//        ExcelExport ee1;
+//
+//        //判定是闲置管理还是记录
+//        if(name.contains("综合评价总分排名")){
+//            ee1 = new ExcelExport("综合评价总分排名" + df.format(new Date()));
+//            responseTab1(df,ee1,map0,map1,map2);
+//            ee1.export(response);
+//        }else{
+//            ee1 = new ExcelExport("综合评价总分排名" + df.format(new Date()));
+//            responseTab1(df,ee1,map0,map1,map2);
+//            ee1.export(response);
+//        }
+//    }
+
+//    public void responseTab1(DateFormat df, ExcelExport ee1, Map<String, Object> map0, Map<String, Object> map1, Map<String, Object> map2){
+//
+//        //闲置率
+//        List<LeaveUseVo> ideaRateList=wzBuildManageDetailsService.queryLeaveUseList(map0);
+//        //出租欠费率
+//        List<WzHouseContracEntity> rentArreList=wzHouseContracService.dealHouseContracList(map1);
+//        //维修
+//        List<WzScoreVo> resultList= wzHouseMaintenaCostService.queryDailyModifyByScore(map2);
+//
+//        List<LeaveUseVo> ideaList=new ArrayList<>();
+//        if(ideaRateList.size()>0){
+//            ideaList=ideaRateList.get(0).getChildren();
+//        }
+//        List<WzHouseContracEntity> rentList=new ArrayList<>();
+//        if(rentArreList.size()>0){
+//            rentList   =rentArreList.get(0).getChildren();
+//        }
+//        List<WzScoreVo> scoreVoList=new ArrayList<>();
+//        if(resultList.size()>0){
+//            scoreVoList=resultList.get(0).getChildren();
+//            if(rentList.size()>0){
+//                resultList.get(0).setUnitPricePerSquareMeter(rentList.get(0).getUnitPricePerSquareMeter());
+//                resultList.get(0).setRArrearsRate(rentList.get(0).getAverage());
+//            }
+//            if(ideaList.size()>0){
+//                resultList.get(0).setIdleRate(ideaList.get(0).getAverage());
+//                resultList.get(0).setRAbleRate(ideaList.get(0).getRentAverage());
+//            }
+//        }
+//        for (WzScoreVo wzScoreVo : scoreVoList) {
+//            for(LeaveUseVo useVo:ideaList){
+//                if(wzScoreVo.getCity().equals(useVo.getCity())){
+//                    wzScoreVo.setIdleRate(useVo.getAverage());
+//                    wzScoreVo.setRAbleRate(useVo.getRentAverage());
+//                    break;
+//                }
+//            }
+//            for(WzHouseContracEntity con:rentList){
+//                if(wzScoreVo.getCity().equals(con.getCity())){
+//                    wzScoreVo.setRArrearsRate(con.getAverage());
+//                    wzScoreVo.setUnitPricePerSquareMeter(con.getUnitPricePerSquareMeter());
+//                    break;
+//                }
+//            }
+//        }
+//
+//        List<Object> colList=new ArrayList();;
+//        List<Object[]> allList = new ArrayList();
+//        for (int i = 0; i < resultList.size(); i++) {
+//
+//            if(resultList.get(i).getCity().contains("省")){
+//                colList = new ArrayList();
+//                colList.add(resultList.get(i).getCity());
+//                colList.add("");
+//                colList.add(WzHouseMaintenaCostController.toThousands(resultList.get(i).getIdleRate(),true)+"%");
+//                colList.add(WzHouseMaintenaCostController.toThousands(resultList.get(i).getRAbleRate(),true)+"%");
+//                colList.add(WzHouseMaintenaCostController.toThousands(resultList.get(i).getRArrearsRate(),true)+"%");
+//                colList.add(WzHouseMaintenaCostController.toThousands(resultList.get(i).getUnitPricePerSquareMeter(),true));
+//                colList.add(WzHouseMaintenaCostController.toThousands(resultList.get(i).getDailyNum(),false));
+//                colList.add(WzHouseMaintenaCostController.toThousands(resultList.get(i).getHighNum(),false));
+//                allList.add(colList.toArray());
+//
+//                //处理城市的
+//                List<WzScoreVo> cityList1=resultList.get(i).getChildren();
+//                for (WzScoreVo floorNoUserVo : cityList1) {
+//                    colList = new ArrayList();
+//                    colList.add("");
+//                    colList.add(floorNoUserVo.getCity());
+//                    colList.add(WzHouseMaintenaCostController.toThousands(floorNoUserVo.getIdleRate(),true)+"%");
+//                    colList.add(WzHouseMaintenaCostController.toThousands(floorNoUserVo.getRAbleRate(),true)+"%");
+//                    colList.add(WzHouseMaintenaCostController.toThousands(floorNoUserVo.getRArrearsRate(),true)+"%");
+//                    colList.add(WzHouseMaintenaCostController.toThousands(floorNoUserVo.getUnitPricePerSquareMeter(),true));
+//                    colList.add(WzHouseMaintenaCostController.toThousands(floorNoUserVo.getDailyNum(),false));
+//                    colList.add(WzHouseMaintenaCostController.toThousands(floorNoUserVo.getHighNum(),false));
+//                    allList.add(colList.toArray());
+//
+//                }
+//            }
+//        }
+//        String[] header = new String[]{
+//                "资产所属单位(一级)",
+//                "资产所属单位(二级)",
+//                "闲置率=出/(出+闲)",
+//                "可出租率=(出+闲)/(自+出+闲)",
+//                "出租欠费率=欠费合同/合同总数",
+//                "每平方单价=不含税总价/租期/面积",
+//                "大于万元零星维修次数",
+//                "高频(大于每月1次)维修建筑数",
+//                "总分",
+//                "排名"
+//        };
+//        ee1.addSheetByArray(df.format(new Date()) + "清单", allList, header);
+//    }
+
+
+//}

+ 1 - 1
src/main/java/com/example/controller/gdc/WzStrategyController.java

@@ -17,7 +17,7 @@ import java.util.List;
 import java.util.Map;
 
 /**
- * 房屋出租(合同管理)
+ * 策略公式维护
  */
 @RestController
 @RequestMapping("/house-car/house/dist/api/wzStrategy")

+ 1 - 1
src/main/java/com/example/controller/gdc/WzUserController.java

@@ -15,7 +15,7 @@ import org.springframework.web.bind.annotation.RestController;
 import java.util.List;
 
 /**
- * 房屋出租(合同管理)
+ * 负责人信息维护
  */
 @RestController
 @RequestMapping("/house-car/house/dist/api/wzUser")

+ 41 - 0
src/main/java/com/example/controller/house/HouseScoreRankingController.java

@@ -0,0 +1,41 @@
+package com.example.controller.house;
+
+import com.example.common.PageVo;
+import com.example.common.Rsp;
+import com.example.pojo.dto.ScoreRankingDto;
+import com.example.pojo.vo.ScoreRankingVo;
+import com.example.service.house.HouseScoreRankingService;
+import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.tags.Tag;
+import lombok.RequiredArgsConstructor;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import javax.servlet.http.HttpServletResponse;
+import javax.validation.Valid;
+
+
+@Tag(name = "综合评价")
+@Slf4j
+@RequestMapping("/house-car/house/dist/api/wzScoreRanking")
+@RestController
+@RequiredArgsConstructor
+public class HouseScoreRankingController {
+    private final HouseScoreRankingService houseScoreRankingService;
+
+    @Operation(summary = "查询综合评价")
+    @PostMapping("/list")
+    public Rsp<PageVo<ScoreRankingVo>> scoreRanking(@Valid @RequestBody ScoreRankingDto dto) {
+        return houseScoreRankingService.scoreRanking(dto);
+    }
+
+    @Operation(summary = "综合评价导出")
+    @GetMapping("/excel")
+    public void scoreRankingExport(ScoreRankingDto.ScoreRankingMapDTO dto, HttpServletResponse response) {
+        houseScoreRankingService.scoreRankingExport(dto, response);
+    }
+}

+ 2 - 2
src/main/java/com/example/dao/gdc/WzOtnAreaDao.java

@@ -76,9 +76,9 @@ limit 1
 """)
     OtnAreaEntity getByName(@Param("name") String name);
 
-    List<OtnAreaEntity> getCityOption(Long parentId);
+//    List<OtnAreaEntity> getCityOption(Long parentId);
 
-    OtnAreaEntity queryObjectById(Long id);
+//    OtnAreaEntity queryObjectById(Long id);
 //     List<WzHouseContractVo> queryVoList(Map<String, Object> map);
 //
 //     List<FloorNoUserVo> queryLeaveUseList(Map<String, Object> map);

+ 270 - 0
src/main/java/com/example/dao/house/HouseScoreRankingDao.java

@@ -0,0 +1,270 @@
+package com.example.dao.house;
+
+import com.example.pojo.bo.ScoreRankingBo;
+import com.example.pojo.dto.ScoreRankingDto;
+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 HouseScoreRankingDao {
+    @Select("""
+select max(year_month) from house.building_month
+""")
+    Integer getLatestYearMonth();
+
+    @Select("""
+with
+t21 as (
+select
+    case
+        when (coalesce(sum(building_area_rent), 0) + coalesce(sum(building_area_idle), 0)) = 0 then 0
+        else round(sum(building_area_idle) / (coalesce(sum(building_area_rent), 0) + coalesce(sum(building_area_idle), 0)), 4)
+    end as xzl,
+    case
+        when (coalesce(sum(building_area_self_use), 0) + coalesce(sum(building_area_rent), 0) + coalesce(sum(building_area_idle), 0)) = 0 then 0
+        else round((coalesce(sum(building_area_rent), 0) + coalesce(sum(building_area_idle), 0)) / (coalesce(sum(building_area_self_use), 0) + coalesce(sum(building_area_rent), 0) + coalesce(sum(building_area_idle), 0)), 4)
+    end as kczl
+from
+    house.building_month
+where
+    year_month = #{dto.statisticalMonth}
+),
+t51 as (
+select
+    count(1) as wylxwx
+from
+    house.building_high_sporadic_repair
+where
+    year_month = #{dto.statisticalMonth}
+),
+t61 as (
+select
+    distinct area_no,
+    jz_jzid,
+    form_no
+from
+    house.building_repair_month
+where
+    year_month = #{dto.statisticalMonth}
+    and jz_jzid is not null
+    and jz_jzid != ''
+    and area_no is not null
+    and area_no != ''
+),
+t62 as (
+select
+    area_no,
+    jz_jzid,
+    count(1)
+from
+    t61
+group by
+    area_no,
+    jz_jzid
+having
+    count(1) > 1
+),
+t63 as (
+select
+    count(1) as gpwxjz
+from
+    t62
+),
+t71 as (
+select
+    coalesce(t21.xzl, 0) as xzl,
+    coalesce(t21.kczl, 0) as kczl,
+    0 as czqfl,
+    0 as czdj,
+    coalesce(t51.wylxwx, 0) as wylxwx,
+    coalesce(t63.gpwxjz, 0) as gpwxjz
+from
+    t21
+cross join t51
+cross join t63
+)
+select
+    *
+from
+    t71
+""")
+    ScoreRankingBo firstScore(@Param("dto") ScoreRankingDto.ScoreRankingMapDTO dto);
+
+    @Select("""
+with
+t101 as (
+select
+    *
+from
+    common.organization
+where
+    grade = 1
+    and unhide = 1
+order by
+    order_num
+),
+t201 as (
+select
+    area_no,
+    case
+        when (coalesce(sum(building_area_rent), 0) + coalesce(sum(building_area_idle), 0)) = 0 then 0
+        else round(sum(building_area_idle) / (coalesce(sum(building_area_rent), 0) + coalesce(sum(building_area_idle), 0)), 4)
+    end as xzl,
+    case
+        when (coalesce(sum(building_area_self_use), 0) + coalesce(sum(building_area_rent), 0) + coalesce(sum(building_area_idle), 0)) = 0 then 0
+        else round((coalesce(sum(building_area_rent), 0) + coalesce(sum(building_area_idle), 0)) / (coalesce(sum(building_area_self_use), 0) + coalesce(sum(building_area_rent), 0) + coalesce(sum(building_area_idle), 0)), 4)
+    end as kczl
+from
+    house.building_month
+where
+    year_month = #{dto.statisticalMonth}
+group by
+    area_no
+),
+t501 as (
+select
+    area_no,
+    count(1) as wylxwx
+from
+    house.building_high_sporadic_repair
+where
+    year_month = #{dto.statisticalMonth}
+group by
+    area_no
+),
+t601 as (
+select
+    distinct area_no,
+    jz_jzid,
+    form_no
+from
+    house.building_repair_month
+where
+    year_month = #{dto.statisticalMonth}
+    and jz_jzid is not null
+    and jz_jzid != ''
+    and area_no is not null
+    and area_no != ''
+),
+t602 as (
+select
+    area_no,
+    jz_jzid,
+    count(1)
+from
+    t601
+group by
+    area_no,
+    jz_jzid
+having
+    count(1) > 1
+),
+t603 as (
+select
+    area_no,
+    count(1) as gpwxjz
+from
+    t602
+group by
+    area_no
+),
+t701 as (
+select
+    t101.id as area_no,
+    t101.name as area_name,
+    t101.order_num,
+    coalesce(t201.xzl, 0) as xzl,
+    coalesce(t201.kczl, 0) as kczl,
+    0 as czqfl,
+    0 as czdj,
+    coalesce(t501.wylxwx, 0) as wylxwx,
+    coalesce(t603.gpwxjz, 0) as gpwxjz
+from
+    t101
+left join t201 on
+    t101.id = t201.area_no
+left join t501 on
+    t101.id = t501.area_no
+left join t603 on
+    t101.id = t603.area_no
+order by
+    t101.order_num
+),
+t702 as (
+select
+    round(avg(xzl), 4) as xzl,
+    round(avg(kczl), 4) as kczl,
+    round(avg(czqfl), 4) as czqfl,
+    round(avg(czdj), 2) as czdj,
+    round(avg(wylxwx)) as wylxwx,
+    round(avg(gpwxjz)) as gpwxjz
+from
+    t701
+),
+t703 as (
+select
+    t701.area_no,
+    t701.area_name,
+    case
+        when t702.xzl = 0 then 0
+        when t701.xzl < t702.xzl then round(t701.xzl / t702.xzl, 2)
+        else -(round(t701.xzl / t702.xzl, 2))
+    end as xzl,
+    case
+        when t702.kczl = 0 then 0
+        when t701.kczl > t702.kczl then round(t701.kczl / t702.kczl, 2)
+        else -(round(t701.kczl / t702.kczl, 2))
+    end as kczl,
+    case
+        when t702.czqfl = 0 then 0
+        when t701.czqfl < t702.czqfl then round(t701.czqfl / t702.czqfl, 2)
+        else -(round(t701.czqfl / t702.czqfl, 2))
+    end as czqfl,
+    case
+        when t702.czdj = 0 then 0
+        when t701.czdj > t702.czdj then round(t701.czdj / t702.czdj, 2)
+        else -(round(t701.czdj / t702.czdj, 2))
+    end as czdj,
+    case
+        when t702.wylxwx = 0 then 0
+        when t701.wylxwx < t702.wylxwx then round(t701.wylxwx / t702.wylxwx, 2)
+        else -(round(t701.wylxwx / t702.wylxwx, 2))
+    end as wylxwx,
+    case
+        when t702.gpwxjz = 0 then 0
+        when t701.gpwxjz < t702.gpwxjz then round(t701.gpwxjz / t702.gpwxjz, 2)
+        else -(round(t701.gpwxjz / t702.gpwxjz, 2))
+    end as gpwxjz
+from
+    t701
+cross join t702
+),
+t704 as (
+select
+    t701.*,
+    (t703.xzl + t703.kczl + t703.czqfl + t703.czdj + t703.wylxwx + t703.gpwxjz) as zf
+from
+    t701
+join t703 on
+    t701.area_no = t703.area_no
+),
+t705 as (
+select
+    t704.*,
+    row_number() over (
+    order by zf desc) as pm
+from
+    t704
+)
+select
+    *
+from
+    t705
+order by
+    order_num
+""")
+    List<ScoreRankingBo> secondScore(@Param("dto") ScoreRankingDto.ScoreRankingMapDTO dto);
+}

+ 49 - 0
src/main/java/com/example/pojo/bo/ScoreRankingBo.java

@@ -0,0 +1,49 @@
+package com.example.pojo.bo;
+
+import lombok.Data;
+
+import java.math.BigDecimal;
+
+@Data
+public class ScoreRankingBo {
+    /**
+     * 二级组织机构编码
+     */
+    private String areaNo;
+    /**
+     * 二级组织机构名称
+     */
+    private String areaName;
+    /**
+     * 闲置率
+     */
+    private BigDecimal xzl;
+    /**
+     * 可出租率
+     */
+    private BigDecimal kczl;
+    /**
+     * 出租欠费率
+     */
+    private BigDecimal czqfl;
+    /**
+     * 每平方单价
+     */
+    private BigDecimal czdj;
+    /**
+     * 大于万元零星维修次数
+     */
+    private Integer wylxwx;
+    /**
+     * 高频维修建筑数
+     */
+    private Integer gpwxjz;
+    /**
+     * 总分
+     */
+    private BigDecimal zf;
+    /**
+     * 排名
+     */
+    private Integer pm;
+}

+ 38 - 0
src/main/java/com/example/pojo/dto/ScoreRankingDto.java

@@ -0,0 +1,38 @@
+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 java.net.URLDecoder;
+import java.nio.charset.StandardCharsets;
+
+@NoArgsConstructor
+@Data
+public class ScoreRankingDto {
+    @Valid
+    private ScoreRankingDto.ScoreRankingMapDTO map;
+
+    @NoArgsConstructor
+    @Data
+    public static class ScoreRankingMapDTO {
+        @Schema(description = "账期", example = "202312")
+        private Integer statisticalMonth;
+        @Schema(description = "二级组织机构id")
+        private String city;
+        @Schema(description = "三级级组织机构id")
+        private String county;
+    }
+
+    public ScoreRankingDto(ScoreRankingMapDTO 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 = map;
+    }
+}

+ 46 - 0
src/main/java/com/example/pojo/vo/ScoreRankingVo.java

@@ -0,0 +1,46 @@
+package com.example.pojo.vo;
+
+import com.example.pojo.bo.ScoreRankingBo;
+import io.swagger.v3.oas.annotations.media.Schema;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+import java.math.BigDecimal;
+import java.util.List;
+
+@NoArgsConstructor
+@Data
+public class ScoreRankingVo {
+    @Schema(description = "单位")
+    private String city;
+    @Schema(description = "闲置率")
+    private BigDecimal idleRate;
+    @Schema(description = "可出租率")
+    private BigDecimal rAbleRate;
+    @Schema(description = "出租欠费率")
+    private BigDecimal rArrearsRate;
+    @Schema(description = "每平米单价")
+    private BigDecimal unitPricePerSquareMeter;
+    @Schema(description = "大于万元零星维修次数")
+    private Integer dailyNum;
+    @Schema(description = "高频维修建筑数")
+    private Integer highNum;
+    @Schema(description = "总分")
+    private BigDecimal score;
+    @Schema(description = "排名")
+    private Integer ranking;
+    @Schema(description = "子列表")
+    private List<ScoreRankingVo> children;
+
+    public ScoreRankingVo(ScoreRankingBo bo) {
+        this.city = bo.getAreaName();
+        this.idleRate = bo.getXzl().multiply(new BigDecimal("100"));
+        this.rAbleRate = bo.getKczl().multiply(new BigDecimal("100"));
+        this.rArrearsRate = bo.getCzqfl().multiply(new BigDecimal("100"));
+        this.unitPricePerSquareMeter = bo.getCzdj();
+        this.dailyNum = bo.getWylxwx();
+        this.highNum = bo.getGpwxjz();
+        this.score = bo.getZf();
+        this.ranking = bo.getPm();
+    }
+}

+ 224 - 0
src/main/java/com/example/service/house/HouseScoreRankingService.java

@@ -0,0 +1,224 @@
+package com.example.service.house;
+
+import cn.hutool.core.net.URLEncodeUtil;
+import com.example.common.PageVo;
+import com.example.common.Rsp;
+import com.example.dao.house.HouseScoreRankingDao;
+import com.example.pojo.bo.ScoreRankingBo;
+import com.example.pojo.dto.ScoreRankingDto;
+import com.example.pojo.vo.ScoreRankingVo;
+import lombok.RequiredArgsConstructor;
+import lombok.extern.slf4j.Slf4j;
+import org.apache.poi.ss.usermodel.Cell;
+import org.apache.poi.ss.usermodel.CellStyle;
+import org.apache.poi.ss.usermodel.DataFormat;
+import org.apache.poi.ss.usermodel.HorizontalAlignment;
+import org.apache.poi.ss.usermodel.Row;
+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 javax.servlet.http.HttpServletResponse;
+import javax.validation.Valid;
+import java.time.LocalDateTime;
+import java.time.format.DateTimeFormatter;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+import java.util.concurrent.atomic.AtomicInteger;
+import java.util.stream.Stream;
+
+
+@Slf4j
+@Service
+@RequiredArgsConstructor
+public class HouseScoreRankingService {
+    private final HouseScoreRankingDao houseScoreRankingDao;
+
+    public Rsp<PageVo<ScoreRankingVo>> scoreRanking(@Valid ScoreRankingDto dto) {
+        if (dto.getMap().getStatisticalMonth() == null) {
+            Integer yearMonth = houseScoreRankingDao.getLatestYearMonth();
+            dto.getMap().setStatisticalMonth(yearMonth);
+        }
+        ScoreRankingBo firstBo = houseScoreRankingDao.firstScore(dto.getMap());
+        List<ScoreRankingVo> list = new ArrayList<>();
+        ScoreRankingVo vo = new ScoreRankingVo(firstBo);
+        vo.setCity("全省");
+        vo.setChildren(list);
+        List<ScoreRankingBo> secondBos = houseScoreRankingDao.secondScore(dto.getMap());
+        secondBos.forEach(t -> list.add(new ScoreRankingVo(t)));
+        PageVo<ScoreRankingVo> pageVo = new PageVo<>(Collections.singletonList(vo));
+        return Rsp.ok(pageVo);
+    }
+
+    public void scoreRankingExport(ScoreRankingDto.ScoreRankingMapDTO dto, HttpServletResponse response) {
+        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()) {
+            writeScoreRanking(dto, wb);
+            wb.write(response.getOutputStream());
+        } catch (Exception e) {
+            log.error(e.getMessage(), e);
+        }
+    }
+
+    private void writeScoreRanking(ScoreRankingDto.ScoreRankingMapDTO dto, SXSSFWorkbook wb) {
+        DataFormat dataFormat = wb.createDataFormat();
+        // 默认样式
+        CellStyle baseCellStyle = wb.createCellStyle();
+        baseCellStyle.setAlignment(HorizontalAlignment.CENTER);
+        baseCellStyle.setVerticalAlignment(VerticalAlignment.CENTER);
+        // 整数样式
+        CellStyle integerCellStyle = wb.createCellStyle();
+        integerCellStyle.setDataFormat(dataFormat.getFormat("#,##0"));
+        integerCellStyle.setAlignment(HorizontalAlignment.RIGHT);
+        // 数字样式
+        CellStyle numberCellStyle = wb.createCellStyle();
+        numberCellStyle.setDataFormat(dataFormat.getFormat("#,##0.00"));
+        numberCellStyle.setAlignment(HorizontalAlignment.RIGHT);
+        // 百分比样式
+        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("资产所属单位(一级)", "资产所属单位(二级)", "闲置率=出/(出+闲)",
+                "可出租率=(出+闲)/(自+出+闲)", "出租欠费率=欠费合同/合同总数", "每平方单价=不含税总价/租期/面积",
+                "大于万元零星维修次数", "高频(大于每月1次)维修建筑数", "总分", "排名").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 (dto.getStatisticalMonth() == null) {
+            Integer yearMonth = houseScoreRankingDao.getLatestYearMonth();
+            dto.setStatisticalMonth(yearMonth);
+        }
+        ScoreRankingBo firstBo = houseScoreRankingDao.firstScore(dto);
+        AtomicInteger columnIndex1 = new AtomicInteger(0);
+        Row row1 = sheet.createRow(rowIndex.getAndIncrement());
+        // 资产所属单位(一级)
+        Cell firstUnitCell1 = row1.createCell(columnIndex1.getAndIncrement());
+        firstUnitCell1.setCellValue("全省");
+        // 资产所属单位(二级)
+        Cell areaNameCell1 = row1.createCell(columnIndex1.getAndIncrement());
+        // 闲置率
+        Cell xzlCell1 = row1.createCell(columnIndex1.getAndIncrement());
+        if (firstBo.getXzl() != null) {
+            xzlCell1.setCellValue(firstBo.getXzl().doubleValue());
+        }
+        xzlCell1.setCellStyle(percentCellStyle);
+        // 可出租率
+        Cell kczlCell1 = row1.createCell(columnIndex1.getAndIncrement());
+        if (firstBo.getKczl() != null) {
+            kczlCell1.setCellValue(firstBo.getKczl().doubleValue());
+        }
+        kczlCell1.setCellStyle(percentCellStyle);
+        // 出租欠费率
+        Cell czqflCell1 = row1.createCell(columnIndex1.getAndIncrement());
+        if (firstBo.getCzqfl() != null) {
+            czqflCell1.setCellValue(firstBo.getCzqfl().doubleValue());
+        }
+        czqflCell1.setCellStyle(percentCellStyle);
+        // 每平方单价
+        Cell czdjCell1 = row1.createCell(columnIndex1.getAndIncrement());
+        if (firstBo.getCzdj() != null) {
+            czdjCell1.setCellValue(firstBo.getCzdj().doubleValue());
+        }
+        czdjCell1.setCellStyle(numberCellStyle);
+        // 大于万元零星维修次数
+        Cell wylxwxCell1 = row1.createCell(columnIndex1.getAndIncrement());
+        if (firstBo.getWylxwx() != null) {
+            wylxwxCell1.setCellValue(firstBo.getWylxwx().doubleValue());
+        }
+        wylxwxCell1.setCellStyle(integerCellStyle);
+        // 高频(大于每月1次)维修建筑数
+        Cell gpwxjzCell1 = row1.createCell(columnIndex1.getAndIncrement());
+        if (firstBo.getGpwxjz() != null) {
+            gpwxjzCell1.setCellValue(firstBo.getGpwxjz().doubleValue());
+        }
+        gpwxjzCell1.setCellStyle(integerCellStyle);
+        // 总分
+        Cell zfCell1 = row1.createCell(columnIndex1.getAndIncrement());
+        if (firstBo.getZf() != null) {
+            zfCell1.setCellValue(firstBo.getZf().doubleValue());
+        }
+        zfCell1.setCellStyle(numberCellStyle);
+        // 排名
+        Cell pmCell1 = row1.createCell(columnIndex1.getAndIncrement());
+        if (firstBo.getPm() != null) {
+            pmCell1.setCellValue(firstBo.getPm().doubleValue());
+        }
+        pmCell1.setCellStyle(integerCellStyle);
+        List<ScoreRankingBo> secondBos = houseScoreRankingDao.secondScore(dto);
+        // 数据
+        for (ScoreRankingBo t : secondBos) {
+            AtomicInteger columnIndex = new AtomicInteger(0);
+            Row row = sheet.createRow(rowIndex.getAndIncrement());
+            // 资产所属单位(一级)
+            Cell firstUnitCell = row.createCell(columnIndex.getAndIncrement());
+            // 资产所属单位(二级)
+            Cell areaNameCell = row.createCell(columnIndex.getAndIncrement());
+            if (t.getAreaName() != null) {
+                areaNameCell.setCellValue(t.getAreaName());
+            }
+            // 闲置率
+            Cell xzlCell = row.createCell(columnIndex.getAndIncrement());
+            if (t.getXzl() != null) {
+                xzlCell.setCellValue(t.getXzl().doubleValue());
+            }
+            xzlCell.setCellStyle(percentCellStyle);
+            // 可出租率
+            Cell kczlCell = row.createCell(columnIndex.getAndIncrement());
+            if (t.getKczl() != null) {
+                kczlCell.setCellValue(t.getKczl().doubleValue());
+            }
+            kczlCell.setCellStyle(percentCellStyle);
+            // 出租欠费率
+            Cell czqflCell = row.createCell(columnIndex.getAndIncrement());
+            if (t.getCzqfl() != null) {
+                czqflCell.setCellValue(t.getCzqfl().doubleValue());
+            }
+            czqflCell.setCellStyle(percentCellStyle);
+            // 每平方单价
+            Cell czdjCell = row.createCell(columnIndex.getAndIncrement());
+            if (t.getCzdj() != null) {
+                czdjCell.setCellValue(t.getCzdj().doubleValue());
+            }
+            czdjCell.setCellStyle(numberCellStyle);
+            // 大于万元零星维修次数
+            Cell wylxwxCell = row.createCell(columnIndex.getAndIncrement());
+            if (t.getWylxwx() != null) {
+                wylxwxCell.setCellValue(t.getWylxwx().doubleValue());
+            }
+            wylxwxCell.setCellStyle(integerCellStyle);
+            // 高频(大于每月1次)维修建筑数
+            Cell gpwxjzCell = row.createCell(columnIndex.getAndIncrement());
+            if (t.getGpwxjz() != null) {
+                gpwxjzCell.setCellValue(t.getGpwxjz().doubleValue());
+            }
+            gpwxjzCell.setCellStyle(integerCellStyle);
+            // 总分
+            Cell zfCell = row.createCell(columnIndex.getAndIncrement());
+            if (t.getZf() != null) {
+                zfCell.setCellValue(t.getZf().doubleValue());
+            }
+            zfCell.setCellStyle(numberCellStyle);
+            // 排名
+            Cell pmCell = row.createCell(columnIndex.getAndIncrement());
+            if (t.getPm() != null) {
+                pmCell.setCellValue(t.getPm().doubleValue());
+            }
+            pmCell.setCellStyle(integerCellStyle);
+        }
+    }
+}

+ 1 - 1
src/main/resources/application-prod.yml

@@ -16,4 +16,4 @@ knife4j:
 logging:
   level:
     com:
-      example: info
+      example: debug

+ 79 - 79
src/main/resources/com/example/dao/gdc/WzOtnAreaDao.xml

@@ -9,58 +9,58 @@
     </resultMap>
 
 
-    <select id="queryObject" resultType="com.example.pojo.gdc.OtnAreaEntity">
-        select
-            id,
-            province,
-            name,
-            level,
-            weight,
-            parent_id as parentId
-        from house_theme.otn_area
-        where name = #{name}
-    </select>
-
-
-    <select id="queryObjectById" resultType="com.example.pojo.gdc.OtnAreaEntity">
-        select
-            id,
-            province,
-            name,
-            level,
-            weight,
-            parent_id as parentId
-        from house_theme.otn_area
-        where id = #{id}
-    </select>
-
-
-    <select id="queryList" resultType="com.example.pojo.gdc.OtnAreaEntity">
-        select
-            id,
-            province,
-            name,
-            level,
-            weight,
-            parent_id as parentId
-        from house_theme.otn_area
-        WHERE 1=1
-        <if test="name != null and name.trim() != ''">
-            AND name LIKE concat('%',#{name},'%')
-        </if>
-        <choose>
-            <when test="sidx != null and sidx.trim() != ''">
-                order by ${sidx} ${order}
-            </when>
-            <otherwise>
-                order by id desc
-            </otherwise>
-        </choose>
-        <if test="offset != null and limit != null">
-            LIMIT #{limit} OFFSET #{offset}
-
-        </if>
-    </select>
+<!--    <select id="queryObject" resultType="com.example.pojo.gdc.OtnAreaEntity">-->
+<!--        select-->
+<!--            id,-->
+<!--            province,-->
+<!--            name,-->
+<!--            level,-->
+<!--            weight,-->
+<!--            parent_id as parentId-->
+<!--        from house_theme.otn_area-->
+<!--        where name = #{name}-->
+<!--    </select>-->
+
+
+<!--    <select id="queryObjectById" resultType="com.example.pojo.gdc.OtnAreaEntity">-->
+<!--        select-->
+<!--            id,-->
+<!--            province,-->
+<!--            name,-->
+<!--            level,-->
+<!--            weight,-->
+<!--            parent_id as parentId-->
+<!--        from house_theme.otn_area-->
+<!--        where id = #{id}-->
+<!--    </select>-->
+
+
+<!--    <select id="queryList" resultType="com.example.pojo.gdc.OtnAreaEntity">-->
+<!--        select-->
+<!--            id,-->
+<!--            province,-->
+<!--            name,-->
+<!--            level,-->
+<!--            weight,-->
+<!--            parent_id as parentId-->
+<!--        from house_theme.otn_area-->
+<!--        WHERE 1=1-->
+<!--        <if test="name != null and name.trim() != ''">-->
+<!--            AND name LIKE concat('%',#{name},'%')-->
+<!--        </if>-->
+<!--        <choose>-->
+<!--            <when test="sidx != null and sidx.trim() != ''">-->
+<!--                order by ${sidx} ${order}-->
+<!--            </when>-->
+<!--            <otherwise>-->
+<!--                order by id desc-->
+<!--            </otherwise>-->
+<!--        </choose>-->
+<!--        <if test="offset != null and limit != null">-->
+<!--            LIMIT #{limit} OFFSET #{offset}-->
+
+<!--        </if>-->
+<!--    </select>-->
 
     <select id="queryVoList" resultType="com.example.pojo.gdc.vo.houserent.WzHouseContractVo">
         select
@@ -137,32 +137,32 @@
         </if>
     </select>
 
-    <insert id="save" parameterType="com.example.pojo.gdc.OtnAreaEntity" useGeneratedKeys="true" keyProperty="id">
-         insert into otn_area(
-             province,
-             name,
-             level,
-             weight,
-             parent_id
-         ) values(
-             #{province},
-             #{name},
-             #{level},
-             #{weight},
-             #{parentId}
-         )
-    </insert>
-
-    <select id="getCityOption" resultType="com.example.pojo.gdc.OtnAreaEntity">
-        select
-             id,
-             province,
-             name,
-             level,
-             weight,
-             parent_id as parentId
-        from house_theme.otn_area
-        WHERE parent_id=#{id}
-    </select>
+<!--    <insert id="save" parameterType="com.example.pojo.gdc.OtnAreaEntity" useGeneratedKeys="true" keyProperty="id">-->
+<!--         insert into otn_area(-->
+<!--             province,-->
+<!--             name,-->
+<!--             level,-->
+<!--             weight,-->
+<!--             parent_id-->
+<!--         ) values(-->
+<!--             #{province},-->
+<!--             #{name},-->
+<!--             #{level},-->
+<!--             #{weight},-->
+<!--             #{parentId}-->
+<!--         )-->
+<!--    </insert>-->
+
+<!--    <select id="getCityOption" resultType="com.example.pojo.gdc.OtnAreaEntity">-->
+<!--        select-->
+<!--             id,-->
+<!--             province,-->
+<!--             name,-->
+<!--             level,-->
+<!--             weight,-->
+<!--             parent_id as parentId-->
+<!--        from house_theme.otn_area-->
+<!--        WHERE parent_id=#{id}-->
+<!--    </select>-->
 
 </mapper>

Some files were not shown because too many files changed in this diff