Jelajahi Sumber

测试数据用

chenendian 1 bulan lalu
induk
melakukan
d393e077fe

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

@@ -17,7 +17,6 @@ import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 
 import javax.servlet.http.HttpServletResponse;
-import java.io.PrintStream;
 import java.util.*;
 
 /**

+ 11 - 10
siwei-modules/siwei-apply/src/main/java/com/siwei/apply/service/cadastre/impl/SupplyServiceImpl.java

@@ -392,12 +392,12 @@ public class SupplyServiceImpl implements ISupplyService {
 
     @Override
     public LandSupplyReportVO getTdgyPurposeReport(String startYear, String endYear){
-        List<TdgyStatisticsRes> completeList = dgyMapper.getListByYear(null, null, startYear, endYear);
-
-//        SupplyYearStatisticsRes res = new SupplyYearStatisticsRes();
-//        GongdiJihuaFilterVo filterVo = new GongdiJihuaFilterVo();
-//        filterVo.setPageSize(100000);
-//        List<GongdiJihua> completeList = gongdiJihuaMapper.getList(filterVo);
+        //List<TdgyStatisticsRes> completeList = dgyMapper.getListByYear(null, null, startYear, endYear);
+        //todo 这里需要修改
+        SupplyYearStatisticsRes res = new SupplyYearStatisticsRes();
+        GongdiJihuaFilterVo filterVo = new GongdiJihuaFilterVo();
+        filterVo.setPageSize(100000);
+        List<GongdiJihua> completeList = gongdiJihuaMapper.getList(filterVo);
 
         if (CollectionUtils.isEmpty(completeList)) {
             return new LandSupplyReportVO();
@@ -412,7 +412,7 @@ public class SupplyServiceImpl implements ISupplyService {
 
         // 2. 统计年份并排序
         Set<Integer> yearSet = new TreeSet<>();
-        for (TdgyStatisticsRes item : completeList) {
+        for (GongdiJihua item : completeList) {
             if (item.getGysj() != null) {
                 yearSet.add(item.getGysj().getYear() + 1900);
             }
@@ -423,10 +423,11 @@ public class SupplyServiceImpl implements ISupplyService {
         // Map<一级分类名称, Map<供应方式, Map<年份, 面积汇总>>>
         Map<String, Map<String, Map<String, Double>>> stats = new HashMap<>();
 
-        for (TdgyStatisticsRes item : completeList) {
+        for (GongdiJihua item : completeList) {
             if (item.getGysj() == null || item.getTdyt() == null || item.getTdyt().length() < 2) continue;
-            //String firstLevelCode  = LandUseTypeEnum.getCodeByName(item.getTdyt());
-            String firstLevelCode = item.getTdyt().substring(0, 2);
+            String firstLevelCode  = LandUseTypeEnum.getCodeByName(item.getTdyt());
+            //todo 这里需要修改
+            //String firstLevelCode = item.getTdyt().substring(0, 2);
             String parentName = codeToFirstName.getOrDefault(firstLevelCode, "其他");
             String year = String.valueOf(item.getGysj().getYear() + 1900);
             String gyfs = "划拨".equals(item.getGyfs()) ? "划拨" : ("出让".equals(item.getGyfs()) ? "出让" : "其他");