|
|
@ -3,9 +3,11 @@ package com.ruoyi.web.controller.base;
|
|
|
|
import java.util.ArrayList;
|
|
|
|
import java.util.ArrayList;
|
|
|
|
import java.util.Date;
|
|
|
|
import java.util.Date;
|
|
|
|
import java.util.List;
|
|
|
|
import java.util.List;
|
|
|
|
|
|
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
|
|
|
|
|
|
import com.alibaba.fastjson.JSONArray;
|
|
|
|
import com.alibaba.fastjson.JSONArray;
|
|
|
|
import com.mysql.cj.xdevapi.JsonArray;
|
|
|
|
import com.mysql.cj.xdevapi.JsonArray;
|
|
|
|
|
|
|
|
import com.ruoyi.common.constant.UserConstants;
|
|
|
|
import com.ruoyi.common.utils.ShiroUtils;
|
|
|
|
import com.ruoyi.common.utils.ShiroUtils;
|
|
|
|
import com.ruoyi.system.domain.BaseAlarmInfo;
|
|
|
|
import com.ruoyi.system.domain.BaseAlarmInfo;
|
|
|
|
import com.ruoyi.system.domain.BaseAlarmType;
|
|
|
|
import com.ruoyi.system.domain.BaseAlarmType;
|
|
|
@ -115,10 +117,20 @@ public class BaseSensorInfoController extends BaseController {
|
|
|
|
|
|
|
|
|
|
|
|
/** 新增传感器信息 */
|
|
|
|
/** 新增传感器信息 */
|
|
|
|
@GetMapping("/add")
|
|
|
|
@GetMapping("/add")
|
|
|
|
public String add() {
|
|
|
|
public String add(ModelMap mmap) {
|
|
|
|
return prefix + "/add";
|
|
|
|
return prefix + "/add";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@PostMapping("/checkSensorIdUnique")
|
|
|
|
|
|
|
|
@ResponseBody
|
|
|
|
|
|
|
|
public String checkSensorIdUnique(BaseSensorInfo baseSensorInfo){
|
|
|
|
|
|
|
|
List<BaseSensorInfoDto> baseSensorInfoDtos = baseSensorInfoService.selectBaseSensorInfoList(baseSensorInfo);
|
|
|
|
|
|
|
|
if(baseSensorInfoDtos.size() > 0){
|
|
|
|
|
|
|
|
return UserConstants.DEPT_NAME_NOT_UNIQUE;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
return UserConstants.DEPT_NAME_UNIQUE;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/** 新增保存传感器信息 */
|
|
|
|
/** 新增保存传感器信息 */
|
|
|
|
@RequiresPermissions("base:sensorInfo:add")
|
|
|
|
@RequiresPermissions("base:sensorInfo:add")
|
|
|
|
@Log(title = "传感器信息", businessType = BusinessType.INSERT)
|
|
|
|
@Log(title = "传感器信息", businessType = BusinessType.INSERT)
|
|
|
|