|
|
|
@ -3,7 +3,10 @@ package com.ruoyi.web.controller.base;
|
|
|
|
|
import java.util.Date;
|
|
|
|
|
import java.util.List;
|
|
|
|
|
|
|
|
|
|
import com.ruoyi.common.constant.UserConstants;
|
|
|
|
|
import com.ruoyi.common.utils.ShiroUtils;
|
|
|
|
|
import com.ruoyi.system.domain.BaseSensorInfo;
|
|
|
|
|
import com.ruoyi.system.domain.dto.BaseSensorInfoDto;
|
|
|
|
|
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
|
import org.springframework.stereotype.Controller;
|
|
|
|
@ -165,4 +168,22 @@ public class BaseAlarmTypeController extends BaseController
|
|
|
|
|
List<Ztree> ztrees = baseAlarmTypeService.selectBaseAlarmTypeTree();
|
|
|
|
|
return ztrees;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 告警类型编号校验
|
|
|
|
|
* @author WenJY
|
|
|
|
|
* @date 2022/4/26 21:05
|
|
|
|
|
* @param baseAlarmType
|
|
|
|
|
* @return java.lang.String
|
|
|
|
|
*/
|
|
|
|
|
@PostMapping("/checkAlarmTypeIdUnique")
|
|
|
|
|
@ResponseBody
|
|
|
|
|
public String checkAlarmTypeIdUnique(BaseAlarmType baseAlarmType){
|
|
|
|
|
List<BaseAlarmType> baseAlarmTypes = baseAlarmTypeService.selectBaseAlarmTypeList(baseAlarmType);
|
|
|
|
|
|
|
|
|
|
if(baseAlarmTypes.size() > 0){
|
|
|
|
|
return UserConstants.DEPT_NAME_NOT_UNIQUE;
|
|
|
|
|
}
|
|
|
|
|
return UserConstants.DEPT_NAME_UNIQUE;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|