|
@@ -1,73 +0,0 @@
|
|
|
-package com.sky.ioc.service.dashboard.impl;
|
|
|
-
|
|
|
-import com.alibaba.fastjson.JSONArray;
|
|
|
-import com.alibaba.fastjson.JSONObject;
|
|
|
-import com.sky.ioc.service.dashboard.SmartSignageService;
|
|
|
-import com.sky.ioc.tool.ReturnMsg;
|
|
|
-import org.springframework.stereotype.Service;
|
|
|
-
|
|
|
-import java.util.ArrayList;
|
|
|
-import java.util.List;
|
|
|
-import java.util.Map;
|
|
|
-
|
|
|
-/**
|
|
|
- * @author LunCe
|
|
|
- * 智能看板
|
|
|
- */
|
|
|
-
|
|
|
-@Service
|
|
|
-public class SmartSignageServiceImpl implements SmartSignageService {
|
|
|
- @Override
|
|
|
- public ReturnMsg getBuildingSituation() {
|
|
|
- JSONArray jsonArray = new JSONArray();
|
|
|
- JSONObject jsonObject = new JSONObject();
|
|
|
- jsonObject.put("total",2000);
|
|
|
- jsonObject.put("occupancy",1800);
|
|
|
- jsonObject.put("percentage","95%");
|
|
|
-
|
|
|
- JSONObject jsonObject2 = new JSONObject();
|
|
|
- jsonObject2.put("total",2000);
|
|
|
- jsonObject2.put("occupancy",1800);
|
|
|
- jsonObject2.put("percentage","97%");
|
|
|
-
|
|
|
- JSONObject jsonObject3 = new JSONObject();
|
|
|
- jsonObject3.put("total",2000);
|
|
|
- jsonObject3.put("occupancy",1800);
|
|
|
- jsonObject3.put("percentage","98%");
|
|
|
- jsonArray.add(jsonObject);
|
|
|
- jsonArray.add(jsonObject2);
|
|
|
- jsonArray.add(jsonObject3);
|
|
|
-
|
|
|
-
|
|
|
- JSONObject jsonObject1 = new JSONObject();
|
|
|
- jsonObject1.put("data",jsonArray);
|
|
|
- jsonObject1.put("totalArea","15000㎡");
|
|
|
- return ReturnMsg.ok(jsonObject1);
|
|
|
- }
|
|
|
-
|
|
|
- @Override
|
|
|
- public ReturnMsg getCarbonQuota() {
|
|
|
- List<Map<String,Object>> listMap = new ArrayList<>();
|
|
|
- listMap.get(0).put("info","上分");
|
|
|
- listMap.get(0).put("consumed",500);
|
|
|
- listMap.get(0).put("carbonQuota",100);
|
|
|
-
|
|
|
- listMap.get(1).put("info","广分");
|
|
|
- listMap.get(1).put("consumed",500);
|
|
|
- listMap.get(1).put("carbonQuota",200);
|
|
|
-
|
|
|
-
|
|
|
- listMap.get(2).put("info","郑分");
|
|
|
- listMap.get(2).put("consumed",500);
|
|
|
- listMap.get(2).put("carbonQuota",402);
|
|
|
-
|
|
|
- listMap.get(3).put("info","规划院");
|
|
|
- listMap.get(3).put("consumed",500);
|
|
|
- listMap.get(3).put("carbonQuota",520);
|
|
|
-
|
|
|
- listMap.get(4).put("info","总部");
|
|
|
- listMap.get(4).put("consumed",500);
|
|
|
- listMap.get(4).put("carbonQuota",520);
|
|
|
- return ReturnMsg.ok(listMap);
|
|
|
- }
|
|
|
-}
|