|
@@ -17,7 +17,6 @@ import org.apache.commons.collections4.CollectionUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
|
|
-import java.time.LocalDate;
|
|
|
|
|
import java.util.*;
|
|
import java.util.*;
|
|
|
import java.util.stream.Collectors;
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
|
@@ -39,7 +38,6 @@ public class SupplyServiceImpl implements ISupplyService {
|
|
|
@Override
|
|
@Override
|
|
|
public Object GetList(String param) {
|
|
public Object GetList(String param) {
|
|
|
|
|
|
|
|
-
|
|
|
|
|
return null;
|
|
return null;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -56,7 +54,17 @@ public class SupplyServiceImpl implements ISupplyService {
|
|
|
filterVo.setYear(year);
|
|
filterVo.setYear(year);
|
|
|
filterVo.setPageSize(100000);
|
|
filterVo.setPageSize(100000);
|
|
|
List<GongdiJihua> list = gongdiJihuaMapper.getList(filterVo);
|
|
List<GongdiJihua> list = gongdiJihuaMapper.getList(filterVo);
|
|
|
- List<TdgyStatisticsRes> completeList = dgyMapper.getListByYear(year, null, null, null);
|
|
|
|
|
|
|
+
|
|
|
|
|
+ //这里合并两部分数据
|
|
|
|
|
+ List<TdgyStatisticsRes> completeList = new ArrayList<>();
|
|
|
|
|
+ List<TdgyStatisticsRes> completeBusinessStatusList = dgyMapper.getListByYear(year, null, null, null);
|
|
|
|
|
+ List<TdgyStatisticsRes> completeSjgdList = dgyMapper.getSjgdListByYear(year, null, null, null);
|
|
|
|
|
+ if(CollectionUtils.isNotEmpty(completeBusinessStatusList)){
|
|
|
|
|
+ completeList.addAll(completeBusinessStatusList);
|
|
|
|
|
+ }
|
|
|
|
|
+ if(CollectionUtils.isNotEmpty(completeSjgdList)){
|
|
|
|
|
+ completeList.addAll(completeSjgdList);
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
if(CollectionUtils.isNotEmpty(list)) {
|
|
if(CollectionUtils.isNotEmpty(list)) {
|
|
|
double completeRate =0;
|
|
double completeRate =0;
|
|
@@ -191,14 +199,18 @@ public class SupplyServiceImpl implements ISupplyService {
|
|
|
*/
|
|
*/
|
|
|
@Override
|
|
@Override
|
|
|
public TrendStatisticsRes trendStatistics(String landType) {
|
|
public TrendStatisticsRes trendStatistics(String landType) {
|
|
|
|
|
+ //这里合并两部分数据
|
|
|
|
|
+ List<TdgyStatisticsRes> completeList = new ArrayList<>();
|
|
|
|
|
+ List<TdgyStatisticsRes> completeBusinessStatusList = dgyMapper.getListByYear(null, landType, null, null);
|
|
|
|
|
+ List<TdgyStatisticsRes> completeSjgdList = dgyMapper.getSjgdListByYear(null, landType, null, null);
|
|
|
|
|
+ if(CollectionUtils.isNotEmpty(completeBusinessStatusList)){
|
|
|
|
|
+ completeList.addAll(completeBusinessStatusList);
|
|
|
|
|
+ }
|
|
|
|
|
+ if(CollectionUtils.isNotEmpty(completeSjgdList)){
|
|
|
|
|
+ completeList.addAll(completeSjgdList);
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
- List<TdgyStatisticsRes> completeList = dgyMapper.getListByYear(null, landType, null, null);
|
|
|
|
|
-
|
|
|
|
|
TrendStatisticsRes res = new TrendStatisticsRes();
|
|
TrendStatisticsRes res = new TrendStatisticsRes();
|
|
|
List<Map<String, Object>> areaTrendStatisticsList = new ArrayList<>();
|
|
List<Map<String, Object>> areaTrendStatisticsList = new ArrayList<>();
|
|
|
List<Map<String, Object>> supplyModeStatisticsList = new ArrayList<>();
|
|
List<Map<String, Object>> supplyModeStatisticsList = new ArrayList<>();
|
|
@@ -253,10 +265,16 @@ public class SupplyServiceImpl implements ISupplyService {
|
|
|
LandSupplyReportDTO report = new LandSupplyReportDTO();
|
|
LandSupplyReportDTO report = new LandSupplyReportDTO();
|
|
|
report.setTitle("土地供应进度分析报表");
|
|
report.setTitle("土地供应进度分析报表");
|
|
|
report.setStatTimeRange(startTime + " 至 " + endTime);
|
|
report.setStatTimeRange(startTime + " 至 " + endTime);
|
|
|
-
|
|
|
|
|
- // 获取时间范围内的完成数据
|
|
|
|
|
- List<TdgyStatisticsRes> completeList = dgyMapper.getListByYear(null, null, startTime, endTime);
|
|
|
|
|
-
|
|
|
|
|
|
|
+ //获取时间范围内的完成数据
|
|
|
|
|
+ List<TdgyStatisticsRes> completeList = new ArrayList<>();
|
|
|
|
|
+ List<TdgyStatisticsRes> completeBusinessStatusList = dgyMapper.getListByYear(null, null, startTime, endTime);
|
|
|
|
|
+ List<TdgyStatisticsRes> completeSjgdList = dgyMapper.getSjgdListByYear(null, null, startTime, endTime);
|
|
|
|
|
+ if(CollectionUtils.isNotEmpty(completeBusinessStatusList)){
|
|
|
|
|
+ completeList.addAll(completeBusinessStatusList);
|
|
|
|
|
+ }
|
|
|
|
|
+ if(CollectionUtils.isNotEmpty(completeSjgdList)){
|
|
|
|
|
+ completeList.addAll(completeSjgdList);
|
|
|
|
|
+ }
|
|
|
// 获取时间范围内的计划数据
|
|
// 获取时间范围内的计划数据
|
|
|
Map<String, Object> planSummary = gongdiJihuaMapper.getPlanSummaryByTimeRange(startTime, endTime);
|
|
Map<String, Object> planSummary = gongdiJihuaMapper.getPlanSummaryByTimeRange(startTime, endTime);
|
|
|
List<Map<String, Object>> planStatsByLandType = gongdiJihuaMapper.getPlanStatsByLandType(startTime, endTime);
|
|
List<Map<String, Object>> planStatsByLandType = gongdiJihuaMapper.getPlanStatsByLandType(startTime, endTime);
|
|
@@ -403,10 +421,21 @@ public class SupplyServiceImpl implements ISupplyService {
|
|
|
public LandSupplyReportVO getTdgyPurposeReport(String startYear, String endYear){
|
|
public LandSupplyReportVO getTdgyPurposeReport(String startYear, String endYear){
|
|
|
//List<TdgyStatisticsRes> completeList = dgyMapper.getListByYear(null, null, startYear, endYear);
|
|
//List<TdgyStatisticsRes> completeList = dgyMapper.getListByYear(null, null, startYear, endYear);
|
|
|
//todo 这里需要修改
|
|
//todo 这里需要修改
|
|
|
- SupplyYearStatisticsRes res = new SupplyYearStatisticsRes();
|
|
|
|
|
- GongdiJihuaFilterVo filterVo = new GongdiJihuaFilterVo();
|
|
|
|
|
- filterVo.setPageSize(100000);
|
|
|
|
|
- List<GongdiJihua> completeList = gongdiJihuaMapper.getList(filterVo);
|
|
|
|
|
|
|
+// SupplyYearStatisticsRes res = new SupplyYearStatisticsRes();
|
|
|
|
|
+// GongdiJihuaFilterVo filterVo = new GongdiJihuaFilterVo();
|
|
|
|
|
+// filterVo.setPageSize(100000);
|
|
|
|
|
+// List<GongdiJihua> completeList = gongdiJihuaMapper.getList(filterVo);
|
|
|
|
|
+
|
|
|
|
|
+ //这里合并两部分数据
|
|
|
|
|
+ List<TdgyStatisticsRes> completeList = new ArrayList<>();
|
|
|
|
|
+ List<TdgyStatisticsRes> completeBusinessStatusList = dgyMapper.getListByYear(null, null, startYear, endYear);
|
|
|
|
|
+ List<TdgyStatisticsRes> completeSjgdList = dgyMapper.getSjgdListByYear(null, null, startYear, endYear);
|
|
|
|
|
+ if(CollectionUtils.isNotEmpty(completeBusinessStatusList)){
|
|
|
|
|
+ completeList.addAll(completeBusinessStatusList);
|
|
|
|
|
+ }
|
|
|
|
|
+ if(CollectionUtils.isNotEmpty(completeSjgdList)){
|
|
|
|
|
+ completeList.addAll(completeSjgdList);
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
if (CollectionUtils.isEmpty(completeList)) {
|
|
if (CollectionUtils.isEmpty(completeList)) {
|
|
|
return new LandSupplyReportVO();
|
|
return new LandSupplyReportVO();
|
|
@@ -421,7 +450,7 @@ public class SupplyServiceImpl implements ISupplyService {
|
|
|
|
|
|
|
|
// 2. 统计年份并排序
|
|
// 2. 统计年份并排序
|
|
|
Set<Integer> yearSet = new TreeSet<>();
|
|
Set<Integer> yearSet = new TreeSet<>();
|
|
|
- for (GongdiJihua item : completeList) {
|
|
|
|
|
|
|
+ for (TdgyStatisticsRes item : completeList) {
|
|
|
if (item.getGysj() != null) {
|
|
if (item.getGysj() != null) {
|
|
|
yearSet.add(item.getGysj().getYear() + 1900);
|
|
yearSet.add(item.getGysj().getYear() + 1900);
|
|
|
}
|
|
}
|
|
@@ -432,11 +461,10 @@ public class SupplyServiceImpl implements ISupplyService {
|
|
|
// Map<一级分类名称, Map<供应方式, Map<年份, 面积汇总>>>
|
|
// Map<一级分类名称, Map<供应方式, Map<年份, 面积汇总>>>
|
|
|
Map<String, Map<String, Map<String, Double>>> stats = new HashMap<>();
|
|
Map<String, Map<String, Map<String, Double>>> stats = new HashMap<>();
|
|
|
|
|
|
|
|
- for (GongdiJihua item : completeList) {
|
|
|
|
|
|
|
+ for (TdgyStatisticsRes item : completeList) {
|
|
|
if (item.getGysj() == null || item.getTdyt() == null || item.getTdyt().length() < 2) continue;
|
|
if (item.getGysj() == null || item.getTdyt() == null || item.getTdyt().length() < 2) continue;
|
|
|
- String firstLevelCode = LandUseTypeEnum.getCodeByName(item.getTdyt());
|
|
|
|
|
- //todo 这里需要修改
|
|
|
|
|
- //String firstLevelCode = item.getTdyt().substring(0, 2);
|
|
|
|
|
|
|
+ //String firstLevelCode = LandUseTypeEnum.getCodeByName(item.getTdyt());
|
|
|
|
|
+ String firstLevelCode = item.getTdyt().substring(0, 2);
|
|
|
String parentName = codeToFirstName.getOrDefault(firstLevelCode, "其他");
|
|
String parentName = codeToFirstName.getOrDefault(firstLevelCode, "其他");
|
|
|
String year = String.valueOf(item.getGysj().getYear() + 1900);
|
|
String year = String.valueOf(item.getGysj().getYear() + 1900);
|
|
|
String gyfs = "划拨".equals(item.getGyfs()) ? "划拨" : ("出让".equals(item.getGyfs()) ? "出让" : "其他");
|
|
String gyfs = "划拨".equals(item.getGyfs()) ? "划拨" : ("出让".equals(item.getGyfs()) ? "出让" : "其他");
|
|
@@ -529,8 +557,18 @@ public class SupplyServiceImpl implements ISupplyService {
|
|
|
return vo;
|
|
return vo;
|
|
|
}).collect(Collectors.toList());
|
|
}).collect(Collectors.toList());
|
|
|
}else if(supplyType == 2){
|
|
}else if(supplyType == 2){
|
|
|
- List<TdgyStatisticsRes> completeList = dgyMapper.getListByYear(year, null, null, null);
|
|
|
|
|
- resList = completeList.stream().map(item -> {
|
|
|
|
|
|
|
+ //这里合并两部分数据
|
|
|
|
|
+ List<TdgyStatisticsRes> completeList = new ArrayList<>();
|
|
|
|
|
+ List<TdgyStatisticsRes> completeBusinessStatusList = dgyMapper.getListByYear(year, null, null, null);
|
|
|
|
|
+ List<TdgyStatisticsRes> completeSjgdList = dgyMapper.getSjgdListByYear(year, null, null, null);
|
|
|
|
|
+ if(CollectionUtils.isNotEmpty(completeBusinessStatusList)){
|
|
|
|
|
+ completeList.addAll(completeBusinessStatusList);
|
|
|
|
|
+ }
|
|
|
|
|
+ if(CollectionUtils.isNotEmpty(completeSjgdList)){
|
|
|
|
|
+ completeList.addAll(completeSjgdList);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ resList = completeList.stream().map(item -> {
|
|
|
LandSupplyProjectVO vo = new LandSupplyProjectVO();
|
|
LandSupplyProjectVO vo = new LandSupplyProjectVO();
|
|
|
vo.setProjectPropertyId(item.getProjectId());
|
|
vo.setProjectPropertyId(item.getProjectId());
|
|
|
vo.setProjectName(item.getXmmc());
|
|
vo.setProjectName(item.getXmmc());
|
|
@@ -558,9 +596,16 @@ public class SupplyServiceImpl implements ISupplyService {
|
|
|
vo.setGeom(item.getGeom());
|
|
vo.setGeom(item.getGeom());
|
|
|
return vo;
|
|
return vo;
|
|
|
}).collect(Collectors.toList());
|
|
}).collect(Collectors.toList());
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
- List<TdgyStatisticsRes> completeList = dgyMapper.getListByYear(year, null, null, null);
|
|
|
|
|
|
|
+ //这里合并两部分数据
|
|
|
|
|
+ List<TdgyStatisticsRes> completeList = new ArrayList<>();
|
|
|
|
|
+ List<TdgyStatisticsRes> completeBusinessStatusList = dgyMapper.getListByYear(year, null, null, null);
|
|
|
|
|
+ List<TdgyStatisticsRes> completeSjgdList = dgyMapper.getSjgdListByYear(year, null, null, null);
|
|
|
|
|
+ if(CollectionUtils.isNotEmpty(completeBusinessStatusList)){
|
|
|
|
|
+ completeList.addAll(completeBusinessStatusList);
|
|
|
|
|
+ }
|
|
|
|
|
+ if(CollectionUtils.isNotEmpty(completeSjgdList)){
|
|
|
|
|
+ completeList.addAll(completeSjgdList);
|
|
|
|
|
+ }
|
|
|
List<LandSupplyProjectVO> resList2 = completeList.stream().map(item -> {
|
|
List<LandSupplyProjectVO> resList2 = completeList.stream().map(item -> {
|
|
|
LandSupplyProjectVO vo = new LandSupplyProjectVO();
|
|
LandSupplyProjectVO vo = new LandSupplyProjectVO();
|
|
|
vo.setProjectPropertyId(item.getProjectId());
|
|
vo.setProjectPropertyId(item.getProjectId());
|