1
0
Эх сурвалжийг харах

增加-业务应用-土地供应统计接口定义

chenendian 5 сар өмнө
parent
commit
eb107880da

+ 206 - 0
siwei-modules/siwei-apply/src/main/java/com/siwei/apply/controller/cadastre/SupplyController.java

@@ -0,0 +1,206 @@
+package com.siwei.apply.controller.cadastre;
+
+import com.siwei.apply.domain.res.*;
+import com.siwei.apply.service.cadastre.IZymlService;
+import com.siwei.common.core.domain.R;
+import com.siwei.common.core.web.controller.BaseController;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+
+/**
+ * 地籍土地供应模块
+ *
+ */
+
+@RestController
+@RequestMapping("/cadastre/supply")
+public class SupplyController extends BaseController {
+
+    @Autowired
+    private IZymlService zymlService;
+
+    /**
+     * 年度统计
+     */
+    @GetMapping("/yearStatistics/{year}")
+    public R<SupplyYearStatisticsRes> getYearStatistics(@PathVariable String year) {
+        try {
+            SupplyYearStatisticsRes res = new SupplyYearStatisticsRes();
+            if(year.equalsIgnoreCase("2024")){
+                SupplyRateRes supplyRate= new SupplyRateRes();
+                List<LandUseRes> landUseStatisticsList = List.of(); //用途分析
+                List<ProjectSupplyRes> projectSupplyList = List.of(); //  供应方式
+
+                supplyRate.setCompleteRate(78);
+                supplyRate.setPlanProjectCount(15);
+                supplyRate.setCompleteProjectCount(11);
+                supplyRate.setPlanArea(788.6f);
+                supplyRate.setCompleteArea(548.2f);
+                supplyRate.setGdUnit("亩");
+                res.setSupplyRate(supplyRate);
+
+                //--------------土地用途分析----------------------
+
+                LandUseRes   landUse1 = new LandUseRes();
+                landUse1.setLandUseTypeName("城镇住宅用地");
+                landUse1.setPlanLandUseArea(700);
+                landUse1.setCompleteLandUseArea(300);
+
+                LandUseRes   landUse2 = new LandUseRes();
+                landUse2.setLandUseTypeName("教育用地");
+                landUse2.setPlanLandUseArea(900);
+                landUse2.setCompleteLandUseArea(600);
+
+                landUseStatisticsList.addAll(List.of(landUse1,landUse2));
+                res.setLandUseStatisticsList(landUseStatisticsList);
+                //--------------供应方式----------------------
+
+                ProjectSupplyRes  projectSupply1 = new ProjectSupplyRes();
+                projectSupply1.setGdArea(263.12f);
+                projectSupply1.setGdType("出让");
+                projectSupply1.setGdUnit("亩");
+
+                ProjectSupplyRes  projectSupply2 = new ProjectSupplyRes();
+                projectSupply2.setGdArea(220.12f);
+                projectSupply2.setGdType("划拨");
+                projectSupply2.setGdUnit("亩");
+
+                ProjectSupplyRes  projectSupply3 = new ProjectSupplyRes();
+                projectSupply2.setGdArea(190.12f);
+                projectSupply2.setGdType("其它");
+                projectSupply2.setGdUnit("亩");
+
+                projectSupplyList.addAll(List.of(projectSupply1,projectSupply2,projectSupply3));
+                res.setProjectSupplyList(projectSupplyList);
+
+            }else  if(year.equalsIgnoreCase("2025")){
+
+
+            }else  if(year.equalsIgnoreCase("2026")){
+
+
+            }
+
+
+            return R.ok(res);
+        } catch (Exception e) {
+            return R.fail(e.getMessage());
+        }
+    }
+
+
+
+    /**
+     *
+     * 趋势统计
+     *
+     */
+    @GetMapping("/trendStatistics/{landType}")
+    public R<TrendStatisticsRes> getTrendStatistics(@PathVariable String landType) {
+        try {
+            TrendStatisticsRes res = new TrendStatisticsRes();
+            List<Map<String,Object>> areaTrendStatisticsList = List.of(); // 面积趋势分析list
+            List<Map<String,Object>>  supplyModeStatisticsList = List.of(); // 供应方式分析list
+
+            Map<String,Object> map1 = new HashMap<>();
+            map1.put("year",2023);
+            map1.put("area",3365.22);
+
+            Map<String,Object> map2 = new HashMap<>();
+            map1.put("year",2024);
+            map1.put("area",18900.35);
+
+            Map<String,Object> map3 = new HashMap<>();
+            map1.put("year",2025);
+            map1.put("area",2000.35);
+            areaTrendStatisticsList.addAll(List.of(map1,map2,map3));
+            res.setAreaTrendStatisticsList(areaTrendStatisticsList);
+
+            //--------------下面为供地方式list----------------------
+            Map<String,Object> modeMap1 = new HashMap<>();
+            modeMap1.put("year",2023);
+            modeMap1.put("transferArea",587.7); //出让
+            modeMap1.put("allocateArea",500.5); // 划拨区域
+            modeMap1.put("otherArea",498.23); // 其它区域面积
+            supplyModeStatisticsList.add(modeMap1);
+            res.setSupplyModeStatisticsList(supplyModeStatisticsList);
+
+            return R.ok(res);
+        } catch (Exception e) {
+            return R.fail(e.getMessage());
+        }
+    }
+
+
+
+
+
+
+
+
+/*
+    */
+/**
+     * 获取资源目录列表
+     *
+     * @param param 预留
+     * @return
+     *//*
+
+    @GetMapping("/GetList")
+    public R GetList(String param) {
+        R list = zymlService.GetList(param);
+        return list;
+    }
+
+    */
+/**
+     * 获取资源目录列表
+     *
+     * @param param 预留
+     * @return
+     *//*
+
+    @GetMapping("/GetTree")
+    public R GetTree(String param) {
+        R list = zymlService.GetTree(param);
+        return list;
+    }
+
+*/
+
+
+
+
+
+//    /**
+//     * 根据标识码获取资源详情
+//     *
+//     * @param bsm
+//     * @return
+//     */
+//    @RequestMapping("/GetByBsm")
+//    public R GetByBsm(String bsm) {
+//        R list = zymlService.GetByBsm(bsm);
+//        return list;
+//    }
+//
+//    /**
+//     * 获取我收藏的资源列表
+//     *
+//     * @param param 预留
+//     * @return
+//     */
+//    @GetMapping("/GetMyCollect")
+//    public R GetMyCollect(String param) {
+//        R list = zymlService.GetMyCollect(param);
+//        return list;
+//    }
+
+
+}

+ 14 - 0
siwei-modules/siwei-apply/src/main/java/com/siwei/apply/domain/res/LandUseRes.java

@@ -0,0 +1,14 @@
+package com.siwei.apply.domain.res;
+
+import lombok.Data;
+
+
+/**
+ * 土地用途res
+ */
+@Data
+public class LandUseRes {
+    private String landUseTypeName; // 用地类型名称
+    private Integer planLandUseArea; // 计划面积
+    private Integer completeLandUseArea; // 实际完成面积
+}

+ 18 - 0
siwei-modules/siwei-apply/src/main/java/com/siwei/apply/domain/res/SupplyRateRes.java

@@ -0,0 +1,18 @@
+package com.siwei.apply.domain.res;
+
+import lombok.Data;
+
+/**
+ * 年度分析
+ * 供应率
+ */
+@Data
+public class SupplyRateRes {
+    private Integer  planProjectCount;
+    private Integer  completeProjectCount;
+    private Integer completeRate;
+    private Float  planArea;
+    private Float  completeArea;
+    private String gdUnit;// 供地单位
+
+}

+ 16 - 0
siwei-modules/siwei-apply/src/main/java/com/siwei/apply/domain/res/SupplyYearStatisticsRes.java

@@ -0,0 +1,16 @@
+package com.siwei.apply.domain.res;
+
+import lombok.Data;
+
+import java.util.List;
+
+/**
+ * 项目概览响应类
+ * 用于展示项目的概览信息
+ */
+@Data
+public class SupplyYearStatisticsRes {
+    private SupplyRateRes supplyRate; // 供应率对象
+    private List<LandUseRes> landUseStatisticsList; // 土地用途分析list
+    private List<ProjectSupplyRes> projectSupplyList; //供应方式分析
+}

+ 16 - 0
siwei-modules/siwei-apply/src/main/java/com/siwei/apply/domain/res/TrendStatisticsRes.java

@@ -0,0 +1,16 @@
+package com.siwei.apply.domain.res;
+
+import lombok.Data;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 项目概览响应类
+ * 用于展示项目的概览信息
+ */
+@Data
+public class TrendStatisticsRes {
+    private List<Map<String,Object>> areaTrendStatisticsList; // 面积趋势分析list
+    private List<Map<String,Object>>  supplyModeStatisticsList; // 供应方式分析list
+}