对比新文件 |
| | |
| | | package com.iailab.module.shasteel.api.controller.admin; |
| | | |
| | | |
| | | import com.iailab.framework.common.pojo.CommonResult; |
| | | import com.iailab.framework.common.pojo.PageResult; |
| | | import com.iailab.module.model.api.mcs.McsApi; |
| | | import com.iailab.module.model.api.mcs.dto.StAlarmAndSuggestPageReqVO; |
| | | import com.iailab.module.model.api.mcs.dto.StAlarmAndSuggestRespVO; |
| | | import io.swagger.v3.oas.annotations.Operation; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.Arrays; |
| | | import java.util.List; |
| | | |
| | | import static com.iailab.framework.common.pojo.CommonResult.success; |
| | | |
| | | /** |
| | | * 沙钢智能监控平台数据接口 |
| | | * |
| | | */ |
| | | @Slf4j |
| | | @RestController |
| | | @RequestMapping("/shasteel/api/data") |
| | | public class DataController { |
| | | |
| | | private Logger logger = LoggerFactory.getLogger(getClass()); |
| | | |
| | | @Autowired |
| | | private McsApi mcsApi; |
| | | |
| | | private final List<String> titleList = new ArrayList<>( |
| | | Arrays.asList( |
| | | "高炉煤气预警", |
| | | "焦炉煤气预警", |
| | | "转炉5W+8W煤气柜预警", |
| | | "宏发12W煤气柜预警", |
| | | "转炉特钢12W煤气柜预警", |
| | | "空压机预警", |
| | | "大新预警", |
| | | "法液空合同执行度", |
| | | "盈德合同执行度" |
| | | ) |
| | | ); |
| | | |
| | | private final List<String> contentKeyList = new ArrayList<>( |
| | | Arrays.asList( |
| | | "放散", |
| | | "预测放散", |
| | | "煤气柜运行风险", |
| | | "空压机跳机", |
| | | "大新浦项蒸汽压力", |
| | | "法液空运行优化指标", |
| | | "盈德运行优化指标" |
| | | ) |
| | | ); |
| | | @GetMapping("/alarm-suggest/page") |
| | | @Operation(summary = "预警与建议信息") |
| | | public CommonResult<PageResult<StAlarmAndSuggestRespVO>> queryAlarmAndSuggestPage() { |
| | | StAlarmAndSuggestPageReqVO reqVO = new StAlarmAndSuggestPageReqVO(); |
| | | reqVO.setTitle(titleList); |
| | | reqVO.setContentKey(contentKeyList); |
| | | PageResult<StAlarmAndSuggestRespVO> page = mcsApi.getAlarmAndSuggestPage(reqVO); |
| | | return success(page); |
| | | } |
| | | } |