Commit 0d0084d9 authored by zhangsen's avatar zhangsen

监盘概览部分API提交

parent c864026b
......@@ -7,11 +7,16 @@ import com.yeejoin.equipmanage.common.utils.CommonPageable;
import com.yeejoin.equipmanage.common.utils.CommonResponseUtil;
import com.yeejoin.equipmanage.common.utils.StringUtil;
import com.yeejoin.equipmanage.config.PersonIdentify;
import com.yeejoin.equipmanage.mapper.FireFightingSystemMapper;
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.util.ObjectUtils;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
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.foundation.utils.ValidationUtil;
......@@ -23,4 +28,89 @@ import org.typroject.tyboot.core.restful.utils.ResponseModel;
@RequestMapping(value = "/supervisionConfigure", produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
public class SupervisionConfigureController extends AbstractBaseController {
@Autowired
private FireFightingSystemMapper fireFightingSystemMapper;
@PersonIdentify
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(value = "监盘概览水源信息")
@GetMapping("/getWaterInfo")
public ResponseModel getWaterInfo(CommonPageable commonPageable, @RequestParam(required = false) String bizOrgCode) {
if (commonPageable.getPageNumber() == 0) {
commonPageable.setPageNumber(1);
}
if (StringUtils.isEmpty(bizOrgCode)) {
ReginParams reginParams = getSelectedOrgInfo();
bizOrgCode = !ValidationUtil.isEmpty(reginParams.getPersonIdentity()) && StringUtil.isNotEmpty(reginParams.getPersonIdentity().getBizOrgCode()) ? reginParams.getPersonIdentity().getBizOrgCode() : null;
}
Page page = new Page<>(commonPageable.getPageNumber(), commonPageable.getPageSize());
return CommonResponseUtil.success(fireFightingSystemMapper.getWaterInfoBySuper(page, bizOrgCode));
}
@PersonIdentify
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(value = "监盘概览泡沫罐和水箱信息(监盘概览)")
@GetMapping("/getFoamTankBySuper")
public ResponseModel getFoamTankBySuper(CommonPageable commonPageable, @RequestParam(required = false) String bizOrgCode) {
if (commonPageable.getPageNumber() == 0) {
commonPageable.setPageNumber(1);
}
if (StringUtils.isEmpty(bizOrgCode)) {
ReginParams reginParams = getSelectedOrgInfo();
bizOrgCode = !ValidationUtil.isEmpty(reginParams.getPersonIdentity()) && StringUtil.isNotEmpty(reginParams.getPersonIdentity().getBizOrgCode()) ? reginParams.getPersonIdentity().getBizOrgCode() : null;
}
Page page = new Page<>(commonPageable.getPageNumber(), commonPageable.getPageSize());
return CommonResponseUtil.success(fireFightingSystemMapper.getFoamTankBySuper(page, bizOrgCode));
}
@PersonIdentify
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(value = "监盘概览管网压力信息(监盘概览)")
@GetMapping("/getPipeNetworkBySuper")
public ResponseModel getPipeNetworkBySuper(CommonPageable commonPageable, @RequestParam(required = false) String bizOrgCode) {
if (commonPageable.getPageNumber() == 0) {
commonPageable.setPageNumber(1);
}
if (StringUtils.isEmpty(bizOrgCode)) {
ReginParams reginParams = getSelectedOrgInfo();
bizOrgCode = !ValidationUtil.isEmpty(reginParams.getPersonIdentity()) && StringUtil.isNotEmpty(reginParams.getPersonIdentity().getBizOrgCode()) ? reginParams.getPersonIdentity().getBizOrgCode() : null;
}
Page page = new Page<>(commonPageable.getPageNumber(), commonPageable.getPageSize());
return CommonResponseUtil.success(fireFightingSystemMapper.getPipeNetworkBySuper(page, bizOrgCode));
}
@PersonIdentify
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(value = "监盘概览水池装置进水流量信息(监盘概览)")
@GetMapping("/getInfluentFlowBySuper")
public ResponseModel getInfluentFlowBySuper(CommonPageable commonPageable, @RequestParam(required = false) String bizOrgCode) {
if (commonPageable.getPageNumber() == 0) {
commonPageable.setPageNumber(1);
}
if (StringUtils.isEmpty(bizOrgCode)) {
ReginParams reginParams = getSelectedOrgInfo();
bizOrgCode = !ValidationUtil.isEmpty(reginParams.getPersonIdentity()) && StringUtil.isNotEmpty(reginParams.getPersonIdentity().getBizOrgCode()) ? reginParams.getPersonIdentity().getBizOrgCode() : null;
}
Page page = new Page<>(commonPageable.getPageNumber(), commonPageable.getPageSize());
return CommonResponseUtil.success(fireFightingSystemMapper.getInfluentFlowBySuper(page, bizOrgCode));
}
@PersonIdentify
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(value = "获取某站下装备数量、摄像头数量(监盘概览)")
@GetMapping("/statisticsBySuper")
public ResponseModel statisticsByStation(@RequestParam(required = false) String bizOrgCode) {
if (ObjectUtils.isEmpty(bizOrgCode)) {
ReginParams reginParams = getSelectedOrgInfo();
ReginParams.PersonIdentity personIdentity = reginParams.getPersonIdentity();
if (!ValidationUtil.isEmpty(personIdentity)) {
bizOrgCode = personIdentity.getBizOrgCode();
}
}
if (ObjectUtils.isEmpty(bizOrgCode)){
return CommonResponseUtil.success(null);
}
return CommonResponseUtil.success(fireFightingSystemMapper.statisticsByStation(bizOrgCode));
}
}
......@@ -306,6 +306,40 @@ public interface FireFightingSystemMapper extends BaseMapper<FireFightingSystemE
* @return
*/
Page<Map<String, Object>> getWaterInfo(Page page, @Param("bizOrgCode") String bizOrgCode, @Param("systemCode") String systemCode);
/**
* 获取水源信息(监盘概览)
*
* @param bizOrgCode
* @return
*/
Page<Map<String, Object>> getWaterInfoBySuper(Page page, @Param("bizOrgCode") String bizOrgCode);
/**
* 监盘概览泡沫罐和水箱信息(监盘概览)
* @param page
* @param bizOrgCode
* @return
*/
Page<Map<String, Object>> getFoamTankBySuper(Page page, @Param("bizOrgCode") String bizOrgCode);
/**
* 监盘概览管网压力信息(监盘概览)
* @param page
* @param bizOrgCode
* @return
*/
Page<Map<String, Object>> getPipeNetworkBySuper(Page page, @Param("bizOrgCode") String bizOrgCode);
/**
* 监盘概览水池装置进水流量信息(监盘概览)
* @param page
* @param bizOrgCode
* @return
*/
Page<Map<String, Object>> getInfluentFlowBySuper(Page page, @Param("bizOrgCode") String bizOrgCode);
/**
* 获取系统今日告警信息
*
......
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