Commit e5cde6e9 authored by tangwei's avatar tangwei

升压站开关接口

parent 26be8ab6
...@@ -39,6 +39,7 @@ import org.typroject.tyboot.core.restful.utils.ResponseHelper; ...@@ -39,6 +39,7 @@ import org.typroject.tyboot.core.restful.utils.ResponseHelper;
import org.typroject.tyboot.core.restful.utils.ResponseModel; import org.typroject.tyboot.core.restful.utils.ResponseModel;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.text.Collator;
import java.util.*; import java.util.*;
import java.util.stream.Collectors; import java.util.stream.Collectors;
...@@ -351,6 +352,34 @@ public class MonitorFanIdxController extends BaseController { ...@@ -351,6 +352,34 @@ public class MonitorFanIdxController extends BaseController {
result.setTotal(statusMonitoring.size()); result.setTotal(statusMonitoring.size());
return ResponseHelper.buildResponse(result); return ResponseHelper.buildResponse(result);
} }
@TycloudOperation(needAuth = false, ApiLevel = UserType.AGENCY)
@ApiOperation(value = "升压站光字牌/开关-通用")
@GetMapping("/getStatusGzpnew")
public ResponseModel<IPage<Map<String, Object>>> getStatusGzpnew(@RequestParam(required = false) String name,@RequestParam(value = "stationId") String stationId, String frontModule, String systemType, String equipNum, @RequestParam(required = false) String stationType) {
StationBasic stationBasic = stationBasicMapper.selectById(stationId);
String gatewayId = stationBasic.getBoosterGatewayId();
if (null != stationType) {
gatewayId = stationBasic.getFanGatewayId();
}
List<Map<String, Object>> statusMonitoring = monitorFanIndicator.getStatusGzp(gatewayId, systemType, frontModule, equipNum,stationBasic.getStationType());
if(name!=null){
statusMonitoring= statusMonitoring.stream().filter(s-> s.get("data").toString().contains(name)).collect(Collectors.toList());
}
IPage<Map<String, Object>> result = new Page<>();
result.setRecords(statusMonitoring);
result.setCurrent(1);
result.setTotal(statusMonitoring.size());
return ResponseHelper.buildResponse(result);
}
@TycloudOperation(needAuth = false, ApiLevel = UserType.AGENCY) @TycloudOperation(needAuth = false, ApiLevel = UserType.AGENCY)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment