Explorar el Código

关于收储统计信息

chenendian hace 5 meses
padre
commit
b8707088c6

+ 195 - 0
siwei-modules/siwei-apply/src/main/java/com/siwei/apply/controller/cadastre/StorageController.java

@@ -0,0 +1,195 @@
+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/storage")
+public class StorageController extends BaseController {
+
+    @Autowired
+    private IZymlService zymlService;
+
+
+
+    /**
+     * 年度统计
+     */
+    @GetMapping("/yearStatistics/{year}")
+    public R<StorageYearStatisticsRes> getYearStatistics(@PathVariable String year) {
+        try {
+            StorageYearStatisticsRes res = new StorageYearStatisticsRes();
+            if (year.equalsIgnoreCase("2024")) {
+                StorageRateRes storageRate = new StorageRateRes();
+
+                List<LandUseRes> landUseStatisticsList = new java.util.ArrayList<>(List.of()); // 用途分析
+                List<ProjectSupplyRes> projectSupplyList = new java.util.ArrayList<>(List.of()); // 供应方式
+                storageRate.setCompleteRate(78);
+                storageRate.setPlanProjectCount(15);
+                storageRate.setCompleteProjectCount(11);
+                storageRate.setPlanArea(788.6f);
+                storageRate.setCompleteArea(548.2f);
+                storageRate.setGdUnit("亩");
+                storageRate.setEstimatedCost(1254.6f);
+                storageRate.setExpenditureCost(1000.3f);
+                res.setStorageRate(storageRate);
+
+
+                // --------------土地用途分析----------------------
+
+                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();
+                projectSupply3.setGdArea(190.12f);
+                projectSupply3.setGdType("其它");
+                projectSupply3.setGdUnit("亩");
+
+                projectSupplyList.addAll(List.of(projectSupply1, projectSupply2, projectSupply3));
+                res.setProjectSupplyList(projectSupplyList);
+
+            } else if (year.equalsIgnoreCase("2025") || year.equalsIgnoreCase("2026")) {
+                StorageRateRes storageRate = new StorageRateRes();
+                List<LandUseRes> landUseStatisticsList = new java.util.ArrayList<>(List.of()); // 用途分析
+                List<ProjectSupplyRes> projectSupplyList = new java.util.ArrayList<>(List.of()); // 供应方式
+                storageRate.setCompleteRate(78 + (int) (Math.random() * 10));
+                storageRate.setPlanProjectCount(15 + (int) (Math.random() * 5));
+                storageRate.setCompleteProjectCount(11 + (int) (Math.random() * 5));
+                storageRate.setPlanArea(788.6f + (float) (Math.random() * 100));
+                storageRate.setCompleteArea(548.2f + (float) (Math.random() * 100));
+                storageRate.setGdUnit("亩");
+                storageRate.setEstimatedCost(1254.6f);
+                storageRate.setExpenditureCost(1000.3f);
+                res.setStorageRate(storageRate);
+
+                // --------------土地用途分析----------------------
+                // 城镇住宅用地,教育用地,商业用地,工业用地,物流仓储用地,公路用地,工业绿地
+                String[] landTypes = { "城镇住宅用地", "教育用地", "商业用地", "工业用地", "物流仓储用地", "公路用地", "工业绿地" };
+                for (String type : landTypes) {
+                    LandUseRes landUse = new LandUseRes();
+                    landUse.setLandUseTypeName(type);
+                    // 随机生成面积
+                    landUse.setPlanLandUseArea(Integer.parseInt(String.valueOf(500 + (int) (Math.random() * 500))));
+                    landUse.setCompleteLandUseArea(Integer.parseInt(String.valueOf(300 + (int) (Math.random() * 300))));
+                    landUseStatisticsList.add(landUse);
+                }
+                res.setLandUseStatisticsList(landUseStatisticsList);
+
+                // --------------供应方式----------------------
+
+                ProjectSupplyRes projectSupply1 = new ProjectSupplyRes();
+                projectSupply1.setGdArea(263.12f + (float) (Math.random() * 100));
+                projectSupply1.setGdType("出让");
+                projectSupply1.setGdUnit("亩");
+
+                ProjectSupplyRes projectSupply2 = new ProjectSupplyRes();
+                projectSupply2.setGdArea(220.12f + (float) (Math.random() * 100));
+                projectSupply2.setGdType("划拨");
+                projectSupply2.setGdUnit("亩");
+
+                ProjectSupplyRes projectSupply3 = new ProjectSupplyRes();
+                projectSupply3.setGdArea(190.12f + (float) (Math.random() * 100));
+                projectSupply3.setGdType("其它");
+                projectSupply3.setGdUnit("亩");
+
+                projectSupplyList.addAll(List.of(projectSupply1, projectSupply2, projectSupply3));
+                res.setProjectSupplyList(projectSupplyList);
+
+            }
+
+            return R.ok(res);
+        } catch (Exception e) {
+            e.printStackTrace();
+            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 = new java.util.ArrayList<>(List.of()); // 面积趋势分析list
+            List<Map<String, Object>> supplyModeStatisticsList = new java.util.ArrayList<>(List.of()); // 供应方式分析list
+
+            Map<String, Object> map1 = new HashMap<>();
+            map1.put("year", 2023);
+            map1.put("area", 3365.22);
+
+            Map<String, Object> map2 = new HashMap<>();
+            map2.put("year", 2024);
+            map2.put("area", 18900.35);
+
+            Map<String, Object> map3 = new HashMap<>();
+            map3.put("year", 2025);
+            map3.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);
+
+            Map<String, Object> modeMap2 = new HashMap<>();
+            modeMap2.put("year", 2024);
+            modeMap2.put("transferArea", 487.7); // 出让
+            modeMap2.put("allocateArea", 400.5); // 划拨区域
+            modeMap2.put("otherArea", 398.23); // 其它区域面积
+            supplyModeStatisticsList.add(modeMap2);
+
+            Map<String, Object> modeMap3 = new HashMap<>();
+            modeMap3.put("year", 2025);
+            modeMap3.put("transferArea", 487.7); // 出让
+            modeMap3.put("allocateArea", 400.5); // 划拨区域
+            modeMap3.put("otherArea", 398.23); // 其它区域面积
+            supplyModeStatisticsList.add(modeMap2);
+            res.setSupplyModeStatisticsList(supplyModeStatisticsList);
+            return R.ok(res);
+        } catch (Exception e) {
+            return R.fail(e.getMessage());
+        }
+    }
+
+}

+ 19 - 0
siwei-modules/siwei-apply/src/main/java/com/siwei/apply/domain/res/StorageRateRes.java

@@ -0,0 +1,19 @@
+package com.siwei.apply.domain.res;
+
+import lombok.Data;
+
+/**
+ * 收储进度
+ * 供应率
+ */
+@Data
+public class StorageRateRes {
+    private Integer  planProjectCount;
+    private Integer  completeProjectCount;
+    private Integer completeRate;
+    private Float  planArea;
+    private Float  completeArea;
+    private String gdUnit; //供地单位
+    private Float estimatedCost; // 供地成本
+    private Float expenditureCost ;// 支出收储成本
+}

+ 17 - 0
siwei-modules/siwei-apply/src/main/java/com/siwei/apply/domain/res/StorageYearStatisticsRes.java

@@ -0,0 +1,17 @@
+package com.siwei.apply.domain.res;
+
+import lombok.Data;
+
+import java.util.List;
+
+/**
+ *
+ * 收储进度统计
+ */
+@Data
+public class StorageYearStatisticsRes {
+    private StorageRateRes storageRate; // 供应率对象
+    private List<LandUseRes> landUseStatisticsList; // 土地用途分析list
+    private List<ProjectSupplyRes> projectSupplyList; //供应方式分析
+
+}

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

@@ -5,8 +5,8 @@ import lombok.Data;
 import java.util.List;
 
 /**
- * 项目概览响应类
- * 用于展示项目的概览信息
+ *
+ * 供应进度统计
  */
 @Data
 public class SupplyYearStatisticsRes {