|
|
@@ -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());
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+}
|