|
@@ -4,6 +4,7 @@ import com.alibaba.fastjson2.JSONArray;
|
|
|
import com.alibaba.fastjson2.JSONObject;
|
|
|
import com.project.common.utils.StringUtils;
|
|
|
import com.project.zcustom.domain.addional.LargeBuildingControl;
|
|
|
+import com.project.zcustom.domain.addional.LargeBuildingControlAmmeterDetail;
|
|
|
import com.project.zcustom.mapper.unit.PlatBuildingMapper;
|
|
|
import com.project.zcustom.service.service.smart.IPlatBuildingService;
|
|
|
import com.project.zcustom.tools.ApiUrlConfig;
|
|
@@ -312,45 +313,11 @@ public class PlatBuildingServiceImpl implements IPlatBuildingService {
|
|
|
}
|
|
|
|
|
|
public JSONArray getThisAmmeterDetail(String type){
|
|
|
- // TODO
|
|
|
- String result = buildingService.repeat(ApiUrlConfig.getControlElectricityDetail(), "type=" + type);
|
|
|
+ String result = platBuildingMapper.getThisAmmeterDetail(type);
|
|
|
if (StringUtils.isNotBlank(result)){
|
|
|
return JSONArray.parseArray(result);
|
|
|
}
|
|
|
return new JSONArray();
|
|
|
- /*String str = "[\n" +
|
|
|
- " {\n" +
|
|
|
- " \"number\": \"1# 1-3\",\n" +
|
|
|
- " \"EqName\": \"设备名称\",\n" +
|
|
|
- " \"type\": \"设备所属类别\",\n" +
|
|
|
- " \"Kwh\": \"56.2\",\n" +
|
|
|
- " },\n" +
|
|
|
- " {\n" +
|
|
|
- " \"number\": \"1# 1-3\",\n" +
|
|
|
- " \"EqName\": \"设备名称\",\n" +
|
|
|
- " \"type\": \"设备所属类别\",\n" +
|
|
|
- " \"Kwh\": \"56.2\",\n" +
|
|
|
- " },\n" +
|
|
|
- " {\n" +
|
|
|
- " \"number\": \"1# 1-3\",\n" +
|
|
|
- " \"EqName\": \"设备名称\",\n" +
|
|
|
- " \"type\": \"设备所属类别\",\n" +
|
|
|
- " \"Kwh\": \"56.2\",\n" +
|
|
|
- " },\n" +
|
|
|
- " {\n" +
|
|
|
- " \"number\": \"1# 1-3\",\n" +
|
|
|
- " \"EqName\": \"设备名称\",\n" +
|
|
|
- " \"type\": \"设备所属类别\",\n" +
|
|
|
- " \"Kwh\": \"56.2\",\n" +
|
|
|
- " },\n" +
|
|
|
- " {\n" +
|
|
|
- " \"number\": \"1# 1-3\",\n" +
|
|
|
- " \"EqName\": \"设备名称\",\n" +
|
|
|
- " \"type\": \"设备所属类别\",\n" +
|
|
|
- " \"Kwh\": \"56.2\",\n" +
|
|
|
- " },\n" +
|
|
|
- " ]";
|
|
|
- return JSONArray.parseArray(str);*/
|
|
|
}
|
|
|
|
|
|
public List<Map<String, Object>> getTodayElectricity(){
|
|
@@ -420,29 +387,19 @@ public class PlatBuildingServiceImpl implements IPlatBuildingService {
|
|
|
}
|
|
|
|
|
|
public JSONArray getAbnormalPoint(String type){
|
|
|
- // TODO
|
|
|
- String result = buildingService.repeat(ApiUrlConfig.getControlAlertDetails(), "type=" + type);
|
|
|
- if (StringUtils.isNotBlank(result)){
|
|
|
- return JSONArray.parseArray(result);
|
|
|
+ LargeBuildingControl largeBuildingControl = platBuildingMapper.getAbnormalPoint();
|
|
|
+ switch (type){
|
|
|
+ case "1":
|
|
|
+ return JSONArray.parseArray(largeBuildingControl.getAbnormalPointOne());
|
|
|
+ case "2":
|
|
|
+ return JSONArray.parseArray(largeBuildingControl.getAbnormalPointTwo());
|
|
|
+ case "3":
|
|
|
+ return JSONArray.parseArray(largeBuildingControl.getAbnormalPointThree());
|
|
|
+ case "4":
|
|
|
+ return JSONArray.parseArray(largeBuildingControl.getAbnormalPointFour());
|
|
|
+ default:
|
|
|
+ return new JSONArray();
|
|
|
}
|
|
|
- return new JSONArray();
|
|
|
- /*String str = "[\n" +
|
|
|
- " {\n" +
|
|
|
- " \"alertTime\": \"2025-01-01 15:12:11\",\n" +
|
|
|
- " \"alertName\": \"液位过低\",\n" +
|
|
|
- " \"alertValue\": \"1.11m\",\n" +
|
|
|
- " \"alertEquipment\": \"液位计编号(如电表的话:为1# 1-5等)\",\n" +
|
|
|
- " \"alertPosition\": \"B2层2号配电室\"\n" +
|
|
|
- " },\n" +
|
|
|
- " {\n" +
|
|
|
- " \"alertTime\": \"2025-01-01 15:12:11\",\n" +
|
|
|
- " \"alertName\": \"设备离线\",\n" +
|
|
|
- " \"alertValue\": \"0.00m\",\n" +
|
|
|
- " \"alertEquipment\": \"液位计编号(如电表的话:为1# 1-5等)\",\n" +
|
|
|
- " \"alertPosition\": \"B2层2号配电室\"\n" +
|
|
|
- " }\n" +
|
|
|
- " ]";
|
|
|
- return JSONArray.parseArray(str);*/
|
|
|
}
|
|
|
|
|
|
public JSONArray getWarnEvent(){
|