Commit 67c12c5a authored by 高建强's avatar 高建强

item:总部直流中心统一入口提交

parent effa07d5
package com.yeejoin.equipmanage.controller;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.equipmanage.common.utils.*;
import com.yeejoin.equipmanage.service.IEquipmentSpecificAlarmService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.typroject.tyboot.core.foundation.enumeration.UserType;
import org.typroject.tyboot.core.restful.doc.TycloudOperation;
import org.typroject.tyboot.core.restful.utils.ResponseModel;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
/**
* @author Jianqiang Gao
* @title: DCenterController
* <pre>
* @description: 设备告警
* </pre>
* @date 2022/11/15 09:54
*/
@RestController
@Api(tags = "总部直流中心监管页面Api")
@RequestMapping(value = "/dc-center", produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
public class DCenterController extends AbstractBaseController {
@Autowired
IEquipmentSpecificAlarmService iEquipmentSpecificAlarmService;
/**
* 直流中心告警列表分页,用于直流中心大数据查询分页,不建议再扩展联表查询
*
*/
@RequestMapping(value = "/list", method = RequestMethod.GET)
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "GET", value = "列表分页查询", produces = "application/json;charset=UTF-8", notes = "列表分页查询")
public ResponseModel listPage(@RequestParam(value = "alarmType", required = false) String alarmType,
CommonPageable commonPageable) {
if (commonPageable.getPageNumber() == 0) {
commonPageable.setPageNumber(1);
}
List<CommonRequest> queryRequests = new ArrayList<>();
CommonRequest request = new CommonRequest();
request.setName("alarmType");
request.setValue(StringUtil.isNotEmpty(alarmType) ? StringUtils.trimToNull(alarmType) : null);
queryRequests.add(request);
CommonPageInfoParam param = CommonPageParamUtil.fillCommonPageInfoParam(queryRequests, commonPageable);
Page<Map<String, Object>> list = iEquipmentSpecificAlarmService.zlzxListPage(param);
return CommonResponseUtil.success(list);
}
}
...@@ -178,29 +178,6 @@ public class EquipmentAlarmController extends AbstractBaseController { ...@@ -178,29 +178,6 @@ public class EquipmentAlarmController extends AbstractBaseController {
} }
/** /**
* 直流中心告警列表分页,用于直流中心大数据查询分页,不建议再扩展联表查询
*
* @return
*/
@RequestMapping(value = "/zlzx-list", method = RequestMethod.GET)
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "GET", value = "列表分页查询", produces = "application/json;charset=UTF-8", notes = "列表分页查询")
public ResponseModel listPage(@RequestParam(value = "alarmType", required = false) String alarmType,
CommonPageable commonPageable) {
if (commonPageable.getPageNumber() == 0) {
commonPageable.setPageNumber(1);
}
List<CommonRequest> queryRequests = new ArrayList<>();
CommonRequest request = new CommonRequest();
request.setName("alarmType");
request.setValue(StringUtil.isNotEmpty(alarmType) ? StringUtils.trimToNull(alarmType) : null);
queryRequests.add(request);
CommonPageInfoParam param = CommonPageParamUtil.fillCommonPageInfoParam(queryRequests, commonPageable);
Page<Map<String, Object>> list = iEquipmentSpecificAlarmService.zlzxListPage(param);
return CommonResponseUtil.success(list);
}
/**
* 稳压泵跑马灯消息已读列表分页查询 * 稳压泵跑马灯消息已读列表分页查询
* *
* @return * @return
......
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