From 8590d9a97730a258f89cf05f159216f8da8d3465 Mon Sep 17 00:00:00 2001
From: huanghongfa <huanghongfa123456>
Date: 星期二, 30 三月 2021 16:34:43 +0800
Subject: [PATCH] 实有人口分页查询接口,实有人口点击详情接口,实有人口设置标签接口,实有人口导出模板接口

---
 springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/CommonDataApi.java |  144 ++++++++++++++++++++++++++++++++++++++++++++++--
 1 files changed, 138 insertions(+), 6 deletions(-)

diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/CommonDataApi.java b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/CommonDataApi.java
index be0d730..2b01bd2 100644
--- a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/CommonDataApi.java
+++ b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/CommonDataApi.java
@@ -2,12 +2,9 @@
 
 import com.panzhihua.common.model.dtos.community.*;
 import com.panzhihua.common.model.vos.R;
-import com.panzhihua.common.model.vos.community.ComCvtServeExcelVO;
-import com.panzhihua.common.model.vos.community.ComMngCarExcelVO;
-import com.panzhihua.common.model.vos.community.ComMngRealCompanyExcelVO;
-import com.panzhihua.common.model.vos.community.ComMngRealCompanyVO;
-import com.panzhihua.service_community.service.ComMngCarService;
-import com.panzhihua.service_community.service.ComMngRealCompanyService;
+import com.panzhihua.common.model.vos.community.*;
+import com.panzhihua.common.service.user.UserService;
+import com.panzhihua.service_community.service.*;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.web.bind.annotation.*;
 
@@ -29,6 +26,15 @@
 
     @Resource
     private ComMngRealCompanyService comMngRealCompanyService;
+
+    @Resource
+    private ComMngRealAssetsService comMngRealAssetsService;
+
+    @Resource
+    private ComMngProvinceService comMngProvinceService;
+    @Resource
+    private ComMngPopulationService comMngPopulationService;
+
 
     /**
      * 小程序用户车辆登记
@@ -145,4 +151,130 @@
     public R exportRealCompanyExcel(@RequestBody ExportRealCompanyExcelDTO exportRealCompanyExcelDTO ){
         return comMngRealCompanyService.exportRealCompanyExcel(exportRealCompanyExcelDTO);
     }
+
+
+    /**
+     * 社区后台实有资产管理列表
+     * @param pageComMngRealAssetsDTO
+     * @return
+     */
+    @PostMapping("/assets/page")
+    public R pageQueryComMngRealAssets(@RequestBody PageComMngRealAssetsDTO pageComMngRealAssetsDTO) {
+        return comMngRealAssetsService.pageQueryComMngRealAssets(pageComMngRealAssetsDTO);
+    }
+
+    /**
+     * 社区后台添加修改实有资产
+     * @param comMngRealAssetsVO
+     * @return
+     */
+    @PostMapping("/assets/save")
+    public R saveComMngRealAssets(@RequestBody ComMngRealAssetsVO comMngRealAssetsVO) {
+        return comMngRealAssetsService.saveComMngRealAssets(comMngRealAssetsVO);
+    }
+
+    /**
+     * 社区后台删除实有资产
+     * @param id
+     * @return
+     */
+    @DeleteMapping("/assets/delete")
+    public R deleteComMngRealAssets(@RequestParam(value = "id") Long id) {
+        return comMngRealAssetsService.deleteComMngRealAssets(id);
+    }
+
+    @GetMapping("/assets/detail")
+    public R detailComMngRealAssets(@RequestParam(value = "id") Long id) {
+        return comMngRealAssetsService.detailComMngRealAssets(id);
+    }
+
+    /**
+     * 社区后台导入实有资产
+     * @param list 车实有资产列表
+     * @param communityId 社区编号
+     * @return
+     */
+    @PostMapping("/assets/import")
+    public R listSaveMngRealAssetsExcelVO(@RequestBody List<ComMngRealAssetsExcelVO> list, @RequestParam("communityId") Long communityId){
+        return comMngRealAssetsService.listSaveMngRealAssetsExcelVO(list,communityId);
+    }
+
+    /**
+     * 导出实有资产
+     * @param exportRealAssetsExcelDTO 实有资产导出查询参数
+     * @return
+     */
+    @PostMapping("/assets/export")
+    public R exportRealAssetsExcel(@RequestBody ExportRealAssetsExcelDTO exportRealAssetsExcelDTO ){
+        return comMngRealAssetsService.exportRealAssetsExcel(exportRealAssetsExcelDTO);
+    }
+
+    /**
+     * 查询所有省份
+     * @return
+     */
+    @GetMapping("/province")
+    public R getProvince() {
+        return comMngProvinceService.getProvince();
+    }
+
+    /**
+     * 查询省份下所有的城市
+     * @param provinceAdcode
+     * @return
+     */
+    @GetMapping("/city")
+    public R getCityByProvinceCode(@RequestParam(value = "provinceAdcode") Integer provinceAdcode){
+        return comMngProvinceService.getCityByProvinceCode(provinceAdcode);
+    }
+
+    /**
+     * 查询城市下所有的区县
+     * @param cityAdcode
+     * @return
+     */
+    @GetMapping("/district")
+    R getDistrictByCityCode(@RequestParam(value = "cityAdcode") Integer cityAdcode){
+        return comMngProvinceService.getDistrictByCityCode(cityAdcode);
+    }
+
+    /**
+     * 查询特定省下所有区域 tree结构
+     * @param provinceAdcode
+     * @return
+     */
+    @GetMapping("/area/all")
+    R getCityTreeByProvinceCode(@RequestParam(value = "provinceAdcode") Integer provinceAdcode){
+        return comMngProvinceService.getCityTreeByProvinceCode(provinceAdcode);
+    }
+
+    /**
+     * 社区后台实有人口管理列表
+     * @param comMngPopulationVO 查询参数
+     * @return  实有人口分页查询结果
+     */
+    @PostMapping("/population/page")
+    public R pagePopulation(@RequestBody ComMngPopulationDTO comMngPopulationVO) {
+        return comMngPopulationService.pagePopulation(comMngPopulationVO);
+    }
+
+    /**
+     * 根据实有人口id查询详情
+     * @param populationId 实有人口id
+     * @return  实有人口详情查询结果
+     */
+    @PostMapping("/population/detail")
+    public R detailPopulation(@RequestParam(value = "populationId") Long populationId) {
+        return comMngPopulationService.detailPopulation(populationId);
+    }
+
+    /**
+     * 根据实有人口id修改标签列表
+     * @param populationTagDTO 请求参数
+     * @return  修改结果
+     */
+    @PostMapping("/population/editTag")
+    public R editTagPopulation(@RequestBody ComMngPopulationTagDTO populationTagDTO) {
+        return comMngPopulationService.editTagPopulation(populationTagDTO);
+    }
 }

--
Gitblit v1.7.1