|
@ -388,6 +388,7 @@ public class DcDeviceServiceImpl extends ServiceImpl<DcDeviceMapper, DcDevice> i |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* 根据网段查询设备 |
|
|
* 根据网段查询设备 |
|
|
|
|
|
* |
|
|
* @param networkSegment |
|
|
* @param networkSegment |
|
|
* @return |
|
|
* @return |
|
|
*/ |
|
|
*/ |
|
@ -402,7 +403,7 @@ public class DcDeviceServiceImpl extends ServiceImpl<DcDeviceMapper, DcDevice> i |
|
|
* 根据网段分组查询分组设备 |
|
|
* 根据网段分组查询分组设备 |
|
|
*/ |
|
|
*/ |
|
|
@Override |
|
|
@Override |
|
|
public Map<String,List<DcDevice>> getGroupingDeviceByNetworkSegment() { |
|
|
public Map<String, List<DcDevice>> getGroupingDeviceByNetworkSegment() { |
|
|
List<DcDevice> deviceList = dcDeviceMapper.selectDcDeviceList(new DcDevice()); |
|
|
List<DcDevice> deviceList = dcDeviceMapper.selectDcDeviceList(new DcDevice()); |
|
|
return deviceList.stream() |
|
|
return deviceList.stream() |
|
|
.collect(Collectors.groupingBy(DcDevice::getNetworkSegment)); |
|
|
.collect(Collectors.groupingBy(DcDevice::getNetworkSegment)); |
|
@ -424,7 +425,7 @@ public class DcDeviceServiceImpl extends ServiceImpl<DcDeviceMapper, DcDevice> i |
|
|
public Long statisticalAnomalyDevice() { |
|
|
public Long statisticalAnomalyDevice() { |
|
|
LambdaQueryWrapper<DcDevice> lambdaQueryWrapper = new LambdaQueryWrapper<>(); |
|
|
LambdaQueryWrapper<DcDevice> lambdaQueryWrapper = new LambdaQueryWrapper<>(); |
|
|
lambdaQueryWrapper.eq(DcDevice::getDeviceState, UniversalEnum.ZERO.getNumber()).or().isNull(DcDevice::getDeviceState); |
|
|
lambdaQueryWrapper.eq(DcDevice::getDeviceState, UniversalEnum.ZERO.getNumber()).or().isNull(DcDevice::getDeviceState); |
|
|
lambdaQueryWrapper.eq(DcDevice::getUseState,UniversalEnum.ONE.getNumber()); |
|
|
lambdaQueryWrapper.eq(DcDevice::getUseState, UniversalEnum.ONE.getNumber()); |
|
|
return (long) list(lambdaQueryWrapper).size(); |
|
|
return (long) list(lambdaQueryWrapper).size(); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
@ -455,7 +456,7 @@ public class DcDeviceServiceImpl extends ServiceImpl<DcDeviceMapper, DcDevice> i |
|
|
device.setDirection(direction); |
|
|
device.setDirection(direction); |
|
|
} |
|
|
} |
|
|
List<DcDevice> list = listDevice(device); |
|
|
List<DcDevice> list = listDevice(device); |
|
|
if (startStakeMarks != null && endStakeMarks != null) { |
|
|
if (startStakeMarks != null && startStakeMarks.size() != UniversalEnum.ZERO.getNumber() && endStakeMarks != null && endStakeMarks.size() != UniversalEnum.ZERO.getNumber()) { |
|
|
Integer startStakeMark = Integer.parseInt(startStakeMarks.get(UniversalEnum.ZERO.getNumber()) + startStakeMarks.get(UniversalEnum.ONE.getNumber())); |
|
|
Integer startStakeMark = Integer.parseInt(startStakeMarks.get(UniversalEnum.ZERO.getNumber()) + startStakeMarks.get(UniversalEnum.ONE.getNumber())); |
|
|
Integer endStakeMark = Integer.parseInt(endStakeMarks.get(UniversalEnum.ZERO.getNumber()) + endStakeMarks.get(UniversalEnum.ONE.getNumber())); |
|
|
Integer endStakeMark = Integer.parseInt(endStakeMarks.get(UniversalEnum.ZERO.getNumber()) + endStakeMarks.get(UniversalEnum.ONE.getNumber())); |
|
|
for (DcDevice dcDevice : list) { |
|
|
for (DcDevice dcDevice : list) { |
|
@ -519,31 +520,30 @@ public class DcDeviceServiceImpl extends ServiceImpl<DcDeviceMapper, DcDevice> i |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@Override |
|
|
@Override |
|
|
public List<DcDevice> selectNearCamPile(String direction,String startMileage,String endMileage){ |
|
|
public List<DcDevice> selectNearCamPile(String direction, String startMileage, String endMileage) { |
|
|
return dcDeviceMapper.selectNearCamPile(direction,startMileage,endMileage); |
|
|
return dcDeviceMapper.selectNearCamPile(direction, startMileage, endMileage); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* @Description 获取事发地上游10公里内的情报板 |
|
|
|
|
|
* |
|
|
|
|
|
* @author liuwenge |
|
|
|
|
|
* @date 2024/4/15 14:18 |
|
|
|
|
|
* @param stakeMark 桩号 |
|
|
* @param stakeMark 桩号 |
|
|
* @param direction 方向 |
|
|
* @param direction 方向 |
|
|
* @return com.ruoyi.common.core.domain.AjaxResult |
|
|
* @return com.ruoyi.common.core.domain.AjaxResult |
|
|
|
|
|
* @Description 获取事发地上游10公里内的情报板 |
|
|
|
|
|
* @author liuwenge |
|
|
|
|
|
* @date 2024/4/15 14:18 |
|
|
*/ |
|
|
*/ |
|
|
@Override |
|
|
@Override |
|
|
public AjaxResult selectNearBoard(String stakeMark, String direction){ |
|
|
public AjaxResult selectNearBoard(String stakeMark, String direction) { |
|
|
|
|
|
|
|
|
Integer mileage = Integer.valueOf(StakeMarkUtils.formatMetre(stakeMark)); |
|
|
Integer mileage = Integer.valueOf(StakeMarkUtils.formatMetre(stakeMark)); |
|
|
|
|
|
|
|
|
List<DcDevice> boardList = new ArrayList<>(); |
|
|
List<DcDevice> boardList = new ArrayList<>(); |
|
|
if (UniversalEnum.ONE.getValue().equals(direction)){ |
|
|
if (UniversalEnum.ONE.getValue().equals(direction)) { |
|
|
Integer start = mileage - UniversalEnum.TEN_THOUSAND.getNumber(); |
|
|
Integer start = mileage - UniversalEnum.TEN_THOUSAND.getNumber(); |
|
|
boardList = dcDeviceMapper.selectNearBoard(direction,start,mileage); |
|
|
boardList = dcDeviceMapper.selectNearBoard(direction, start, mileage); |
|
|
} else if (UniversalEnum.THREE.getValue().equals(direction)){ |
|
|
} else if (UniversalEnum.THREE.getValue().equals(direction)) { |
|
|
Integer end = mileage + UniversalEnum.TEN_THOUSAND.getNumber(); |
|
|
Integer end = mileage + UniversalEnum.TEN_THOUSAND.getNumber(); |
|
|
boardList = dcDeviceMapper.selectNearBoard(direction,mileage,end); |
|
|
boardList = dcDeviceMapper.selectNearBoard(direction, mileage, end); |
|
|
} |
|
|
} |
|
|
return AjaxResult.success(boardList); |
|
|
return AjaxResult.success(boardList); |
|
|
} |
|
|
} |
|
@ -553,6 +553,7 @@ public class DcDeviceServiceImpl extends ServiceImpl<DcDeviceMapper, DcDevice> i |
|
|
public List<HashMap<String, Object>> selectDeviceNameList(DcDevice dcDevice) { |
|
|
public List<HashMap<String, Object>> selectDeviceNameList(DcDevice dcDevice) { |
|
|
return dcDeviceMapper.selectDeviceNameList(dcDevice); |
|
|
return dcDeviceMapper.selectDeviceNameList(dcDevice); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
//设备查询-设备参数属性列表
|
|
|
//设备查询-设备参数属性列表
|
|
|
@Override |
|
|
@Override |
|
|
public List<HashMap<String, Object>> selectDeviceParameterProperties(DcDevice dcDevice) { |
|
|
public List<HashMap<String, Object>> selectDeviceParameterProperties(DcDevice dcDevice) { |
|
@ -574,9 +575,10 @@ public class DcDeviceServiceImpl extends ServiceImpl<DcDeviceMapper, DcDevice> i |
|
|
.get(); // 请求方法
|
|
|
.get(); // 请求方法
|
|
|
return JSON.parseObject(response.body().string(), AjaxResult.class); |
|
|
return JSON.parseObject(response.body().string(), AjaxResult.class); |
|
|
} |
|
|
} |
|
|
public List<Map<String,Object>> selectDeviceOfRoad(){ |
|
|
|
|
|
|
|
|
public List<Map<String, Object>> selectDeviceOfRoad() { |
|
|
return dcDeviceMapper.selectDeviceOfRoad(); |
|
|
return dcDeviceMapper.selectDeviceOfRoad(); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|