Commit 3818c18b authored by zhangsen's avatar zhangsen

设备告警状态API修改

parent 0c58ace3
package com.yeejoin.equipmanage.controller; package com.yeejoin.equipmanage.controller;
import com.yeejoin.equipmanage.mapper.FireFightingSystemMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.boot.biz.common.bo.ReginParams; import com.yeejoin.amos.boot.biz.common.bo.ReginParams;
import com.yeejoin.equipmanage.common.utils.*; import com.yeejoin.equipmanage.common.utils.*;
import com.yeejoin.equipmanage.mapper.FireFightingSystemMapper;
import com.yeejoin.equipmanage.service.IEquipmentSpecificAlarmService; import com.yeejoin.equipmanage.service.IEquipmentSpecificAlarmService;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import io.swagger.annotations.ApiOperation;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType; import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.*;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
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 java.util.List;
import java.util.Map;
import org.typroject.tyboot.core.foundation.enumeration.UserType; import org.typroject.tyboot.core.foundation.enumeration.UserType;
import org.typroject.tyboot.core.foundation.utils.ValidationUtil; import org.typroject.tyboot.core.foundation.utils.ValidationUtil;
import org.typroject.tyboot.core.restful.doc.TycloudOperation; import org.typroject.tyboot.core.restful.doc.TycloudOperation;
...@@ -122,12 +110,12 @@ public class ConfigureController extends AbstractBaseController { ...@@ -122,12 +110,12 @@ public class ConfigureController extends AbstractBaseController {
@TycloudOperation(ApiLevel = UserType.AGENCY) @TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(value = "获取设备告警待确认和未处理信息") @ApiOperation(value = "获取设备告警待确认和未处理信息(根据系统编码查询)")
@GetMapping("/getEquipAlarmInfoNum") @GetMapping("/getEquipAlarmInfoNum")
public ResponseModel getEquipAlarmInfoNum() { public ResponseModel getEquipAlarmInfoNum(@RequestParam(required = false) String systemCode) {
ReginParams reginParams = getSelectedOrgInfo(); ReginParams reginParams = getSelectedOrgInfo();
String bizOrgCode = !ValidationUtil.isEmpty(reginParams.getPersonIdentity()) && StringUtil.isNotEmpty(reginParams.getPersonIdentity().getBizOrgCode()) ? reginParams.getPersonIdentity().getBizOrgCode() : null; String bizOrgCode = !ValidationUtil.isEmpty(reginParams.getPersonIdentity()) && StringUtil.isNotEmpty(reginParams.getPersonIdentity().getBizOrgCode()) ? reginParams.getPersonIdentity().getBizOrgCode() : null;
return CommonResponseUtil.success(fireFightingSystemMapper.getEquipAlarmInfoNum(bizOrgCode)); return CommonResponseUtil.success(fireFightingSystemMapper.getEquipAlarmInfoNum(systemCode, bizOrgCode));
} }
@TycloudOperation(ApiLevel = UserType.AGENCY) @TycloudOperation(ApiLevel = UserType.AGENCY)
......
...@@ -249,7 +249,7 @@ public interface FireFightingSystemMapper extends BaseMapper<FireFightingSystemE ...@@ -249,7 +249,7 @@ public interface FireFightingSystemMapper extends BaseMapper<FireFightingSystemE
* @param bizOrgCode * @param bizOrgCode
* @return * @return
*/ */
List<Map<String, Object>> getEquipAlarmInfoNum(@Param("bizOrgCode") String bizOrgCode); List<Map<String, Object>> getEquipAlarmInfoNum(@Param("systemCode") String systemCode, @Param("bizOrgCode") String bizOrgCode);
/** /**
* 获取消防力量信息(队伍值班等) * 获取消防力量信息(队伍值班等)
......
...@@ -2402,6 +2402,9 @@ ...@@ -2402,6 +2402,9 @@
<if test="bizOrgCode!=null and bizOrgCode!=''"> <if test="bizOrgCode!=null and bizOrgCode!=''">
and es.biz_org_code = #{bizOrgCode,jdbcType=VARCHAR} and es.biz_org_code = #{bizOrgCode,jdbcType=VARCHAR}
</if> </if>
<if test="systemCode!=null and systemCode!=''">
and FIND_IN_SET( #{systemCode,jdbcType=VARCHAR}, log.system_codes )
</if>
</where> </where>
) AS unclearInfoNum, ) AS unclearInfoNum,
( (
......
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