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