Browse Source

收储样例实际2

chenendian 1 day ago
parent
commit
d651604933

+ 28 - 14
siwei-modules/siwei-apply/src/main/java/com/siwei/apply/controller/cadastre/StorageController.java

@@ -42,16 +42,19 @@ public class StorageController extends BaseController {
                 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(17);
-                storageRate.setPlanArea(788.6f);
-                storageRate.setCompleteArea(548.2f);
+                storageRate.setCompleteRate(63 + (int) (Math.random() * 10));
+                storageRate.setPlanProjectCount(33 + (int) (Math.random() * 5));
+                storageRate.setCompleteProjectCount(21 + (int) (Math.random() * 5));
+
+                storageRate.setPlanArea((float) (Math.round((788.6f + (float) (Math.random() * 100)) * 100) / 100.0));
+                storageRate.setCompleteArea((float) (Math.round((548.2f + (float) (Math.random() * 100)) * 100) / 100.0));
                 storageRate.setGdUnit("亩");
-                storageRate.setEstimatedCost(1254.6f);
-                storageRate.setExpenditureCost(1000.3f);
+                storageRate.setEstimatedCost(349338.6f);
+                storageRate.setExpenditureCost(109300.3f);
                 res.setStorageRate(storageRate);
+
                 // --------------土地用途分析----------------------
 
                 LandUseRes landUse1 = new LandUseRes();
@@ -99,17 +102,28 @@ public class StorageController extends BaseController {
             } else if (year.equalsIgnoreCase("2025") ) {
                 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(33 + (int) (Math.random() * 5));
-                storageRate.setCompleteProjectCount(31 + (int) (Math.random() * 5));
-                storageRate.setPlanArea((float) (Math.round((788.6f + (float) (Math.random() * 100)) * 100) / 100.0));
-                storageRate.setCompleteArea((float) (Math.round((548.2f + (float) (Math.random() * 100)) * 100) / 100.0));
+                storageRate.setCompleteRate(46);
+                storageRate.setPlanProjectCount(15);
+                storageRate.setCompleteProjectCount(7);
+
+                storageRate.setPlanArea(1788.6f);
+                storageRate.setCompleteArea(445.2f);
                 storageRate.setGdUnit("亩");
-                storageRate.setEstimatedCost(1254.6f);
-                storageRate.setExpenditureCost(1000.3f);
+                storageRate.setEstimatedCost(149338.6f);
+                storageRate.setExpenditureCost(89338.3f);
                 res.setStorageRate(storageRate);
 
+
+
+
+
+
+
+
+
                 // --------------土地用途分析----------------------
                 // 城镇住宅用地,教育用地,商业用地,工业用地,物流仓储用地,公路用地,工业绿地
                 String[] landTypes = { "城镇住宅用地", "教育用地", "商业用地", "工业用地", "物流仓储用地", "公路用地", "工业绿地" };

+ 6 - 1
siwei-modules/siwei-apply/src/main/java/com/siwei/apply/service/cadastre/impl/StorageServiceImpl.java

@@ -98,7 +98,10 @@ public class StorageServiceImpl {
         }else if(supplyType == 2){
             //这里合并两部分数据
             List<TdgyStatisticsRes> completeList = new ArrayList<>();
-            List<TdgyStatisticsRes> sjgdList = gjShijiShouchuMapper.gjShijiShouchuListByYear(null, null, null, null);
+            if(!year.equals("2025")){
+                year = null;
+            }
+            List<TdgyStatisticsRes> sjgdList = gjShijiShouchuMapper.gjShijiShouchuListByYear(year, null, null, null);
             if (CollectionUtils.isNotEmpty(sjgdList)) {
                 completeList.addAll(sjgdList);
             }
@@ -115,8 +118,10 @@ public class StorageServiceImpl {
                     vo.setDateType("3");
                 }
                 vo.setNodeId(item.getNodeId());
+                vo.setSupplyMethod(item.getGyfs());
                 vo.setGeom(item.getGeom());
                 vo.setYear(item.getGysj());
+                vo.setArea(String.valueOf(item.getMjMu()));
                 return vo;
             }).collect(Collectors.toList());
         } else if(supplyType == 0){

+ 1 - 1
siwei-modules/siwei-apply/src/main/resources/mapper/GjShijiShouchuMapper.xml

@@ -161,7 +161,7 @@
             CAST(gid AS VARCHAR) AS nodeId,
             ytdyt AS tdyt,
             scfs AS gyfs,
-            scsj AS gysj,
+            to_timestamp(scsj, 'YYYY/MM/DD') AS gysj,
             "面积_亩" AS mjMu,
             bz,
             ST_AsEWKT(geom) AS geom