|
@@ -6,6 +6,7 @@ import com.onemap.common.core.web.domain.RequestResult;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
+import java.math.BigDecimal;
|
|
|
import java.util.HashMap;
|
|
|
import java.util.Map;
|
|
|
|
|
@@ -17,13 +18,15 @@ public class TdtjServiceImp implements TdtjService {
|
|
|
@Resource
|
|
|
private TdgyMapper tdgyMapper;
|
|
|
|
|
|
+ // TODO:只统计22年~24年的数据
|
|
|
+
|
|
|
@Override
|
|
|
public RequestResult getOverview() {
|
|
|
+ Map<String, Object> map = new HashMap<>();
|
|
|
+
|
|
|
// 获取疑似土地总数
|
|
|
Map<String, Object> suspectedRes = tdgyMapper.getCountAreaSuspected();
|
|
|
|
|
|
-
|
|
|
- Map<String, Object> map = new HashMap<>();
|
|
|
Map<String, Object> mapSuspected = new HashMap<>();
|
|
|
mapSuspected.put("area", suspectedRes.get("area"));
|
|
|
mapSuspected.put("count", suspectedRes.get("total"));
|
|
@@ -45,6 +48,16 @@ public class TdtjServiceImp implements TdtjService {
|
|
|
mapDisposal.put("count", disposalRes.get("total"));
|
|
|
map.put("disposal", mapDisposal);
|
|
|
|
|
|
+ // 获取土地闲置率
|
|
|
+ Map<String, Object> landMap = tdgyMapper.getLandCountArea();
|
|
|
+ BigDecimal landArea = (BigDecimal) landMap.get("area");
|
|
|
+ BigDecimal confirmArea = (BigDecimal) confirmRes.get("area");
|
|
|
+ map.put("idleRate", confirmArea.floatValue() / landArea.floatValue());
|
|
|
+
|
|
|
+ // 获取闲置处置率
|
|
|
+ BigDecimal disposalArea = (BigDecimal) disposalRes.get("area");
|
|
|
+ map.put("disposalRate", disposalArea.floatValue() / confirmArea.floatValue());
|
|
|
+
|
|
|
return RequestResult.success(map);
|
|
|
}
|
|
|
|