将终端台账拆分为pq&pms两类
This commit is contained in:
@@ -1,10 +1,9 @@
|
||||
package com.njcn.device;
|
||||
package com.njcn;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.mybatis.spring.annotation.MapperScan;
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
|
||||
import org.springframework.cloud.openfeign.EnableFeignClients;
|
||||
|
||||
/**
|
||||
@@ -1,89 +0,0 @@
|
||||
package com.njcn.device.controller;
|
||||
|
||||
import com.njcn.common.pojo.annotation.OperateInfo;
|
||||
import com.njcn.common.pojo.enums.common.LogEnum;
|
||||
import com.njcn.common.pojo.enums.response.CommonResponseEnum;
|
||||
import com.njcn.common.pojo.exception.BusinessException;
|
||||
import com.njcn.common.pojo.response.HttpResult;
|
||||
import com.njcn.common.utils.HttpResultUtil;
|
||||
import com.njcn.device.pojo.param.AlarmStrategyParam;
|
||||
import com.njcn.device.pojo.vo.AlarmStrategyVO;
|
||||
import com.njcn.device.service.AlarmStrategyService;
|
||||
import com.njcn.web.controller.BaseController;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @version 1.0.0
|
||||
* @author: chenchao
|
||||
* @date: 2022/06/23 11:36
|
||||
*/
|
||||
@Validated
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("/Alarm")
|
||||
@Api(tags = "告警管理")
|
||||
@AllArgsConstructor
|
||||
public class AlarmController extends BaseController {
|
||||
|
||||
private final AlarmStrategyService alarmStrategyService;
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/getAlarmStrategyData")
|
||||
@ApiOperation("告警策略管理")
|
||||
public HttpResult<List<AlarmStrategyVO>> getAlarmStrategyData(){
|
||||
String methodDescribe = getMethodDescribe("getAlarmStrategyData");
|
||||
List<AlarmStrategyVO> list = alarmStrategyService.getAlarmStrategyData();
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, list, methodDescribe);
|
||||
}
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/updateAlarmStrategyById")
|
||||
@ApiOperation("修改告警策略")
|
||||
@ApiImplicitParam(name = "alarmStrategyParam", value = "修改策略参数", required = true)
|
||||
public HttpResult<List<AlarmStrategyVO>> updateAlarmStrategyById(@RequestBody AlarmStrategyParam alarmStrategyParam){
|
||||
String methodDescribe = getMethodDescribe("getAlarmStrategyData");
|
||||
boolean res = alarmStrategyService.updateAlarmStrategyById(alarmStrategyParam);
|
||||
if (res) {
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);
|
||||
} else {
|
||||
throw new BusinessException(CommonResponseEnum.FAIL);
|
||||
}
|
||||
}
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/addAlarmStrategyById")
|
||||
@ApiOperation("新增告警策略")
|
||||
@ApiImplicitParam(name = "alarmStrategyParam", value = "新增策略参数", required = true)
|
||||
public HttpResult<List<AlarmStrategyVO>> addAlarmStrategyById(@RequestBody AlarmStrategyParam alarmStrategyParam){
|
||||
String methodDescribe = getMethodDescribe("addAlarmStrategyById");
|
||||
boolean res = alarmStrategyService.addAlarmStrategyById(alarmStrategyParam);
|
||||
if (res) {
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);
|
||||
} else {
|
||||
throw new BusinessException(CommonResponseEnum.FAIL);
|
||||
}
|
||||
}
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/removeAlarmStrategyData")
|
||||
@ApiOperation("删除告警策略")
|
||||
@ApiImplicitParam(name = "id", value = "策略id", required = true)
|
||||
public HttpResult<List<AlarmStrategyVO>> removeAlarmStrategyData(@RequestParam("id") String id){
|
||||
String methodDescribe = getMethodDescribe("removeAlarmStrategyData");
|
||||
boolean res = alarmStrategyService.removeAlarmStrategyData(id);
|
||||
if (res) {
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);
|
||||
} else {
|
||||
throw new BusinessException(CommonResponseEnum.FAIL);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,78 +0,0 @@
|
||||
package com.njcn.device.controller;
|
||||
|
||||
import com.njcn.common.pojo.annotation.OperateInfo;
|
||||
import com.njcn.common.pojo.enums.common.LogEnum;
|
||||
import com.njcn.common.pojo.enums.response.CommonResponseEnum;
|
||||
import com.njcn.common.pojo.response.HttpResult;
|
||||
import com.njcn.common.utils.HttpResultUtil;
|
||||
import com.njcn.common.utils.LogUtil;
|
||||
import com.njcn.device.pojo.param.AreaCensusParam;
|
||||
import com.njcn.device.pojo.vo.AreaDeviceOnlineVO;
|
||||
import com.njcn.device.pojo.vo.AreaIntegrityVO;
|
||||
import com.njcn.device.service.AreaDeviceOnlineService;
|
||||
import com.njcn.device.service.AreaIntegrityService;
|
||||
import com.njcn.web.controller.BaseController;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @version 1.0.0
|
||||
* @author: chenchao
|
||||
* @date: 2022/08/11 14:05
|
||||
*/
|
||||
@Validated
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("/areaCensus")
|
||||
@Api(tags = "区域统计")
|
||||
@AllArgsConstructor
|
||||
public class AreaCensusController extends BaseController {
|
||||
|
||||
private final AreaDeviceOnlineService areaDeviceOnlineService;
|
||||
|
||||
private final AreaIntegrityService areaIntegrityService;
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/getAreaDeviceOnline")
|
||||
@ApiOperation("获取区域终端在线率")
|
||||
@ApiImplicitParam(name = "areaCensusParam", value = "区域统计查询参数", required = true)
|
||||
public HttpResult<List<AreaDeviceOnlineVO>> getAreaDeviceOnline(@RequestBody @Validated AreaCensusParam areaCensusParam) {
|
||||
String methodDescribe = getMethodDescribe("getAreaDeviceOnline");
|
||||
LogUtil.njcnDebug(log, "{}", methodDescribe, areaCensusParam);
|
||||
List<AreaDeviceOnlineVO> result = areaDeviceOnlineService.getAreaDeviceOnline(areaCensusParam);
|
||||
if (CollectionUtils.isEmpty(result)) {
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.NO_DATA, null, methodDescribe);
|
||||
} else {
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, result, methodDescribe);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/getAreaIntegrity")
|
||||
@ApiOperation("获取区域数据完整性")
|
||||
@ApiImplicitParam(name = "areaCensusParam", value = "查询参数实体", required = true)
|
||||
public HttpResult<List<AreaIntegrityVO>> getAreaIntegrity(@RequestBody @Validated AreaCensusParam areaCensusParam) {
|
||||
String methodDescribe = getMethodDescribe("getAreaIntegrity");
|
||||
LogUtil.njcnDebug(log, "{}", methodDescribe, areaCensusParam);
|
||||
List<AreaIntegrityVO> result = areaIntegrityService.getAreaIntegrity(areaCensusParam);
|
||||
if (CollectionUtils.isEmpty(result)) {
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.NO_DATA, null, methodDescribe);
|
||||
} else {
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, result, methodDescribe);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -1,70 +0,0 @@
|
||||
package com.njcn.device.controller;
|
||||
|
||||
import com.njcn.common.pojo.annotation.OperateInfo;
|
||||
import com.njcn.common.pojo.enums.common.LogEnum;
|
||||
import com.njcn.common.pojo.enums.response.CommonResponseEnum;
|
||||
import com.njcn.common.pojo.response.HttpResult;
|
||||
import com.njcn.common.utils.HttpResultUtil;
|
||||
import com.njcn.device.pojo.vo.CommunicateVO;
|
||||
import com.njcn.device.pojo.param.PulicTimeParam;
|
||||
import com.njcn.device.pojo.param.PulicTimeStatisParam;
|
||||
import com.njcn.device.pojo.vo.CommunicateStatisticsVO;
|
||||
import com.njcn.device.pojo.vo.DeviceOnlineDataVO;
|
||||
import com.njcn.device.service.CommunicateService;
|
||||
import com.njcn.web.controller.BaseController;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author denghuajun
|
||||
* @date 2022/2/28
|
||||
*
|
||||
*/
|
||||
@Validated
|
||||
@Slf4j
|
||||
@Api(tags = "运行状态管理")
|
||||
@RestController
|
||||
@RequestMapping("/communicate")
|
||||
@RequiredArgsConstructor
|
||||
public class CommunicateController extends BaseController {
|
||||
|
||||
private final CommunicateService communicateService;
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/getComFlagInfoData")
|
||||
@ApiOperation("终端通讯信息")
|
||||
@ApiImplicitParam(name = "pulicTimeParam", value = "终端通讯信息", required = true)
|
||||
public HttpResult<CommunicateVO> getComFlagInfoData(@RequestBody @Validated PulicTimeParam pulicTimeParam) {
|
||||
String methodDescribe = getMethodDescribe("getComFlagInfoData");
|
||||
CommunicateVO list = communicateService.getComFlagInfoData(pulicTimeParam);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, list, methodDescribe);
|
||||
}
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/getRunInfoData")
|
||||
@ApiOperation("终端运行状态统计")
|
||||
@ApiImplicitParam(name = "pulicTimeStatisParam", value = "终端运行状态统计", required = true)
|
||||
public HttpResult<CommunicateStatisticsVO> getRunInfoData(@RequestBody @Validated PulicTimeStatisParam pulicTimeStatisParam) {
|
||||
String methodDescribe = getMethodDescribe("getRunInfoData");
|
||||
CommunicateStatisticsVO list = communicateService.getRunInfoData(pulicTimeStatisParam);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, list, methodDescribe);
|
||||
}
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/getRunOnlineRateData")
|
||||
@ApiOperation("终端在线率统计")
|
||||
@ApiImplicitParam(name = "pulicTimeParam", value = "终端在线率统计", required = true)
|
||||
public HttpResult<List<DeviceOnlineDataVO>> getRunOnlineRateData(@RequestBody @Validated PulicTimeParam pulicTimeParam) {
|
||||
String methodDescribe = getMethodDescribe("getRunOnlineRateData");
|
||||
List<DeviceOnlineDataVO> list = communicateService.getRunOnlineRateData(pulicTimeParam);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, list, methodDescribe);
|
||||
}
|
||||
}
|
||||
@@ -1,111 +0,0 @@
|
||||
package com.njcn.device.controller;
|
||||
|
||||
import com.njcn.common.pojo.annotation.OperateInfo;
|
||||
import com.njcn.common.pojo.constant.OperateType;
|
||||
import com.njcn.common.pojo.enums.common.LogEnum;
|
||||
import com.njcn.common.pojo.enums.response.CommonResponseEnum;
|
||||
import com.njcn.common.pojo.response.HttpResult;
|
||||
import com.njcn.common.utils.HttpResultUtil;
|
||||
import com.njcn.common.utils.LogUtil;
|
||||
import com.njcn.device.service.DeptLineService;
|
||||
import com.njcn.web.controller.BaseController;
|
||||
import com.njcn.web.pojo.param.DeptLineParam;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author denghuajun
|
||||
* @date 2022/1/12 16:33
|
||||
* 部门监测点相关
|
||||
*/
|
||||
@Validated
|
||||
@Slf4j
|
||||
@Api(tags = "部门监测点相关")
|
||||
@RestController
|
||||
@RequestMapping("/deptLine")
|
||||
@RequiredArgsConstructor
|
||||
public class DeptLineController extends BaseController {
|
||||
|
||||
private final DeptLineService deptLineService;
|
||||
|
||||
/**
|
||||
* 部门绑定监测点
|
||||
*
|
||||
* @param deptLineParam 部门监测点
|
||||
*/
|
||||
@OperateInfo(info = LogEnum.SYSTEM_COMMON, operateType = OperateType.ADD)
|
||||
@PostMapping("/deptBindLine")
|
||||
@ApiOperation("部门绑定监测点")
|
||||
@ApiImplicitParam(name = "deptLineParam", value = "部门绑定监测点", required = true)
|
||||
public HttpResult deptBindLine(@RequestBody @Validated DeptLineParam deptLineParam) {
|
||||
String methodDescribe = getMethodDescribe("deptBindLine");
|
||||
LogUtil.njcnDebug(log, "{},部门监测点数据为:{}", methodDescribe, deptLineParam);
|
||||
deptLineService.deptBindLine(deptLineParam);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);
|
||||
}
|
||||
|
||||
/**
|
||||
* 部门解除绑定监测点
|
||||
*
|
||||
* @param deptLineParam 部门监测点
|
||||
*/
|
||||
@OperateInfo(info = LogEnum.SYSTEM_COMMON, operateType = OperateType.DELETE)
|
||||
@PostMapping("/deptDeleteBindLine")
|
||||
@ApiOperation("部门解除绑定监测点")
|
||||
@ApiImplicitParam(name = "deptLineParam", value = "部门绑定监测点", required = true)
|
||||
public HttpResult deptDeleteBindLine(@RequestBody @Validated DeptLineParam deptLineParam) {
|
||||
String methodDescribe = getMethodDescribe("deptDeleteBindLine");
|
||||
LogUtil.njcnDebug(log, "{},部门监测点数据为:{}", methodDescribe, deptLineParam);
|
||||
deptLineService.deptDeleteBindLine(deptLineParam);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据部门ids集合查询是否绑定监测点
|
||||
*
|
||||
* @param ids 部门id
|
||||
*/
|
||||
@OperateInfo(info = LogEnum.SYSTEM_COMMON)
|
||||
@PostMapping("/selectDeptBindLines")
|
||||
@ApiOperation("查询是否绑定监测点")
|
||||
@ApiImplicitParam(name = "ids", value = "部门id", required = true)
|
||||
public HttpResult selectDeptBindLines(@RequestParam("ids") List<String> ids) {
|
||||
String methodDescribe = getMethodDescribe("selectDeptBindLines");
|
||||
deptLineService.selectDeptBindLines(ids);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据部门id解除绑定监测点
|
||||
*
|
||||
* @param id 部门id
|
||||
*/
|
||||
@OperateInfo(info = LogEnum.SYSTEM_COMMON, operateType = OperateType.DELETE)
|
||||
@PostMapping("/removeBind")
|
||||
@ApiOperation("部门解除绑定监测点")
|
||||
@ApiImplicitParam(name = "id", value = "部门id", required = true)
|
||||
public HttpResult<Integer> removeBind(@RequestParam("id") String id) {
|
||||
String methodDescribe = getMethodDescribe("removeBind");
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, deptLineService.removeBind(id), methodDescribe);
|
||||
}
|
||||
|
||||
|
||||
@OperateInfo(info = LogEnum.SYSTEM_COMMON)
|
||||
@PostMapping("/getLineByDeptId")
|
||||
@ApiOperation("部门Id获取绑定监测点")
|
||||
@ApiImplicitParam(name = "id", value = "部门id", required = true)
|
||||
public HttpResult<List<String>> getLineByDeptId(@RequestParam("id") String id) {
|
||||
String methodDescribe = getMethodDescribe("getLineByDeptId");
|
||||
List<String> list = deptLineService.getLineByDeptId(id);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, list, methodDescribe);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -1,212 +0,0 @@
|
||||
package com.njcn.device.controller;
|
||||
|
||||
import cn.hutool.core.collection.CollectionUtil;
|
||||
import com.njcn.common.pojo.annotation.OperateInfo;
|
||||
import com.njcn.common.pojo.enums.common.LogEnum;
|
||||
import com.njcn.common.pojo.enums.response.CommonResponseEnum;
|
||||
import com.njcn.common.pojo.response.HttpResult;
|
||||
import com.njcn.common.utils.HttpResultUtil;
|
||||
import com.njcn.device.pojo.bo.BaseLineInfo;
|
||||
import com.njcn.device.pojo.dto.GeneralDeviceDTO;
|
||||
import com.njcn.device.pojo.param.DeviceInfoParam;
|
||||
import com.njcn.device.service.TerminalBaseService;
|
||||
import com.njcn.device.service.impl.GeneralDeviceService;
|
||||
import com.njcn.web.controller.BaseController;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiImplicitParams;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
/**
|
||||
* @author hongawen
|
||||
* @version 1.0.0
|
||||
* @date 2022年02月11日 09:28
|
||||
*/
|
||||
@Slf4j
|
||||
@Api(tags = "获取终端信息")
|
||||
@RestController
|
||||
@RequestMapping("/deviceInfo")
|
||||
@RequiredArgsConstructor
|
||||
public class GeneralDeviceInfoController extends BaseController {
|
||||
|
||||
|
||||
private final GeneralDeviceService generalDeviceService;
|
||||
|
||||
private final TerminalBaseService terminalBaseService;
|
||||
|
||||
/**
|
||||
* 获取按部门分类的实际运行终端综合信息
|
||||
*/
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/getPracticalRunDeviceInfoAsDept")
|
||||
@ApiOperation("获取按部门分类的实际运行终端综合信息")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "deviceInfoParam", value = "查询终端条件", required = true)
|
||||
})
|
||||
@Deprecated
|
||||
public HttpResult<List<GeneralDeviceDTO>> getPracticalRunDeviceInfoAsDept(@RequestBody @Validated DeviceInfoParam deviceInfoParam) {
|
||||
String methodDescribe = getMethodDescribe("getPracticalRunDeviceInfoAsDept");
|
||||
List<GeneralDeviceDTO> deptDeviceInfos = generalDeviceService.getDeviceInfoAsDept(deviceInfoParam, Stream.of(0).collect(Collectors.toList()), Stream.of(1).collect(Collectors.toList()));
|
||||
if (CollectionUtil.isEmpty(deptDeviceInfos)) {
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.NO_DATA, null, methodDescribe);
|
||||
} else {
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, deptDeviceInfos, methodDescribe);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取按部门分类的实际便携式终端综合信息
|
||||
*/
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/getOfflineRunDeviceInfoAsDept")
|
||||
@ApiOperation("获取按部门分类的实际便携式终端综合信息")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "deviceInfoParam", value = "查询终端条件", required = true)
|
||||
})
|
||||
@Deprecated
|
||||
public HttpResult<List<GeneralDeviceDTO>> getOfflineRunDeviceInfoAsDept(@RequestBody @Validated DeviceInfoParam deviceInfoParam) {
|
||||
String methodDescribe = getMethodDescribe("getOfflineRunDeviceInfoAsDept");
|
||||
List<GeneralDeviceDTO> deptDeviceInfos = generalDeviceService.getDeviceInfoAsDept(deviceInfoParam, Stream.of(0).collect(Collectors.toList()), Stream.of(2).collect(Collectors.toList()));
|
||||
if (CollectionUtil.isEmpty(deptDeviceInfos)) {
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.NO_DATA, null, methodDescribe);
|
||||
} else {
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, deptDeviceInfos, methodDescribe);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取按部门分类的实际所有终端综合信息
|
||||
*/
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/getPracticalAllDeviceInfoAsDept")
|
||||
@ApiOperation("获取按部门分类的实际所有终端综合信息")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "deviceInfoParam", value = "查询终端条件", required = true)
|
||||
})
|
||||
@Deprecated
|
||||
public HttpResult<List<GeneralDeviceDTO>> getPracticalAllDeviceInfoAsDept(@RequestBody @Validated DeviceInfoParam deviceInfoParam) {
|
||||
String methodDescribe = getMethodDescribe("getPracticalAllDeviceInfoAsDept");
|
||||
List<GeneralDeviceDTO> deptDeviceInfos = generalDeviceService.getDeviceInfoAsDept(deviceInfoParam, null, Stream.of(1).collect(Collectors.toList()));
|
||||
if (CollectionUtil.isEmpty(deptDeviceInfos)) {
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.NO_DATA, null, methodDescribe);
|
||||
} else {
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, deptDeviceInfos, methodDescribe);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 按变电站分类的实际终端综合信息
|
||||
*
|
||||
* 1、取变电站索引集合&排重
|
||||
* 2、根据变电站索引获取出名称+索引信息
|
||||
* 3、取所有监测点索引&排重
|
||||
* 4、获取所有检测的pids
|
||||
* 5、清洗数据
|
||||
*/
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/getPracticalRunDeviceInfoAsSubstation")
|
||||
@ApiOperation("获取按变电站分类的实际运行终端综合信息")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "deviceInfoParam", value = "查询终端条件", required = true)
|
||||
})
|
||||
@Deprecated
|
||||
public HttpResult<List<GeneralDeviceDTO>> getPracticalRunDeviceInfoAsSubstation(@RequestBody @Validated DeviceInfoParam deviceInfoParam) {
|
||||
String methodDescribe = getMethodDescribe("getPracticalRunDeviceInfoAsSubstation");
|
||||
List<GeneralDeviceDTO> substationDeviceInfos = generalDeviceService.getDeviceInfoAsSubstation(deviceInfoParam, Stream.of(0).collect(Collectors.toList()), Stream.of(1).collect(Collectors.toList()));
|
||||
if (CollectionUtil.isEmpty(substationDeviceInfos)) {
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.NO_DATA, null, methodDescribe);
|
||||
} else {
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, substationDeviceInfos, methodDescribe);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取实际运行终端综合信息
|
||||
*/
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/getPracticalRunDeviceInfo")
|
||||
@ApiOperation("获取实际运行终端综合信息")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "deviceInfoParam", value = "查询终端条件", required = true)
|
||||
})
|
||||
@Deprecated
|
||||
public HttpResult<List<GeneralDeviceDTO>> getPracticalRunDeviceInfo(@RequestBody @Validated DeviceInfoParam deviceInfoParam) {
|
||||
String methodDescribe = getMethodDescribe("getPracticalRunDeviceInfo");
|
||||
List<GeneralDeviceDTO> deptDeviceInfos = generalDeviceService.getDeviceInfo(deviceInfoParam, Stream.of(0).collect(Collectors.toList()), Stream.of(1).collect(Collectors.toList()));
|
||||
if (CollectionUtil.isEmpty(deptDeviceInfos)) {
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.NO_DATA, null, methodDescribe);
|
||||
} else {
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, deptDeviceInfos, methodDescribe);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取实际便携式终端综合信息
|
||||
*/
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/getOfflineRunDeviceInfo")
|
||||
@ApiOperation("获取实际便携式终端综合信息")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "deviceInfoParam", value = "查询终端条件", required = true)
|
||||
})
|
||||
@Deprecated
|
||||
public HttpResult<List<GeneralDeviceDTO>> getOfflineRunDeviceInfo(@RequestBody @Validated DeviceInfoParam deviceInfoParam) {
|
||||
String methodDescribe = getMethodDescribe("getOfflineRunDeviceInfo");
|
||||
List<GeneralDeviceDTO> deptDeviceInfos = generalDeviceService.getDeviceInfo(deviceInfoParam, Stream.of(0).collect(Collectors.toList()), Stream.of(2).collect(Collectors.toList()));
|
||||
if (CollectionUtil.isEmpty(deptDeviceInfos)) {
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.NO_DATA, null, methodDescribe);
|
||||
} else {
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, deptDeviceInfos, methodDescribe);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取实际所有终端综合信息
|
||||
*/
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/getPracticalAllDeviceInfo")
|
||||
@ApiOperation("获取实际所有终端综合信息")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "deviceInfoParam", value = "查询终端条件", required = true)
|
||||
})
|
||||
public HttpResult<List<GeneralDeviceDTO>> getPracticalAllDeviceInfo(@RequestBody @Validated DeviceInfoParam deviceInfoParam) {
|
||||
String methodDescribe = getMethodDescribe("getPracticalAllDeviceInfo");
|
||||
List<GeneralDeviceDTO> deptDeviceInfos = generalDeviceService.getDeviceInfo(deviceInfoParam, null, Stream.of(1).collect(Collectors.toList()));
|
||||
if (CollectionUtil.isEmpty(deptDeviceInfos)) {
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.NO_DATA, null, methodDescribe);
|
||||
} else {
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, deptDeviceInfos, methodDescribe);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取监测点及以上层的基础信息
|
||||
*/
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/getBaseLineInfo")
|
||||
@ApiOperation("获取监测点及以上层的基础信息")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "lineIndex", value = "监测点集合", required = true)
|
||||
})
|
||||
public HttpResult<List<BaseLineInfo>> getBaseLineInfo(@RequestBody List<String> lineIndex) {
|
||||
String methodDescribe = getMethodDescribe("getBaseLineInfo");
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, terminalBaseService.getBaseLineInfo(lineIndex), methodDescribe);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -1,371 +0,0 @@
|
||||
package com.njcn.device.controller;
|
||||
|
||||
import com.njcn.common.pojo.annotation.OperateInfo;
|
||||
import com.njcn.common.pojo.enums.common.LogEnum;
|
||||
import com.njcn.common.pojo.enums.response.CommonResponseEnum;
|
||||
import com.njcn.common.pojo.exception.BusinessException;
|
||||
import com.njcn.common.pojo.response.HttpResult;
|
||||
import com.njcn.common.utils.HttpResultUtil;
|
||||
import com.njcn.common.utils.LogUtil;
|
||||
import com.njcn.device.enums.DeviceResponseEnum;
|
||||
import com.njcn.device.mapper.DeviceMapper;
|
||||
import com.njcn.device.mapper.LineDetailMapper;
|
||||
import com.njcn.device.mapper.LineMapper;
|
||||
import com.njcn.device.pojo.dto.*;
|
||||
import com.njcn.device.pojo.param.LineBaseQueryParam;
|
||||
import com.njcn.device.pojo.po.Device;
|
||||
import com.njcn.device.pojo.po.Line;
|
||||
import com.njcn.device.pojo.po.LineDetail;
|
||||
import com.njcn.device.pojo.po.Overlimit;
|
||||
import com.njcn.device.pojo.vo.*;
|
||||
import com.njcn.device.service.LineService;
|
||||
import com.njcn.web.controller.BaseController;
|
||||
import io.swagger.annotations.*;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import springfox.documentation.annotations.ApiIgnore;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* @author denghuajun
|
||||
* @date 2022/2/23
|
||||
* 监测点相关
|
||||
*/
|
||||
@Slf4j
|
||||
@Api(tags = "监测点管理")
|
||||
@RestController
|
||||
@RequestMapping("/line")
|
||||
@RequiredArgsConstructor
|
||||
public class LineController extends BaseController {
|
||||
|
||||
private final LineService lineService;
|
||||
|
||||
private final DeviceMapper deviceMapper;
|
||||
|
||||
private final LineMapper lineMapper;
|
||||
|
||||
private final LineDetailMapper lineDetailMapper;
|
||||
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/getLineDetailData")
|
||||
@ApiOperation("根据监测点id获取监测点详情")
|
||||
@ApiImplicitParam(name = "id", value = "监测点id", required = true)
|
||||
public HttpResult<LineDetailDataVO> getLineDetailData(@RequestParam("id") String id) {
|
||||
String methodDescribe = getMethodDescribe("getLineDetailData");
|
||||
LineDetailDataVO result = lineService.getLineDetailData(id);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, result, methodDescribe);
|
||||
}
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/getLineOverLimitData")
|
||||
@ApiOperation("根据监测点id获取越限详情")
|
||||
@ApiImplicitParam(name = "id", value = "监测点id", required = true)
|
||||
public HttpResult<LineOverLimitVO> getLineOverLimitData(@RequestParam("id") String id) {
|
||||
String methodDescribe = getMethodDescribe("getLineOverLimitData");
|
||||
LineOverLimitVO result = lineService.getLineOverLimitData(id);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, result, methodDescribe);
|
||||
}
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/getSubstationData")
|
||||
@ApiOperation("根据变电站id获取变电站详情")
|
||||
@ApiImplicitParam(name = "id", value = "监测点id", required = true)
|
||||
public HttpResult<List<SubstationDetailVO>> getSubstationData(@RequestParam("id") List<String> id) {
|
||||
String methodDescribe = getMethodDescribe("getSubstationData");
|
||||
List<SubstationDetailVO> result = lineService.getSubstationData(id);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, result, methodDescribe);
|
||||
}
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/getComFlagInfoData")
|
||||
@ApiOperation("根据监测点Id终端状态信息")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "id", value = "监测点id", required = true),
|
||||
@ApiImplicitParam(name = "searchBeginTime", value = "起始时间"),
|
||||
@ApiImplicitParam(name = "searchEndTime", value = "截止时间")
|
||||
})
|
||||
public HttpResult<CommunicateVO> getComFlagInfoData(@RequestParam(required = false) @ApiParam("id") String id,
|
||||
@RequestParam("searchBeginTime") String searchBeginTime,
|
||||
@RequestParam("searchEndTime") String searchEndTime) {
|
||||
String methodDescribe = getMethodDescribe("getComFlagInfoData");
|
||||
CommunicateVO result = lineService.getComFlagInfoData(id, searchBeginTime, searchEndTime);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, result, methodDescribe);
|
||||
}
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/getLineIdByDevId")
|
||||
@ApiOperation("根据监测点Id终端状态信息")
|
||||
@ApiImplicitParam(name = "id", value = "监测点id", required = true)
|
||||
public HttpResult<String> getLineIdByDevId(@RequestParam(required = false) @ApiParam("id") String id) {
|
||||
String methodDescribe = getMethodDescribe("getComFlagInfoData");
|
||||
String result = lineService.getLineIdByDevId(id);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, result, methodDescribe);
|
||||
}
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/getOverLimitData")
|
||||
@ApiOperation("根据监测点id获取越限数值")
|
||||
@ApiImplicitParam(name = "id", value = "监测点id", required = true)
|
||||
public HttpResult<Overlimit> getOverLimitData(@RequestParam("id") String id) {
|
||||
String methodDescribe = getMethodDescribe("getLineOverLimitData");
|
||||
Overlimit result = lineService.getOverLimitData(id);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, result, methodDescribe);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取投运在线的监测点的限值
|
||||
*
|
||||
* @author cdf
|
||||
* @date 2022/3/23
|
||||
*/
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/getAllLineOverLimit")
|
||||
@ApiOperation("获取投运在线的监测点的限值")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "serverName", value = "服务名称", required = true),
|
||||
@ApiImplicitParam(name = "deptId", value = "部门id")
|
||||
})
|
||||
public HttpResult<List<Overlimit>> getAllLineOverLimit(@RequestParam("serverName") String serverName, @RequestParam(value = "deptId", required = false) String deptId) {
|
||||
String methodDescribe = getMethodDescribe("getAllLineOverLimit");
|
||||
List<Overlimit> result = lineService.getAllLineOverLimit(serverName, deptId);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, result, methodDescribe);
|
||||
}
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/getAllLine")
|
||||
@ApiOperation("获取所有监测点")
|
||||
@ApiImplicitParam(name = "id", value = "监测点集合", required = true)
|
||||
public HttpResult<List<LineDeviceStateVO>> getAllLine(@RequestBody List<String> id) {
|
||||
String methodDescribe = getMethodDescribe("getAllLine");
|
||||
List<LineDeviceStateVO> result = lineMapper.getLineDeviceStateVO(id);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, result, methodDescribe);
|
||||
}
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/getDeviceState")
|
||||
@ApiOperation("获取变电站详情(pq_line)")
|
||||
@ApiImplicitParam(name = "id", value = "变电站id", required = true)
|
||||
public HttpResult<Integer> getDeviceState(@RequestParam("id") String id) {
|
||||
String methodDescribe = getMethodDescribe("getDeviceState");
|
||||
String result = lineService.getLineIdByDevId(id);
|
||||
Device device = deviceMapper.selectById(result);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, device.getComFlag(), methodDescribe);
|
||||
}
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/getSubstationInfo")
|
||||
@ApiOperation("获取变电站信息")
|
||||
@ApiImplicitParam(name = "id", value = "变电站id", required = true)
|
||||
@ApiIgnore
|
||||
public HttpResult<PollutionSubstationDTO> getSubstationInfo(@RequestParam("id") String id) {
|
||||
String methodDescribe = getMethodDescribe("getSubstationInfo");
|
||||
LogUtil.njcnDebug(log, "{},变电站id:{}", methodDescribe, id);
|
||||
PollutionSubstationDTO pollutionSubstation = lineService.getSubstationInfo(id);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, pollutionSubstation, methodDescribe);
|
||||
}
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/getLineInfo")
|
||||
@ApiOperation("获取监测点信息")
|
||||
@ApiImplicitParam(name = "pollutionParamDTO", value = "对象", required = true)
|
||||
@ApiIgnore
|
||||
public HttpResult<List<PollutionLineDTO>> getLineInfo(@RequestBody PollutionParamDTO pollutionParamDTO) {
|
||||
String methodDescribe = getMethodDescribe("getLineInfo");
|
||||
LogUtil.njcnDebug(log, "{},对象:{}", methodDescribe, pollutionParamDTO);
|
||||
List<PollutionLineDTO> result = lineService.getLineInfo(pollutionParamDTO);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, result, methodDescribe);
|
||||
}
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/getLineSubGdDetail")
|
||||
@ApiOperation("根据监测点id集合获取详细信息")
|
||||
@ApiImplicitParam(name = "id", value = "监测点集合", required = true)
|
||||
@ApiIgnore
|
||||
public HttpResult<LineDetailVO> getLineSubGdDetail(@RequestParam("id") String id) {
|
||||
String methodDescribe = getMethodDescribe("getLineSubGdDetail");
|
||||
LineDetailVO result = lineMapper.getLineSubGdDetail(id);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, result, methodDescribe);
|
||||
}
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/getWarningSub")
|
||||
@ApiOperation("获取告警变电站信息")
|
||||
@ApiImplicitParam(name = "list", value = "变电站集合", required = true)
|
||||
@ApiIgnore
|
||||
public HttpResult<List<WarningSubstationDTO>> getWarningSub(@RequestParam("list") List<String> list) {
|
||||
String methodDescribe = getMethodDescribe("getWarningSub");
|
||||
LogUtil.njcnDebug(log, "{},变电站集合:{}", methodDescribe, list);
|
||||
List<WarningSubstationDTO> result = lineMapper.getWarningSub(list);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, result, methodDescribe);
|
||||
}
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/getOverLimitLineInfo")
|
||||
@ApiOperation("监测点稳态超标信息")
|
||||
@ApiImplicitParam(name = "pollutionParamDTO", value = "实体", required = true)
|
||||
public HttpResult<List<OverLimitLineDTO>> getOverLimitLineInfo(@RequestBody PollutionParamDTO pollutionParamDTO) {
|
||||
String methodDescribe = getMethodDescribe("getOverLimitLineInfo");
|
||||
LogUtil.njcnDebug(log, "{},变电站集合:{}", methodDescribe, pollutionParamDTO);
|
||||
List<OverLimitLineDTO> result = lineMapper.getOverLimitLineInfo(pollutionParamDTO.getLineList());
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, result, methodDescribe);
|
||||
}
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/getLineList")
|
||||
@ApiOperation("获取生成limitRate的监测点")
|
||||
@ApiIgnore
|
||||
public HttpResult<List<String>> getLineList() {
|
||||
String methodDescribe = getMethodDescribe("getLineList");
|
||||
List<String> result = lineMapper.getLineList();
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, result, methodDescribe);
|
||||
}
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/getOverLimitByList")
|
||||
@ApiOperation("获取监测点限值")
|
||||
@ApiImplicitParam(name = "pollutionParamDTO", value = "实体", required = true)
|
||||
@ApiIgnore
|
||||
public HttpResult<List<Overlimit>> getOverLimitByList(@RequestBody PollutionParamDTO pollutionParamDTO) {
|
||||
String methodDescribe = getMethodDescribe("getOverLimitByList");
|
||||
LogUtil.njcnDebug(log, "{},监测点集合:{}", methodDescribe, pollutionParamDTO);
|
||||
List<Overlimit> result = lineService.getOverLimitByList(pollutionParamDTO);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, result, methodDescribe);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取监测点及以上层的基础信息(含区域信息)
|
||||
*/
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/getBaseLineAreaInfo")
|
||||
@ApiOperation("获取监测点及以上层的基础信息(含区域信息)")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "lineIndex", value = "监测点集合", required = true)
|
||||
})
|
||||
public HttpResult<List<AreaLineInfoVO>> getBaseLineAreaInfo(@RequestBody List<String> lineIndex) {
|
||||
String methodDescribe = getMethodDescribe("getBaseLineAreaInfo");
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, lineService.getBaseLineAreaInfo(lineIndex,null,null), methodDescribe);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取丰富的监测点信息(扩展模糊查询)
|
||||
*/
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/getRichLineInfo")
|
||||
@ApiOperation("获取丰富的监测点信息(扩展模糊查询)")
|
||||
@ApiImplicitParam(name = "lineBaseQueryParam", value = "监测点参数", required = true)
|
||||
public HttpResult<List<AreaLineInfoVO>> getRichLineInfo(@RequestBody @Validated LineBaseQueryParam lineBaseQueryParam) {
|
||||
String methodDescribe = getMethodDescribe("getRichLineInfo");
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, lineService.getBaseLineAreaInfo(lineBaseQueryParam.getLineIds(),lineBaseQueryParam.getSearchValue(),lineBaseQueryParam.getComFlag()), methodDescribe);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 根据监测点ids获取监测点基本信息
|
||||
* @author cdf
|
||||
* @date 2022/6/30
|
||||
*/
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/getBaseLineList")
|
||||
@ApiOperation("获取最基础的监测点信息")
|
||||
@ApiImplicitParam(name = "lineIndex", value = "监测点集合", required = true)
|
||||
public HttpResult<List<Line>> getBaseLineList(@RequestBody List<String> lineIndex) {
|
||||
String methodDescribe = getMethodDescribe("getBaseLineList");
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, lineService.getBaseLineList(lineIndex), methodDescribe);
|
||||
}
|
||||
|
||||
/**
|
||||
* 功能描述: 获取指定条件的监测点信息
|
||||
* @author xy
|
||||
* @date 2022/7/8 14:24
|
||||
* @return 监测点详情集合
|
||||
*/
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/getLineDetail")
|
||||
@ApiOperation("根据监测点集合获取监测点详情")
|
||||
@ApiImplicitParam(name = "list", value = "监测点集合")
|
||||
@ApiIgnore
|
||||
public HttpResult<List<LineDetail>> getLineDetail(@RequestParam(required = false) List<String> list) {
|
||||
String methodDescribe = getMethodDescribe("getLineDetail");
|
||||
LogUtil.njcnDebug(log, "{},监测点集合:{}", methodDescribe, list);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, lineDetailMapper.getSpecifyLineDetail(list), methodDescribe);
|
||||
}
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/getDeviceList")
|
||||
@ApiOperation("获取生成在线率的装置Id")
|
||||
@ApiIgnore
|
||||
public HttpResult<List<String>> getDeviceList() {
|
||||
String methodDescribe = getMethodDescribe("getDeviceList");
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, lineMapper.getDeviceList(), methodDescribe);
|
||||
}
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/getRunLineIdsList")
|
||||
@ApiOperation("获取生成在线率的监测点Id")
|
||||
public HttpResult<List<String>> getRunLineIdsList() {
|
||||
String methodDescribe = getMethodDescribe("getRunLineIdsList");
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, lineMapper.getRunLineIdsList(), methodDescribe);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取当前状态在线的监测点数量
|
||||
* @param lineIds 监测点集合
|
||||
* @return 在线的监测点数量
|
||||
* @author cdf
|
||||
* @date 2022/8/1
|
||||
*/
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/getOnLineCount")
|
||||
@ApiOperation("获取当前状态在线的监测点数量")
|
||||
@ApiImplicitParam(name = "lineIds", value = "监测点集合", required = true)
|
||||
public HttpResult<Integer> getOnLineCount(@RequestBody List<String> lineIds) {
|
||||
String methodDescribe = getMethodDescribe("getOnLineCount");
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, lineMapper.getOnLineCount(lineIds), methodDescribe);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取当前状态在线和离线的监测点
|
||||
* @param lineBaseQueryParam 监测点查询参数
|
||||
* @return 在线的监测点id集
|
||||
* @author cdf
|
||||
* @date 2022/8/1
|
||||
*/
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/getOnOrUnLine")
|
||||
@ApiOperation("获取当前状态在线和离线的监测点")
|
||||
@ApiImplicitParam(name = "lineBaseQueryParam", value = "监测点查询参数", required = true)
|
||||
public HttpResult<List<String>> getOnOrUnLine(@RequestBody @Validated LineBaseQueryParam lineBaseQueryParam) {
|
||||
String methodDescribe = getMethodDescribe("getOnOrUnLine");
|
||||
if(Objects.isNull(lineBaseQueryParam.getComFlag())){
|
||||
throw new BusinessException(DeviceResponseEnum.PARAM_VAL_ERR);
|
||||
}
|
||||
List<String> idsRes = lineMapper.getOnOrUnLine(lineBaseQueryParam.getLineIds(),lineBaseQueryParam.getComFlag());
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS,idsRes, methodDescribe);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取监测点设备id
|
||||
* @param lineIds 监测点集合
|
||||
* @return 监测点设备id
|
||||
* @author cdf
|
||||
* @date 2022/8/1
|
||||
*/
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/getOnLineDevLine")
|
||||
@ApiOperation("获取当前状态在线的监测点数量")
|
||||
@ApiImplicitParam(name = "lineIds", value = "监测点集合", required = true)
|
||||
public HttpResult<List<OnlineLineDTO>> getOnLineDevLine(@RequestBody List<String> lineIds) {
|
||||
String methodDescribe = getMethodDescribe("getOnLineDevLine");
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, lineMapper.getOnLineDevLine(lineIds), methodDescribe);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -1,162 +0,0 @@
|
||||
package com.njcn.device.controller;
|
||||
|
||||
import cn.afterturn.easypoi.excel.ExcelExportUtil;
|
||||
import cn.afterturn.easypoi.excel.ExcelImportUtil;
|
||||
import cn.afterturn.easypoi.excel.entity.ExportParams;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.njcn.common.pojo.annotation.OperateInfo;
|
||||
import com.njcn.common.pojo.constant.OperateType;
|
||||
import com.njcn.common.pojo.enums.common.LogEnum;
|
||||
import com.njcn.common.pojo.enums.response.CommonResponseEnum;
|
||||
import com.njcn.common.pojo.response.HttpResult;
|
||||
import com.njcn.common.utils.HttpResultUtil;
|
||||
import com.njcn.device.pojo.bo.excel.LineMark;
|
||||
import com.njcn.device.pojo.param.TerminalMainQueryParam;
|
||||
import com.njcn.device.pojo.po.LineDetail;
|
||||
import com.njcn.device.pojo.vo.LineMarkVO;
|
||||
import com.njcn.device.service.LineMarkService;
|
||||
import com.njcn.poi.util.PoiUtil;
|
||||
import com.njcn.web.controller.BaseController;
|
||||
import io.swagger.annotations.*;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.poi.ss.usermodel.Workbook;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* pqs
|
||||
* 监测点评分控制
|
||||
* @author cdf
|
||||
* @date 2022/5/10
|
||||
*/
|
||||
@Slf4j
|
||||
@Api(tags = "监测点评分管理")
|
||||
@RestController
|
||||
@RequestMapping("/mark")
|
||||
@RequiredArgsConstructor
|
||||
public class LineMarkController extends BaseController {
|
||||
private final LineMarkService lineMarkService;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 批量导入监测点评分
|
||||
* @author cdf
|
||||
* @date 2022/5/10
|
||||
*/
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/batchExport")
|
||||
@ApiOperation("批量导入监测点评分")
|
||||
public HttpResult<String> batchExport(@ApiParam(value = "文件", required = true) @RequestPart("file") MultipartFile file, HttpServletResponse response){
|
||||
String methodDescribe = getMethodDescribe("batchExport");
|
||||
String res = lineMarkService.batchExport(file,response);
|
||||
if(res.equals(CommonResponseEnum.SUCCESS.getMessage())){
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);
|
||||
}else if(res.equals(CommonResponseEnum.FAIL.getMessage())) {
|
||||
return null;
|
||||
}else {
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.FAIL, res, methodDescribe);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出excel头模板
|
||||
* @author cdf
|
||||
* @date 2022/6/8
|
||||
*/
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@GetMapping("/heardExport")
|
||||
@ApiOperation("导出excel头模板")
|
||||
public void heardExport(HttpServletResponse response){
|
||||
ExportParams exportParams = new ExportParams();
|
||||
Workbook workbook = ExcelExportUtil.exportExcel(exportParams,LineMark.class,new ArrayList<>());
|
||||
PoiUtil.exportFileByWorkbook(workbook,"",response);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取监测点评分列表
|
||||
* @author cdf
|
||||
* @date 2022/5/11
|
||||
*/
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/getLineMark")
|
||||
@ApiOperation("查询监测点评分列表")
|
||||
@ApiImplicitParam(name = "terminalMainQueryParam", value = "监测点评分参数体")
|
||||
HttpResult<IPage<LineMarkVO>> getLineMark(@RequestBody TerminalMainQueryParam terminalMainQueryParam){
|
||||
String methodDescribe = getMethodDescribe("getLineMark");
|
||||
IPage<LineMarkVO> resList = lineMarkService.getLineMark(terminalMainQueryParam);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, resList, methodDescribe);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取监测点评分列表
|
||||
* @author cdf
|
||||
* @date 2022/5/11
|
||||
*/
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/exportLineMark")
|
||||
@ApiOperation("导出监测点评分列表")
|
||||
@ApiImplicitParam(name = "terminalMainQueryParam", value = "监测点评分参数体")
|
||||
void exportLineMark(@RequestBody TerminalMainQueryParam terminalMainQueryParam,HttpServletResponse response){
|
||||
List<LineMark> resList = lineMarkService.exportLineMark(terminalMainQueryParam);
|
||||
ExportParams exportParams = new ExportParams();
|
||||
|
||||
Workbook workbook = ExcelExportUtil.exportExcel(exportParams,LineMark.class,resList);
|
||||
PoiUtil.exportFileByWorkbook(workbook,"监测点评分台账",response);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @author cdf
|
||||
* @date 2022/5/11
|
||||
*/
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON,operateType = OperateType.UPDATE)
|
||||
@PostMapping("/singleOperate")
|
||||
@ApiOperation("修改单个监测点等级")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "id", value = "监测点id", required = true),
|
||||
@ApiImplicitParam(name = "lineGrade", value = "监测点等级", required = true),
|
||||
})
|
||||
public HttpResult<Object> singleOperate(@RequestParam("id") String id, @RequestParam("lineGrade")String lineGrade){
|
||||
String methodDescribe = getMethodDescribe("singleOperate");
|
||||
boolean res = lineMarkService.singleOperate(id,lineGrade);
|
||||
if(res){
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);
|
||||
}else {
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.FAIL, null, methodDescribe);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取单个监测点评级
|
||||
*
|
||||
* @author cdf
|
||||
* @date 2022/5/11
|
||||
*/
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@ApiOperation("获取单个监测点评级")
|
||||
@ApiImplicitParam(name = "id", value = "监测点id", required = true)
|
||||
@GetMapping("getLineGradeById")
|
||||
public HttpResult<LineDetail> getLineGradeById(@RequestParam("id") String id) {
|
||||
String methodDescribe = getMethodDescribe("getLineGradeById");
|
||||
LineDetail lineLedger = lineMarkService.getLineGradeById(id);
|
||||
if (Objects.nonNull(lineLedger)) {
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, lineLedger, methodDescribe);
|
||||
}
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.FAIL, null, methodDescribe);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -1,63 +0,0 @@
|
||||
package com.njcn.device.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.njcn.common.pojo.annotation.OperateInfo;
|
||||
import com.njcn.common.pojo.enums.common.LogEnum;
|
||||
import com.njcn.common.pojo.enums.response.CommonResponseEnum;
|
||||
import com.njcn.common.pojo.response.HttpResult;
|
||||
import com.njcn.common.utils.HttpResultUtil;
|
||||
import com.njcn.device.pojo.param.DeviceLogParam;
|
||||
import com.njcn.device.pojo.param.EventLogParam;
|
||||
import com.njcn.device.pojo.vo.DeviceLogVO;
|
||||
import com.njcn.device.pojo.vo.EventLogVO;
|
||||
import com.njcn.device.service.LogManageService;
|
||||
import com.njcn.web.controller.BaseController;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/**
|
||||
* @version 1.0.0
|
||||
* @author: chenchao
|
||||
* @date: 2022/05/26 16:08
|
||||
*/
|
||||
@Validated
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("/logManage")
|
||||
@Api(tags = "日志管理")
|
||||
@AllArgsConstructor
|
||||
public class LogManageController extends BaseController {
|
||||
|
||||
private final LogManageService deviceLogService;
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/getDeviceLogData")
|
||||
@ApiOperation("终端运维日志")
|
||||
@ApiImplicitParam(name = "deviceLogParam", value = "查询终端日志信息", required = true)
|
||||
public HttpResult<Page<DeviceLogVO>> getDeviceLogData(@RequestBody @Validated DeviceLogParam deviceLogParam){
|
||||
String methodDescribe = getMethodDescribe("getDeviceLogData");
|
||||
Page<DeviceLogVO> list = deviceLogService.getDeviceLogData(deviceLogParam);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, list, methodDescribe);
|
||||
}
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/getEventLogData")
|
||||
@ApiOperation("暂降推送日志")
|
||||
@ApiImplicitParam(name = "eventLogParam", value = "查询终端日志信息", required = true)
|
||||
public HttpResult<Page<EventLogVO>> getEventLogData(@RequestBody @Validated EventLogParam eventLogParam){
|
||||
String methodDescribe = getMethodDescribe("getEventLogData");
|
||||
Page<EventLogVO> list = deviceLogService.getEventLogData(eventLogParam);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, list, methodDescribe);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -1,173 +0,0 @@
|
||||
package com.njcn.device.controller;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.njcn.common.pojo.annotation.OperateInfo;
|
||||
import com.njcn.common.pojo.constant.OperateType;
|
||||
import com.njcn.common.pojo.enums.common.LogEnum;
|
||||
import com.njcn.common.pojo.enums.response.CommonResponseEnum;
|
||||
import com.njcn.common.pojo.exception.BusinessException;
|
||||
import com.njcn.common.pojo.response.HttpResult;
|
||||
import com.njcn.common.utils.HttpResultUtil;
|
||||
import com.njcn.device.pojo.param.NodeParam;
|
||||
import com.njcn.device.pojo.po.Node;
|
||||
import com.njcn.device.service.INodeService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiImplicitParams;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import com.njcn.web.controller.BaseController;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* 前置程序控制器
|
||||
* @author cdf
|
||||
* @since 2022-01-07
|
||||
*/
|
||||
@Slf4j
|
||||
@Api(tags = "前置机管理")
|
||||
@RestController
|
||||
@RequestMapping("node")
|
||||
@RequiredArgsConstructor
|
||||
public class NodeController extends BaseController {
|
||||
|
||||
private final INodeService iNodeService;
|
||||
|
||||
/**
|
||||
* 新增前置机
|
||||
* @author cdf
|
||||
* @date 2021/6/23
|
||||
*/
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON,operateType = OperateType.ADD)
|
||||
@ApiOperation("新增前置机")
|
||||
@ApiImplicitParam(value = "前置机信息",name = "nodeParam",required = true)
|
||||
@PostMapping("addNode")
|
||||
public HttpResult<Boolean> addNode(@Validated @RequestBody NodeParam nodeParam){
|
||||
String methodDescribe = getMethodDescribe("addNode");
|
||||
boolean result = iNodeService.addNode(nodeParam);
|
||||
if (result){
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, true, methodDescribe);
|
||||
} else {
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.FAIL, false, methodDescribe);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改前置机
|
||||
* @author cdf
|
||||
* @date 2021/6/23
|
||||
*/
|
||||
@ApiOperation("修改前置机")
|
||||
@ApiImplicitParam(value = "前置机信息",name = "updateNodeParam",required = true)
|
||||
@PutMapping("updateNode")
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON,operateType = OperateType.UPDATE)
|
||||
public HttpResult<Boolean> updateNode(@Validated @RequestBody NodeParam.NodeUpdateParam updateNodeParam){
|
||||
String methodDescribe = getMethodDescribe("updateNode");
|
||||
boolean result = iNodeService.updateNode(updateNodeParam);
|
||||
if (result){
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, true, methodDescribe);
|
||||
} else {
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.FAIL, false, methodDescribe);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除前置
|
||||
* @author cdf
|
||||
* @date 2021/6/23
|
||||
*/
|
||||
@ApiOperation(value = "删除前置机")
|
||||
@ApiImplicitParam(value = "前置机id",name = "id",required = true)
|
||||
@PostMapping("delNode")
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON,operateType = OperateType.DELETE)
|
||||
public HttpResult<Boolean> delNode(@Validated @NotNull(message = "id不可为空") @RequestParam("id")String id){
|
||||
String methodDescribe = getMethodDescribe("delNode");
|
||||
boolean result = iNodeService.delNode(id);
|
||||
if (result){
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, true, methodDescribe);
|
||||
} else {
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.FAIL, false, methodDescribe);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 变更前置机状态
|
||||
* @author cdf
|
||||
* @date 2021/6/23
|
||||
*/
|
||||
@ApiOperation(value = "变更前置机状态")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(value = "前置机id",name = "id",required = true ),
|
||||
@ApiImplicitParam(value = "前置机状态",name = "state",required = true )
|
||||
})
|
||||
@PostMapping("updateNodeState")
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON,operateType = OperateType.UPDATE)
|
||||
public HttpResult<Boolean> updateNodeState(@Validated @NotNull(message = "id不可为空") @RequestParam("id")String id,@NotNull(message = "状态不为空") @RequestParam("state")Integer state){
|
||||
String methodDescribe = getMethodDescribe("updateNodeState");
|
||||
boolean result = iNodeService.updateNodeState(id,state);
|
||||
if (result){
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, true, methodDescribe);
|
||||
} else {
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.FAIL, false, methodDescribe);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取全部前置机分页
|
||||
* @author cdf
|
||||
* @date 2021/6/23
|
||||
*/
|
||||
@ApiOperation("获取全部前置机")
|
||||
@OperateInfo(info = LogEnum.BUSINESS_MEDIUM)
|
||||
@PostMapping("nodeList")
|
||||
public HttpResult<Page<Node>> nodeList(@RequestBody NodeParam.NodeQueryParam nodeQueryParam){
|
||||
String methodDescribe = getMethodDescribe("nodeList");
|
||||
Page<Node> page = iNodeService.nodeList(nodeQueryParam);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, page, methodDescribe);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取全部前置机不分页
|
||||
* @author cdf
|
||||
* @date 2021/6/23
|
||||
*/
|
||||
@ApiOperation("获取全部前置机")
|
||||
@OperateInfo(info = LogEnum.BUSINESS_MEDIUM)
|
||||
@GetMapping("nodeAllList")
|
||||
public HttpResult<List<Node>> nodeAllList(){
|
||||
String methodDescribe = getMethodDescribe("nodeAllList");
|
||||
List<Node> resList = iNodeService.nodeAllList();
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, resList, methodDescribe);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id获取前置机
|
||||
* @author cdf
|
||||
* @date 2021/6/23
|
||||
*/
|
||||
@ApiOperation("根据id获取前置机")
|
||||
@ApiImplicitParam(value = "前置机id",name = "id",required = true)
|
||||
@OperateInfo(info = LogEnum.BUSINESS_MEDIUM)
|
||||
@GetMapping("getNodeById")
|
||||
public HttpResult<Node> getNodeById(@Validated @NotNull(message = "id不可为空") @RequestParam("id")String id){
|
||||
String methodDescribe = getMethodDescribe("getNodeById");
|
||||
Node node = iNodeService.getNodeById(id);
|
||||
if(Objects.isNull(node)){
|
||||
throw new BusinessException(CommonResponseEnum.FAIL);
|
||||
}else {
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, node, methodDescribe);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -1,110 +0,0 @@
|
||||
package com.njcn.device.controller;
|
||||
|
||||
import com.njcn.common.pojo.annotation.OperateInfo;
|
||||
import com.njcn.common.pojo.enums.common.LogEnum;
|
||||
import com.njcn.common.pojo.enums.response.CommonResponseEnum;
|
||||
import com.njcn.common.pojo.response.HttpResult;
|
||||
import com.njcn.common.utils.HttpResultUtil;
|
||||
import com.njcn.common.utils.LogUtil;
|
||||
import com.njcn.device.pojo.param.DeviceInfoParam;
|
||||
import com.njcn.device.pojo.vo.*;
|
||||
import com.njcn.device.service.LineService;
|
||||
import com.njcn.web.controller.BaseController;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiImplicitParams;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author denghuajun
|
||||
* @version 1.0.0
|
||||
* @date 2022年05月11日 15:24
|
||||
*/
|
||||
@Slf4j
|
||||
@Api(tags = "运维中心")
|
||||
@RestController
|
||||
@RequestMapping("/operation")
|
||||
@RequiredArgsConstructor
|
||||
public class OperationContrController extends BaseController {
|
||||
|
||||
private final LineService lineService;
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/getLineDistribution")
|
||||
@ApiOperation("获取监测点分布")
|
||||
@ApiImplicitParam(name = "deviceInfoParam", value = "实体", required = true)
|
||||
public HttpResult<List<LineDistributionVO>> getLineDistribution(@RequestBody @Validated DeviceInfoParam deviceInfoParam) {
|
||||
String methodDescribe = getMethodDescribe("getLineDistribution");
|
||||
LogUtil.njcnDebug(log, "{},参数集合:{}", methodDescribe, deviceInfoParam);
|
||||
List<LineDistributionVO> result = lineService.getLineDistribution(deviceInfoParam);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, result, methodDescribe);
|
||||
}
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/getLineStatisticsDetail")
|
||||
@ApiOperation("获取监测点统计")
|
||||
@ApiImplicitParam(name = "deviceInfoParam", value = "实体", required = true)
|
||||
public HttpResult<List<LineStatisticsDetailVO>> getLineStatisticsDetail(@RequestBody @Validated DeviceInfoParam.BusinessParam deviceInfoParam) {
|
||||
String methodDescribe = getMethodDescribe("getLineStatisticsDetail");
|
||||
LogUtil.njcnDebug(log, "{},参数集合:{}", methodDescribe, deviceInfoParam);
|
||||
List<LineStatisticsDetailVO> result = lineService.getLineStatisticsDetail(deviceInfoParam);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, result, methodDescribe);
|
||||
}
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/getLineStatisticsTable")
|
||||
@ApiOperation("获取监测点表格统计")
|
||||
@ApiImplicitParam(name = "deviceInfoParam", value = "实体", required = true)
|
||||
public HttpResult<List<LineStatisticsTableVO>> getLineStatisticsTable(@RequestBody @Validated DeviceInfoParam.BusinessParam deviceInfoParam) {
|
||||
String methodDescribe = getMethodDescribe("getLineStatisticsTable");
|
||||
LogUtil.njcnDebug(log, "{},参数集合:{}", methodDescribe, deviceInfoParam);
|
||||
List<LineStatisticsTableVO> result = lineService.getLineStatisticsTable(deviceInfoParam);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, result, methodDescribe);
|
||||
}
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/getLineRunStatistics")
|
||||
@ApiOperation("获取监测点运行统计")
|
||||
@ApiImplicitParam(name = "deviceInfoParam", value = "实体", required = true)
|
||||
public HttpResult<List<LineFlowMealDetailVO>> getLineRunStatistics(@RequestBody @Validated DeviceInfoParam.BusinessParam deviceInfoParam) {
|
||||
String methodDescribe = getMethodDescribe("getLineRunStatistics");
|
||||
LogUtil.njcnDebug(log, "{},参数集合:{}", methodDescribe, deviceInfoParam);
|
||||
List<LineFlowMealDetailVO> result = lineService.getLineRunStatistics(deviceInfoParam);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, result, methodDescribe);
|
||||
}
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/getLineStaticsView")
|
||||
@ApiOperation("获取详细的监测点统计")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "startTime", value = "起始时间", required = true),
|
||||
@ApiImplicitParam(name = "endTime", value = "结束时间", required = true),
|
||||
@ApiImplicitParam(name = "lineId", value = "监测点id", required = true)
|
||||
})
|
||||
public HttpResult<LineStaticsViewVO> getLineStaticsView(@Param("startTime") String startTime, @Param("endTime") String endTime, @Param("lineId") String lineId) {
|
||||
String methodDescribe = getMethodDescribe("getLineStaticsView");
|
||||
LineStaticsViewVO result = lineService.getLineStaticsView(startTime, endTime, lineId);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, result, methodDescribe);
|
||||
}
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/getComunicateStatics")
|
||||
@ApiOperation("获取中断异常统计")
|
||||
@ApiImplicitParam(name = "conditionBusinessParam", value = "实体", required = true)
|
||||
public HttpResult<DeviceAbnormalVO> getComunicateStatics(@RequestBody @Validated DeviceInfoParam.BusinessParam conditionBusinessParam) {
|
||||
String methodDescribe = getMethodDescribe("getComunicateStatics");
|
||||
DeviceAbnormalVO result = lineService.getComunicateStatics(conditionBusinessParam);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, result, methodDescribe);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,134 +0,0 @@
|
||||
package com.njcn.device.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.njcn.common.pojo.annotation.OperateInfo;
|
||||
import com.njcn.common.pojo.enums.common.LogEnum;
|
||||
import com.njcn.common.pojo.enums.response.CommonResponseEnum;
|
||||
import com.njcn.common.pojo.exception.BusinessException;
|
||||
import com.njcn.common.pojo.response.HttpResult;
|
||||
import com.njcn.common.utils.HttpResultUtil;
|
||||
import com.njcn.device.pojo.vo.VersionVO;
|
||||
import com.njcn.device.service.ProgramVersionService;
|
||||
import com.njcn.web.controller.BaseController;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.annotations.ApiParam;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import java.time.LocalDate;
|
||||
|
||||
/**
|
||||
* @version 1.0.0
|
||||
* @author: chenchao
|
||||
* @date: 2022/05/19 14:44
|
||||
*/
|
||||
@Validated
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("/programVersion")
|
||||
@Api(tags = "终端版本维护")
|
||||
@AllArgsConstructor
|
||||
public class ProgramVersionController extends BaseController {
|
||||
|
||||
private final ProgramVersionService programService;
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/getProgramVersion")
|
||||
@ApiOperation("程序版本查询")
|
||||
public HttpResult<Page<VersionVO>> getProgramVersion(@RequestParam(value = "devType",required = false) String devType,@RequestParam("pageSize") Integer pageSize,@RequestParam("pageNum") Integer pageNum) {
|
||||
String methodDescribe = getMethodDescribe("getProgramVersion");
|
||||
Page<VersionVO> list = programService.getProgramVersion(devType, pageSize, pageNum);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, list, methodDescribe);
|
||||
}
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@ResponseBody
|
||||
@PostMapping("/addProgramVersion")
|
||||
@ApiOperation("新增程序版本")
|
||||
public HttpResult addProgramVersion(@RequestParam("name") String name,
|
||||
@RequestParam("protocol") String protocol,
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd") @RequestParam("date") LocalDate date,
|
||||
@RequestParam("devType") String devType,
|
||||
@RequestParam("remark") String remark,
|
||||
@RequestParam(value = "versionType",required = false) String versionType,
|
||||
@ApiParam(value = "文件", required = true) @RequestPart("file") MultipartFile file) {
|
||||
String methodDescribe = getMethodDescribe("addProgramVersion");
|
||||
boolean res = programService.addProgramVersion(name,protocol,date,devType,remark,versionType,file);
|
||||
if (res) {
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);
|
||||
} else {
|
||||
throw new BusinessException(CommonResponseEnum.FAIL);
|
||||
}
|
||||
}
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/getProgramVersionById")
|
||||
@ApiOperation("版本文件是否存在")
|
||||
@ApiImplicitParam(name = "id", value = "终端版本id", required = true)
|
||||
public HttpResult getProgramVersionById(@RequestParam("id") String id) {
|
||||
String methodDescribe = getMethodDescribe("getProgramVersionById");
|
||||
boolean res = programService.getProgramVersionById(id);
|
||||
if (res) {
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.FILE_EXIST, null, methodDescribe);
|
||||
} else {
|
||||
throw new BusinessException(CommonResponseEnum.NO_DATA);
|
||||
}
|
||||
}
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/updateProgramVersion")
|
||||
@ApiOperation("修改程序版本")
|
||||
public HttpResult updateProgramVersion(@RequestParam("id") String id,
|
||||
@RequestParam("name") String name,
|
||||
@RequestParam("protocol") String protocol,
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd") @RequestParam("date") LocalDate date,
|
||||
@RequestParam("devType") String devType,
|
||||
@RequestParam("remark") String remark,
|
||||
@RequestParam(value = "versionType",required = false) String versionType,
|
||||
@ApiParam(value = "文件", required = true) @RequestPart("file") MultipartFile file) {
|
||||
String methodDescribe = getMethodDescribe("updateProgramVersion");
|
||||
boolean res = programService.updateProgramVersion(id,name,protocol,date,devType,remark,versionType,file);
|
||||
if (res) {
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);
|
||||
} else {
|
||||
throw new BusinessException(CommonResponseEnum.FAIL);
|
||||
}
|
||||
}
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/updateVersionFlag")
|
||||
@ApiOperation("修改程序版本状态")
|
||||
@ApiImplicitParam(name = "id", value = "终端版本id", required = true)
|
||||
public HttpResult updateVersionFlag(@RequestParam("id") String id) {
|
||||
String methodDescribe = getMethodDescribe("updateVersionFlag");
|
||||
boolean res = programService.updateVersionFlag(id);
|
||||
if (res) {
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);
|
||||
} else {
|
||||
throw new BusinessException(CommonResponseEnum.FAIL);
|
||||
}
|
||||
}
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/delProgramVersion")
|
||||
@ApiOperation("删除程序版本")
|
||||
@ApiImplicitParam(name = "id", value = "终端版本id", required = true)
|
||||
public HttpResult delProgramVersion(@RequestParam("id") String id) {
|
||||
String methodDescribe = getMethodDescribe("delProgramVersion");
|
||||
boolean res = programService.delProgramVersion(id);
|
||||
if (res) {
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);
|
||||
} else {
|
||||
throw new BusinessException(CommonResponseEnum.FAIL);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -1,158 +0,0 @@
|
||||
package com.njcn.device.controller;
|
||||
|
||||
import com.njcn.common.pojo.annotation.OperateInfo;
|
||||
import com.njcn.common.pojo.enums.common.LogEnum;
|
||||
import com.njcn.common.pojo.enums.response.CommonResponseEnum;
|
||||
import com.njcn.common.pojo.exception.BusinessException;
|
||||
import com.njcn.common.pojo.response.HttpResult;
|
||||
import com.njcn.common.utils.HttpResultUtil;
|
||||
import com.njcn.device.pojo.param.FlowMealParam;
|
||||
import com.njcn.device.pojo.param.FlowStrategyParam;
|
||||
import com.njcn.device.pojo.vo.FlowStrategyVO;
|
||||
import com.njcn.device.pojo.vo.RateOfFlowVO;
|
||||
import com.njcn.device.pojo.vo.ShowFlowStrategyVO;
|
||||
import com.njcn.device.service.FlowMealService;
|
||||
import com.njcn.device.service.FlowStrategyService;
|
||||
import com.njcn.web.controller.BaseController;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @version 1.0.0
|
||||
* @author: chenchao
|
||||
* @date: 2022/05/11 10:08
|
||||
*/
|
||||
@Validated
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("/rateOfFlow")
|
||||
@Api(tags = "流量管理")
|
||||
@AllArgsConstructor
|
||||
public class RateOfFlowController extends BaseController {
|
||||
|
||||
private final FlowMealService flowMealService;
|
||||
|
||||
private final FlowStrategyService flowStrategyService;
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/getRateOfFlowData")
|
||||
@ApiOperation("流量套餐管理")
|
||||
public HttpResult<List<RateOfFlowVO>> getRateOfFlowData(){
|
||||
String methodDescribe = getMethodDescribe("getRateOfFlowData");
|
||||
List<RateOfFlowVO> list = flowMealService.getRateOfFlowData();
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, list, methodDescribe);
|
||||
}
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/addRateOfFlowData")
|
||||
@ApiOperation("新增流量套餐")
|
||||
@ApiImplicitParam(name = "flowMealParam", value = "流量套餐信息", required = true)
|
||||
public HttpResult addRateOfFlowData(@RequestBody @Validated FlowMealParam flowMealParam){
|
||||
String methodDescribe = getMethodDescribe("addRateOfFlowData");
|
||||
boolean res = flowMealService.addRateOfFlowData(flowMealParam);
|
||||
if (res) {
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);
|
||||
} else {
|
||||
throw new BusinessException(CommonResponseEnum.FAIL);
|
||||
}
|
||||
}
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/updateRateOfFlowData")
|
||||
@ApiOperation("修改流量套餐")
|
||||
@ApiImplicitParam(name = "flowMealUpdateParam", value = "套餐更改信息", required = true)
|
||||
public HttpResult updateRateOfFlowData(@RequestBody @Validated FlowMealParam.FlowMealUpdateParam flowMealUpdateParam){
|
||||
String methodDescribe = getMethodDescribe("updateRateOfFlowData");
|
||||
boolean res = flowMealService.updateRateOfFlowData(flowMealUpdateParam);
|
||||
if (res) {
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);
|
||||
} else {
|
||||
throw new BusinessException(CommonResponseEnum.FAIL);
|
||||
}
|
||||
}
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/deleteRateOfFlowData")
|
||||
@ApiOperation("删除流量套餐")
|
||||
@ApiImplicitParam(name = "id", value = "套餐更改id", required = true)
|
||||
public HttpResult deleteRateOfFlowData(@NotNull(message = "id不可为空") @RequestParam("id")String id){
|
||||
String methodDescribe = getMethodDescribe("deleteRateOfFlowData");
|
||||
boolean res = flowMealService.deleteRateOfFlowData(id);
|
||||
if (res) {
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);
|
||||
} else {
|
||||
throw new BusinessException(CommonResponseEnum.FAIL);
|
||||
}
|
||||
}
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/getRateOfFlowStrategy")
|
||||
@ApiOperation("流量策略管理")
|
||||
public HttpResult<List<FlowStrategyVO>> getRateOfFlowStrategy(){
|
||||
String methodDescribe = getMethodDescribe("getRateOfFlowStrategy");
|
||||
List<FlowStrategyVO> list = flowStrategyService.getRateOfFlowStrategy();
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, list, methodDescribe);
|
||||
}
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/addRateOfFlowStrategy")
|
||||
@ApiOperation("新增流量策略")
|
||||
@ApiImplicitParam(name = "flowStrategyParam", value = "流量套餐信息", required = true)
|
||||
public HttpResult addRateOfFlowStrategy(@RequestBody @Validated FlowStrategyParam flowStrategyParam){
|
||||
String methodDescribe = getMethodDescribe("addRateOfFlowStrategy");
|
||||
boolean res = flowStrategyService.addRateOfFlowStrategy(flowStrategyParam);
|
||||
if (res) {
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);
|
||||
} else {
|
||||
throw new BusinessException(CommonResponseEnum.FAIL);
|
||||
}
|
||||
}
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/getFlowStrategyById")
|
||||
@ApiOperation("流量策略数据回显")
|
||||
@ApiImplicitParam(name = "id", value = "流量策略id", required = true)
|
||||
public HttpResult<ShowFlowStrategyVO> getFlowStrategyById(@RequestParam("id") String id){
|
||||
String methodDescribe = getMethodDescribe("getFlowStrategyById");
|
||||
ShowFlowStrategyVO result = flowStrategyService.getFlowStrategyById(id);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, result, methodDescribe);
|
||||
}
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/updateRateOfFlowStrategy")
|
||||
@ApiOperation("修改流量策略")
|
||||
@ApiImplicitParam(name = "flowStrategyUpdateParam", value = "流量策略更改信息", required = true)
|
||||
public HttpResult updateRateOfFlowStrategy(@RequestBody @Validated FlowStrategyParam.FlowStrategyUpdateParam flowStrategyUpdateParam){
|
||||
String methodDescribe = getMethodDescribe("updateRateOfFlowStrategy");
|
||||
boolean res = flowStrategyService.updateRateOfFlowStrategy(flowStrategyUpdateParam);
|
||||
if (res) {
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);
|
||||
} else {
|
||||
throw new BusinessException(CommonResponseEnum.FAIL);
|
||||
}
|
||||
}
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/deleteRateOfFlowStrategy")
|
||||
@ApiOperation("删除流量策略")
|
||||
@ApiImplicitParam(name = "id", value = "策略更改id", required = true)
|
||||
public HttpResult deleteRateOfFlowStrategy(@NotNull(message = "id不可为空") @RequestParam("id")String id){
|
||||
String methodDescribe = getMethodDescribe("deleteRateOfFlowStrategy");
|
||||
boolean res = flowStrategyService.deleteRateOfFlowStrategy(id);
|
||||
if (res) {
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);
|
||||
} else {
|
||||
throw new BusinessException(CommonResponseEnum.FAIL);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -1,80 +0,0 @@
|
||||
package com.njcn.device.controller;
|
||||
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.date.format.DatePrinter;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.njcn.common.pojo.annotation.OperateInfo;
|
||||
import com.njcn.common.pojo.enums.common.LogEnum;
|
||||
import com.njcn.common.pojo.enums.response.CommonResponseEnum;
|
||||
import com.njcn.common.pojo.response.HttpResult;
|
||||
import com.njcn.common.utils.HttpResultUtil;
|
||||
import com.njcn.common.utils.PubUtils;
|
||||
import com.njcn.device.pojo.param.DeviceInfoParam;
|
||||
import com.njcn.device.pojo.param.RunManageParam;
|
||||
import com.njcn.device.pojo.param.TerminalLedgerParam;
|
||||
import com.njcn.device.pojo.vo.LineDetailDataVO;
|
||||
import com.njcn.device.pojo.vo.RunManageVO;
|
||||
import com.njcn.device.pojo.vo.RunTimeVO;
|
||||
import com.njcn.device.pojo.vo.TerminalLedgerVO;
|
||||
import com.njcn.device.service.RunManageService;
|
||||
import com.njcn.web.controller.BaseController;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.text.DateFormat;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 运行管理
|
||||
*
|
||||
* @author denghuajun
|
||||
* @version 1.0.0
|
||||
* @date 2022/3/30
|
||||
*/
|
||||
@Slf4j
|
||||
@Api(tags = "运行管理")
|
||||
@RestController
|
||||
@RequestMapping("/runManage")
|
||||
@RequiredArgsConstructor
|
||||
public class RunManageController extends BaseController {
|
||||
|
||||
private final RunManageService runManageService;
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/getLineLedger")
|
||||
@ApiOperation("监测点台账信息")
|
||||
@ApiImplicitParam(name = "runManageParam", value = "监测点台账参数", required = true)
|
||||
public HttpResult<List<RunManageVO>> getLineLedger(@RequestBody @Validated RunManageParam runManageParam) {
|
||||
String methodDescribe = getMethodDescribe("getLineLedger");
|
||||
List<RunManageVO> res = runManageService.getLineLedger(runManageParam);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, res, methodDescribe);
|
||||
}
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/getRuntimeData")
|
||||
@ApiOperation("终端台账信息")
|
||||
@ApiImplicitParam(name = "runManageParam", value = "终端台账参数", required = true)
|
||||
public HttpResult<List<RunTimeVO>> getRuntimeData(@RequestBody @Validated RunManageParam runManageParam) {
|
||||
String methodDescribe = getMethodDescribe("getRuntimeData");
|
||||
List<RunTimeVO> result = runManageService.getRuntimeDetail(runManageParam);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, result, methodDescribe);
|
||||
}
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/getTerminalLedger")
|
||||
@ApiOperation("终端台账统计")
|
||||
@ApiImplicitParam(name = "deviceInfoParam", value = "终端台账参数", required = true)
|
||||
public HttpResult<List<TerminalLedgerVO>> getTerminalLedger(@RequestBody @Validated DeviceInfoParam deviceInfoParam) {
|
||||
String methodDescribe = getMethodDescribe("getTerminalLedger");
|
||||
List<TerminalLedgerVO> result = runManageService.getTerminalLedger(deviceInfoParam);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, result, methodDescribe);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,58 +0,0 @@
|
||||
package com.njcn.device.controller;
|
||||
|
||||
import com.alibaba.nacos.client.naming.utils.CollectionUtils;
|
||||
import com.njcn.common.pojo.annotation.OperateInfo;
|
||||
import com.njcn.common.pojo.enums.common.LogEnum;
|
||||
import com.njcn.common.pojo.enums.response.CommonResponseEnum;
|
||||
import com.njcn.common.pojo.response.HttpResult;
|
||||
import com.njcn.common.utils.HttpResultUtil;
|
||||
import com.njcn.common.utils.LogUtil;
|
||||
import com.njcn.device.pojo.param.TabCensusParam;
|
||||
import com.njcn.device.pojo.vo.DeviceOnlineTabVO;
|
||||
import com.njcn.device.service.DeviceOnlineDataService;
|
||||
import com.njcn.web.controller.BaseController;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @version 1.0.0
|
||||
* @author: chenchao
|
||||
* @date: 2022/08/16 14:34
|
||||
*/
|
||||
@Validated
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("/tabCensus")
|
||||
@Api(tags = "列表统计")
|
||||
@AllArgsConstructor
|
||||
public class TabCensusController extends BaseController {
|
||||
|
||||
private final DeviceOnlineDataService deviceOnlineDataService;
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/getDeviceOnlineData")
|
||||
@ApiOperation("获取终端在线率列表")
|
||||
@ApiImplicitParam(name = "tabCensusParam", value = "区域统计查询参数", required = true)
|
||||
public HttpResult<List<DeviceOnlineTabVO>> getDeviceOnlineData(@RequestBody @Validated TabCensusParam tabCensusParam) {
|
||||
String methodDescribe = getMethodDescribe("getDeviceOnlineData");
|
||||
LogUtil.njcnDebug(log, "{}", methodDescribe, tabCensusParam);
|
||||
List<DeviceOnlineTabVO> result = deviceOnlineDataService.getDeviceOnlineData(tabCensusParam);
|
||||
if (CollectionUtils.isEmpty(result)) {
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.NO_DATA, null, methodDescribe);
|
||||
} else {
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, result, methodDescribe);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -1,94 +0,0 @@
|
||||
package com.njcn.device.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.njcn.common.pojo.annotation.OperateInfo;
|
||||
import com.njcn.common.pojo.constant.OperateType;
|
||||
import com.njcn.common.pojo.enums.common.LogEnum;
|
||||
import com.njcn.common.pojo.enums.response.CommonResponseEnum;
|
||||
import com.njcn.common.pojo.response.HttpResult;
|
||||
import com.njcn.common.utils.HttpResultUtil;
|
||||
import com.njcn.common.utils.PubUtils;
|
||||
import com.njcn.device.pojo.param.AlarmParam;
|
||||
import com.njcn.device.pojo.vo.TerminalAlarmVO;
|
||||
import com.njcn.device.service.TerminalAlarmService;
|
||||
import com.njcn.web.controller.BaseController;
|
||||
import com.njcn.web.pojo.annotation.DateTimeStrValid;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiImplicitParams;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* pqs
|
||||
* 终端告警管理
|
||||
* @author cdf
|
||||
* @date 2022/5/12
|
||||
*/
|
||||
@Slf4j
|
||||
@Api(tags = "终端告警管理")
|
||||
@RestController
|
||||
@RequestMapping("/alarm")
|
||||
@RequiredArgsConstructor
|
||||
public class TerminalAlarmController extends BaseController {
|
||||
|
||||
private final TerminalAlarmService terminalAlarmService;
|
||||
|
||||
/**
|
||||
* 查询告警主列表
|
||||
* @author cdf
|
||||
* @date 2022/5/17
|
||||
*/
|
||||
@PostMapping("/alarmList")
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@ApiOperation("查询告警主列表")
|
||||
@ApiImplicitParam(name = "alarmParam", value = "告警类型")
|
||||
public HttpResult<Page<TerminalAlarmVO>> alarmInfoList(@RequestBody @Validated AlarmParam alarmParam){
|
||||
String methodDescribe = getMethodDescribe("alarmInfoList");
|
||||
Page<TerminalAlarmVO> res = terminalAlarmService.alarmList(alarmParam);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, res, methodDescribe);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取告警详情
|
||||
* @author cdf
|
||||
* @date 2022/5/23
|
||||
*/
|
||||
@PostMapping("/alarmDetail")
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@ApiOperation("获取告警详情")
|
||||
@ApiImplicitParam(name = "alarmParam", value = "告警类型")
|
||||
public HttpResult<List<TerminalAlarmVO>> alarmInfoDetail(@RequestBody @Validated AlarmParam alarmParam){
|
||||
String methodDescribe = getMethodDescribe("alarmInfoDetail");
|
||||
List<TerminalAlarmVO> res = terminalAlarmService.alarmDetail(alarmParam);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, res, methodDescribe);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 批量修改告警
|
||||
* @author cdf
|
||||
* @date 2022/5/23
|
||||
*/
|
||||
@PostMapping("updateAlarmInfo")
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON,operateType = OperateType.UPDATE)
|
||||
@ApiOperation("批量修改告警")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "type", value = "告警类型"),
|
||||
@ApiImplicitParam(name = "devLineId", value = "监测点装置id"),
|
||||
|
||||
})
|
||||
public HttpResult<Object> updateAlarmInfo(@RequestParam("type") String type,@RequestParam("devLineId")String devLineId){
|
||||
String methodDescribe = getMethodDescribe("updateAlarmInfo");
|
||||
terminalAlarmService.updateAlarmInfo(type,devLineId);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,277 +0,0 @@
|
||||
package com.njcn.device.controller;
|
||||
|
||||
import cn.afterturn.easypoi.excel.ExcelExportUtil;
|
||||
import cn.afterturn.easypoi.excel.entity.ExportParams;
|
||||
import cn.afterturn.easypoi.excel.entity.enmus.ExcelType;
|
||||
import cn.hutool.core.collection.CollectionUtil;
|
||||
import com.njcn.common.pojo.annotation.OperateInfo;
|
||||
import com.njcn.common.pojo.constant.OperateType;
|
||||
import com.njcn.common.pojo.enums.common.LogEnum;
|
||||
import com.njcn.common.pojo.enums.response.CommonResponseEnum;
|
||||
import com.njcn.common.pojo.exception.BusinessException;
|
||||
import com.njcn.common.pojo.response.HttpResult;
|
||||
import com.njcn.common.utils.HttpResultUtil;
|
||||
import com.njcn.common.utils.LogUtil;
|
||||
import com.njcn.device.enums.DeviceResponseEnum;
|
||||
import com.njcn.device.pojo.bo.DeviceType;
|
||||
import com.njcn.device.pojo.bo.excel.TerminalBaseExcel;
|
||||
import com.njcn.device.pojo.param.*;
|
||||
import com.njcn.device.pojo.po.Device;
|
||||
import com.njcn.device.pojo.po.Line;
|
||||
import com.njcn.device.pojo.vo.AreaLineInfoVO;
|
||||
import com.njcn.device.pojo.vo.TerminalBaseVO;
|
||||
import com.njcn.device.pojo.vo.TerminalVO;
|
||||
import com.njcn.device.service.TerminalBaseService;
|
||||
import com.njcn.poi.excel.ExcelUtil;
|
||||
import com.njcn.poi.util.PoiUtil;
|
||||
import com.njcn.web.controller.BaseController;
|
||||
import io.swagger.annotations.*;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.poi.ss.usermodel.Workbook;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
import springfox.documentation.annotations.ApiIgnore;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import javax.validation.Valid;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* pqs
|
||||
*
|
||||
* @author cdf
|
||||
* @date 2022/1/4
|
||||
*/
|
||||
@Slf4j
|
||||
@Api(tags = "装置管理")
|
||||
@RestController
|
||||
@RequestMapping("/device")
|
||||
@RequiredArgsConstructor
|
||||
public class TerminalBaseController extends BaseController {
|
||||
|
||||
private final TerminalBaseService terminalBaseService;
|
||||
|
||||
|
||||
/**
|
||||
* 终端新增操作
|
||||
*
|
||||
* @author cdf
|
||||
* @date 2021/7/5
|
||||
*/
|
||||
@ApiOperation("终端新增操作")
|
||||
@OperateInfo(operateType = OperateType.ADD, info = LogEnum.BUSINESS_MEDIUM)
|
||||
@PostMapping("addTerminal")
|
||||
public HttpResult<Object> addTerminal(@Valid @RequestBody AddTerminalParam addTerminalParam) {
|
||||
String methodDescribe = getMethodDescribe("addTerminal");
|
||||
//装置母线监测点相关检验
|
||||
List<String> voltageName = new ArrayList<>();
|
||||
if (CollectionUtil.isNotEmpty(addTerminalParam.getDeviceParam())) {
|
||||
//校验装置是否存在重名
|
||||
List<DeviceParam> listDev = addTerminalParam.getDeviceParam();
|
||||
List<String> devName = listDev.stream().map(DeviceParam::getName).collect(Collectors.toList());
|
||||
long count = devName.stream().distinct().count();
|
||||
if (count != devName.size()) {
|
||||
throw new BusinessException(DeviceResponseEnum.DEVICE_REPETITION);
|
||||
}
|
||||
//校验装置是否存在重复ip
|
||||
List<String> devIp = listDev.stream().map(DeviceParam::getIp).collect(Collectors.toList());
|
||||
long countIp = devIp.stream().distinct().count();
|
||||
if (countIp != devIp.size()) {
|
||||
throw new BusinessException(DeviceResponseEnum.DEVICE_IP_REPETITION);
|
||||
}
|
||||
|
||||
//校验母线名称
|
||||
for (DeviceParam deviceParam : listDev) {
|
||||
if (CollectionUtil.isNotEmpty(deviceParam.getSubVoltageParam())) {
|
||||
List<SubVoltageParam> subvList = deviceParam.getSubVoltageParam();
|
||||
List<String> subVName = subvList.stream().map(SubVoltageParam::getName).collect(Collectors.toList());
|
||||
voltageName.addAll(subVName);
|
||||
//校验监测点名称
|
||||
for (SubVoltageParam subVoltageParam : subvList) {
|
||||
if (CollectionUtil.isNotEmpty(subVoltageParam.getLineParam())) {
|
||||
List<LineParam> listLine = subVoltageParam.getLineParam();
|
||||
List<String> lineName = listLine.stream().map(LineParam::getName).collect(Collectors.toList());
|
||||
long countLine = lineName.stream().distinct().count();
|
||||
if (countLine != lineName.size()) {
|
||||
throw new BusinessException(DeviceResponseEnum.LINE_NAME_REPETITION);
|
||||
}
|
||||
List<Integer> lineNum = listLine.stream().map(LineParam::getNum).collect(Collectors.toList());
|
||||
long countNum = lineNum.stream().distinct().count();
|
||||
if (countNum != lineNum.size()) {
|
||||
throw new BusinessException(DeviceResponseEnum.LINE_NUM_REPETITION);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
long countSubV = voltageName.stream().distinct().count();
|
||||
if (countSubV != voltageName.size()) {
|
||||
throw new BusinessException(DeviceResponseEnum.SUBV_NAME_REPETITION);
|
||||
}
|
||||
}
|
||||
terminalBaseService.addTerminal(addTerminalParam);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 终端修改操作
|
||||
*
|
||||
* @author cdf
|
||||
* @date 2021/7/19
|
||||
*/
|
||||
@ApiOperation("终端修改操作")
|
||||
@OperateInfo(operateType = OperateType.UPDATE, info = LogEnum.BUSINESS_MEDIUM)
|
||||
@PutMapping("updateTerminal")
|
||||
public HttpResult<Object> updateTerminal(@Valid @RequestBody UpdateTerminalParam updateTerminalParam) {
|
||||
String methodDescribe = getMethodDescribe("updateTerminal");
|
||||
terminalBaseService.updateTerminal(updateTerminalParam);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id level获取终端相关信息
|
||||
*
|
||||
* @author cdf
|
||||
* @date 2021/7/19
|
||||
*/
|
||||
@ApiOperation("查询终端详情")
|
||||
@OperateInfo(info = LogEnum.BUSINESS_MEDIUM)
|
||||
@GetMapping("queryTerminal")
|
||||
public HttpResult<TerminalVO> queryTerminal(@RequestParam("id") String id) {
|
||||
String methodDescribe = getMethodDescribe("queryTerminal");
|
||||
TerminalVO t = terminalBaseService.queryTerminal(id);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, t, methodDescribe);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 根据id和节点level删除当前节点以及下级节点
|
||||
*
|
||||
* @author cdf
|
||||
* @date 2021/7/21
|
||||
*/
|
||||
@ApiOperation("终端删除操作")
|
||||
@OperateInfo(operateType = OperateType.DELETE, info = LogEnum.BUSINESS_SERIOUS)
|
||||
@DeleteMapping("delTerminal")
|
||||
public HttpResult<Object> delTerminal(@RequestParam("id") String id) {
|
||||
String methodDescribe = getMethodDescribe("delTerminal");
|
||||
terminalBaseService.delTerminal(id);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 功能描述:根据变电站id获取变电站详情
|
||||
*
|
||||
* @param list
|
||||
* @return
|
||||
* @author xy
|
||||
* @date 2022/2/21 18:53
|
||||
*/
|
||||
@ApiOperation("获取变电站信息")
|
||||
@OperateInfo
|
||||
@GetMapping("/getSubstationById")
|
||||
@ApiIgnore
|
||||
public HttpResult<List<Line>> getSubstationById(@RequestParam("list") List<String> list) {
|
||||
String methodDescribe = getMethodDescribe("getSubstationById");
|
||||
LogUtil.njcnDebug(log, "{},变电站集合为:{}", methodDescribe, list);
|
||||
List<Line> subList = terminalBaseService.getSubstationById(list);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, subList, methodDescribe);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 根据设备id集获取设备集信息
|
||||
*
|
||||
* @param list 设备集合
|
||||
* @author cdf
|
||||
* @date 2022/6/29
|
||||
*/
|
||||
@ApiOperation("获取装置信息")
|
||||
@OperateInfo
|
||||
@PostMapping("/getDevInfoByIds")
|
||||
public HttpResult<List<TerminalBaseVO>> getDevInfoByIds(@RequestBody List<String> list) {
|
||||
String methodDescribe = getMethodDescribe("getDevInfoByIds");
|
||||
LogUtil.njcnDebug(log, "{},设备集合为:{}", methodDescribe, list);
|
||||
List<TerminalBaseVO> devList = terminalBaseService.getDeviceByIdOnOrOff(list, new DeviceType(), 0);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, devList, methodDescribe);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量导入oracle中的原始数据
|
||||
*
|
||||
* @param file 上传的数据文件
|
||||
* @return 返回导入结果
|
||||
*/
|
||||
@ResponseBody
|
||||
@ApiOperation("批量导入oracle中的原始数据")
|
||||
@PostMapping(value = "importOracleTerminalData")
|
||||
public HttpResult<String> importOracleTerminalData(@ApiParam(value = "文件", required = true) @RequestPart("file") MultipartFile file, HttpServletResponse response) {
|
||||
String methodDescribe = getMethodDescribe("importOracleTerminalData");
|
||||
if (Objects.isNull(terminalBaseService.importOracleTerminalData(file, response))) {
|
||||
return null;
|
||||
}
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 导出台账
|
||||
*
|
||||
* @author cdf
|
||||
* @date 2022/5/17
|
||||
*/
|
||||
@ResponseBody
|
||||
@ApiOperation("导出台账信息")
|
||||
@GetMapping(value = "exportTerminalBase")
|
||||
public HttpResult<String> exportTerminalBase(HttpServletResponse response) {
|
||||
String methodDescribe = getMethodDescribe("exportTerminalBase");
|
||||
String fileName = "台账信息.xls";
|
||||
List<TerminalBaseExcel> baseExcelList = null;
|
||||
try {
|
||||
baseExcelList = terminalBaseService.exportTerminalBase();
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.FAIL, null, methodDescribe);
|
||||
}
|
||||
ExportParams exportExcel = new ExportParams("批量导入模板(请严格按照模板标准填入数据)", "台账信息");
|
||||
Workbook workbook = ExcelExportUtil.exportExcel(exportExcel, TerminalBaseExcel.class, baseExcelList);
|
||||
PoiUtil.exportFileByWorkbook(workbook, fileName, response);
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出台账生成的excel
|
||||
*
|
||||
* @author cdf
|
||||
* @date 2022/5/17
|
||||
*/
|
||||
@ApiOperation("导出台账模板")
|
||||
@GetMapping(value = "downTerminalTemplate")
|
||||
public void downTerminalTemplate(HttpServletResponse response) {
|
||||
terminalBaseService.downTerminalTemplate(response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导入excel台账模板
|
||||
*
|
||||
* @author cdf
|
||||
* @date 2022/5/18
|
||||
*/
|
||||
@ResponseBody
|
||||
@ApiOperation("excel批量导入台账信息")
|
||||
@PostMapping(value = "importTerminalBase")
|
||||
public HttpResult<String> importTerminalBase(@ApiParam(value = "文件", required = true) @RequestPart("file") MultipartFile file, HttpServletResponse response) {
|
||||
String methodDescribe = getMethodDescribe("importTerminalBase");
|
||||
terminalBaseService.importTerminalBase(file, response);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -1,192 +0,0 @@
|
||||
package com.njcn.device.controller;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.njcn.common.pojo.annotation.OperateInfo;
|
||||
import com.njcn.common.pojo.constant.OperateType;
|
||||
import com.njcn.common.pojo.enums.common.LogEnum;
|
||||
import com.njcn.common.pojo.enums.response.CommonResponseEnum;
|
||||
import com.njcn.common.pojo.exception.BusinessException;
|
||||
import com.njcn.common.pojo.response.HttpResult;
|
||||
import com.njcn.common.utils.HttpResultUtil;
|
||||
import com.njcn.device.pojo.param.TerminalMainQueryParam;
|
||||
import com.njcn.device.pojo.param.TerminalParam;
|
||||
import com.njcn.device.pojo.po.MonthFlow;
|
||||
import com.njcn.device.pojo.vo.TerminalMaintainVO;
|
||||
import com.njcn.device.service.TerminalMaintainService;
|
||||
import com.njcn.web.controller.BaseController;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* pqs
|
||||
* 终端运维管理
|
||||
*
|
||||
* @author cdf
|
||||
* @date 2022/5/11
|
||||
*/
|
||||
@Slf4j
|
||||
@Api(tags = "终端运维管理")
|
||||
@RestController
|
||||
@RequestMapping("maintain")
|
||||
@RequiredArgsConstructor
|
||||
@Validated
|
||||
public class TerminalMaintainController extends BaseController {
|
||||
|
||||
private final TerminalMaintainService terminalMaintainService;
|
||||
|
||||
/**
|
||||
* 查询终端运维主界面列表
|
||||
*
|
||||
* @author cdf
|
||||
* @date 2022/5/11
|
||||
*/
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/getTerminalMainList")
|
||||
@ApiOperation("获取终端运维主列表")
|
||||
public HttpResult<List<TerminalMaintainVO>> getTerminalMainList(TerminalMainQueryParam terminalMainQueryParam) {
|
||||
String methodDescribe = getMethodDescribe("getTerminalMainList");
|
||||
List<TerminalMaintainVO> resList = terminalMaintainService.getTerminalMainList(terminalMainQueryParam);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, resList, methodDescribe);
|
||||
}
|
||||
|
||||
/**
|
||||
* 终端状态管理,流量管理,流量策略管理主界面
|
||||
*
|
||||
* @param ids 装置id集
|
||||
* @author cdf
|
||||
* @date 2022/5/11
|
||||
*/
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/getStatusManageList")
|
||||
@ApiOperation("终端状态管理列表")
|
||||
public HttpResult<List<TerminalMaintainVO>> getStatusManageList(@RequestBody @NotEmpty(message = "id不可为空") List<String> ids) {
|
||||
String methodDescribe = getMethodDescribe("getStatusManageList");
|
||||
List<TerminalMaintainVO> resList = terminalMaintainService.getManageList(ids, 0);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, resList, methodDescribe);
|
||||
}
|
||||
|
||||
/**
|
||||
* 终端流量配置主界面
|
||||
*
|
||||
* @author cdf
|
||||
* @date 2022/5/11
|
||||
*/
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/getFlowManageList")
|
||||
@ApiOperation("终端流量管理列表")
|
||||
public HttpResult<List<TerminalMaintainVO>> getFlowManageList(@RequestBody @NotEmpty(message = "id不可为空") List<String> ids) {
|
||||
String methodDescribe = getMethodDescribe("getFlowManageList");
|
||||
List<TerminalMaintainVO> resList = terminalMaintainService.getManageList(ids, 1);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, resList, methodDescribe);
|
||||
}
|
||||
|
||||
/**
|
||||
* 终端流量策略配置主界面
|
||||
*
|
||||
* @author cdf
|
||||
* @date 2022/5/11
|
||||
*/
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/getFlowStrategyManageList")
|
||||
@ApiOperation("终端流量策略列表")
|
||||
public HttpResult<List<TerminalMaintainVO>> getFlowStrategyManageList(@RequestBody @NotEmpty(message = "id不可为空") List<String> ids) {
|
||||
String methodDescribe = getMethodDescribe("getFlowStrategyManageList");
|
||||
List<TerminalMaintainVO> resList = terminalMaintainService.getManageList(ids, 2);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, resList, methodDescribe);
|
||||
}
|
||||
|
||||
/**
|
||||
* 流量统计主界面
|
||||
*
|
||||
*/
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/getFlowStatisticsList")
|
||||
@ApiOperation("查看流量统计列表")
|
||||
public HttpResult<Page<MonthFlow>> getFlowStatisticsList(@RequestBody TerminalParam terminalParam) {
|
||||
String methodDescribe = getMethodDescribe("getFlowStatisticsList");
|
||||
Page<MonthFlow> resList = terminalMaintainService.getFlowStatic(terminalParam);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, resList, methodDescribe);
|
||||
}
|
||||
/**
|
||||
* 批量修改终端状态
|
||||
*
|
||||
* @author cdf
|
||||
* @date 2022/5/12
|
||||
*/
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON, operateType = OperateType.UPDATE)
|
||||
@PostMapping("/updateRunFlagManage")
|
||||
@ApiOperation("批量修改终端状态")
|
||||
@ApiImplicitParam(name = "terminalParam", value = "实体", required = true)
|
||||
public HttpResult<List<TerminalMaintainVO>> updateRunFlagManage(@RequestBody TerminalParam terminalParam) {
|
||||
String methodDescribe = getMethodDescribe("updateRunFlagManage");
|
||||
if(Objects.isNull(terminalParam.getRunFlag())){
|
||||
throw new BusinessException(CommonResponseEnum.ILLEGAL_ARGUMENT_EXCEPTION);
|
||||
}
|
||||
boolean res = terminalMaintainService.updateRunFlagManage(terminalParam);
|
||||
if (res) {
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);
|
||||
} else {
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.FAIL, null, methodDescribe);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 批量修改终端流量
|
||||
*
|
||||
* @author cdf
|
||||
* @date 2022/5/12
|
||||
*/
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON, operateType = OperateType.UPDATE)
|
||||
@PostMapping("/updateDevFlowMeal")
|
||||
@ApiOperation("批量修改终端流量套餐")
|
||||
@ApiImplicitParam(name = "terminalParam", value = "实体", required = true)
|
||||
public HttpResult<Object> updateDevFlowMeal(@RequestBody TerminalParam terminalParam) {
|
||||
String methodDescribe = getMethodDescribe("updateDevFlowMeal");
|
||||
if(StrUtil.isBlank(terminalParam.getBaseMealId()) && StrUtil.isBlank(terminalParam.getExtendMealId())){
|
||||
throw new BusinessException(CommonResponseEnum.ILLEGAL_ARGUMENT_EXCEPTION);
|
||||
}
|
||||
boolean res = terminalMaintainService.updateFlowMeal(terminalParam);
|
||||
if (res) {
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);
|
||||
} else {
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.FAIL, null, methodDescribe);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 批量修改终端流量策略
|
||||
*
|
||||
* @author cdf
|
||||
* @date 2022/5/12
|
||||
*/
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON, operateType = OperateType.UPDATE)
|
||||
@PostMapping("/updateDevFlowStrategy")
|
||||
@ApiOperation("批量修改终端流量策略")
|
||||
@ApiImplicitParam(name = "terminalParam", value = "实体", required = true)
|
||||
public HttpResult<Object> updateDevFlowStrategy(@RequestBody TerminalParam terminalParam) {
|
||||
String methodDescribe = getMethodDescribe("updateDevFlowStrategy");
|
||||
if(StrUtil.isBlank(terminalParam.getFlowStrategyId())){
|
||||
throw new BusinessException(CommonResponseEnum.ILLEGAL_ARGUMENT_EXCEPTION);
|
||||
}
|
||||
boolean res = terminalMaintainService.updateFlowStrategy(terminalParam);
|
||||
if (res) {
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);
|
||||
} else {
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.FAIL, null, methodDescribe);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -1,98 +0,0 @@
|
||||
package com.njcn.device.controller;
|
||||
|
||||
|
||||
import com.njcn.common.pojo.annotation.OperateInfo;
|
||||
import com.njcn.common.pojo.constant.OperateType;
|
||||
import com.njcn.common.pojo.enums.common.LogEnum;
|
||||
import com.njcn.common.pojo.enums.response.CommonResponseEnum;
|
||||
import com.njcn.common.pojo.response.HttpResult;
|
||||
import com.njcn.common.utils.HttpResultUtil;
|
||||
import com.njcn.device.pojo.param.DeviceInfoParam;
|
||||
import com.njcn.device.pojo.vo.DeptLineTreeVO;
|
||||
import com.njcn.device.pojo.vo.TerminalTree;
|
||||
import com.njcn.device.service.TerminalTreeService;
|
||||
import com.njcn.device.service.impl.GeneralDeviceService;
|
||||
import com.njcn.web.controller.BaseController;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiImplicitParams;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* pqs
|
||||
* 终端树控制器
|
||||
* @author cdf
|
||||
* @date 2021/7/19
|
||||
*/
|
||||
@Slf4j
|
||||
@Api(tags = "终端树管理")
|
||||
@RestController
|
||||
@AllArgsConstructor
|
||||
@RequestMapping("/terminalTree")
|
||||
public class TerminalTreeController extends BaseController {
|
||||
|
||||
private final TerminalTreeService terminalTreeService;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 获取终端台账设备树
|
||||
* @author cdf
|
||||
* @date 2021/7/19
|
||||
*/
|
||||
@ApiOperation("获取终端树")
|
||||
@OperateInfo(info = LogEnum.BUSINESS_MEDIUM)
|
||||
@GetMapping("getTerminalTree")
|
||||
public HttpResult<List<TerminalTree>> getTerminalTree(){
|
||||
String methodDescribe = getMethodDescribe("getTerminalTree");
|
||||
List<TerminalTree> tree = terminalTreeService.getTerminalTree();
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, tree, methodDescribe);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取终端台账设备树
|
||||
* @author cdf
|
||||
* @date 2021/7/19
|
||||
*/
|
||||
|
||||
@ApiOperation("获取5层终端树")
|
||||
@OperateInfo(info = LogEnum.BUSINESS_MEDIUM)
|
||||
@PostMapping("getTerminalTreeForFive")
|
||||
@ApiImplicitParam(name = "deviceInfoParam", value = "台账查询参数", required = true)
|
||||
public HttpResult<List<TerminalTree>> getTerminalTreeForFive(@RequestBody @Validated DeviceInfoParam deviceInfoParam){
|
||||
String methodDescribe = getMethodDescribe("getTerminalTreeForFive");
|
||||
List<TerminalTree> tree = terminalTreeService.getTerminalTreeForFive(deviceInfoParam);
|
||||
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, tree, methodDescribe);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据省份获取部门监测点树
|
||||
* @author dhj
|
||||
* @date 2022/1/14
|
||||
*/
|
||||
|
||||
@ApiOperation("根据省份获取部门监测点树")
|
||||
@GetMapping("getDeptBindDeptLineTree")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "deptId", value = "部门id", required = false),
|
||||
@ApiImplicitParam(name = "deptType", value = "部门类型", required = true),
|
||||
@ApiImplicitParam(name = "id", value = "区域id", required = false),
|
||||
@ApiImplicitParam(name = "type", value = "区域类型", required = true)
|
||||
})
|
||||
public HttpResult<List<DeptLineTreeVO>> getDeptBindDeptLineTree(@RequestParam("deptId")String deptId, @RequestParam("deptType")Integer deptType,@RequestParam("id")String id, @RequestParam("type")Integer type){
|
||||
String methodDescribe = getMethodDescribe("getDeptBindDeptLineTree");
|
||||
List<DeptLineTreeVO> tree = terminalTreeService.getDeptBindDeptLineTree(deptId,deptType,id,type);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, tree, methodDescribe);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,69 +0,0 @@
|
||||
package com.njcn.device.controller;
|
||||
|
||||
import com.njcn.common.pojo.annotation.OperateInfo;
|
||||
import com.njcn.common.pojo.enums.common.LogEnum;
|
||||
import com.njcn.common.pojo.enums.response.CommonResponseEnum;
|
||||
import com.njcn.common.pojo.response.HttpResult;
|
||||
import com.njcn.common.utils.HttpResultUtil;
|
||||
import com.njcn.device.pojo.param.TerminalMainQueryParam;
|
||||
import com.njcn.device.pojo.po.DevVersion;
|
||||
import com.njcn.device.pojo.vo.TerminalMaintainVO;
|
||||
import com.njcn.device.pojo.vo.TerminalVersionVO;
|
||||
import com.njcn.device.service.TerminalVersionService;
|
||||
import com.njcn.web.controller.BaseController;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* pqs
|
||||
* 终端程序版本管理
|
||||
* @author cdf
|
||||
* @date 2022/5/12
|
||||
*/
|
||||
@Slf4j
|
||||
@Api(tags = "终端程序版本管理")
|
||||
@RestController
|
||||
@RequestMapping("/version")
|
||||
@RequiredArgsConstructor
|
||||
public class TerminalVersionController extends BaseController {
|
||||
|
||||
private final TerminalVersionService terminalVersionService;
|
||||
|
||||
/**
|
||||
* 查询终端程序版本主列表
|
||||
*
|
||||
* @author cdf
|
||||
* @date 2022/5/11
|
||||
*/
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/getTerminalVersionList")
|
||||
@ApiOperation("查询终端程序版本主列表")
|
||||
public HttpResult<List<TerminalVersionVO>> getTerminalVersionList(@RequestBody TerminalMainQueryParam terminalMainQueryParam) {
|
||||
String methodDescribe = getMethodDescribe("getTerminalVersionList");
|
||||
List<TerminalVersionVO> resList = terminalVersionService.getTerminalVersionList(terminalMainQueryParam);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, resList, methodDescribe);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询装置升级日志
|
||||
* @author cdf
|
||||
* @date 2022/5/17
|
||||
*/
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/getTerminalUpLog")
|
||||
@ApiOperation("查询终端程序版本升级日志")
|
||||
public HttpResult<List<DevVersion>> getTerminalUpLog(@RequestParam("id")String id) {
|
||||
String methodDescribe = getMethodDescribe("getTerminalUpLog");
|
||||
List<DevVersion> resList = terminalVersionService.getTerminalUpLog(id);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, resList, methodDescribe);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -1,44 +0,0 @@
|
||||
package com.njcn.device.mapper;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.njcn.device.pojo.po.Alarm;
|
||||
import com.njcn.device.pojo.vo.TerminalAlarmVO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author cdf
|
||||
* @since 2022-01-07
|
||||
*/
|
||||
public interface AlarmMapper extends BaseMapper<Alarm> {
|
||||
|
||||
/**
|
||||
* 获取告警主列表sql
|
||||
* @author cdf
|
||||
* @date 2022/5/23
|
||||
*/
|
||||
Page<TerminalAlarmVO> getAlarmInfo(Page<TerminalAlarmVO> page, @Param("startTime") LocalDateTime startTime, @Param("endTime")LocalDateTime endTime, @Param("flag")Integer flag, @Param("type")String type, @Param("alarmLevel") Integer alarmLevel, @Param("lineGrade") String lineGrade);
|
||||
|
||||
/**
|
||||
* 获取告警详情
|
||||
* @author cdf
|
||||
* @date 2022/5/23
|
||||
*/
|
||||
List<TerminalAlarmVO> getAlarmDetail(@Param("startTime") LocalDateTime startTime, @Param("endTime")LocalDateTime endTime, @Param("flag")Integer flag, @Param("type")String type, @Param("devLineId") String devLineId,@Param("processTime")LocalDateTime processTime);
|
||||
|
||||
/**
|
||||
* 批量处理
|
||||
* @author cdf
|
||||
* @date 2022/5/23
|
||||
*/
|
||||
boolean updateAlarmInfo(@Param("type")String type,@Param("devLineId")String devLineId,@Param("processTime")LocalDateTime processTime,@Param("userIndex")String userIndex);
|
||||
}
|
||||
@@ -1,28 +0,0 @@
|
||||
package com.njcn.device.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.njcn.device.pojo.po.AlarmStrategy;
|
||||
import com.njcn.device.pojo.vo.AlarmStrategyVO;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @version 1.0.0
|
||||
* @author: chenchao
|
||||
* @date: 2022/06/23 13:39
|
||||
*/
|
||||
public interface AlarmStrategyMapper extends BaseMapper<AlarmStrategy> {
|
||||
|
||||
/**
|
||||
* 获取告警策略列表
|
||||
*/
|
||||
List<AlarmStrategyVO> getAlarmStrategyData();
|
||||
/**
|
||||
* 查询告警策略是否已存在
|
||||
*/
|
||||
Integer getAlarmStrategyById(String id);
|
||||
/**
|
||||
* 删除告警策略
|
||||
*/
|
||||
void updateAlarmStrategyState(String id);
|
||||
}
|
||||
@@ -1,23 +0,0 @@
|
||||
package com.njcn.device.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @version 1.0.0
|
||||
* @author: chenchao
|
||||
* @date: 2022/08/12 13:29
|
||||
*/
|
||||
public interface AreaDeviceOnlineMapper {
|
||||
|
||||
|
||||
/**
|
||||
* 通过终端ID获取监测点集合
|
||||
*/
|
||||
List<String> selectLineIds(String deviceId);
|
||||
|
||||
/**
|
||||
* 通过监测点等级获取监测点ID集合
|
||||
*/
|
||||
List<String> selectLineIdBylineLevel(String lineLevel);
|
||||
|
||||
}
|
||||
@@ -1,18 +0,0 @@
|
||||
package com.njcn.device.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.njcn.device.pojo.po.Communicate;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author denghuajun
|
||||
* @date 2022/2/28
|
||||
*
|
||||
*/
|
||||
public interface CommunicateMapper extends BaseMapper<Communicate> {
|
||||
List<Communicate> getCommunicate(@Param("id") String id, @Param("startTime") Date startTime, @Param("endTime")Date endTime);
|
||||
}
|
||||
@@ -1,47 +0,0 @@
|
||||
package com.njcn.device.mapper;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.njcn.device.pojo.po.DeptLine;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author denghuajun
|
||||
* @since 2022-01-12 18:04
|
||||
*/
|
||||
public interface DeptLineMapper extends BaseMapper<DeptLine> {
|
||||
/**
|
||||
* 换绑监测点
|
||||
* @param id 部门id
|
||||
* @param lineId 监测点id
|
||||
* @return
|
||||
*/
|
||||
int deptChangeBindLine(@Param("id")String id,@Param("lineId")String lineId);
|
||||
|
||||
|
||||
/**
|
||||
* 查询所有绑定的监测点
|
||||
*/
|
||||
List<String> getAllBindLine();
|
||||
|
||||
/**
|
||||
* 查询其他绑定的监测点
|
||||
* @param deptId
|
||||
* @return
|
||||
*/
|
||||
List<String> getOtherBindLine(@Param("deptId")String deptId);
|
||||
|
||||
/**
|
||||
* 查询自己绑定的监测点
|
||||
* @param deptId
|
||||
* @return
|
||||
*/
|
||||
List<String> getMyselfBindLine(@Param("deptId")String deptId);
|
||||
}
|
||||
@@ -1,22 +0,0 @@
|
||||
package com.njcn.device.mapper;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.njcn.device.pojo.po.DevFuction;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author cdf
|
||||
* @since 2022-01-07
|
||||
*/
|
||||
public interface DevFuctionMapper extends BaseMapper<DevFuction> {
|
||||
|
||||
int addBatch(@Param("list") List<DevFuction> list);
|
||||
|
||||
}
|
||||
@@ -1,17 +0,0 @@
|
||||
package com.njcn.device.mapper;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.njcn.device.pojo.po.DevMeal;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author cdf
|
||||
* @since 2022-01-07
|
||||
*/
|
||||
public interface DevMealMapper extends BaseMapper<DevMeal> {
|
||||
|
||||
}
|
||||
@@ -1,17 +0,0 @@
|
||||
package com.njcn.device.mapper;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.njcn.device.pojo.po.DevState;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author cdf
|
||||
* @since 2022-01-07
|
||||
*/
|
||||
public interface DevStateMapper extends BaseMapper<DevState> {
|
||||
|
||||
}
|
||||
@@ -1,17 +0,0 @@
|
||||
package com.njcn.device.mapper;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.njcn.device.pojo.po.DevStrategy;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author cdf
|
||||
* @since 2022-01-07
|
||||
*/
|
||||
public interface DevStrategyMapper extends BaseMapper<DevStrategy> {
|
||||
|
||||
}
|
||||
@@ -1,17 +0,0 @@
|
||||
package com.njcn.device.mapper;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.njcn.device.pojo.po.DevVersion;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author cdf
|
||||
* @since 2022-01-07
|
||||
*/
|
||||
public interface DevVersionMapper extends BaseMapper<DevVersion> {
|
||||
|
||||
}
|
||||
@@ -1,19 +0,0 @@
|
||||
package com.njcn.device.mapper;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.njcn.device.pojo.po.DeviceBak;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author cdf
|
||||
* @since 2022-01-04
|
||||
*/
|
||||
public interface DeviceBakMapper extends BaseMapper<DeviceBak> {
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -1,47 +0,0 @@
|
||||
package com.njcn.device.mapper;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.njcn.device.pojo.po.Device;
|
||||
import com.njcn.device.pojo.vo.RunManageVO;
|
||||
import com.njcn.device.pojo.vo.RunTimeVO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author cdf
|
||||
* @since 2022-01-04
|
||||
*/
|
||||
public interface DeviceMapper extends BaseMapper<Device> {
|
||||
|
||||
/**
|
||||
* 通过设备id集查询装置信息
|
||||
* @author cdf
|
||||
* @date 2022/5/11
|
||||
*/
|
||||
List<Device> getDeviceList(@Param("list") List<String> list);
|
||||
|
||||
/**
|
||||
* 获取监测点台账信息
|
||||
* @param list 监测点集合
|
||||
* @param comFlag 状态
|
||||
* @param runFlag 状态
|
||||
* @return 结果
|
||||
*/
|
||||
List<RunManageVO> getRunManageList(@Param("list") List<String> list, @Param("comFlag")List<Integer> comFlag, @Param("runFlag")List<Integer> runFlag);
|
||||
|
||||
/**
|
||||
* 获取监测点台账信息
|
||||
* @param list 终端集合
|
||||
* @param comFlag 状态
|
||||
* @param runFlag 状态
|
||||
* @return 结果
|
||||
*/
|
||||
List<RunTimeVO> getRunManageDevList(@Param("list") List<String> list, @Param("comFlag")List<Integer> comFlag, @Param("runFlag")List<Integer> runFlag);
|
||||
}
|
||||
@@ -1,25 +0,0 @@
|
||||
package com.njcn.device.mapper;
|
||||
|
||||
import com.njcn.device.pojo.dto.DeviceOnlineDataDTO;
|
||||
import com.njcn.device.pojo.vo.DeviceOnlineTabVO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @version 1.0.0
|
||||
* @author: chenchao
|
||||
* @date: 2022/08/17 15:00
|
||||
*/
|
||||
public interface DeviceOnlineDataMapper {
|
||||
|
||||
/**获取终端对应的等级 */
|
||||
List<DeviceOnlineDataDTO> getMinDeviceLevel(@Param("deviceIds") List<String> deviceIds);
|
||||
|
||||
|
||||
DeviceOnlineDataDTO getMinDeviceLevelById(String deviceIds);
|
||||
|
||||
/**获取终端集合父级名称 */
|
||||
List<DeviceOnlineTabVO> getDeviceFatherData(@Param("deviceIds") List<String> deviceIds);
|
||||
|
||||
}
|
||||
@@ -1,17 +0,0 @@
|
||||
package com.njcn.device.mapper;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.njcn.device.pojo.po.FlowMeal;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author cdf
|
||||
* @since 2022-01-07
|
||||
*/
|
||||
public interface FlowMealMapper extends BaseMapper<FlowMeal> {
|
||||
|
||||
}
|
||||
@@ -1,17 +0,0 @@
|
||||
package com.njcn.device.mapper;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.njcn.device.pojo.po.FlowStrategyDic;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author cdf
|
||||
* @since 2022-01-07
|
||||
*/
|
||||
public interface FlowStrategyDicMapper extends BaseMapper<FlowStrategyDic> {
|
||||
|
||||
}
|
||||
@@ -1,17 +0,0 @@
|
||||
package com.njcn.device.mapper;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.njcn.device.pojo.po.FlowStrategy;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author cdf
|
||||
* @since 2022-01-07
|
||||
*/
|
||||
public interface FlowStrategyMapper extends BaseMapper<FlowStrategy> {
|
||||
|
||||
}
|
||||
@@ -1,19 +0,0 @@
|
||||
package com.njcn.device.mapper;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.njcn.device.pojo.po.*;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author cdf
|
||||
* @since 2022-01-04
|
||||
*/
|
||||
public interface LineBakMapper extends BaseMapper<LineBak> {
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -1,36 +0,0 @@
|
||||
package com.njcn.device.mapper;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.njcn.device.pojo.po.LineDetail;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author cdf
|
||||
* @since 2022-01-04
|
||||
*/
|
||||
public interface LineDetailMapper extends BaseMapper<LineDetail> {
|
||||
|
||||
/**
|
||||
* 查询装置下监测点号号是否已被占用
|
||||
* @param devIndex 装置索引
|
||||
* @param num 线路号
|
||||
* @return 监测点信息
|
||||
*/
|
||||
List<LineDetail> getLineDetail(@Param("devIndex") String devIndex, @Param("num") List<Integer> num);
|
||||
|
||||
/**
|
||||
* 实际设备下的监测点&&稳态系统和两个系统的监测点&&投运终端下的监测点
|
||||
* 获取指定条件的监测点信息
|
||||
* @param list 监测点集合
|
||||
* @return 结果
|
||||
*/
|
||||
List<LineDetail> getSpecifyLineDetail(@Param("list") List<String> list);
|
||||
|
||||
}
|
||||
@@ -1,347 +0,0 @@
|
||||
package com.njcn.device.mapper;
|
||||
|
||||
|
||||
import cn.hutool.core.date.DateTime;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.njcn.common.pojo.dto.SimpleDTO;
|
||||
import com.njcn.device.pojo.bo.BaseLineInfo;
|
||||
import com.njcn.device.pojo.bo.DeviceType;
|
||||
import com.njcn.device.pojo.bo.excel.TerminalBaseExcel;
|
||||
import com.njcn.device.pojo.dto.*;
|
||||
import com.njcn.device.pojo.param.DeviceInfoParam;
|
||||
import com.njcn.device.pojo.po.*;
|
||||
import com.njcn.device.pojo.vo.*;
|
||||
import com.njcn.web.pojo.vo.LineDataVO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author cdf
|
||||
* @since 2022-01-04
|
||||
*/
|
||||
public interface LineMapper extends BaseMapper<Line> {
|
||||
|
||||
/**
|
||||
* 查询变电站下面的装置
|
||||
*
|
||||
* @author cdf
|
||||
* @date 2022/1/5
|
||||
*/
|
||||
List<Device> getDeviceBySubId(@Param("subId") String subId, @Param("list") List<String> ipList);
|
||||
|
||||
/**
|
||||
* 查询变电站下面的装置
|
||||
*
|
||||
* @author cdf
|
||||
* @date 2022/1/5
|
||||
*/
|
||||
List<Device> getDeviceBySubIdForUpdate(@Param("subId") String subId, @Param("ipList") List<String> ipList, @Param("devList") List<String> devList);
|
||||
|
||||
/**
|
||||
* 查询装置下的监测点完整信息
|
||||
*
|
||||
* @author cdf
|
||||
* @date 2022/1/6
|
||||
*/
|
||||
List<LineDetail> getLineDetailByDeviceId(@Param("devId") String devId);
|
||||
|
||||
/**
|
||||
* 查询装置下的母线信息
|
||||
* @param devId 设备id
|
||||
* @date 2022/7/1
|
||||
*/
|
||||
List<Voltage> getVoltageByDevId(@Param("devId") String devId);
|
||||
|
||||
|
||||
/**
|
||||
* 通过监测点id获取母线详情
|
||||
*
|
||||
* @author cdf
|
||||
* @date 2022/1/6
|
||||
*/
|
||||
Voltage getVoltageByLineId(@Param("lineId") String lineId);
|
||||
|
||||
|
||||
/**
|
||||
* 返回所有树节点(全部pq_line表数据)
|
||||
*
|
||||
* @author cdf
|
||||
* @date 2022/1/13
|
||||
*/
|
||||
List<TerminalTree> getAllList();
|
||||
|
||||
/**
|
||||
* 获取区域
|
||||
*
|
||||
* @return TerminalTree 终端树数据
|
||||
* @author cdf
|
||||
* @date 2022/2/14
|
||||
*/
|
||||
List<TerminalTree> getProvinceList(@Param("pids") List<String> pids, @Param("type") Integer type);
|
||||
|
||||
|
||||
/**
|
||||
* 返回未绑定的监测点
|
||||
*/
|
||||
List<TerminalTree> getUnBindList();
|
||||
|
||||
/**
|
||||
* 返回省份的上级
|
||||
*/
|
||||
List<String> selectProject(@Param("areaId") String areaId);
|
||||
|
||||
/**
|
||||
* @param areaId
|
||||
* @return 返回省份名称
|
||||
*/
|
||||
String getProviceName(@Param("areaId") String areaId);
|
||||
|
||||
|
||||
/**
|
||||
* 根据终端id,获取所有对应终端
|
||||
*
|
||||
* @param devIds 终端id
|
||||
* @param deviceType 终端条件筛选
|
||||
* @return 终端数据
|
||||
*/
|
||||
List<Line> getDeviceById(@Param("devIds") List<String> devIds, @Param("deviceType") DeviceType deviceType);
|
||||
|
||||
|
||||
List<TerminalBaseVO> getDeviceByIdOnOrOff(@Param("devIds") List<String> devIds, @Param("deviceType") DeviceType deviceType,@Param("comFlag")Integer comFlag);
|
||||
|
||||
|
||||
List<LineDataVO> getLineDetail(@Param("ids") List<String> ids);
|
||||
|
||||
/**
|
||||
* 根据监测点id,获取所有监测点
|
||||
*
|
||||
* @param ids 监测点id
|
||||
* @param deviceInfoParam 监测点查询条件
|
||||
* @return 监测点数据
|
||||
*/
|
||||
List<Line> getLineByCondition(@Param("ids") List<String> ids, @Param("deviceInfoParam") DeviceInfoParam deviceInfoParam);
|
||||
|
||||
/**
|
||||
* 查询终端信息
|
||||
*
|
||||
* @param devIds 终端索引
|
||||
* @param deviceType 终端筛选条件
|
||||
* @param manufacturer 终端厂家
|
||||
*/
|
||||
List<Line> getDeviceByCondition(@Param("devIds") List<String> devIds, @Param("deviceType") DeviceType deviceType, @Param("manufacturer") List<SimpleDTO> manufacturer);
|
||||
|
||||
/**
|
||||
* 查询母线信息
|
||||
*
|
||||
* @param voltageIds 母线索引
|
||||
* @param scale 电压等级
|
||||
*/
|
||||
List<Line> getVoltageByCondition(@Param("voltageIds") List<String> voltageIds, @Param("scale") List<SimpleDTO> scale);
|
||||
|
||||
/**
|
||||
* 查询母线id
|
||||
*
|
||||
* @param voltageIds 母线索引集合
|
||||
* @param scale 电压等级
|
||||
*/
|
||||
List<String> getVoltageIdByScale(@Param("voltageIds") List<String> voltageIds, @Param("scale") String scale);
|
||||
|
||||
/**
|
||||
* 查询监测点id
|
||||
*
|
||||
* @param lineIds 监测点索引集合
|
||||
* @param loadType 干扰源类型
|
||||
*/
|
||||
List<String> getLineIdByLoadType(@Param("lineIds") List<String> lineIds, @Param("loadType") String loadType);
|
||||
|
||||
|
||||
/**
|
||||
* 查询终端id
|
||||
*
|
||||
* @param deviceIds 终端索引集合
|
||||
* @param manufacturer 制造厂家
|
||||
*/
|
||||
List<String> getDeviceIdByManufacturer(@Param("deviceIds") List<String> deviceIds, @Param("manufacturer") String manufacturer);
|
||||
|
||||
|
||||
/**
|
||||
* 获取所有在线投运的监测点限值
|
||||
* @author cdf
|
||||
* @date 2022/3/23
|
||||
*/
|
||||
List<Overlimit> getAllLineOverLimit(@Param("list")List<Integer> list);
|
||||
|
||||
/**
|
||||
* 根据监测点集合查询基础信息
|
||||
* @param lineIndex 监测点结合
|
||||
* @return 基础信息
|
||||
*/
|
||||
List<BaseLineInfo> getBaseLineInfo(@Param("list")List<String> lineIndex);
|
||||
|
||||
|
||||
/**
|
||||
* 获取监测点区域详细信息(原基础上添加监测点区域经纬度信息)
|
||||
* @param lineIndex 监测点结合
|
||||
* @date 2022/6/29
|
||||
*/
|
||||
List<AreaLineInfoVO> getBaseLineAreaInfo(@Param("list")List<String> lineIndex,@Param("searchValue")String searchValue,@Param("comFlag")Integer comFlag);
|
||||
|
||||
/**
|
||||
* 返回监测点信息及通讯状态
|
||||
* @param lineIndex 监测点集合
|
||||
* @return 结果
|
||||
*/
|
||||
List<LineDeviceStateVO> getLineDeviceStateVO(@Param("list")List<String> lineIndex);
|
||||
|
||||
|
||||
/**
|
||||
* 获取变电站信息
|
||||
* @param id 变电站id
|
||||
* @return 结果
|
||||
*/
|
||||
PollutionSubstationDTO getSubstationInfo(@Param("id")String id);
|
||||
|
||||
/**
|
||||
* 获取监测点信息
|
||||
* @param list 监测点集合
|
||||
* @return 结果
|
||||
*/
|
||||
List<PollutionLineDTO> getLineInfo(@Param("list") List<String> list);
|
||||
|
||||
/**
|
||||
* 获取监测点信息
|
||||
* @param id 监测点id
|
||||
* @return 结果
|
||||
*/
|
||||
LineDetailVO getLineSubGdDetail(@Param("id")String id);
|
||||
|
||||
/**
|
||||
* 获取告警变电站信息
|
||||
* @param list 变电站集合
|
||||
* @return 结果
|
||||
*/
|
||||
List<WarningSubstationDTO> getWarningSub(@Param("list") List<String> list);
|
||||
|
||||
/**
|
||||
* 获取监测点信息
|
||||
* @param list 变电站集合
|
||||
* @return 结果
|
||||
*/
|
||||
List<OverLimitLineDTO> getOverLimitLineInfo(@Param("list") List<String> list);
|
||||
/**
|
||||
* 获取监测点状态信息
|
||||
* @param list 变电站集合
|
||||
* @return 结果
|
||||
*/
|
||||
LineStateVO getLineStatisticsDetail(@Param("list") List<String> list);
|
||||
|
||||
/**
|
||||
* 获取监测点信息
|
||||
* @param list 变电站集合
|
||||
* @return 结果
|
||||
*/
|
||||
List<LineStatisticsTableVO> getLineInfoByTableList(@Param("list") List<String> list);
|
||||
|
||||
/**
|
||||
* 获取监测点信息
|
||||
* @param list 变电站集合
|
||||
* @return 结果
|
||||
*/
|
||||
List<LineFlowMealDetailVO> getFlowLineInfoByTableList(@Param("list") List<String> list);
|
||||
|
||||
/**
|
||||
* 获取监测点信息
|
||||
* @param list 变电站集合
|
||||
* @return 结果
|
||||
*/
|
||||
List<LineStatisticsTableVO> getLineStatisticsTableData(@Param("list") List<String> list);
|
||||
|
||||
/**
|
||||
* 监测点运行统计
|
||||
* @param list 监测点集合
|
||||
* @param startTime 起始时间
|
||||
* @param endTime 结束时间
|
||||
* @return 结果
|
||||
*/
|
||||
List<LineFlowMealDetailVO> getLineRunStatistics(@Param("list") List<String> list, @Param("startTime") DateTime startTime, @Param("endTime")DateTime endTime);
|
||||
|
||||
/**
|
||||
* 监测点运行统计
|
||||
* @param list 监测点集合
|
||||
* @param startTime 起始时间
|
||||
* @param endTime 结束时间
|
||||
* @return 结果
|
||||
*/
|
||||
List<LineFlowMealDetailVO> getFlowLineRunStatistics(@Param("list") List<String> list, @Param("startTime") DateTime startTime, @Param("endTime")DateTime endTime);
|
||||
|
||||
/**
|
||||
* 获取生成limitRate表的监测点集合
|
||||
* @return 监测点id集合
|
||||
*/
|
||||
List<String> getLineList();
|
||||
|
||||
|
||||
/**
|
||||
* 导出终端台账信息
|
||||
* @author cdf
|
||||
* @date 2022/5/17
|
||||
*/
|
||||
List<TerminalBaseExcel> getTerminalBaseExcel();
|
||||
|
||||
/**
|
||||
* 根据监测点id获取终端id
|
||||
* @param lineId 监测点id
|
||||
* @return 结果
|
||||
*/
|
||||
String getDevIndex(@Param("lineId")String lineId);
|
||||
|
||||
/**
|
||||
* 获取变电站下母线
|
||||
* @param subId 变电站id
|
||||
* @author cdf
|
||||
* @date 2022/7/4
|
||||
* @return 结果
|
||||
*/
|
||||
List<Line> getVoltageListBySubId(@Param("subId")String subId,@Param("voltageName")List<String> voltageName);
|
||||
|
||||
/**
|
||||
* 获取生成在线率的装置Id
|
||||
* @return 装置Id
|
||||
*/
|
||||
List<String> getDeviceList();
|
||||
|
||||
/**
|
||||
* 获取生成在线率的监测点Id
|
||||
* @return 监测点Id
|
||||
*/
|
||||
List<String> getRunLineIdsList();
|
||||
|
||||
|
||||
/**
|
||||
* 获取当前状态在线的监测点数量
|
||||
* @return Integer 在线监测点数量
|
||||
*/
|
||||
Integer getOnLineCount(@Param("lineIds")List<String> lineIds);
|
||||
|
||||
/**
|
||||
* 获取监测点设备id
|
||||
* @return Integer 监测点设备id
|
||||
*/
|
||||
List<OnlineLineDTO> getOnLineDevLine(@Param("lineIds")List<String> lineIds);
|
||||
|
||||
|
||||
/**
|
||||
* 获取当前状态在线和离线的监测点
|
||||
* @return 在线或离线监测点ids
|
||||
*/
|
||||
List<String> getOnOrUnLine(@Param("list")List<String> lineIds,@Param("comFlag")Integer comFlag);
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -1,56 +0,0 @@
|
||||
package com.njcn.device.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.njcn.device.pojo.bo.excel.LineMark;
|
||||
import com.njcn.device.pojo.vo.LineMarkVO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* pqs
|
||||
*
|
||||
* @author cdf
|
||||
* @date 2022/5/10
|
||||
*/
|
||||
public interface LineMarkMapper {
|
||||
/**
|
||||
* 获取监测点台账
|
||||
* @author cdf
|
||||
* @date 2021/10/27
|
||||
*/
|
||||
Page<LineMarkVO> getLineMark(IPage<LineMarkVO> page, @Param("comFlag")Integer comFlag, @Param("lineGrade")String lineGrade, @Param("searchValue")String searchValue);
|
||||
|
||||
List<LineMark> exportLineMark(@Param("comFlag")Integer comFlag, @Param("lineGrade")String lineGrade, @Param("searchValue")String searchValue);
|
||||
|
||||
/**
|
||||
* 修改监测点评级
|
||||
* @author cdf
|
||||
* @date 2021/11/2
|
||||
*/
|
||||
boolean singleOperate(@Param("lineIndex") String lineIndex, @Param("lineGrade")String lineGrade);
|
||||
|
||||
/**
|
||||
* 获取监测点评级
|
||||
* @author cdf
|
||||
* @date 2021/11/2
|
||||
*/
|
||||
LineMarkVO getLineGrade(@Param("lineIndex")Integer lineIndex);
|
||||
|
||||
/**
|
||||
*
|
||||
* @author cdf
|
||||
* @date 2021/10/28
|
||||
*/
|
||||
LineMarkVO getLineMarkData(@Param("gdName")String gdName,@Param("subName")String subName,@Param("devName")String devName,@Param("lineName")String lineName);
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 批量修改监测点评级
|
||||
* @author cdf
|
||||
* @date 2021/10/29
|
||||
*/
|
||||
Integer batchUpdateForLine(@Param("list") List<LineMark> list);
|
||||
}
|
||||
@@ -1,22 +0,0 @@
|
||||
package com.njcn.device.mapper;
|
||||
|
||||
import com.njcn.device.pojo.vo.DeviceLogVO;
|
||||
import com.njcn.device.pojo.vo.EventLogVO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
/**
|
||||
* @version 1.0.0
|
||||
* @author: chenchao
|
||||
* @date: 2022/05/26 18:54
|
||||
*/
|
||||
public interface LogManageMapper {
|
||||
|
||||
/**
|
||||
* 查询终端日志信息
|
||||
*/
|
||||
DeviceLogVO getDeviceLogData(@Param("lineIds") String lineIds,@Param("terminalTypes") String terminalTypes,@Param("updateBys") String updateBys);
|
||||
/**
|
||||
* 查询暂降推送日志信息
|
||||
*/
|
||||
EventLogVO getEventLogData(String lineId);
|
||||
}
|
||||
@@ -1,17 +0,0 @@
|
||||
package com.njcn.device.mapper;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.njcn.device.pojo.po.MonthFlow;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author cdf
|
||||
* @since 2022-01-07
|
||||
*/
|
||||
public interface MonthFlowMapper extends BaseMapper<MonthFlow> {
|
||||
|
||||
}
|
||||
@@ -1,17 +0,0 @@
|
||||
package com.njcn.device.mapper;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.njcn.device.pojo.po.Node;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author cdf
|
||||
* @since 2022-01-04
|
||||
*/
|
||||
public interface NodeMapper extends BaseMapper<Node> {
|
||||
|
||||
}
|
||||
@@ -1,17 +0,0 @@
|
||||
package com.njcn.device.mapper;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.njcn.device.pojo.po.Overlimit;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author cdf
|
||||
* @since 2022-01-04
|
||||
*/
|
||||
public interface OverlimitMapper extends BaseMapper<Overlimit> {
|
||||
|
||||
}
|
||||
@@ -1,32 +0,0 @@
|
||||
package com.njcn.device.mapper;
|
||||
|
||||
import com.njcn.device.pojo.vo.ShowVersionVO;
|
||||
import com.njcn.device.pojo.vo.VersionVO;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @version 1.0.0
|
||||
* @author: chenchao
|
||||
* @date: 2022/05/23 13:23
|
||||
*/
|
||||
public interface ProgramVersionMapper {
|
||||
|
||||
/**
|
||||
* 获取终端版本信息,根据装置型号查询
|
||||
*/
|
||||
List<VersionVO> getVersion(String devType);
|
||||
/**
|
||||
* 根据id获取终端版本信息
|
||||
*/
|
||||
ShowVersionVO getProgramVersionById(String id);
|
||||
/**
|
||||
* 修改程序版本状态
|
||||
*/
|
||||
void updateVersionFlag(String id);
|
||||
/**
|
||||
* 修改程序版本状态
|
||||
*/
|
||||
void updateVersionState(String id);
|
||||
|
||||
}
|
||||
@@ -1,17 +0,0 @@
|
||||
package com.njcn.device.mapper;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.njcn.device.pojo.po.ProtectValue;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author cdf
|
||||
* @since 2022-01-07
|
||||
*/
|
||||
public interface ProtectValueMapper extends BaseMapper<ProtectValue> {
|
||||
|
||||
}
|
||||
@@ -1,17 +0,0 @@
|
||||
package com.njcn.device.mapper;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.njcn.device.pojo.po.ProtectWord;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author cdf
|
||||
* @since 2022-01-07
|
||||
*/
|
||||
public interface ProtectWordMapper extends BaseMapper<ProtectWord> {
|
||||
|
||||
}
|
||||
@@ -1,56 +0,0 @@
|
||||
package com.njcn.device.mapper;
|
||||
|
||||
import com.njcn.device.pojo.vo.FlowStrategyVO;
|
||||
import com.njcn.device.pojo.vo.RateOfFlowVO;
|
||||
import com.njcn.device.pojo.vo.ShowFlowStrategyVO;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @version 1.0.0
|
||||
* @author: chenchao
|
||||
* @date: 2022/05/11 16:34
|
||||
*/
|
||||
public interface RateOfFlowMapper {
|
||||
|
||||
/**
|
||||
* 获取流量套餐信息,支持模糊筛选
|
||||
*/
|
||||
List<RateOfFlowVO> getRateOfFlowData();
|
||||
/**
|
||||
* 查询基础套餐默认唯一性
|
||||
*/
|
||||
List<RateOfFlowVO> getRateOfFlowFlag();
|
||||
/**
|
||||
* 修改套餐状态
|
||||
*/
|
||||
void updateByState(String id);
|
||||
|
||||
|
||||
/**
|
||||
* 获取流量策略信息
|
||||
*/
|
||||
List<FlowStrategyVO> getFlowStrategy();
|
||||
/**
|
||||
* 查询流量策略默认唯一性
|
||||
*/
|
||||
List<FlowStrategyVO> getStrategyFlag();
|
||||
/**
|
||||
* 修改策略状态
|
||||
*/
|
||||
void updateByStrategy(String id);
|
||||
/**
|
||||
* 通过id获取流量策略
|
||||
*/
|
||||
ShowFlowStrategyVO getFlowStrategyById(String id);
|
||||
/**
|
||||
* 查询流量策略关联表
|
||||
*/
|
||||
List<String> getStrategyDicFun(String id);
|
||||
String getDictData(String id);
|
||||
/**
|
||||
* 删除流量策略功能关联信息
|
||||
*/
|
||||
void delStrategyDicFun(String id);
|
||||
|
||||
}
|
||||
@@ -1,17 +0,0 @@
|
||||
package com.njcn.device.mapper;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.njcn.device.pojo.po.StatisFlow;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author cdf
|
||||
* @since 2022-01-07
|
||||
*/
|
||||
public interface StatisFlowMapper extends BaseMapper<StatisFlow> {
|
||||
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
package com.njcn.device.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.njcn.device.pojo.po.StrategydicFun;
|
||||
|
||||
/**
|
||||
* @version 1.0.0
|
||||
* @author: chenchao
|
||||
* @date: 2022/05/20 14:20
|
||||
*/
|
||||
public interface StrategydicFunMapper extends BaseMapper<StrategydicFun> {
|
||||
}
|
||||
@@ -1,26 +0,0 @@
|
||||
package com.njcn.device.mapper;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.njcn.device.pojo.po.Substation;
|
||||
import com.njcn.device.pojo.vo.SubstationDetailVO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author cdf
|
||||
* @since 2022-01-04
|
||||
*/
|
||||
public interface SubstationMapper extends BaseMapper<Substation> {
|
||||
/**
|
||||
* 获取变电站相关
|
||||
* @param id 变电站集合
|
||||
* @return 结果
|
||||
*/
|
||||
List<SubstationDetailVO> getSubstationData(@Param("id") List<String> id);
|
||||
}
|
||||
@@ -1,77 +0,0 @@
|
||||
package com.njcn.device.mapper;
|
||||
|
||||
import com.njcn.device.pojo.vo.TerminalMaintainVO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* pqs
|
||||
* 终端运维
|
||||
* @author cdf
|
||||
* @date 2022/5/11
|
||||
*/
|
||||
public interface TerminalMaintainMapper {
|
||||
|
||||
|
||||
/**
|
||||
* 或取装置及关联信息
|
||||
* @author cdf
|
||||
* @date 2022/5/11
|
||||
*/
|
||||
List<TerminalMaintainVO> getTerminalDevInfo();
|
||||
|
||||
/**
|
||||
* 获取区域
|
||||
* @author cdf
|
||||
* @date 2022/5/11
|
||||
*/
|
||||
List<TerminalMaintainVO> getProvList();
|
||||
|
||||
/**
|
||||
* 获取公司,单位
|
||||
* @author cdf
|
||||
* @date 2022/5/11
|
||||
*/
|
||||
List<TerminalMaintainVO> getGdAndSubList(@Param("level") Integer level);
|
||||
|
||||
/**
|
||||
* 根据ids获取pq_line省份信息
|
||||
* @author cdf
|
||||
* @date 2022/5/12
|
||||
*/
|
||||
List<TerminalMaintainVO> getPqLineProvList(@Param("ids") List<String> ids);
|
||||
|
||||
/**
|
||||
* 根据ids获取pq_line公司单位信息
|
||||
* @author cdf
|
||||
* @date 2022/5/12
|
||||
*/
|
||||
List<TerminalMaintainVO> getPqLineGdAndSubList(@Param("ids") List<String> ids);
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 根据装置ids获取所有终端运行状态
|
||||
* @author cdf
|
||||
* @date 2022/5/12
|
||||
*/
|
||||
List<TerminalMaintainVO> getRunFlagList(@Param("ids") List<String> ids);
|
||||
|
||||
/**
|
||||
* 根据装置ids获取所有终端流量套餐
|
||||
* @author cdf
|
||||
* @date 2022/5/12
|
||||
*/
|
||||
List<TerminalMaintainVO> getFlowMealList(@Param("ids") List<String> ids);
|
||||
|
||||
/**
|
||||
* 根据装置ids获取所有终端流量策略
|
||||
* @author cdf
|
||||
* @date 2022/5/12
|
||||
*/
|
||||
List<TerminalMaintainVO> getFlowStrategyList(@Param("ids") List<String> ids);
|
||||
|
||||
|
||||
}
|
||||
@@ -1,58 +0,0 @@
|
||||
package com.njcn.device.mapper;
|
||||
|
||||
import com.njcn.device.pojo.param.TerminalMainQueryParam;
|
||||
import com.njcn.device.pojo.vo.TerminalMaintainVO;
|
||||
import com.njcn.device.pojo.vo.TerminalVersionVO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* pqs
|
||||
* 终端程序版本
|
||||
* @author cdf
|
||||
* @date 2022/5/12
|
||||
*/
|
||||
public interface TerminalVersionMapper {
|
||||
|
||||
/**
|
||||
* 或取装置及关联信息
|
||||
* @author cdf
|
||||
* @date 2022/5/11
|
||||
*/
|
||||
List<TerminalVersionVO> getTerminalVersionInfo(@Param("queryParam")TerminalMainQueryParam queryParam);
|
||||
|
||||
/**
|
||||
* 获取区域
|
||||
* @author cdf
|
||||
* @date 2022/5/11
|
||||
*/
|
||||
List<TerminalVersionVO> getProvList();
|
||||
|
||||
/**
|
||||
* 获取公司,单位
|
||||
* @author cdf
|
||||
* @date 2022/5/11
|
||||
*/
|
||||
List<TerminalVersionVO> getGdAndSubList(@Param("level") Integer level);
|
||||
|
||||
/**
|
||||
* 根据ids获取pq_line省份信息
|
||||
* @author cdf
|
||||
* @date 2022/5/12
|
||||
*/
|
||||
List<TerminalVersionVO> getPqLineProvList(@Param("ids") List<String> ids);
|
||||
|
||||
/**
|
||||
* 根据ids获取pq_line公司单位信息
|
||||
* @author cdf
|
||||
* @date 2022/5/12
|
||||
*/
|
||||
List<TerminalVersionVO> getPqLineGdAndSubList(@Param("ids") List<String> ids);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -1,43 +0,0 @@
|
||||
package com.njcn.device.mapper;
|
||||
|
||||
import com.njcn.device.pojo.vo.TerminalTree;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* pqs
|
||||
*
|
||||
* @author cdf
|
||||
* @date 2022/2/28
|
||||
*/
|
||||
public interface TreeMapper {
|
||||
|
||||
/**
|
||||
* 根据供电公司索引获取出省会的信息
|
||||
* @param gdIndexes 供电公司索引
|
||||
* @return 省会信息
|
||||
*/
|
||||
List<TerminalTree> getProvinceList(@Param("gdIndex")List<String> gdIndexes);
|
||||
|
||||
/**
|
||||
* 获取出供电公司的信息
|
||||
* @param gdIndexes 供电公司索引
|
||||
* @return 供电公司信息
|
||||
*/
|
||||
List<TerminalTree> getGdList(@Param("gdIndex")List<String> gdIndexes);
|
||||
|
||||
/**
|
||||
* 获取出变电站的信息
|
||||
* @param subIndexes 变电站索引
|
||||
* @return 变电站信息
|
||||
*/
|
||||
List<TerminalTree> getSubList(@Param("subIndex")List<String> subIndexes);
|
||||
|
||||
/**
|
||||
* 根据监测点索引获取监测点级五层树数据
|
||||
* @param lineIndexes 监测点索引
|
||||
* @return 监测点信息
|
||||
*/
|
||||
List<TerminalTree> getLineList(@Param("lineIndex")List<String> lineIndexes);
|
||||
}
|
||||
@@ -1,17 +0,0 @@
|
||||
package com.njcn.device.mapper;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.njcn.device.pojo.po.Version;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author cdf
|
||||
* @since 2022-01-07
|
||||
*/
|
||||
public interface VersionMapper extends BaseMapper<Version> {
|
||||
|
||||
}
|
||||
@@ -1,27 +0,0 @@
|
||||
package com.njcn.device.mapper;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.njcn.device.pojo.po.Voltage;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author cdf
|
||||
* @since 2022-01-04
|
||||
*/
|
||||
public interface VoltageMapper extends BaseMapper<Voltage> {
|
||||
|
||||
/**
|
||||
* 查询装置下母线号是否已被占用
|
||||
* @param devIndex 装置索引
|
||||
* @param num 线路号
|
||||
* @return 母线信息
|
||||
*/
|
||||
List<Voltage> getVoltageByNum(@Param("devIndex") String devIndex, @Param("num") List<Integer> num);
|
||||
}
|
||||
@@ -1,162 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.njcn.device.mapper.AlarmMapper">
|
||||
|
||||
<select id="getAlarmInfo" resultType="TerminalAlarmVO">
|
||||
SELECT
|
||||
*
|
||||
FROM
|
||||
((
|
||||
SELECT
|
||||
d.NAME type,
|
||||
d.id typeId,
|
||||
d.`Level`,
|
||||
max( a.Occurred_Time ) occurredTime,
|
||||
c.NAME subName,
|
||||
b.NAME devLineName,
|
||||
b.id devLineId,
|
||||
a.Remark,
|
||||
a.flag,
|
||||
a.process_time,
|
||||
i.name updateBy,
|
||||
h.NAME lineGrade,
|
||||
h.Algo_Describe algoDescribe
|
||||
FROM
|
||||
cld_alarm a
|
||||
INNER JOIN pq_line b ON a.Line_Id = b.id
|
||||
INNER JOIN pq_line c ON b.pid = c.id
|
||||
LEFT JOIN sys_dict_data d ON a.Type = d.id
|
||||
INNER JOIN pq_line e ON b.id = e.pid
|
||||
INNER JOIN pq_line f ON e.id = f.pid
|
||||
INNER JOIN pq_line_detail g ON f.id = g.id
|
||||
LEFT JOIN sys_dict_data h ON g.Line_Grade = h.id
|
||||
Left join sys_user i on a.update_by = i.id
|
||||
WHERE
|
||||
a.dev_line_type = 1
|
||||
<if test="flag!=null">
|
||||
and a.flag = #{flag}
|
||||
</if>
|
||||
<if test="alarmLevel!=null">
|
||||
and d.level = #{alarmLevel}
|
||||
</if>
|
||||
<if test="lineGrade!=null and lineGrade !=''">
|
||||
and g.line_Grade = #{lineGrade}
|
||||
</if>
|
||||
<if test="type!=null and type!=''">
|
||||
and a.type = #{type}
|
||||
</if>
|
||||
GROUP BY
|
||||
type,
|
||||
typeId,
|
||||
subName,
|
||||
devLineName,
|
||||
devLineId,
|
||||
flag,
|
||||
Remark,
|
||||
process_time,
|
||||
updateBy,
|
||||
lineGrade,
|
||||
algoDescribe
|
||||
)
|
||||
UNION
|
||||
(
|
||||
SELECT
|
||||
f.NAME type,
|
||||
f.id typeId,
|
||||
f.`Level`,
|
||||
max( a.Occurred_Time ) occurredTime,
|
||||
e.NAME subName,
|
||||
b.NAME devLineName,
|
||||
b.id devLineId,
|
||||
a.Remark,
|
||||
a.flag,
|
||||
a.process_time,
|
||||
i.name updateBy,
|
||||
h.NAME lineGrade,
|
||||
h.Algo_Describe algoDescribe
|
||||
FROM
|
||||
cld_alarm a
|
||||
INNER JOIN pq_line b ON a.Line_Id = b.id
|
||||
INNER JOIN pq_line c ON c.id = b.pid
|
||||
INNER JOIN pq_line d ON d.id = c.pid
|
||||
INNER JOIN pq_line e ON e.id = d.pid
|
||||
LEFT JOIN sys_dict_data f ON a.Type = f.id
|
||||
INNER JOIN pq_line_detail g ON g.id = b.id
|
||||
LEFT JOIN sys_dict_data h ON g.Line_Grade = h.id
|
||||
Left join sys_user i on a.update_by = i.id
|
||||
WHERE
|
||||
a.dev_line_type = 2
|
||||
<if test="flag!=null">
|
||||
and a.flag = #{flag}
|
||||
</if>
|
||||
<if test="alarmLevel!=null">
|
||||
and f.level = #{alarmLevel}
|
||||
</if>
|
||||
<if test="lineGrade!=null and lineGrade !=''">
|
||||
and g.line_Grade = #{lineGrade}
|
||||
</if>
|
||||
<if test="type!=null and type!=''">
|
||||
and a.type = #{type}
|
||||
</if>
|
||||
GROUP BY
|
||||
type,
|
||||
typeId,
|
||||
subName,
|
||||
devLineName,
|
||||
devLineId,
|
||||
flag,
|
||||
Remark,
|
||||
process_time,
|
||||
updateBy,
|
||||
lineGrade,
|
||||
algoDescribe
|
||||
)) tt
|
||||
WHERE
|
||||
tt.occurredTime BETWEEN #{startTime} AND #{endTime}
|
||||
ORDER BY
|
||||
algoDescribe ASC,
|
||||
LEVEL ASC,
|
||||
flag ASC,
|
||||
occurredTime DESC
|
||||
</select>
|
||||
|
||||
|
||||
<select id="getAlarmDetail" resultType="TerminalAlarmVO">
|
||||
SELECT
|
||||
a.id,
|
||||
a.occurred_time,
|
||||
b.`level`,
|
||||
a.Remark,
|
||||
a.flag,
|
||||
b.name type,
|
||||
a.process_time,
|
||||
|
||||
c.NAME AS updateBy
|
||||
FROM
|
||||
cld_alarm a
|
||||
LEFT JOIN sys_dict_data b ON b.id = a.type
|
||||
LEFT JOIN sys_user c ON a.update_by = c.id
|
||||
WHERE
|
||||
a.occurred_Time BETWEEN #{startTime} AND #{endTime}
|
||||
AND a.line_id = #{devLineId}
|
||||
AND a.Flag = #{flag}
|
||||
AND a.type = #{type}
|
||||
<if test="processTime!=null">
|
||||
and a.process_time = #{processTime}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<update id="updateAlarmInfo">
|
||||
update cld_alarm set
|
||||
process_time=#{processTime},
|
||||
flag = 1,
|
||||
update_by=#{userIndex}
|
||||
where type=#{type}
|
||||
and line_id=#{devLineId}
|
||||
and state = 1
|
||||
and flag = 0
|
||||
</update>
|
||||
|
||||
|
||||
|
||||
</mapper>
|
||||
@@ -1,42 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.njcn.device.mapper.AlarmStrategyMapper">
|
||||
|
||||
<select id="getAlarmStrategyData" resultType="AlarmStrategyVO">
|
||||
SELECT
|
||||
A.`Id` id,
|
||||
B.`Name` name,
|
||||
A.`Integrity_Value` integrityValue,
|
||||
A.`Online_Value` onlineValue,
|
||||
A.`Offtime_Value` offTimeValue,
|
||||
A.`Warn_Value` warnValue,
|
||||
A.`Update_Time` updateTime,
|
||||
C.`Name` updateBy
|
||||
FROM
|
||||
pqs_alarm_strategy A,
|
||||
sys_dict_data B,
|
||||
sys_user C
|
||||
WHERE A.State = 1
|
||||
AND A.Id = B.Id
|
||||
AND A.Update_By = C.Id
|
||||
</select>
|
||||
|
||||
<select id="getAlarmStrategyById" resultType="java.lang.Integer">
|
||||
SELECT
|
||||
COUNT(Id)
|
||||
FROM
|
||||
pqs_alarm_strategy
|
||||
WHERE State = 1
|
||||
AND Id = #{id}
|
||||
</select>
|
||||
|
||||
<update id="updateAlarmStrategyState">
|
||||
UPDATE
|
||||
pqs_alarm_strategy
|
||||
SET
|
||||
State = 0
|
||||
WHERE Id = #{id}
|
||||
</update>
|
||||
|
||||
</mapper>
|
||||
@@ -1,27 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.njcn.device.mapper.AreaDeviceOnlineMapper">
|
||||
|
||||
<select id="selectLineIds" resultType="java.lang.String">
|
||||
SELECT
|
||||
A2.Id
|
||||
FROM
|
||||
pq_line A,
|
||||
pq_line A1,
|
||||
pq_line A2
|
||||
WHERE A.Id = #{deviceId}
|
||||
AND A1.Pid = A.Id
|
||||
AND A2.Pid = A1.Id
|
||||
</select>
|
||||
|
||||
<select id="selectLineIdBylineLevel" resultType="java.lang.String">
|
||||
SELECT
|
||||
Id
|
||||
FROM
|
||||
pq_line_detail
|
||||
WHERE Line_Grade = #{lineLevel}
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
||||
@@ -1,5 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.njcn.device.mapper.CommunicateMapper">
|
||||
|
||||
</mapper>
|
||||
@@ -1,20 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.njcn.device.mapper.DeptLineMapper">
|
||||
|
||||
<update id="deptChangeBindLine" >
|
||||
update pq_dept_line set id = #{id} where Line_Id = #{lineId}
|
||||
</update>
|
||||
|
||||
<select id="getAllBindLine" resultType="String">
|
||||
select line_id from pq_dept_line
|
||||
</select>
|
||||
|
||||
<select id="getOtherBindLine" resultType="String">
|
||||
select line_id from pq_dept_line where Id !=#{deptId}
|
||||
</select>
|
||||
|
||||
<select id="getMyselfBindLine" resultType="String">
|
||||
select line_id from pq_dept_line where Id =#{deptId}
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -1,11 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.njcn.device.mapper.DevFuctionMapper">
|
||||
|
||||
<insert id="addBatch">
|
||||
insert into cld_dev_fuction (id,line_id,fuc_name) values
|
||||
<foreach collection="list" item="item" separator="," index="index">
|
||||
(#{item.id},#{item.lineId},#{item.fucName})
|
||||
</foreach>
|
||||
</insert>
|
||||
</mapper>
|
||||
@@ -1,5 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.njcn.device.mapper.DevMealMapper">
|
||||
|
||||
</mapper>
|
||||
@@ -1,5 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.njcn.device.mapper.DevStateMapper">
|
||||
|
||||
</mapper>
|
||||
@@ -1,5 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.njcn.device.mapper.DevStrategyMapper">
|
||||
|
||||
</mapper>
|
||||
@@ -1,5 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.njcn.device.mapper.DevVersionMapper">
|
||||
|
||||
</mapper>
|
||||
@@ -1,6 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.njcn.device.mapper.DeviceBakMapper">
|
||||
|
||||
|
||||
</mapper>
|
||||
@@ -1,169 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.njcn.device.mapper.DeviceMapper">
|
||||
|
||||
|
||||
<select id="getDeviceList">
|
||||
|
||||
</select>
|
||||
|
||||
<select id="getRunManageList" resultType="com.njcn.device.pojo.vo.RunManageVO">
|
||||
SELECT
|
||||
linedetail.Num AS id,
|
||||
line.NAME AS lineName,
|
||||
area.NAME AS areaName,
|
||||
gd.NAME AS gdName,
|
||||
sub.NAME AS bdName,
|
||||
scaleId.Name as scale,
|
||||
manufacturerId.name as manufacturer,
|
||||
dev.name as devName,
|
||||
device.IP as ip,
|
||||
case device.Run_Flag when 0 then "投运"
|
||||
when 1 then "热备用"
|
||||
when 2 then "停运"
|
||||
end as runFlag,
|
||||
case device.Com_Flag when 0 then "中断"
|
||||
when 1 then "正常"
|
||||
end as comFlag,
|
||||
loadtypeId.Name as loadType,
|
||||
businesstypeId.name as businessType,
|
||||
IFNULL(linedetail.Obj_Name,"/") as objName,
|
||||
case linedetail.PT_Type when 0 then "星型接线"
|
||||
when 1 then "三角型接线"
|
||||
when 2 then "开口三角型接线"
|
||||
end as ptType,
|
||||
CONCAT(linedetail.PT1,"/", linedetail.PT2) as pt,
|
||||
CONCAT(linedetail.CT1,"/", linedetail.CT2) as ct,
|
||||
linedetail.Standard_Capacity as standardCapacity,
|
||||
linedetail.Short_Capacity as shortCapacity,
|
||||
linedetail.Dev_Capacity as devCapacity,
|
||||
linedetail.Deal_Capacity as dealCapacity,
|
||||
over.Freq_Dev as freqDev,
|
||||
over.Voltage_Dev as voltageDev,
|
||||
over.Uvoltage_Dev as uvoltageDev,
|
||||
over.Ubalance as ubalance,
|
||||
over.I_Neg as iNeg,
|
||||
over.Flicker as flicker,
|
||||
over.Uaberrance as uaberrance,
|
||||
over.Uharm_3 as oddHarm,
|
||||
over.Uharm_2 as evenHarm,
|
||||
over.Iharm_2 as iharm2,
|
||||
over.Iharm_3 as iharm3,
|
||||
over.Iharm_4 as iharm4,
|
||||
over.Iharm_5 as iharm5,
|
||||
over.Iharm_6 as iharm6,
|
||||
over.Iharm_7 as iharm7,
|
||||
over.Iharm_8 as iharm8,
|
||||
over.Iharm_9 as iharm9,
|
||||
over.Iharm_10 as iharm10,
|
||||
over.Iharm_11 as iharm11,
|
||||
over.Iharm_12 as iharm12,
|
||||
over.Iharm_13 as iharm13,
|
||||
over.Iharm_14 as iharm14,
|
||||
over.Iharm_15 as iharm15,
|
||||
over.Iharm_16 as iharm16,
|
||||
over.Iharm_17 as iharm17,
|
||||
over.Iharm_18 as iharm18,
|
||||
over.Iharm_19 as iharm19,
|
||||
over.Iharm_20 as iharm20,
|
||||
over.Iharm_21 as iharm21,
|
||||
over.Iharm_22 as iharm22,
|
||||
over.Iharm_23 as iharm23,
|
||||
over.Iharm_24 as iharm24,
|
||||
over.Iharm_25 as iharm25,
|
||||
over.InUharm_1 as inUharm,
|
||||
over.InUharm_16 as inUharm16
|
||||
FROM
|
||||
pq_line line
|
||||
INNER JOIN pq_line vol ON vol.Id = line.Pid
|
||||
INNER JOIN pq_line dev ON dev.Id = vol.Pid
|
||||
INNER JOIN pq_line sub ON sub.Id = dev.Pid
|
||||
INNER JOIN pq_line gd ON gd.Id = sub.Pid
|
||||
INNER JOIN pq_line areaId ON areaId.Id = gd.Pid
|
||||
INNER JOIN sys_area area ON area.Id = areaId.NAME
|
||||
INNER JOIN pq_overlimit over ON over.Id = line.Id
|
||||
INNER JOIN pq_voltage voltage ON voltage.Id = vol.Id
|
||||
INNER JOIN sys_dict_data scaleId ON scaleId.Id = voltage.Scale
|
||||
INNER JOIN pq_device device ON device.Id = dev.Id
|
||||
INNER JOIN sys_dict_data manufacturerId ON manufacturerId.Id = device.Manufacturer
|
||||
INNER JOIN pq_line_detail linedetail ON linedetail.Id = line.Id
|
||||
INNER JOIN sys_dict_data loadtypeId ON loadtypeId.Id = linedetail.Load_Type
|
||||
INNER JOIN sys_dict_data businesstypeId ON businesstypeId.Id = linedetail.Business_Type
|
||||
WHERE line.Id in
|
||||
<foreach item="item" collection="list" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
<if test="runFlag == '' and type !=null">
|
||||
and device.Run_Flag in
|
||||
<foreach item="item1" collection="runFlag" open="(" separator="," close=")">
|
||||
#{item1}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="comFlag == '' and type !=null">
|
||||
and device.Com_Flag in
|
||||
<foreach item="item2" collection="comFlag" open="(" separator="," close=")">
|
||||
#{item2}
|
||||
</foreach>
|
||||
</if>
|
||||
ORDER BY
|
||||
areaId.NAME
|
||||
</select>
|
||||
|
||||
<select id="getRunManageDevList" resultType="com.njcn.device.pojo.vo.RunTimeVO">
|
||||
SELECT
|
||||
dev.Id as id,
|
||||
area.NAME AS areaName,
|
||||
gd.NAME AS gdName,
|
||||
sub.NAME AS bdName,
|
||||
manufacturerId.NAME AS manufacturer,
|
||||
dev.NAME AS devName,
|
||||
device.IP AS ip,
|
||||
device.Login_Time AS loginTime,
|
||||
devT.Name AS devType,
|
||||
device.PORT AS PORT,
|
||||
CASE
|
||||
device.Run_Flag
|
||||
WHEN 0 THEN
|
||||
"投运"
|
||||
WHEN 1 THEN
|
||||
"热备用"
|
||||
WHEN 2 THEN
|
||||
"停运"
|
||||
END AS runFlag,
|
||||
CASE
|
||||
device.Com_Flag
|
||||
WHEN 0 THEN
|
||||
"中断"
|
||||
WHEN 1 THEN
|
||||
"正常"
|
||||
END AS comFlag,
|
||||
device.Update_Time AS updateTime
|
||||
FROM
|
||||
pq_line dev
|
||||
INNER JOIN pq_line sub ON sub.Id = dev.Pid
|
||||
INNER JOIN pq_line gd ON gd.Id = sub.Pid
|
||||
INNER JOIN pq_line areaId ON areaId.Id = gd.Pid
|
||||
INNER JOIN sys_area area ON area.Id = areaId.NAME
|
||||
INNER JOIN pq_device device ON device.Id = dev.Id
|
||||
INNER JOIN sys_dict_data manufacturerId ON manufacturerId.Id = device.Manufacturer
|
||||
INNER JOIN sys_dict_data devT ON devT.Id = device.Dev_Type
|
||||
WHERE dev.Id in
|
||||
<foreach item="item" collection="list" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
<if test="runFlag == '' and runFlag !=null">
|
||||
and device.Run_Flag in
|
||||
<foreach item="item1" collection="runFlag" open="(" separator="," close=")">
|
||||
#{item1}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="comFlag == '' and comFlag !=null">
|
||||
and device.Com_Flag in
|
||||
<foreach item="item2" collection="comFlag" open="(" separator="," close=")">
|
||||
#{item2}
|
||||
</foreach>
|
||||
</if>
|
||||
ORDER BY
|
||||
areaId.NAME
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -1,75 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.njcn.device.mapper.DeviceOnlineDataMapper">
|
||||
|
||||
<select id="getMinDeviceLevel" resultType="DeviceOnlineDataDTO">
|
||||
SELECT
|
||||
a.`Id` deviceId,
|
||||
e.`Line_Grade` lineGrade,
|
||||
f.`Name` levelName,
|
||||
MIN(f.Algo_Describe)
|
||||
FROM
|
||||
pq_line a,
|
||||
pq_line b,
|
||||
pq_line c,
|
||||
pq_line_detail e,
|
||||
sys_dict_data f
|
||||
WHERE
|
||||
a.Id IN
|
||||
<foreach collection="deviceIds" item="item" open="(" close=")" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
AND b.Pid = a.Id
|
||||
AND c.Pid = b.Id
|
||||
AND c.Id = e.Id
|
||||
AND e.Line_Grade = f.Id
|
||||
GROUP BY
|
||||
c.Id,
|
||||
e.Line_Grade
|
||||
</select>
|
||||
|
||||
|
||||
<select id="getMinDeviceLevelById" resultType="DeviceOnlineDataDTO">
|
||||
SELECT
|
||||
a.`Id` deviceId,e.`Line_Grade` lineGrade,f.`Name` levelName,MIN(f.Algo_Describe)
|
||||
FROM
|
||||
pq_line a,
|
||||
pq_line b,
|
||||
pq_line c,
|
||||
pq_line_detail e,
|
||||
sys_dict_data f
|
||||
WHERE a.Id = #{deviceIds}
|
||||
AND b.Pid = a.Id
|
||||
AND c.Pid = b.Id
|
||||
AND c.Id = e.Id
|
||||
AND e.Line_Grade = f.Id
|
||||
GROUP BY e.Line_Grade
|
||||
</select>
|
||||
|
||||
|
||||
<select id="getDeviceFatherData" resultType="DeviceOnlineTabVO">
|
||||
SELECT
|
||||
a.`Id` deviceId,
|
||||
a.`Name` deviceName,
|
||||
b.`Name` subName,
|
||||
c.`Name` gdName,
|
||||
e.`Name` provinceName
|
||||
FROM
|
||||
pq_line a,
|
||||
pq_line b,
|
||||
pq_line c,
|
||||
pq_line d,
|
||||
sys_area e
|
||||
WHERE a.Id IN
|
||||
<foreach collection="deviceIds" item="item" open="(" close=")" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
AND a.Pid = b.Id
|
||||
AND b.Pid = c.Id
|
||||
AND c.Pid = d.Id
|
||||
AND d.Name = e.Id
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
||||
@@ -1,5 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.njcn.device.mapper.FlowMealMapper">
|
||||
|
||||
</mapper>
|
||||
@@ -1,5 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.njcn.device.mapper.FlowStrategyDicMapper">
|
||||
|
||||
</mapper>
|
||||
@@ -1,5 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.njcn.device.mapper.FlowStrategyMapper">
|
||||
|
||||
</mapper>
|
||||
@@ -1,6 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.njcn.device.mapper.LineBakMapper">
|
||||
|
||||
|
||||
</mapper>
|
||||
@@ -1,39 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.njcn.device.mapper.LineDetailMapper">
|
||||
|
||||
<select id="getLineDetail" resultType="LineDetail">
|
||||
select b.* from pq_line a
|
||||
inner join pq_line_detail b on a.id=b.id
|
||||
where
|
||||
find_in_set(#{devIndex}, a.pids)
|
||||
and a.state = 1
|
||||
and b.Num in
|
||||
<foreach collection="num" item="item" open="(" close=")" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
</select>
|
||||
|
||||
<select id="getSpecifyLineDetail" resultType="LineDetail">
|
||||
SELECT
|
||||
D.*
|
||||
FROM
|
||||
pq_line A1,
|
||||
pq_line A2,
|
||||
pq_line A3,
|
||||
pq_line_detail B,
|
||||
pq_device C,
|
||||
pq_line_detail D
|
||||
WHERE
|
||||
<if test="list != null and list.size() > 0">
|
||||
A1.Id in
|
||||
<foreach collection="list" item="item" open="(" close=")" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
AND
|
||||
</if>
|
||||
A1.`Level` = 6 AND A1.Id = B.Id AND
|
||||
A1.Pid = A2.Id AND A2.Pid = A3.Id AND A3.Id = C.Id AND
|
||||
C.Dev_Model = 1 AND C.Dev_Data_Type IN (1,2) AND C.Run_Flag = 0 AND A1.Id = D.Id
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -1,960 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.njcn.device.mapper.LineMapper">
|
||||
|
||||
|
||||
<select id="getDeviceBySubId" resultType="Device">
|
||||
select * from pq_line a
|
||||
inner join pq_device b on a.id=b.id
|
||||
where a.pid = #{subId}
|
||||
and a.state = 1
|
||||
and b.ip in
|
||||
<foreach collection="list" item="item" open="(" close=")" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
</select>
|
||||
|
||||
<select id="getDeviceBySubIdForUpdate" resultType="Device">
|
||||
select * from pq_line a
|
||||
inner join pq_device b on a.id=b.id
|
||||
where a.pid = #{subId}
|
||||
and a.state = 1
|
||||
and b.ip in
|
||||
<foreach collection="ipList" item="item" open="(" close=")" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
and a.id not in
|
||||
<foreach collection="devList" item="item" separator="," open="(" close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</select>
|
||||
|
||||
|
||||
<select id="getLineDetailByDeviceId" resultType="com.njcn.device.pojo.po.LineDetail">
|
||||
select c.id,
|
||||
c.num,
|
||||
c.pt1,
|
||||
c.pt2,
|
||||
c.ct1,
|
||||
c.ct2,
|
||||
c.Dev_Capacity devCapacity,
|
||||
c.short_capacity shortCapacity,
|
||||
c.standard_capacity standardCapacity,
|
||||
c.deal_capacity dealCapacity
|
||||
from pq_line a
|
||||
inner join pq_line b on a.id = b.pid
|
||||
inner join pq_line_detail c on b.id = c.id
|
||||
where a.pid = #{devId}
|
||||
and a.state = 1
|
||||
</select>
|
||||
|
||||
<select id="getVoltageByDevId" resultType="Voltage">
|
||||
select a.id,a.name,b.num
|
||||
from pq_line a
|
||||
inner join pq_voltage b on a.id = b.id
|
||||
where a.pid = #{devId}
|
||||
and a.state = 1
|
||||
</select>
|
||||
|
||||
|
||||
<select id="getVoltageByLineId" resultType="Voltage">
|
||||
select *
|
||||
from pq_line a
|
||||
inner join pq_voltage b on a.pid = b.id
|
||||
where a.id = #{lineId}
|
||||
and a.state = 1
|
||||
</select>
|
||||
|
||||
<select id="getAllList" resultType="TerminalTree">
|
||||
select id, pid, name, level, sort
|
||||
from pq_line
|
||||
where state = 1
|
||||
</select>
|
||||
|
||||
<select id="getProvinceList" resultType="TerminalTree">
|
||||
select a.id,a.pid,b.name,a.level,a.sort from pq_line a
|
||||
inner join sys_area b on a.name = b.id
|
||||
where a.level = 1
|
||||
<if test="type == 1 and type !=null">
|
||||
and a.id in
|
||||
<foreach collection="pids" item="item" open="(" close=")" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
and a.state = 1
|
||||
order by a.sort
|
||||
</select>
|
||||
|
||||
<select id="getInfoByIdList" resultType="TerminalTree">
|
||||
select id,pid,name,level,sort from pq_line
|
||||
where id in
|
||||
<foreach collection="ids" item="item" open="(" close=")" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
and state = 1
|
||||
order by sort
|
||||
</select>
|
||||
|
||||
<select id="getInfoByPidList" resultType="TerminalTree">
|
||||
select a.id,a.pid,a.name,a.level,a.sort from pq_line
|
||||
where pid in
|
||||
<foreach collection="list" item="item" open="(" close=")" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
and a.state = 1
|
||||
order by a.sort
|
||||
</select>
|
||||
|
||||
<select id="getAllDeviceList" resultType="TerminalTree">
|
||||
select a.id,a.pid,b.com_flag comFlag,a.level,a.sort from pq_line a
|
||||
inner join pq_device b on a.id = b.id
|
||||
where a.id in
|
||||
<foreach collection="ids" item="item" open="(" close=")" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
and a.level = 4
|
||||
and a.state = 1
|
||||
order by a.sort
|
||||
</select>
|
||||
|
||||
<select id="getAllVolList" resultType="TerminalTree">
|
||||
select a.id,a.pid,a.name,c.name scale,a.level,a.sort from pq_line a
|
||||
inner join pq_voltage b on a.id = b.id
|
||||
inner join sys_dict_data c on b.scale = c.id
|
||||
where a.id in
|
||||
<foreach collection="ids" item="item" open="(" close=")" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
and a.level = 5
|
||||
and a.state = 1
|
||||
order by a.sort
|
||||
</select>
|
||||
|
||||
|
||||
<select id="getAllLineList" resultType="TerminalTree">
|
||||
select a.id,a.pid,a.name,a.level,a.sort,b.pt_type
|
||||
from pq_line a
|
||||
inner join pq_line_detail b on a.id = b.id
|
||||
where a.id in
|
||||
<foreach collection="ids" item="item" open="(" close=")" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
and a.state = 1
|
||||
order by sort
|
||||
</select>
|
||||
|
||||
<!--华丽分割线 ++++ -->
|
||||
|
||||
|
||||
|
||||
|
||||
<select id="getUnBindList" resultType="TerminalTree">
|
||||
select id, pid, name, level, sort
|
||||
from pq_line
|
||||
where state = 1
|
||||
and id not in (select Line_Id from pq_dept_line)
|
||||
order by sort
|
||||
</select>
|
||||
|
||||
<select id="getBindList" resultType="TerminalTree">
|
||||
select id, pid, name, level, sort
|
||||
from pq_line
|
||||
where state = 1
|
||||
and id in (select Line_Id from pq_dept_line)
|
||||
order by sort
|
||||
</select>
|
||||
|
||||
<select id="selectProject" resultType="String">
|
||||
select pid
|
||||
from pq_line
|
||||
where name = #{areaId}
|
||||
</select>
|
||||
|
||||
<select id="getProviceName" resultType="String">
|
||||
select name
|
||||
from sys_area
|
||||
where id = #{areaId}
|
||||
</select>
|
||||
|
||||
<select id="getDeviceById" resultType="Line">
|
||||
SELECT
|
||||
t1.*
|
||||
FROM
|
||||
pq_line t1,
|
||||
pq_device t2
|
||||
WHERE
|
||||
t1.id = t2.id
|
||||
<if test="deviceType.devModel!=null">
|
||||
AND t2.Dev_Model in
|
||||
<foreach collection="deviceType.devModel" open="(" close=")" item="item" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="deviceType.runFlag!=null">
|
||||
AND t2.Run_Flag in
|
||||
<foreach collection="deviceType.runFlag" open="(" close=")" item="item" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="deviceType.dataType!=null">
|
||||
AND t2.Dev_Data_Type in
|
||||
<foreach collection="deviceType.dataType" open="(" close=")" item="item" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
AND t1.id IN
|
||||
<foreach collection="devIds" open="(" close=")" item="item" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
</select>
|
||||
|
||||
|
||||
<select id="getDeviceByIdOnOrOff" resultType="TerminalBaseVO">
|
||||
SELECT
|
||||
t1.name devName,t2.ip,t2.update_time,sub.name subName,gd.name gdName
|
||||
FROM
|
||||
pq_line t1,
|
||||
pq_device t2,
|
||||
pq_line sub,
|
||||
pq_line gd
|
||||
WHERE
|
||||
t1.id = t2.id
|
||||
and t1.pid = sub.id
|
||||
and sub.pid = gd.id
|
||||
<if test="deviceType.devModel!=null">
|
||||
AND t2.Dev_Model in
|
||||
<foreach collection="deviceType.devModel" open="(" close=")" item="item" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="deviceType.runFlag!=null">
|
||||
AND t2.Run_Flag in
|
||||
<foreach collection="deviceType.runFlag" open="(" close=")" item="item" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="deviceType.dataType!=null">
|
||||
AND t2.Dev_Data_Type in
|
||||
<foreach collection="deviceType.dataType" open="(" close=")" item="item" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
AND t1.id IN
|
||||
<foreach collection="devIds" open="(" close=")" item="item" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
<if test="comFlag!=null">
|
||||
and t2.com_flag = #{comFlag}
|
||||
</if>
|
||||
order by update_time desc
|
||||
|
||||
</select>
|
||||
|
||||
|
||||
<select id="getLineDetail" resultType="com.njcn.web.pojo.vo.LineDataVO">
|
||||
SELECT line.*
|
||||
FROM PQ_LINE line
|
||||
WHERE line.id IN
|
||||
<foreach collection="ids" open="(" close=")" item="item" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
order by line.level asc
|
||||
</select>
|
||||
|
||||
<select id="getLineByCondition" resultType="Line">
|
||||
select
|
||||
t1.*
|
||||
from
|
||||
pq_line t1 ,
|
||||
pq_line_detail t2
|
||||
where
|
||||
t1.id = t2.id
|
||||
and
|
||||
t1.id in
|
||||
<foreach collection="ids" separator="," open="(" close=")" item="item">
|
||||
#{item}
|
||||
</foreach>
|
||||
<if test="deviceInfoParam.monitorFlag!=2">
|
||||
and t2.Monitor_Flag = #{deviceInfoParam.monitorFlag}
|
||||
</if>
|
||||
<if test="deviceInfoParam.powerFlag!=2">
|
||||
and t2.Power_Flag = #{deviceInfoParam.powerFlag}
|
||||
</if>
|
||||
<if test="deviceInfoParam.loadType!=null">
|
||||
AND t2.Load_Type in
|
||||
<foreach collection="deviceInfoParam.loadType" open="(" close=")" item="item" separator=",">
|
||||
#{item.id}
|
||||
</foreach>
|
||||
</if>
|
||||
<!-- xy -->
|
||||
<choose>
|
||||
<when test="deviceInfoParam.statFlag">
|
||||
AND t2.Stat_Flag = 1
|
||||
</when>
|
||||
</choose>
|
||||
<!-- -->
|
||||
</select>
|
||||
|
||||
<select id="getDeviceByCondition" resultType="Line">
|
||||
SELECT
|
||||
t1.*
|
||||
FROM
|
||||
pq_line t1,
|
||||
pq_device t2
|
||||
WHERE
|
||||
t1.id = t2.id
|
||||
<if test="deviceType.devModel!=null">
|
||||
AND t2.Dev_Model in
|
||||
<foreach collection="deviceType.devModel" open="(" close=")" item="item" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="deviceType.runFlag!=null">
|
||||
AND t2.Run_Flag in
|
||||
<foreach collection="deviceType.runFlag" open="(" close=")" item="item" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="deviceType.dataType!=null">
|
||||
AND t2.Dev_Data_Type in
|
||||
<foreach collection="deviceType.dataType" open="(" close=")" item="item" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="manufacturer!=null">
|
||||
AND t2.manufacturer in
|
||||
<foreach collection="manufacturer" open="(" close=")" item="item" separator=",">
|
||||
#{item.id}
|
||||
</foreach>
|
||||
</if>
|
||||
AND t1.id IN
|
||||
<foreach collection="devIds" open="(" close=")" item="item" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
</select>
|
||||
|
||||
|
||||
<select id="getVoltageByCondition" resultType="Line">
|
||||
select
|
||||
t1.*
|
||||
from
|
||||
pq_line t1 ,
|
||||
pq_voltage t2
|
||||
where
|
||||
t1.id = t2.id
|
||||
and
|
||||
t1.id in
|
||||
<foreach collection="voltageIds" separator="," open="(" close=")" item="item">
|
||||
#{item}
|
||||
</foreach>
|
||||
<if test="scale!=null">
|
||||
AND t2.scale in
|
||||
<foreach collection="scale" open="(" close=")" item="item" separator=",">
|
||||
#{item.id}
|
||||
</foreach>
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="getVoltageIdByScale" resultType="String">
|
||||
select
|
||||
t1.id
|
||||
from
|
||||
pq_line t1 ,
|
||||
pq_voltage t2
|
||||
where
|
||||
t1.id = t2.id
|
||||
and
|
||||
t1.id in
|
||||
<foreach collection="voltageIds" separator="," open="(" close=")" item="item">
|
||||
#{item}
|
||||
</foreach>
|
||||
AND
|
||||
t2.scale = #{scale}
|
||||
</select>
|
||||
|
||||
<select id="getLineIdByLoadType" resultType="String">
|
||||
select
|
||||
t1.id
|
||||
from
|
||||
pq_line t1 ,
|
||||
pq_line_detail t2
|
||||
where
|
||||
t1.id = t2.id
|
||||
and
|
||||
t1.id in
|
||||
<foreach collection="lineIds" separator="," open="(" close=")" item="item">
|
||||
#{item}
|
||||
</foreach>
|
||||
AND
|
||||
t2.Load_Type = #{loadType}
|
||||
</select>
|
||||
|
||||
<select id="getDeviceIdByManufacturer" resultType="String">
|
||||
select
|
||||
t1.id
|
||||
from
|
||||
pq_line t1 ,
|
||||
pq_device t2
|
||||
where
|
||||
t1.id = t2.id
|
||||
and
|
||||
t1.id in
|
||||
<foreach collection="deviceIds" separator="," open="(" close=")" item="item">
|
||||
#{item}
|
||||
</foreach>
|
||||
AND
|
||||
t2.Manufacturer = #{manufacturer}
|
||||
</select>
|
||||
|
||||
|
||||
<select id="getAllLineOverLimit" resultType="OverLimit">
|
||||
select f.* from pq_line a
|
||||
inner join pq_line_detail b on a.id = b.id
|
||||
inner join pq_line c on a.pid = c.id
|
||||
inner join pq_line d on c.pid = d.id
|
||||
inner join pq_device e on d.id = e.id
|
||||
inner join pq_overlimit f on a.id=f.id
|
||||
where e.dev_data_type in
|
||||
<foreach collection="list" item="item" open="(" close=")" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
and e.run_flag = 0
|
||||
and e.dev_model = 1
|
||||
</select>
|
||||
|
||||
<select id="getBaseLineInfo" resultType="BaseLineInfo">
|
||||
SELECT
|
||||
line.Id,
|
||||
area.`Name` provincialName,
|
||||
gd.`Name` gdName,
|
||||
substation.`Name` subName,
|
||||
subscale.`Name` subScale,
|
||||
device.`Name` deviceName,
|
||||
pqdevice.IP networkParam,
|
||||
pqdevice.Com_Flag comState,
|
||||
factory.`Name` factoryName,
|
||||
pqdevice.Update_Time time,
|
||||
voltage.`Name` subvName,
|
||||
scale.`Name` subvScale,
|
||||
line.`Name` lineName,
|
||||
line.Sort
|
||||
FROM
|
||||
pq_line line,
|
||||
pq_line voltage,
|
||||
pq_voltage pqvoltage,
|
||||
pq_line device,
|
||||
pq_device pqdevice,
|
||||
pq_line substation,
|
||||
pq_substation pqsubstation,
|
||||
pq_line gd,
|
||||
pq_line provincial,
|
||||
sys_dict_data scale,
|
||||
sys_dict_data factory,
|
||||
sys_dict_data loadtype,
|
||||
sys_dict_data subscale,
|
||||
sys_area area
|
||||
WHERE
|
||||
line.pid = voltage.id
|
||||
AND voltage.id = pqvoltage.id
|
||||
AND pqvoltage.Scale = scale.id
|
||||
AND voltage.pid = device.id
|
||||
AND voltage.pid = pqdevice.id
|
||||
AND pqdevice.Manufacturer = factory.id
|
||||
AND device.pid = substation.id
|
||||
AND substation.id = pqsubstation.id
|
||||
AND pqsubstation.Scale = subscale.id
|
||||
AND substation.pid = gd.id
|
||||
AND gd.pid = provincial.id
|
||||
AND provincial.NAME = area.id
|
||||
AND line.Id IN
|
||||
<foreach item="item" collection="list" separator="," open="(" close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
GROUP BY line.id
|
||||
</select>
|
||||
|
||||
|
||||
<select id="getBaseLineAreaInfo" resultType="AreaLineInfoVO">
|
||||
SELECT
|
||||
line.Id lineId,
|
||||
line.`Name` lineName,
|
||||
gd.`Name` gdName,
|
||||
substation.id subId,
|
||||
substation.`Name` subName,
|
||||
subscale.name subScale,
|
||||
pqdevice.IP ip,
|
||||
pqdevice.Com_Flag comFlag,
|
||||
factory.`Name` manufacturer,
|
||||
voltage.`Name` voltageName,
|
||||
scale.`Name` voltageScale,
|
||||
pqdevice.run_flag,
|
||||
pqdevice.com_flag,
|
||||
pqsubstation.Lng,
|
||||
pqsubstation.lat,
|
||||
detail.ct1,
|
||||
detail.ct2,
|
||||
detail.pt1,
|
||||
detail.pt2,
|
||||
detail.obj_name,
|
||||
loadtype.name loadType
|
||||
FROM
|
||||
pq_line line,
|
||||
pq_line_detail detail,
|
||||
pq_line voltage,
|
||||
pq_voltage pqvoltage,
|
||||
pq_line device,
|
||||
pq_device pqdevice,
|
||||
pq_line substation,
|
||||
pq_substation pqsubstation,
|
||||
pq_line gd,
|
||||
sys_dict_data scale,
|
||||
sys_dict_data factory,
|
||||
sys_dict_data loadtype,
|
||||
sys_dict_data subscale
|
||||
WHERE
|
||||
line.id = detail.id
|
||||
AND line.pid = voltage.id
|
||||
AND voltage.id = pqvoltage.id
|
||||
AND pqvoltage.Scale = scale.id
|
||||
AND voltage.pid = device.id
|
||||
AND voltage.pid = pqdevice.id
|
||||
AND pqdevice.Manufacturer = factory.id
|
||||
AND device.pid = substation.id
|
||||
AND substation.id = pqsubstation.id
|
||||
AND pqsubstation.scale = subscale.id
|
||||
AND substation.pid = gd.id
|
||||
AND detail.load_type = loadtype.id
|
||||
AND line.Id IN
|
||||
<foreach item="item" collection="list" separator="," open="(" close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
<if test="searchValue!=null and searchValue!=''">
|
||||
and (line.name like CONCAT('%', #{searchValue},'%')
|
||||
or voltage.name like CONCAT('%', #{searchValue},'%')
|
||||
or device.name like CONCAT('%', #{searchValue},'%')
|
||||
or substation.name like CONCAT('%', #{searchValue},'%')
|
||||
or gd.name like CONCAT('%', #{searchValue},'%'))
|
||||
</if>
|
||||
<if test="comFlag!=null">
|
||||
and pqdevice.com_flag = #{comFlag}
|
||||
</if>
|
||||
|
||||
</select>
|
||||
|
||||
<select id="getLineDeviceStateVO" resultType="com.njcn.device.pojo.vo.LineDeviceStateVO">
|
||||
SELECT
|
||||
t.id id,
|
||||
t.pids pids,
|
||||
t.NAME name,
|
||||
device.Com_Flag state
|
||||
FROM
|
||||
pq_line t,
|
||||
pq_line subv,
|
||||
pq_device device
|
||||
WHERE
|
||||
subv.id = t.pid
|
||||
AND device.id = subv.pid
|
||||
AND t.id in
|
||||
<foreach item="item" collection="list" separator="," open="(" close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</select>
|
||||
|
||||
<select id="getSubstationInfo" resultType="PollutionSubstationDTO">
|
||||
SELECT A.id,
|
||||
A.`Name` name,
|
||||
C.`Name` voltageLevel
|
||||
FROM pq_line A,
|
||||
pq_substation B,
|
||||
sys_dict_data C
|
||||
WHERE A.Id = #{id}
|
||||
AND A.Id = B.Id
|
||||
AND B.Scale = C.Id
|
||||
</select>
|
||||
|
||||
<select id="getLineInfo" resultType="PollutionLineDTO">
|
||||
SELECT
|
||||
A.Id,
|
||||
A.`Name`,
|
||||
A1.Name busBar,
|
||||
A3.Name substation,
|
||||
A3.Id substationId,
|
||||
A4.Name powerCompany
|
||||
FROM
|
||||
pq_line A,
|
||||
pq_line A1,
|
||||
pq_line A2,
|
||||
pq_line A3,
|
||||
pq_line A4
|
||||
WHERE
|
||||
A.Id IN
|
||||
<foreach item="item" collection="list" separator="," open="(" close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
AND A.Pid = A1.Id
|
||||
AND A.State = 1
|
||||
AND A1.Pid = A2.Id
|
||||
AND A2.Pid = A3.Id
|
||||
AND A3.Pid = A4.Id
|
||||
</select>
|
||||
<select id="getLineSubGdDetail" resultType="com.njcn.device.pojo.vo.LineDetailVO">
|
||||
SELECT DISTINCT gd.NAME gdName,
|
||||
substation.NAME subName,
|
||||
line.NAME lineName
|
||||
FROM pq_line line,
|
||||
pq_line voltage,
|
||||
pq_line device,
|
||||
pq_line substation,
|
||||
pq_line gd
|
||||
WHERE line.pid = voltage.id
|
||||
AND voltage.pid = device.id
|
||||
AND device.pid = substation.id
|
||||
AND substation.pid = gd.id
|
||||
AND line.id = #{id}
|
||||
</select>
|
||||
|
||||
<select id="getWarningSub" resultType="WarningSubstationDTO">
|
||||
SELECT
|
||||
A1.Id,
|
||||
A1.`Name` subName,
|
||||
B.`Name` scale,
|
||||
A2.`Name` city,
|
||||
D.`Name` province
|
||||
FROM
|
||||
pq_line A1,
|
||||
pq_line A2,
|
||||
pq_line A3,
|
||||
sys_dict_data B,
|
||||
pq_substation C,
|
||||
sys_area D
|
||||
WHERE
|
||||
A1.Id in
|
||||
<foreach item="item" collection="list" separator="," open="(" close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
AND A1.Pid = A2.Id AND A2.Pid = A3.Id AND A3.`Name` = D.Area_Code AND A1.Id = C.Id AND C.Scale = B.Id
|
||||
</select>
|
||||
|
||||
<select id="getOverLimitLineInfo" resultType="OverLimitLineDTO">
|
||||
SELECT
|
||||
A1.id,
|
||||
A1.`Name` lineName,
|
||||
C1.`Name` lineScale,
|
||||
C2.`Name` loadType,
|
||||
D.Obj_Name lineObjectName,
|
||||
D.Monitor_Id monitorNumber,
|
||||
A4.`Name` subName,
|
||||
C3.`Name` subScale,
|
||||
A5.`Name` cityCompany,
|
||||
F.`Name` provinceCompany
|
||||
FROM
|
||||
pq_line A1,
|
||||
pq_line A2,
|
||||
pq_line A3,
|
||||
pq_line A4,
|
||||
pq_line A5,
|
||||
pq_line A6,
|
||||
pq_voltage B,
|
||||
sys_dict_data C1,
|
||||
sys_dict_data C2,
|
||||
sys_dict_data C3,
|
||||
pq_line_detail D,
|
||||
pq_substation E,
|
||||
sys_area F
|
||||
WHERE
|
||||
A1.id in
|
||||
<foreach item="item" collection="list" separator="," open="(" close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
AND A1.Pid = A2.Id AND A2.Id = B.Id AND B.Scale = C1.Id AND A1.Id = D.Id AND D.Load_Type = C2.Id
|
||||
AND A2.Pid = A3.Id AND A3.Pid = A4.Id AND A4.Pid = A5.Id AND A4.Id = E.Id AND E.Scale = C3.Id
|
||||
AND A5.Pid = A6.Id AND A6.`Name` = F.Area_Code
|
||||
</select>
|
||||
|
||||
<select id="getLineStatisticsDetail" resultType="LineStateVO">
|
||||
SELECT
|
||||
count(IF( device.Run_Flag = 0, IF ( device.Com_Flag = 1, 1, NULL ), NULL )) normalStateNum,
|
||||
count(IF( device.Run_Flag = 0, IF ( device.Com_Flag = 0, 1, NULL ), NULL )) suspendStateNum,
|
||||
count( device.Run_Flag = 1 OR NULL ) hotSpareStateNum,
|
||||
count( device.Run_Flag = 2 OR NULL ) offStreamStateNum
|
||||
FROM
|
||||
pq_line line
|
||||
INNER JOIN pq_line voltage ON voltage.id = line.pid
|
||||
INNER JOIN pq_device device ON device.id = voltage.pid
|
||||
WHERE
|
||||
line.id IN
|
||||
<foreach item="item" collection="list" separator="," open="(" close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</select>
|
||||
|
||||
<select id="getLineInfoByTableList" resultType="LineStatisticsTableVO">
|
||||
SELECT
|
||||
Id,
|
||||
Pid,
|
||||
Pids,
|
||||
`Name`
|
||||
FROM
|
||||
pq_line
|
||||
WHERE
|
||||
Id IN
|
||||
<foreach item="item" collection="list" separator="," open="(" close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</select>
|
||||
|
||||
<select id="getLineStatisticsTableData" resultType="LineStatisticsTableVO">
|
||||
SELECT
|
||||
A.Id,
|
||||
A.Pid,
|
||||
A.Pids,
|
||||
A.`Name` name,
|
||||
D.run_flag runFlag,
|
||||
D.com_flag comFlag
|
||||
FROM
|
||||
pq_line A,
|
||||
pq_line B,
|
||||
pq_device D
|
||||
WHERE
|
||||
A.Id IN
|
||||
<foreach item="item" collection="list" separator="," open="(" close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
AND A.Pid = B.Id
|
||||
AND B.Pid = D.Id
|
||||
</select>
|
||||
<select id="getLineRunStatistics" resultType="LineFlowMealDetailVO">
|
||||
select t.*
|
||||
from (SELECT a.id,
|
||||
a.pid,
|
||||
a.pids,
|
||||
a.NAME name,
|
||||
a.level,
|
||||
a.update_Time updateTime,
|
||||
b.run_flag runFlag,
|
||||
b.com_flag comFlag,
|
||||
ifnull(d.flow, (select flow from cld_flow_meal where type = 0 and flag = 1)) +
|
||||
ifnull(d1.flow, 0) flowMeal
|
||||
FROM pq_line a
|
||||
INNER JOIN pq_line vol ON a.pid = vol.id
|
||||
INNER JOIN pq_device b ON vol.pid = b.id
|
||||
LEFT JOIN cld_dev_meal c ON b.id = c.line_id
|
||||
LEFT JOIN cld_flow_meal d ON c.Base_Meal_Id = d.id
|
||||
LEFT JOIN cld_flow_meal d1 ON c.Ream_Meal_Id = d1.id
|
||||
LEFT JOIN sys_dict_data e ON b.dev_type = e.id
|
||||
where a.id in
|
||||
<foreach item="item" collection="list" separator="," open="(" close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
)t
|
||||
</select>
|
||||
|
||||
<select id="getFlowLineInfoByTableList" resultType="LineFlowMealDetailVO">
|
||||
SELECT
|
||||
Id,
|
||||
Pid,
|
||||
Pids,
|
||||
`level`,
|
||||
`Name`
|
||||
FROM
|
||||
pq_line
|
||||
WHERE
|
||||
Id IN
|
||||
<foreach item="item" collection="list" separator="," open="(" close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</select>
|
||||
|
||||
<select id="getFlowLineRunStatistics" resultType="LineFlowMealDetailVO">
|
||||
select t.*
|
||||
from (SELECT a.id,
|
||||
a.pid,
|
||||
a.pids,
|
||||
a.NAME name,
|
||||
a.level,
|
||||
a.update_Time updateTime,
|
||||
b.run_flag runFlag,
|
||||
b.com_flag comFlag,
|
||||
ifnull(d.flow, (select flow from cld_flow_meal where type = 0 and flag = 1)) +
|
||||
ifnull(d1.flow, 0) flowMeal
|
||||
FROM pq_line a
|
||||
INNER JOIN pq_device b ON a.id = b.id
|
||||
LEFT JOIN cld_dev_meal c ON b.id = c.line_id
|
||||
LEFT JOIN cld_flow_meal d ON c.Base_Meal_Id = d.id
|
||||
LEFT JOIN cld_flow_meal d1 ON c.Ream_Meal_Id = d1.id
|
||||
LEFT JOIN sys_dict_data e ON b.dev_type = e.id
|
||||
where a.id in
|
||||
<foreach item="item" collection="list" separator="," open="(" close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
)t
|
||||
</select>
|
||||
|
||||
<select id="getLineList" resultType="string">
|
||||
SELECT
|
||||
A1.Id
|
||||
FROM
|
||||
pq_line A1,
|
||||
pq_line A2,
|
||||
pq_line A3,
|
||||
pq_line_detail B,
|
||||
pq_device C
|
||||
WHERE
|
||||
A1.`Level` = 6 AND A1.Id = B.Id AND
|
||||
A1.Pid = A2.Id AND A2.Pid = A3.Id AND A3.Id = C.Id AND
|
||||
C.Dev_Model = 1 AND C.Dev_Data_Type IN (1,2) AND C.Run_Flag = 0
|
||||
</select>
|
||||
|
||||
|
||||
<select id="getTerminalBaseExcel" resultType="TerminalBaseExcel">
|
||||
SELECT
|
||||
pj.NAME projectName,
|
||||
area.NAME provinceName,
|
||||
gd.NAME gdName,
|
||||
sub.NAME substationName,
|
||||
dic.NAME subStationScale,
|
||||
su.Lat,
|
||||
su.Lng,
|
||||
dev.NAME deviceName,
|
||||
d.Dev_Model,
|
||||
d.Dev_Data_Type,
|
||||
d.call_flag,
|
||||
d.Run_Flag,
|
||||
d.Com_Flag,
|
||||
dic6.name Manufacturer,
|
||||
dic7.name Dev_Type,
|
||||
d.ip,
|
||||
d.PORT,
|
||||
d.Series,
|
||||
d.Dev_Key,
|
||||
dic8.name frontType,
|
||||
node.NAME nodeName,
|
||||
vol.NAME subvName,
|
||||
vo.Num subvNum,
|
||||
dic2.NAME subvScale,
|
||||
vo.Model subvModel,
|
||||
line.NAME lineName,
|
||||
de.Num lineNum,
|
||||
concat( de.PT1, "/", de.PT2 ) AS pt,
|
||||
concat( de.CT1, "/", de.CT2 ) AS ct,
|
||||
de.Dev_Capacity,
|
||||
de.Short_Capacity,
|
||||
de.Standard_Capacity,
|
||||
de.Deal_Capacity,
|
||||
de.PT_Type,
|
||||
de.Time_Interval,
|
||||
dic4.name LoadType,
|
||||
dic5.name BusinessType,
|
||||
de.Monitor_Id,
|
||||
de.Obj_Name,
|
||||
de.power_flag,
|
||||
de.Stat_Flag,
|
||||
dic3.name lineGrade,
|
||||
de.Remark
|
||||
FROM
|
||||
pq_line line
|
||||
INNER JOIN pq_line vol ON line.pid = vol.id
|
||||
INNER JOIN pq_line dev ON vol.pid = dev.id
|
||||
INNER JOIN pq_line sub ON dev.pid = sub.id
|
||||
INNER JOIN pq_line gd ON sub.pid = gd.id
|
||||
INNER JOIN pq_line pro ON gd.pid = pro.id
|
||||
INNER JOIN pq_line pj ON pro.pid = pj.id
|
||||
INNER JOIN pq_line_detail de ON line.id = de.id
|
||||
INNER JOIN pq_voltage vo ON vol.id = vo.id
|
||||
INNER JOIN pq_device d ON dev.id = d.id
|
||||
INNER JOIN pq_substation su ON sub.id = su.id
|
||||
LEFT JOIN sys_area area ON pro.NAME = area.id
|
||||
LEFT JOIN sys_dict_data dic ON su.Scale = dic.id
|
||||
LEFT JOIN sys_dict_data dic2 ON vo.Scale = dic2.id
|
||||
left join sys_dict_data dic3 on de.Line_Grade = dic3.id
|
||||
left join sys_dict_data dic4 on de.Load_Type = dic4.id
|
||||
left join sys_dict_data dic5 on de.Business_Type = dic5.id
|
||||
left join sys_dict_data dic6 on d.Manufacturer = dic6.id
|
||||
left join sys_dict_data dic7 on d.Dev_Type = dic7.id
|
||||
left join sys_dict_data dic8 on d.front_type = dic8.id
|
||||
LEFT JOIN pq_node node ON d.Node_Id = node.id
|
||||
order by pj.sort,pro.sort,gd.sort,sub.sort,dev.sort,vol.sort,line.sort
|
||||
</select>
|
||||
|
||||
<select id="getDevIndex" resultType="String">
|
||||
select vo.pid
|
||||
from pq_line line,
|
||||
pq_line vo
|
||||
where vo.id = line.pid
|
||||
and line.id = #{lineId}
|
||||
</select>
|
||||
|
||||
<select id="getVoltageListBySubId" resultType="Line">
|
||||
select * from pq_line voltage
|
||||
inner join pq_line dev on voltage.pid = dev.id
|
||||
inner join pq_line sub on dev.pid = sub.id
|
||||
where sub.id = #{subId}
|
||||
and voltage.state = 1
|
||||
<if test="voltageName!=null">
|
||||
and voltage.name in
|
||||
<foreach collection="voltageName" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="getDeviceList" resultType="string">
|
||||
SELECT Id FROM pq_device WHERE Dev_Model = 1 AND Dev_Data_Type IN (1,2) AND Run_Flag = 0
|
||||
</select>
|
||||
|
||||
<select id="getRunLineIdsList" resultType="string">
|
||||
select a.id from pq_line a
|
||||
inner join pq_line b on a.pid = b.id
|
||||
inner join pq_line c on b.pid = c.id
|
||||
inner join pq_device d on c.id = d.id
|
||||
where d.Dev_Model = 1
|
||||
AND d.Dev_Data_Type IN (1,2)
|
||||
AND d.Run_Flag = 0
|
||||
and a.level = 6
|
||||
and a.state = 1
|
||||
</select>
|
||||
|
||||
|
||||
|
||||
<select id="getOnLineCount" resultType="int">
|
||||
SELECT
|
||||
count( f.Com_Flag )
|
||||
FROM
|
||||
pq_line a
|
||||
INNER JOIN pq_line_detail b ON a.id = b.id
|
||||
INNER JOIN pq_line c ON a.pid = c.id
|
||||
INNER JOIN pq_line d ON c.pid = d.id
|
||||
INNER JOIN pq_device f ON d.id = f.id
|
||||
WHERE
|
||||
a.state = 1
|
||||
AND f.Com_Flag = 1
|
||||
AND a.id in
|
||||
<foreach collection="lineIds" item="item" open="(" close=")" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
</select>
|
||||
|
||||
<select id="getOnLineDevLine" resultType="OnlineLineDTO">
|
||||
select a.id lineId,c.id devId from pq_line a
|
||||
inner join pq_line b on a.pid = b.id
|
||||
inner join pq_line c on b.pid = c.id
|
||||
where a.id in
|
||||
<foreach collection="lineIds" item="item" open="(" close=")" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
</select>
|
||||
|
||||
|
||||
<select id="getOnOrUnLine" resultType="String">
|
||||
select a.id from pq_line a
|
||||
inner join pq_line b on a.pid = b.id
|
||||
inner join pq_line c on b.pid =c.id
|
||||
inner join pq_device d on c.id = d.id
|
||||
where a.id in
|
||||
<foreach collection="list" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
and d.com_flag = #{comFlag}
|
||||
and a.state = 1
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -1,140 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.njcn.device.mapper.LineMarkMapper">
|
||||
|
||||
<select id="getLineMark" resultType="LineMarkVO">
|
||||
SELECT
|
||||
area.NAME province,
|
||||
gd.NAME gdName,
|
||||
sub.NAME subName,
|
||||
dev.NAME devName,
|
||||
line.NAME lineName,
|
||||
line.id lineIndex,
|
||||
devDetail.com_flag,
|
||||
devDetail.run_flag,
|
||||
devDetail.update_time,
|
||||
lineDetail.line_grade lineGradeId,
|
||||
dic.name lineGrade
|
||||
FROM
|
||||
pq_line line
|
||||
INNER JOIN pq_line voltage ON line.pid = voltage.id
|
||||
INNER JOIN pq_line dev ON voltage.pid = dev.id
|
||||
INNER JOIN pq_line sub ON dev.pid = sub.id
|
||||
INNER JOIN pq_line gd ON sub.pid = gd.id
|
||||
INNER JOIN pq_line prov ON gd.pid = prov.id
|
||||
INNER JOIN pq_line_detail lineDetail ON line.id = lineDetail.id
|
||||
INNER JOIN pq_device devDetail ON dev.id = devDetail.id
|
||||
INNER JOIN sys_area area ON prov.NAME = area.id
|
||||
LEFT JOIN sys_dict_data dic ON lineDetail.line_grade = dic.id
|
||||
WHERE
|
||||
line.LEVEL = 6
|
||||
AND line.id = lineDetail.id
|
||||
AND dev.id = devDetail.id
|
||||
AND prov.NAME = area.id
|
||||
AND lineDetail.line_grade = dic.id
|
||||
and devDetail.dev_model = 1
|
||||
|
||||
<if test="comFlag!=null">
|
||||
and devDetail.com_flag = #{comFlag}
|
||||
</if>
|
||||
<if test="lineGrade!=null and lineGrade!=''">
|
||||
and dic.id = #{lineGrade}
|
||||
</if>
|
||||
<if test="searchValue!=null and searchValue!=''">
|
||||
and area.name like CONCAT(CONCAT('%', #{searchValue}), '%') or gd.name like CONCAT(CONCAT('%', #{searchValue}), '%')
|
||||
or sub.name like CONCAT(CONCAT('%', #{searchValue}), '%') or dev.name like CONCAT(CONCAT('%', #{searchValue}), '%')
|
||||
or voltage.name like CONCAT(CONCAT('%', #{searchValue}), '%') or line.name like CONCAT(CONCAT('%', #{searchValue}), '%')
|
||||
</if>
|
||||
order by prov.sort asc,gd.sort asc,sub.sort asc,dev.sort asc,line.sort asc
|
||||
</select>
|
||||
|
||||
<select id="exportLineMark" resultType="LineMark">
|
||||
SELECT
|
||||
area.NAME province,
|
||||
gd.NAME gdName,
|
||||
sub.NAME subName,
|
||||
dev.NAME devName,
|
||||
line.NAME lineName,
|
||||
dic.name mark
|
||||
FROM
|
||||
pq_line line
|
||||
INNER JOIN pq_line voltage ON line.pid = voltage.id
|
||||
INNER JOIN pq_line dev ON voltage.pid = dev.id
|
||||
INNER JOIN pq_line sub ON dev.pid = sub.id
|
||||
INNER JOIN pq_line gd ON sub.pid = gd.id
|
||||
INNER JOIN pq_line prov ON gd.pid = prov.id
|
||||
INNER JOIN pq_line_detail lineDetail ON line.id = lineDetail.id
|
||||
INNER JOIN pq_device devDetail ON dev.id = devDetail.id
|
||||
INNER JOIN sys_area area ON prov.NAME = area.id
|
||||
LEFT JOIN sys_dict_data dic ON lineDetail.line_grade = dic.id
|
||||
WHERE
|
||||
line.LEVEL = 6
|
||||
AND line.id = lineDetail.id
|
||||
AND dev.id = devDetail.id
|
||||
AND prov.NAME = area.id
|
||||
AND lineDetail.line_grade = dic.id
|
||||
and devDetail.dev_model = 1
|
||||
|
||||
<if test="comFlag!=null">
|
||||
and devDetail.com_flag = #{comFlag}
|
||||
</if>
|
||||
<if test="lineGrade!=null and lineGrade!=''">
|
||||
and dic.id = #{lineGrade}
|
||||
</if>
|
||||
<if test="searchValue!=null and searchValue!=''">
|
||||
and area.name like CONCAT(CONCAT('%', #{searchValue}), '%') or gd.name like CONCAT(CONCAT('%', #{searchValue}), '%')
|
||||
or sub.name like CONCAT(CONCAT('%', #{searchValue}), '%') or dev.name like CONCAT(CONCAT('%', #{searchValue}), '%')
|
||||
or voltage.name like CONCAT(CONCAT('%', #{searchValue}), '%') or line.name like CONCAT(CONCAT('%', #{searchValue}), '%')
|
||||
</if>
|
||||
order by prov.sort,gd.sort,sub.sort,dev.sort,line.sort
|
||||
</select>
|
||||
|
||||
<update id="singleOperate">
|
||||
update pq_line_detail set
|
||||
line_grade= #{lineGrade}
|
||||
where id = #{lineIndex}
|
||||
</update>
|
||||
|
||||
<select id="getLineGrade" resultType="LineMarkVO">
|
||||
select
|
||||
a.id lineIndex,
|
||||
b.line_grade lineGrade
|
||||
from pq_line a
|
||||
left join pq_linedetail b on a.id = b.id
|
||||
where a.id=#{lineIndex}
|
||||
</select>
|
||||
|
||||
<select id="getLineMarkData" resultType="LineMarkVO">
|
||||
SELECT
|
||||
gd.NAME gdName,
|
||||
sub.NAME subName,
|
||||
dev.NAME devName,
|
||||
line.NAME lineName,
|
||||
line.id lineIndex,
|
||||
dev.id devIndex
|
||||
FROM
|
||||
pq_line line
|
||||
INNER JOIN pq_line voltage ON line.pid = voltage.id
|
||||
INNER JOIN pq_line dev ON voltage.pid = dev.id
|
||||
INNER JOIN pq_line sub ON dev.pid = sub.id
|
||||
INNER JOIN pq_line gd ON sub.pid = gd.id
|
||||
LEFT JOIN pq_device devDetail ON dev.id = devDetail.id
|
||||
where devDetail.dev_model = 1
|
||||
and gd.name = #{gdName}
|
||||
and sub.name = #{subName}
|
||||
and dev.name = #{devName}
|
||||
and line.name = #{lineName}
|
||||
</select>
|
||||
|
||||
<update id="updateMark">
|
||||
update pq_linedetail set line_grade = #{lineGrade} where id = #{lineIndex}
|
||||
</update>
|
||||
|
||||
<update id="batchUpdateForLine" parameterType="java.util.List">
|
||||
<foreach collection="list" item="item" index="index" separator=";">
|
||||
update pq_line_detail set
|
||||
line_grade= #{item.mark}
|
||||
where id = #{item.lineIndex}
|
||||
</foreach>
|
||||
</update>
|
||||
</mapper>
|
||||
@@ -1,61 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.njcn.device.mapper.LogManageMapper">
|
||||
|
||||
<select id="getDeviceLogData" resultType="DeviceLogVO">
|
||||
SELECT
|
||||
A.`Name` name,
|
||||
B.`Name` type,
|
||||
C.`Name` updateBy
|
||||
FROM
|
||||
pq_line A,
|
||||
sys_dict_data B,
|
||||
sys_user C
|
||||
WHERE
|
||||
A.Id = #{lineIds}
|
||||
AND B.Id = #{terminalTypes}
|
||||
AND C.Id = #{updateBys}
|
||||
</select>
|
||||
<!-- SELECT-->
|
||||
<!-- A.`Name` name,-->
|
||||
<!-- B.`Name` type,-->
|
||||
<!-- C.`Name` updateBy-->
|
||||
<!-- FROM-->
|
||||
<!-- pq_line A,-->
|
||||
<!-- sys_dict_data B,-->
|
||||
<!-- sys_user C-->
|
||||
<!-- WHERE A.Id IN-->
|
||||
<!-- <foreach collection="lineIds" item="item" open="(" close=")" separator=",">-->
|
||||
<!-- #{item}-->
|
||||
<!-- </foreach>-->
|
||||
<!-- AND B.Id IN-->
|
||||
<!-- <foreach collection="terminalTypes" item="item" open="(" close=")" separator=",">-->
|
||||
<!-- #{item}-->
|
||||
<!-- </foreach>-->
|
||||
<!-- AND C.Id IN-->
|
||||
<!-- <foreach collection="updateBys" item="item" open="(" close=")" separator=",">-->
|
||||
<!-- #{item}-->
|
||||
<!-- </foreach>-->
|
||||
|
||||
<select id="getEventLogData" resultType="EventLogVO">
|
||||
SELECT
|
||||
A.`Name` line,
|
||||
A3.`Name` substation,
|
||||
A4.`Name` powerCompany
|
||||
FROM
|
||||
pq_line A,
|
||||
pq_line A1,
|
||||
pq_line A2,
|
||||
pq_line A3,
|
||||
pq_line A4
|
||||
WHERE
|
||||
A.Id = #{lineId}
|
||||
AND A.Pid = A1.Id
|
||||
AND A1.Pid = A2.Id
|
||||
AND A2.Pid = A3.Id
|
||||
AND A3.Pid = A4.Id
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
||||
@@ -1,5 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.njcn.device.mapper.MonthFlowMapper">
|
||||
|
||||
</mapper>
|
||||
@@ -1,5 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.njcn.device.mapper.NodeMapper">
|
||||
|
||||
</mapper>
|
||||
@@ -1,5 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.njcn.device.mapper.OverlimitMapper">
|
||||
|
||||
</mapper>
|
||||
@@ -1,55 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.njcn.device.mapper.ProgramVersionMapper">
|
||||
|
||||
<select id="getVersion" resultType="VersionVO">
|
||||
SELECT
|
||||
A.`Id` id,
|
||||
B.`Name` devType,
|
||||
A.`Name` name,
|
||||
A.`Protocol` protocol,
|
||||
A.`Date` date,
|
||||
C.`Name` updateBy,
|
||||
A.`Update_Time` updateTime,
|
||||
A.`Remark` remark,
|
||||
A.`Version_Type` versionType,
|
||||
A.`Version_Flag` versionFlag
|
||||
FROM
|
||||
cld_version A,
|
||||
sys_dict_data B,
|
||||
sys_user C
|
||||
WHERE A.State = 1
|
||||
AND A.Dev_Type = B.Id
|
||||
AND A.Update_By = C.Id
|
||||
<if test="devType != null and devType != ''">
|
||||
AND A.Dev_Type = ${devType}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="getProgramVersionById" resultType="ShowVersionVO">
|
||||
SELECT
|
||||
`File` file
|
||||
FROM
|
||||
cld_version
|
||||
WHERE Id = #{id}
|
||||
AND State = 1
|
||||
</select>
|
||||
|
||||
<update id="updateVersionFlag">
|
||||
UPDATE
|
||||
cld_version
|
||||
SET
|
||||
Version_Flag = 0
|
||||
WHERE Id = #{id}
|
||||
</update>
|
||||
|
||||
<update id="updateVersionState">
|
||||
UPDATE
|
||||
cld_version
|
||||
SET
|
||||
State = 0
|
||||
WHERE Id = #{id}
|
||||
</update>
|
||||
|
||||
</mapper>
|
||||
@@ -1,5 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.njcn.device.mapper.ProtectValueMapper">
|
||||
|
||||
</mapper>
|
||||
@@ -1,5 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.njcn.device.mapper.ProtectWordMapper">
|
||||
|
||||
</mapper>
|
||||
@@ -1,143 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.njcn.device.mapper.RateOfFlowMapper">
|
||||
|
||||
<select id="getRateOfFlowData" resultType="RateOfFlowVO">
|
||||
SELECT
|
||||
A.`Id` id,
|
||||
A.`Name` name,
|
||||
A.`Type` type,
|
||||
A.`Flag` flag,
|
||||
A.`Combo_Type` comboType,
|
||||
A.`Flow` flow,
|
||||
B.`Name` updateBy,
|
||||
A.`Update_Time` updateTime
|
||||
FROM
|
||||
cld_flow_meal A,
|
||||
sys_user B
|
||||
WHERE A.State = 1
|
||||
AND A.Update_By = B.Id
|
||||
<!-- <if test="data != null and data != ''">-->
|
||||
<!-- AND Id LIKE '%${data}%'-->
|
||||
<!-- OR Name LIKE '%${data}%'-->
|
||||
<!-- OR Update_By LIKE '%${data}%'-->
|
||||
<!-- OR Update_Time LIKE '%${data}%'-->
|
||||
<!-- </if>-->
|
||||
</select>
|
||||
|
||||
<select id="getRateOfFlowFlag" resultType="RateOfFlowVO">
|
||||
SELECT
|
||||
`Id` id,
|
||||
`Name` name,
|
||||
`Type` type,
|
||||
`Flag` flag,
|
||||
`Combo_Type` comboType,
|
||||
`Flow` flow,
|
||||
`Update_By` updateBy,
|
||||
`Update_Time` updateTime
|
||||
FROM
|
||||
cld_flow_meal
|
||||
WHERE Type =0 OR Type =1 AND Flag =1
|
||||
</select>
|
||||
|
||||
<update id="updateByState">
|
||||
UPDATE
|
||||
cld_flow_meal
|
||||
SET
|
||||
State = 0
|
||||
WHERE Id = #{id}
|
||||
</update>
|
||||
|
||||
<select id="getFlowStrategy" resultType="FlowStrategyVO">
|
||||
SELECT
|
||||
A.`Id` id,
|
||||
A.`Name` name,
|
||||
A.`Flag` flag,
|
||||
C.`Name` updateBy,
|
||||
A.`Update_Time` updateTime,
|
||||
B1.`Value` comPerData,
|
||||
B2.`Value` warnPerData,
|
||||
B3.`Value` alertPerData
|
||||
FROM
|
||||
cld_flow_strategy A,
|
||||
cld_flow_strategy_dic B1,
|
||||
cld_flow_strategy_dic B2,
|
||||
cld_flow_strategy_dic B3,
|
||||
sys_user C
|
||||
WHERE A.State = 1
|
||||
AND A.Update_By = C.Id
|
||||
AND A.Com_Per = B1.Id
|
||||
AND A.Warn_Per = B2.Id
|
||||
AND A.Alert_Per = B3.Id
|
||||
</select>
|
||||
|
||||
<select id="getStrategyFlag" resultType="FlowStrategyVO">
|
||||
SELECT
|
||||
`Id` id,
|
||||
`Name` name,
|
||||
`Flag` flag,
|
||||
`Update_By` updateBy,
|
||||
`Update_Time` updateTime
|
||||
FROM
|
||||
cld_flow_strategy
|
||||
WHERE Flag =1
|
||||
</select>
|
||||
|
||||
<update id="updateByStrategy">
|
||||
UPDATE
|
||||
cld_flow_strategy
|
||||
SET
|
||||
State = 0
|
||||
WHERE Id = #{id}
|
||||
</update>
|
||||
|
||||
<select id="getFlowStrategyById" resultType="ShowFlowStrategyVO">
|
||||
SELECT
|
||||
A.`Id` id,
|
||||
A.`Name` name,
|
||||
A.`Flag` flag,
|
||||
C.`Name` updateBy,
|
||||
A.`Update_Time` updateTime,
|
||||
A.`Com_Per` com,
|
||||
A.`Warn_Per` warn,
|
||||
A.`Alert_Per` alert,
|
||||
B1.`Value` comPerData,
|
||||
B2.`Value` warnPerData,
|
||||
B3.`Value` alertPerData
|
||||
FROM
|
||||
cld_flow_strategy A,
|
||||
cld_flow_strategy_dic B1,
|
||||
cld_flow_strategy_dic B2,
|
||||
cld_flow_strategy_dic B3,
|
||||
sys_user C
|
||||
WHERE A.Id = #{id}
|
||||
AND A.State = 1
|
||||
AND A.Update_By = C.Id
|
||||
AND A.Com_Per = B1.Id
|
||||
AND A.Warn_Per = B2.Id
|
||||
AND A.Alert_Per = B3.Id
|
||||
</select>
|
||||
|
||||
<select id="getStrategyDicFun" resultType="java.lang.String">
|
||||
SELECT
|
||||
Fuction_Id
|
||||
FROM
|
||||
cld_strategydic_fun
|
||||
WHERE
|
||||
Strategy_Dic_Id = #{id}
|
||||
</select>
|
||||
<select id="getDictData" resultType="java.lang.String">
|
||||
SELECT
|
||||
Name
|
||||
FROM
|
||||
sys_dict_data
|
||||
WHERE
|
||||
Id = #{id}
|
||||
</select>
|
||||
|
||||
<delete id="delStrategyDicFun">
|
||||
DELETE FROM cld_strategydic_fun WHERE Strategy_Dic_Id = #{id}
|
||||
</delete>
|
||||
|
||||
</mapper>
|
||||
@@ -1,5 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.njcn.device.mapper.StatisFlowMapper">
|
||||
|
||||
</mapper>
|
||||
@@ -1,5 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.njcn.device.mapper.StrategydicFunMapper">
|
||||
|
||||
</mapper>
|
||||
@@ -1,26 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.njcn.device.mapper.SubstationMapper">
|
||||
<select id="getSubstationData" resultType="com.njcn.device.pojo.vo.SubstationDetailVO">
|
||||
SELECT
|
||||
line.id id,
|
||||
line.NAME srbName,
|
||||
sub.Lng coordY,
|
||||
sub.Lat coordX,
|
||||
"blue" color,
|
||||
dic.name scale
|
||||
FROM
|
||||
pq_line line,
|
||||
pq_substation sub,
|
||||
sys_dict_data dic
|
||||
WHERE
|
||||
line.Id = sub.Id
|
||||
and
|
||||
sub.scale = dic.id
|
||||
AND
|
||||
sub.Id IN
|
||||
<foreach collection="id" item="item" open="(" close=")" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -1,125 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.njcn.device.mapper.TerminalMaintainMapper">
|
||||
|
||||
<select id="getTerminalDevInfo" resultType="TerminalMaintainVO">
|
||||
SELECT
|
||||
a.id,
|
||||
a.pid,
|
||||
a.NAME,
|
||||
a.level,
|
||||
b.run_flag,
|
||||
b.com_flag,
|
||||
e.NAME devType,
|
||||
ifnull(g.name,'/') version,
|
||||
ifnull(d.flow,(select flow from cld_flow_meal where type = 0 and flag = 1)) baseFlowMeal,
|
||||
ifnull(d1.flow,0) reamFlowMeal,
|
||||
FORMAT(ifnull(mo.statis_value,0)/1024/1024,2) as statisValue
|
||||
FROM
|
||||
pq_line a
|
||||
INNER JOIN pq_device b ON a.id = b.id
|
||||
LEFT JOIN cld_dev_meal c ON b.id = c.line_id
|
||||
LEFT JOIN cld_flow_meal d ON c.Base_Meal_Id = d.id
|
||||
LEFT JOIN cld_flow_meal d1 ON c.Ream_Meal_Id = d1.id
|
||||
LEFT JOIN sys_dict_data e ON b.dev_type = e.id
|
||||
LEFT JOIN cld_dev_version f on a.id = f.line_id and f.flag = 1 and f.state = 1
|
||||
LEFT JOIN cld_version g on f.version_id = g.id
|
||||
LEFT JOIN
|
||||
(select * from cld_month_flow where date_format(time_id,'%Y-%m' ) = date_format(CURRENT_TIME(),'%Y-%m')) mo on a.id = mo.line_id
|
||||
where b.dev_model = 1
|
||||
</select>
|
||||
|
||||
<select id="getGdAndSubList" resultType="TerminalMaintainVO">
|
||||
select id,name,level,pid from pq_line where level = #{level} and state = 1 order by sort
|
||||
</select>
|
||||
|
||||
<select id="getProvList" resultType="TerminalMaintainVO">
|
||||
select a.id,b.name,a.level,a.pid from pq_line a
|
||||
inner join sys_area b on a.name = b.id
|
||||
where a.level = 1
|
||||
and a.state = 1
|
||||
order by a.sort
|
||||
</select>
|
||||
|
||||
<select id="getPqLineProvList" resultType="TerminalMaintainVO">
|
||||
select a.id,b.name,a.level,a.pid from pq_line a
|
||||
inner join sys_area b on a.name = b.id
|
||||
where a.level = 1
|
||||
and a.id in
|
||||
<foreach collection="ids" item="item" open="(" close=")" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
order by a.sort
|
||||
</select>
|
||||
|
||||
<select id="getPqLineGdAndSubList" resultType="TerminalMaintainVO">
|
||||
select a.id,a.name,a.level,a.pid from pq_line a
|
||||
where a.id in
|
||||
<foreach collection="ids" item="item" open="(" close=")" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
order by a.sort
|
||||
</select>
|
||||
|
||||
|
||||
<select id="getRunFlagList" resultType="TerminalMaintainVO">
|
||||
SELECT
|
||||
a.id,
|
||||
a.pid,
|
||||
a.NAME,
|
||||
b.ip,
|
||||
a.level,
|
||||
b.run_flag
|
||||
FROM
|
||||
pq_line a
|
||||
INNER JOIN pq_device b ON a.id = b.id
|
||||
WHERE a.id in
|
||||
<foreach collection="ids" item="item" separator="," index="index" open="(" close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
order by a.sort
|
||||
</select>
|
||||
|
||||
<select id="getFlowMealList" resultType="TerminalMaintainVO">
|
||||
SELECT
|
||||
a.id,
|
||||
a.pid,
|
||||
a.name,
|
||||
a.level,
|
||||
h.ip,
|
||||
ifnull(f.Flow,(select flow from cld_flow_meal where type = 0 and flag = 1)) baseFlowMeal,
|
||||
g.Flag reamFlowMeal
|
||||
FROM
|
||||
pq_line a
|
||||
inner join pq_device h on a.id = h.id
|
||||
Left join cld_dev_meal e on a.id = e.Line_Id
|
||||
left join cld_flow_meal f on e.Base_Meal_Id = f.Id
|
||||
left join cld_flow_meal g on e.Ream_Meal_Id = g.Id
|
||||
WHERE a.id in
|
||||
<foreach collection="ids" item="item" separator="," index="index" open="(" close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
order by a.sort
|
||||
</select>
|
||||
|
||||
<select id="getFlowStrategyList" resultType="TerminalMaintainVO">
|
||||
SELECT
|
||||
a.id,
|
||||
a.pid,
|
||||
a.name,
|
||||
a.level,
|
||||
ifnull(f.name,(select name from cld_flow_strategy where flag = 1 and state = 1)) flowStrategy,
|
||||
ifnull(f.flag,1) as strategyFlag
|
||||
FROM
|
||||
pq_line a
|
||||
Left join cld_dev_strategy e on a.id = e.Line_Id
|
||||
left join cld_flow_strategy f on e.Strategy_Id = f.Id
|
||||
WHERE a.id in
|
||||
<foreach collection="ids" item="item" separator="," index="index" open="(" close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
order by a.sort
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
||||
@@ -1,73 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.njcn.device.mapper.TerminalVersionMapper">
|
||||
|
||||
|
||||
<select id="getTerminalVersionInfo" resultType="TerminalVersionVO">
|
||||
SELECT
|
||||
a.id,
|
||||
a.pid,
|
||||
a.NAME,
|
||||
a.LEVEL,
|
||||
b.run_flag,
|
||||
b.com_flag,
|
||||
c.NAME devType,
|
||||
ifnull(e.NAME,'/') versionName,
|
||||
ifnull(e.protocol,'/') protocol,
|
||||
ifnull(e.date,'/') versionDate,
|
||||
ifnull(e.update_time,'/') updateTime,
|
||||
ifnull(e.update_by,'/') updateBy
|
||||
FROM
|
||||
pq_line a
|
||||
INNER JOIN pq_device b ON a.id = b.id
|
||||
LEFT JOIN sys_dict_data c ON b.dev_type = c.id
|
||||
LEFT JOIN cld_dev_version d ON b.id = d.Line_Id and d.flag = 1 and d.Result = 1
|
||||
LEFT JOIN cld_version e ON d.Version_Id = e.id
|
||||
LEFT JOIN sys_user f on d.update_by = f.id
|
||||
WHERE
|
||||
b.dev_model = 1
|
||||
<if test="queryParam.runFlag!=null">
|
||||
and b.run_flag = #{queryParam.runFlag}
|
||||
</if>
|
||||
<if test="queryParam.comFlag!=null">
|
||||
and b.com_flag = #{queryParam.comFlag}
|
||||
</if>
|
||||
<if test="queryParam.devType!=null and queryParam.devType!=''">
|
||||
and b.dev_type = #{queryParam.devType}
|
||||
</if>
|
||||
|
||||
</select>
|
||||
|
||||
<select id="getGdAndSubList" resultType="TerminalVersionVO">
|
||||
select id,name,level,pid from pq_line where level = #{level} and state = 1 order by sort
|
||||
</select>
|
||||
|
||||
<select id="getProvList" resultType="TerminalVersionVO">
|
||||
select a.id,b.name,a.level,a.pid from pq_line a
|
||||
inner join sys_area b on a.name = b.id
|
||||
where a.level = 1
|
||||
and a.state = 1
|
||||
order by a.sort
|
||||
</select>
|
||||
|
||||
<select id="getPqLineProvList" resultType="TerminalVersionVO">
|
||||
select a.id,b.name,a.level,a.pid from pq_line a
|
||||
inner join sys_area b on a.name = b.id
|
||||
where a.level = 1
|
||||
and a.id in
|
||||
<foreach collection="ids" item="item" open="(" close=")" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
order by a.sort
|
||||
</select>
|
||||
|
||||
<select id="getPqLineGdAndSubList" resultType="TerminalVersionVO">
|
||||
select a.id,a.name,a.level,a.pid from pq_line a
|
||||
where a.id in
|
||||
<foreach collection="ids" item="item" open="(" close=")" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
order by a.sort
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -1,404 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.njcn.device.mapper.TreeMapper">
|
||||
|
||||
|
||||
<!--监测点-->
|
||||
<select id="getMancLineListByLineIds" resultType="TerminalTree">
|
||||
select distinct a.id,a.pid,a.name,a.level,a.sort,e.pt_type
|
||||
from pq_line a
|
||||
inner join pq_line b on a.pid = b.id
|
||||
inner join pq_line c on b.pid = c.id
|
||||
inner join pq_device d on c.id = d.id
|
||||
inner join pq_line_detail e on a.id = e.id
|
||||
where a.id in
|
||||
<foreach collection="list" item="item" open="(" close=")" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
and d.manufacturer = #{manufacturer}
|
||||
and a.state = 1
|
||||
order by sort
|
||||
</select>
|
||||
<!--母线-->
|
||||
<select id="getMancVoltageListByLineIds" resultType="TerminalTree">
|
||||
select distinct b.id,b.pid,b.name,b.level,b.sort
|
||||
from pq_line a
|
||||
inner join pq_line b on a.pid = b.id
|
||||
inner join pq_line c on b.pid = c.id
|
||||
inner join pq_device d on c.id = d.id
|
||||
where a.id in
|
||||
<foreach collection="list" item="item" open="(" close=")" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
and d.manufacturer = #{manufacturer}
|
||||
and a.state = 1
|
||||
order by sort
|
||||
</select>
|
||||
|
||||
<!--设备-->
|
||||
<select id="getMancDevListByLineIds" resultType="TerminalTree">
|
||||
select distinct c.id,c.pid,c.name,c.level,c.sort,d.com_flag comFlag
|
||||
from pq_line a
|
||||
inner join pq_line b on a.pid = b.id
|
||||
inner join pq_line c on b.pid = c.id
|
||||
inner join pq_device d on c.id = d.id
|
||||
where a.id in
|
||||
<foreach collection="list" item="item" open="(" close=")" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
and d.manufacturer = #{manufacturer}
|
||||
and a.state = 1
|
||||
order by sort
|
||||
</select>
|
||||
|
||||
<!--变电站-->
|
||||
<select id="getMancSubListByLineIds" resultType="TerminalTree">
|
||||
select distinct d.id,d.pid,d.name,d.level,d.sort
|
||||
from pq_line a
|
||||
inner join pq_line b on a.pid = b.id
|
||||
inner join pq_line c on b.pid = c.id
|
||||
inner join pq_line d on c.pid = d.id
|
||||
inner join pq_device e on c.id = e.id
|
||||
where a.id in
|
||||
<foreach collection="list" item="item" open="(" close=")" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
and e.manufacturer = #{manufacturer}
|
||||
and a.state = 1
|
||||
order by sort
|
||||
</select>
|
||||
|
||||
<!--供电公司-->
|
||||
<select id="getMancGdListByLineIds" resultType="TerminalTree">
|
||||
select distinct e.id,e.pid,e.name,e.level,e.sort
|
||||
from pq_line a
|
||||
inner join pq_line b on a.pid = b.id
|
||||
inner join pq_line c on b.pid = c.id
|
||||
inner join pq_line d on c.pid = d.id
|
||||
inner join pq_line e on d.pid = e.id
|
||||
inner join pq_device f on c.id = f.id
|
||||
where a.id in
|
||||
<foreach collection="list" item="item" open="(" close=")" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
and f.manufacturer = #{manufacturer}
|
||||
and a.state = 1
|
||||
order by sort
|
||||
</select>
|
||||
|
||||
<!--省份-->
|
||||
<select id="getMancProvListByLineIds" resultType="TerminalTree">
|
||||
select distinct f.id,f.pid,h.name,f.level,f.sort
|
||||
from pq_line a
|
||||
inner join pq_line b on a.pid = b.id
|
||||
inner join pq_line c on b.pid = c.id
|
||||
inner join pq_line d on c.pid = d.id
|
||||
inner join pq_line e on d.pid = e.id
|
||||
inner join pq_line f on e.pid = f.id
|
||||
inner join pq_device g on c.id = g.id
|
||||
inner join sys_area h on f.name = h.id
|
||||
where a.id in
|
||||
<foreach collection="list" item="item" open="(" close=")" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
and g.manufacturer = #{manufacturer}
|
||||
and a.state = 1
|
||||
order by sort
|
||||
</select>
|
||||
|
||||
|
||||
<!--电压等级++++++++++++++++++++++++++++++++++-->
|
||||
|
||||
<!--监测点-->
|
||||
<select id="getScaleLineListByLineIds" resultType="TerminalTree">
|
||||
select distinct a.id,a.pid,a.name,a.level,a.sort,d.pt_type
|
||||
from pq_line a
|
||||
inner join pq_line b on a.pid = b.id
|
||||
inner join pq_voltage c on c.id = b.id
|
||||
inner join pq_line_detail d on a.id = d.id
|
||||
where a.id in
|
||||
<foreach collection="list" item="item" open="(" close=")" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
and c.scale = #{scale}
|
||||
and a.state = 1
|
||||
order by sort
|
||||
</select>
|
||||
<!--母线-->
|
||||
<select id="getScaleVoltageListByLineIds" resultType="TerminalTree">
|
||||
select distinct b.id,b.pid,b.name,b.level,b.sort
|
||||
from pq_line a
|
||||
inner join pq_line b on a.pid = b.id
|
||||
inner join pq_voltage c on c.id = b.id
|
||||
where a.id in
|
||||
<foreach collection="list" item="item" open="(" close=")" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
and c.scale = #{scale}
|
||||
and a.state = 1
|
||||
order by sort
|
||||
</select>
|
||||
|
||||
<!--设备-->
|
||||
<select id="getScaleDevListByLineIds" resultType="TerminalTree">
|
||||
select distinct c.id,c.pid,c.name,c.level,c.sort,e.com_flag comFlag
|
||||
from pq_line a
|
||||
inner join pq_line b on a.pid = b.id
|
||||
inner join pq_line c on b.pid = c.id
|
||||
inner join pq_voltage d on b.id = d.id
|
||||
inner join pq_device e on c.id = e.id
|
||||
where a.id in
|
||||
<foreach collection="list" item="item" open="(" close=")" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
and d.scale = #{scale}
|
||||
and a.state = 1
|
||||
order by sort
|
||||
</select>
|
||||
|
||||
<!--变电站-->
|
||||
<select id="getScaleSubListByLineIds" resultType="TerminalTree">
|
||||
select distinct d.id,d.pid,d.name,d.level,d.sort
|
||||
from pq_line a
|
||||
inner join pq_line b on a.pid = b.id
|
||||
inner join pq_line c on b.pid = c.id
|
||||
inner join pq_line d on c.pid = d.id
|
||||
inner join pq_voltage e on b.id = e.id
|
||||
where a.id in
|
||||
<foreach collection="list" item="item" open="(" close=")" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
and e.scale = #{scale}
|
||||
and a.state = 1
|
||||
order by sort
|
||||
</select>
|
||||
|
||||
<!--供电公司-->
|
||||
<select id="getScaleGdListByLineIds" resultType="TerminalTree">
|
||||
select distinct e.id,e.pid,e.name,e.level,e.sort
|
||||
from pq_line a
|
||||
inner join pq_line b on a.pid = b.id
|
||||
inner join pq_line c on b.pid = c.id
|
||||
inner join pq_line d on c.pid = d.id
|
||||
inner join pq_line e on d.pid = e.id
|
||||
inner join pq_voltage f on b.id = f.id
|
||||
where a.id in
|
||||
<foreach collection="list" item="item" open="(" close=")" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
and f.scale = #{scale}
|
||||
and a.state = 1
|
||||
order by sort
|
||||
</select>
|
||||
|
||||
<!--省份-->
|
||||
<select id="getScaleProvListByLineIds" resultType="TerminalTree">
|
||||
select distinct f.id,f.pid,h.name,f.level,f.sort
|
||||
from pq_line a
|
||||
inner join pq_line b on a.pid = b.id
|
||||
inner join pq_line c on b.pid = c.id
|
||||
inner join pq_line d on c.pid = d.id
|
||||
inner join pq_line e on d.pid = e.id
|
||||
inner join pq_line f on e.pid = f.id
|
||||
inner join pq_voltage g on b.id = g.id
|
||||
inner join sys_area h on f.name = h.id
|
||||
where a.id in
|
||||
<foreach collection="list" item="item" open="(" close=")" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
and g.scale = #{scale}
|
||||
and a.state = 1
|
||||
order by sort
|
||||
</select>
|
||||
|
||||
|
||||
<!--干扰源类型++++++++++++++++++++++++++++++-->
|
||||
|
||||
<!--监测点-->
|
||||
<select id="getLoadTypeLineListByLineIds" resultType="TerminalTree">
|
||||
select distinct a.id,a.pid,a.name,a.level,a.sort,c.pt_type
|
||||
from pq_line a
|
||||
inner join pq_line b on a.pid = b.id
|
||||
inner join pq_line_detail c on c.id = a.id
|
||||
where a.id in
|
||||
<foreach collection="list" item="item" open="(" close=")" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
and c.load_type = #{loadType}
|
||||
and a.state = 1
|
||||
order by sort
|
||||
</select>
|
||||
|
||||
<!--母线-->
|
||||
<select id="getLoadTypeVoltageListByLineIds" resultType="TerminalTree">
|
||||
select distinct b.id,b.pid,b.name,b.level,b.sort
|
||||
from pq_line a
|
||||
inner join pq_line b on a.pid = b.id
|
||||
inner join pq_line_detail c on c.id = a.id
|
||||
where a.id in
|
||||
<foreach collection="list" item="item" open="(" close=")" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
and c.load_type = #{loadType}
|
||||
and a.state = 1
|
||||
order by sort
|
||||
</select>
|
||||
|
||||
<!--设备-->
|
||||
<select id="getLoadTypeDevListByLineIds" resultType="TerminalTree">
|
||||
select distinct c.id,c.pid,c.name,c.level,c.sort,e.com_flag comFlag
|
||||
from pq_line a
|
||||
inner join pq_line b on a.pid = b.id
|
||||
inner join pq_line c on b.pid = c.id
|
||||
inner join pq_line_detail d on a.id = d.id
|
||||
inner join pq_device e on c.id = e.id
|
||||
where a.id in
|
||||
<foreach collection="list" item="item" open="(" close=")" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
and d.load_type = #{loadType}
|
||||
and a.state = 1
|
||||
order by sort
|
||||
</select>
|
||||
|
||||
<!--变电站-->
|
||||
<select id="getLoadTypeSubListByLineIds" resultType="TerminalTree">
|
||||
select distinct d.id,d.pid,d.name,d.level,d.sort
|
||||
from pq_line a
|
||||
inner join pq_line b on a.pid = b.id
|
||||
inner join pq_line c on b.pid = c.id
|
||||
inner join pq_line d on c.pid = d.id
|
||||
inner join pq_line_detail e on a.id = e.id
|
||||
where a.id in
|
||||
<foreach collection="list" item="item" open="(" close=")" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
and e.load_type = #{loadType}
|
||||
and a.state = 1
|
||||
order by sort
|
||||
</select>
|
||||
|
||||
<!--供电公司-->
|
||||
<select id="getLoadTypeGdListByLineIds" resultType="TerminalTree">
|
||||
select distinct e.id,e.pid,e.name,e.level,e.sort
|
||||
from pq_line a
|
||||
inner join pq_line b on a.pid = b.id
|
||||
inner join pq_line c on b.pid = c.id
|
||||
inner join pq_line d on c.pid = d.id
|
||||
inner join pq_line e on d.pid = e.id
|
||||
inner join pq_line_detail f on a.id = f.id
|
||||
where a.id in
|
||||
<foreach collection="list" item="item" open="(" close=")" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
and f.load_type = #{loadType}
|
||||
and a.state = 1
|
||||
order by sort
|
||||
</select>
|
||||
|
||||
<!--省份-->
|
||||
<select id="getLoadTypeProvListByLineIds" resultType="TerminalTree">
|
||||
select distinct f.id,f.pid,h.name,f.level,f.sort
|
||||
from pq_line a
|
||||
inner join pq_line b on a.pid = b.id
|
||||
inner join pq_line c on b.pid = c.id
|
||||
inner join pq_line d on c.pid = d.id
|
||||
inner join pq_line e on d.pid = e.id
|
||||
inner join pq_line f on e.pid = f.id
|
||||
inner join pq_line_detail g on a.id = g.id
|
||||
inner join sys_area h on f.name = h.id
|
||||
where a.id in
|
||||
<foreach collection="list" item="item" open="(" close=")" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
and g.load_type = #{loadType}
|
||||
and a.state = 1
|
||||
order by sort
|
||||
</select>
|
||||
|
||||
|
||||
<!--省会-->
|
||||
<select id="getProvinceList" resultType="TerminalTree">
|
||||
SELECT
|
||||
DISTINCT(pro.id),
|
||||
pro.pid,
|
||||
pro.level,
|
||||
pro.sort,
|
||||
area.name name
|
||||
FROM
|
||||
pq_line pro,
|
||||
pq_line gd,
|
||||
sys_area area
|
||||
WHERE
|
||||
pro.id = gd.pid
|
||||
AND
|
||||
pro.name = area.id
|
||||
AND
|
||||
gd.id in
|
||||
<foreach collection="gdIndex" item="item" open="(" close=")" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
</select>
|
||||
|
||||
<!--供电公司-->
|
||||
<select id="getGdList" resultType="TerminalTree">
|
||||
SELECT gd.id,
|
||||
gd.pid,
|
||||
gd.LEVEL,
|
||||
gd.sort,
|
||||
gd.Name
|
||||
FROM pq_line gd
|
||||
WHERE
|
||||
gd.id in
|
||||
<foreach collection="gdIndex" item="item" open="(" close=")" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
</select>
|
||||
|
||||
|
||||
<!--变电站-->
|
||||
<select id="getSubList" resultType="TerminalTree">
|
||||
SELECT
|
||||
sub.id,
|
||||
sub.pid,
|
||||
sub.LEVEL,
|
||||
sub.sort,
|
||||
sub.Name
|
||||
FROM
|
||||
pq_line sub
|
||||
WHERE
|
||||
sub.id in
|
||||
<foreach collection="subIndex" item="item" open="(" close=")" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
</select>
|
||||
|
||||
<!--监测点-->
|
||||
<select id="getLineList" resultType="TerminalTree">
|
||||
SELECT
|
||||
line.id,
|
||||
line.pid,
|
||||
line.LEVEL,
|
||||
line.sort,
|
||||
line.pids,
|
||||
CONCAT(voltage.name, '_', line.name) name,
|
||||
comFlag.Com_Flag
|
||||
FROM
|
||||
pq_line line,
|
||||
pq_line voltage,
|
||||
pq_line device,
|
||||
pq_device comFlag
|
||||
WHERE
|
||||
line.pid = voltage.id
|
||||
AND
|
||||
voltage.pid = device.id
|
||||
AND
|
||||
device.id = comFlag.id
|
||||
AND line.id in
|
||||
<foreach collection="lineIndex" item="item" open="(" close=")" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
||||
@@ -1,5 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.njcn.device.mapper.VersionMapper">
|
||||
|
||||
</mapper>
|
||||
@@ -1,17 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.njcn.device.mapper.VoltageMapper">
|
||||
|
||||
<select id="getVoltageByNum" resultType="Voltage">
|
||||
select b.* from pq_line a
|
||||
inner join pq_voltage b on a.id=b.id
|
||||
where a.pid = #{devIndex}
|
||||
and a.state = 1
|
||||
and b.Num in
|
||||
<foreach collection="num" item="item" open="(" close=")" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
||||
@@ -1,33 +0,0 @@
|
||||
package com.njcn.device.service;
|
||||
|
||||
import com.njcn.device.pojo.param.AlarmStrategyParam;
|
||||
import com.njcn.device.pojo.vo.AlarmStrategyVO;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @version 1.0.0
|
||||
* @author: chenchao
|
||||
* @date: 2022/06/23 11:37
|
||||
*/
|
||||
public interface AlarmStrategyService {
|
||||
|
||||
/**
|
||||
* 获取告警策略列表
|
||||
*/
|
||||
List<AlarmStrategyVO> getAlarmStrategyData();
|
||||
|
||||
/**
|
||||
* 修改告警策略
|
||||
*/
|
||||
boolean updateAlarmStrategyById(AlarmStrategyParam alarmStrategyParam);
|
||||
|
||||
/**
|
||||
* 新增告警策略
|
||||
*/
|
||||
boolean addAlarmStrategyById(AlarmStrategyParam alarmStrategyParam);
|
||||
/**
|
||||
* 删除告警策略
|
||||
*/
|
||||
boolean removeAlarmStrategyData(String id);
|
||||
}
|
||||
@@ -1,17 +0,0 @@
|
||||
package com.njcn.device.service;
|
||||
|
||||
import com.njcn.device.pojo.param.AreaCensusParam;
|
||||
import com.njcn.device.pojo.vo.AreaDeviceOnlineVO;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @version 1.0.0
|
||||
* @author: chenchao
|
||||
* @date: 2022/08/11 20:52
|
||||
*/
|
||||
public interface AreaDeviceOnlineService {
|
||||
|
||||
List<AreaDeviceOnlineVO> getAreaDeviceOnline(AreaCensusParam areaCensusParam);
|
||||
|
||||
}
|
||||
@@ -1,17 +0,0 @@
|
||||
package com.njcn.device.service;
|
||||
|
||||
import com.njcn.device.pojo.param.AreaCensusParam;
|
||||
import com.njcn.device.pojo.vo.AreaIntegrityVO;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @version 1.0.0
|
||||
* @author: chenchao
|
||||
* @date: 2022/08/15 15:43
|
||||
*/
|
||||
public interface AreaIntegrityService {
|
||||
|
||||
List<AreaIntegrityVO> getAreaIntegrity(AreaCensusParam areaCensusParam);
|
||||
|
||||
}
|
||||
@@ -1,23 +0,0 @@
|
||||
package com.njcn.device.service;
|
||||
|
||||
import com.njcn.device.pojo.vo.CommunicateVO;
|
||||
import com.njcn.device.pojo.param.PulicTimeParam;
|
||||
import com.njcn.device.pojo.param.PulicTimeStatisParam;
|
||||
import com.njcn.device.pojo.vo.CommunicateStatisticsVO;
|
||||
import com.njcn.device.pojo.vo.DeviceOnlineDataVO;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author denghuajun
|
||||
* @date 2022/2/28
|
||||
*
|
||||
*/
|
||||
public interface CommunicateService {
|
||||
|
||||
CommunicateVO getComFlagInfoData(PulicTimeParam pulicTimeParam);
|
||||
|
||||
CommunicateStatisticsVO getRunInfoData(PulicTimeStatisParam pulicTimeStatisParam);
|
||||
|
||||
List<DeviceOnlineDataVO> getRunOnlineRateData(PulicTimeParam pulicTimeParam);
|
||||
}
|
||||
@@ -1,55 +0,0 @@
|
||||
package com.njcn.device.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.njcn.device.pojo.po.DeptLine;
|
||||
import com.njcn.web.pojo.param.DeptLineParam;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author denghuajun
|
||||
* @date 2022/1/12 17:30
|
||||
*
|
||||
*/
|
||||
public interface DeptLineService extends IService<DeptLine> {
|
||||
|
||||
/**
|
||||
* 部门绑定监测点
|
||||
* @param deptLineParam 部门监测点的实体类
|
||||
* @return 绑定结果
|
||||
*/
|
||||
void deptBindLine(DeptLineParam deptLineParam);
|
||||
|
||||
|
||||
/**
|
||||
* 部门解绑监测点
|
||||
* @param deptLineParam 部门监测点的实体类
|
||||
* @return 解绑结果
|
||||
*/
|
||||
void deptDeleteBindLine(DeptLineParam deptLineParam);
|
||||
|
||||
|
||||
/**
|
||||
* 根据部门ids集合查询是否绑定监测点
|
||||
* @param ids 部门ids
|
||||
* @return 查询结果
|
||||
*/
|
||||
List<DeptLine> selectDeptBindLines(List<String> ids);
|
||||
|
||||
/**
|
||||
* 部门解除绑定监测点
|
||||
* @param id 部门id
|
||||
* @return 解绑结果
|
||||
*/
|
||||
int removeBind(String id);
|
||||
|
||||
/**
|
||||
* 功能描述: 根据部门id获取绑定的监测点
|
||||
*
|
||||
* @param id
|
||||
* @return java.util.List<java.lang.String>
|
||||
* @author xy
|
||||
* @date 2022/1/25 9:28
|
||||
*/
|
||||
List<String> getLineByDeptId(String id);
|
||||
}
|
||||
@@ -1,15 +0,0 @@
|
||||
package com.njcn.device.service;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.njcn.device.pojo.po.DeviceBak;
|
||||
|
||||
/**
|
||||
* 监测点类
|
||||
* @author denghuajun
|
||||
* @date 2022/2/23
|
||||
*
|
||||
*/
|
||||
public interface DeviceBakService extends IService<DeviceBak> {
|
||||
|
||||
}
|
||||
@@ -1,17 +0,0 @@
|
||||
package com.njcn.device.service;
|
||||
|
||||
import com.njcn.device.pojo.param.TabCensusParam;
|
||||
import com.njcn.device.pojo.vo.DeviceOnlineTabVO;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @version 1.0.0
|
||||
* @author: chenchao
|
||||
* @date: 2022/08/16 14:53
|
||||
*/
|
||||
public interface DeviceOnlineDataService {
|
||||
|
||||
List<DeviceOnlineTabVO> getDeviceOnlineData(TabCensusParam tabCensusParam);
|
||||
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
package com.njcn.device.service;
|
||||
|
||||
/**
|
||||
* @version 1.0.0
|
||||
* @author: chenchao
|
||||
* @date: 2022/08/15 15:33
|
||||
*/
|
||||
public interface DeviceOnlineService {
|
||||
|
||||
|
||||
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user