|
|
@ -4,9 +4,13 @@ import java.util.Date;
|
|
|
|
import java.util.List;
|
|
|
|
import java.util.List;
|
|
|
|
import java.util.UUID;
|
|
|
|
import java.util.UUID;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import com.alibaba.fastjson.JSON;
|
|
|
|
|
|
|
|
import com.alibaba.fastjson.JSONArray;
|
|
|
|
|
|
|
|
import com.ruoyi.common.core.page.TableDataInfo;
|
|
|
|
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.BaseDeviceParam;
|
|
|
|
import com.ruoyi.system.domain.BaseDeviceParam;
|
|
|
|
|
|
|
|
import com.ruoyi.system.domain.BaseSensorInfo;
|
|
|
|
import com.ruoyi.system.domain.dto.BaseAlarmInfoDto;
|
|
|
|
import com.ruoyi.system.domain.dto.BaseAlarmInfoDto;
|
|
|
|
import com.ruoyi.system.domain.dto.BaseMonitorunitInfoDto;
|
|
|
|
import com.ruoyi.system.domain.dto.BaseMonitorunitInfoDto;
|
|
|
|
import com.ruoyi.system.domain.dto.BaseSensorInfoDto;
|
|
|
|
import com.ruoyi.system.domain.dto.BaseSensorInfoDto;
|
|
|
@ -15,11 +19,7 @@ import org.apache.shiro.authz.annotation.RequiresPermissions;
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
import org.springframework.stereotype.Controller;
|
|
|
|
import org.springframework.stereotype.Controller;
|
|
|
|
import org.springframework.ui.ModelMap;
|
|
|
|
import org.springframework.ui.ModelMap;
|
|
|
|
import org.springframework.web.bind.annotation.GetMapping;
|
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
import org.springframework.web.bind.annotation.PathVariable;
|
|
|
|
|
|
|
|
import org.springframework.web.bind.annotation.PostMapping;
|
|
|
|
|
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
|
|
|
|
|
import org.springframework.web.bind.annotation.ResponseBody;
|
|
|
|
|
|
|
|
import com.ruoyi.common.annotation.Log;
|
|
|
|
import com.ruoyi.common.annotation.Log;
|
|
|
|
import com.ruoyi.common.enums.BusinessType;
|
|
|
|
import com.ruoyi.common.enums.BusinessType;
|
|
|
|
import com.ruoyi.system.domain.BaseMonitorunitInfo;
|
|
|
|
import com.ruoyi.system.domain.BaseMonitorunitInfo;
|
|
|
@ -62,6 +62,17 @@ public class BaseMonitorunitInfoController extends BaseController {
|
|
|
|
return list;
|
|
|
|
return list;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@GetMapping("/listByParent")
|
|
|
|
|
|
|
|
@ResponseBody
|
|
|
|
|
|
|
|
public TableDataInfo listByParent(String parentId) {
|
|
|
|
|
|
|
|
startPage();
|
|
|
|
|
|
|
|
BaseMonitorunitInfo baseMonitorunitInfo = new BaseMonitorunitInfo();
|
|
|
|
|
|
|
|
baseMonitorunitInfo.setParentId(parentId);
|
|
|
|
|
|
|
|
List<BaseMonitorunitInfoDto> list =
|
|
|
|
|
|
|
|
baseMonitorunitInfoService.selectBaseMonitorunitInfoDtoList(baseMonitorunitInfo);
|
|
|
|
|
|
|
|
return getDataTable(list);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* 获取导入模板
|
|
|
|
* 获取导入模板
|
|
|
|
*
|
|
|
|
*
|
|
|
@ -217,6 +228,30 @@ public class BaseMonitorunitInfoController extends BaseController {
|
|
|
|
return toAjax(baseMonitorunitInfoService.deleteBaseMonitorunitInfoByObjId(ObjId));
|
|
|
|
return toAjax(baseMonitorunitInfoService.deleteBaseMonitorunitInfoByObjId(ObjId));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** 删除子项 */
|
|
|
|
|
|
|
|
@GetMapping("/deleteItem/{monitorunitId}")
|
|
|
|
|
|
|
|
public String deleteItem(@PathVariable("monitorunitId") String monitorunitId, ModelMap mmap) {
|
|
|
|
|
|
|
|
String info = monitorunitId;
|
|
|
|
|
|
|
|
mmap.put("monitorunitId", monitorunitId);
|
|
|
|
|
|
|
|
return prefix + "/deleteItem";
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@PostMapping("/deleteItem")
|
|
|
|
|
|
|
|
@ResponseBody
|
|
|
|
|
|
|
|
public AjaxResult deleteItem(String ids) {
|
|
|
|
|
|
|
|
List<Long> longs = JSONArray.parseArray(ids, Long.class);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
try{
|
|
|
|
|
|
|
|
for (Long aLong : longs) {
|
|
|
|
|
|
|
|
int i = baseMonitorunitInfoService.deleteBaseMonitorunitInfoByObjId(aLong);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}catch (Exception e){
|
|
|
|
|
|
|
|
return error();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return success();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/** 选择监控单元信息树 */
|
|
|
|
/** 选择监控单元信息树 */
|
|
|
|
@GetMapping(value = {"/selectMonitorUnitInfoTree/{ObjId}", "/selectMonitorUnitInfoTree/"})
|
|
|
|
@GetMapping(value = {"/selectMonitorUnitInfoTree/{ObjId}", "/selectMonitorUnitInfoTree/"})
|
|
|
|
public String selectMonitorUnitInfoTree(
|
|
|
|
public String selectMonitorUnitInfoTree(
|
|
|
|