|
|
@@ -124,7 +124,8 @@ public class SupplyServiceImpl implements ISupplyService {
|
|
|
}else {
|
|
|
resList = resList.stream().filter(o->!o.getSupplyMethod().equals("出让")).filter(o->!o.getSupplyMethod().equals("划拨")).collect(Collectors.toList());
|
|
|
}
|
|
|
- } else if (StringUtils.isNotBlank(useType)) {
|
|
|
+ }
|
|
|
+ if (StringUtils.isNotBlank(useType)) {
|
|
|
String code = getTdytCodeByName(useType);
|
|
|
if(StringUtils.isNotBlank(code)){
|
|
|
resList = resList.stream().filter(o->o.getUseType().equals(code)).collect(Collectors.toList());
|
|
|
@@ -179,8 +180,6 @@ public class SupplyServiceImpl implements ISupplyService {
|
|
|
}
|
|
|
|
|
|
{
|
|
|
-
|
|
|
-
|
|
|
int size = 1;
|
|
|
if(CollectionUtils.isEmpty(list)){
|
|
|
list = new ArrayList<>();
|
|
|
@@ -378,15 +377,46 @@ public class SupplyServiceImpl implements ISupplyService {
|
|
|
map.put("area", tmpArea);
|
|
|
areaTrendStatisticsList.add(map);
|
|
|
}
|
|
|
- modeAreaByYear.forEach((year, modeAreas) -> {
|
|
|
+
|
|
|
+ //第二部分015年之前的数据折合到一个年份中
|
|
|
+ double tmpTransferArea = 0d;
|
|
|
+ double tmpAllocateArea = 0d;
|
|
|
+ double tmpOtherArea = 0d;
|
|
|
+ for (Map.Entry<Integer, Map<String, Double>> entry : modeAreaByYear.entrySet()) {
|
|
|
+ Integer year = entry.getKey();
|
|
|
+ Map<String, Double> modeAreas = entry.getValue();
|
|
|
+ if(year>tmpYear) {
|
|
|
+ Map<String, Object> map = new LinkedHashMap<>();
|
|
|
+ map.put("year", year);
|
|
|
+ map.put("transferArea", modeAreas.getOrDefault("transfer", 0.0));
|
|
|
+ map.put("allocateArea", modeAreas.getOrDefault("allocate", 0.0));
|
|
|
+ map.put("otherArea", modeAreas.getOrDefault("other", 0.0));
|
|
|
+ supplyModeStatisticsList.add(map);
|
|
|
+ }else {
|
|
|
+ tmpTransferArea += modeAreas.getOrDefault("transfer", 0.0);
|
|
|
+ tmpAllocateArea += modeAreas.getOrDefault("allocate", 0.0);
|
|
|
+ tmpOtherArea += modeAreas.getOrDefault("other", 0.0);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ {//这里把汇总的增加到返回结果中
|
|
|
Map<String, Object> map = new LinkedHashMap<>();
|
|
|
- map.put("year", year);
|
|
|
- map.put("transferArea", modeAreas.getOrDefault("transfer", 0.0));
|
|
|
- map.put("allocateArea", modeAreas.getOrDefault("allocate", 0.0));
|
|
|
- map.put("otherArea", modeAreas.getOrDefault("other", 0.0));
|
|
|
+ map.put("year", "2016年前");
|
|
|
+ map.put("transferArea", tmpTransferArea);
|
|
|
+ map.put("allocateArea", tmpAllocateArea);
|
|
|
+ map.put("otherArea", tmpOtherArea);
|
|
|
supplyModeStatisticsList.add(map);
|
|
|
- });
|
|
|
+ }
|
|
|
+
|
|
|
+// modeAreaByYear.forEach((year, modeAreas) -> {
|
|
|
+// Map<String, Object> map = new LinkedHashMap<>();
|
|
|
+// map.put("year", year);
|
|
|
+// map.put("transferArea", modeAreas.getOrDefault("transfer", 0.0));
|
|
|
+// map.put("allocateArea", modeAreas.getOrDefault("allocate", 0.0));
|
|
|
+// map.put("otherArea", modeAreas.getOrDefault("other", 0.0));
|
|
|
+// supplyModeStatisticsList.add(map);
|
|
|
+// });
|
|
|
}
|
|
|
+
|
|
|
res.setAreaTrendStatisticsList(areaTrendStatisticsList);
|
|
|
res.setSupplyModeStatisticsList(supplyModeStatisticsList);
|
|
|
return res;
|