|
@ -3,9 +3,11 @@ package com.zc.business.service.impl; |
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
|
|
import com.ruoyi.common.constant.HttpStatus; |
|
|
import com.ruoyi.common.constant.HttpStatus; |
|
|
|
|
|
import com.ruoyi.common.core.domain.AjaxResult; |
|
|
import com.ruoyi.common.core.redis.RedisCache; |
|
|
import com.ruoyi.common.core.redis.RedisCache; |
|
|
import com.ruoyi.common.exception.ServiceException; |
|
|
import com.ruoyi.common.exception.ServiceException; |
|
|
import com.ruoyi.common.utils.PageUtils; |
|
|
import com.ruoyi.common.utils.PageUtils; |
|
|
|
|
|
import com.ruoyi.common.utils.StakeMarkUtils; |
|
|
import com.zc.business.constant.RedisKeyConstants; |
|
|
import com.zc.business.constant.RedisKeyConstants; |
|
|
import com.zc.business.domain.DcDevice; |
|
|
import com.zc.business.domain.DcDevice; |
|
|
import com.zc.business.domain.DcProduct; |
|
|
import com.zc.business.domain.DcProduct; |
|
@ -472,5 +474,30 @@ public class DcDeviceServiceImpl extends ServiceImpl<DcDeviceMapper, DcDevice> i |
|
|
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 direction 方向 |
|
|
|
|
|
* @return com.ruoyi.common.core.domain.AjaxResult |
|
|
|
|
|
*/ |
|
|
|
|
|
@Override |
|
|
|
|
|
public AjaxResult selectNearBoard(String stakeMark, String direction){ |
|
|
|
|
|
|
|
|
|
|
|
Integer mileage = Integer.valueOf(StakeMarkUtils.formatMetre(stakeMark)); |
|
|
|
|
|
|
|
|
|
|
|
List<DcDevice> boardList = new ArrayList<>(); |
|
|
|
|
|
if ("1".equals(direction)){ |
|
|
|
|
|
Integer start = mileage - 10000; |
|
|
|
|
|
boardList = dcDeviceMapper.selectNearBoard(direction,start,mileage); |
|
|
|
|
|
} else if ("3".equals(direction)){ |
|
|
|
|
|
Integer end = mileage + 10000; |
|
|
|
|
|
boardList = dcDeviceMapper.selectNearBoard(direction,mileage,end); |
|
|
|
|
|
} |
|
|
|
|
|
return AjaxResult.success(boardList); |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|