|
@ -8,6 +8,7 @@ import com.ruoyi.common.constant.HttpStatus; |
|
|
import com.ruoyi.common.core.controller.BaseController; |
|
|
import com.ruoyi.common.core.controller.BaseController; |
|
|
import com.ruoyi.common.core.domain.AjaxResult; |
|
|
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.utils.StringUtils; |
|
|
import com.ruoyi.system.service.ISysConfigService; |
|
|
import com.ruoyi.system.service.ISysConfigService; |
|
|
import com.zc.business.constant.DeviceTypeConstants; |
|
|
import com.zc.business.constant.DeviceTypeConstants; |
|
|
import com.zc.business.domain.DcDevice; |
|
|
import com.zc.business.domain.DcDevice; |
|
@ -526,8 +527,7 @@ public class VideoController extends BaseController { |
|
|
List<DcDevice> downCameraList = iDcDeviceService.selectNearCamPile(UniversalEnum.THREE.getValue(),startMileage,endMileage); |
|
|
List<DcDevice> downCameraList = iDcDeviceService.selectNearCamPile(UniversalEnum.THREE.getValue(),startMileage,endMileage); |
|
|
// 排序
|
|
|
// 排序
|
|
|
List<DcDevice> sortedList = upCameraList.stream() |
|
|
List<DcDevice> sortedList = upCameraList.stream() |
|
|
.sorted(Comparator.comparingInt((DcDevice d) -> |
|
|
.sorted(Comparator.comparingInt(this::cameraTypeSorted) |
|
|
"1-2".equals(d.getChildType()) ? 0 : 1) |
|
|
|
|
|
.thenComparing(DcDevice::getStakeMark, Comparator.reverseOrder())) |
|
|
.thenComparing(DcDevice::getStakeMark, Comparator.reverseOrder())) |
|
|
.collect(Collectors.toList()); |
|
|
.collect(Collectors.toList()); |
|
|
|
|
|
|
|
@ -536,6 +536,28 @@ public class VideoController extends BaseController { |
|
|
|
|
|
|
|
|
return AjaxResult.success(result); |
|
|
return AjaxResult.success(result); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* 摄像头类型排序 |
|
|
|
|
|
* 球机->360全景->180全景->其他类型 |
|
|
|
|
|
*/ |
|
|
|
|
|
private int cameraTypeSorted(DcDevice dcDevice){ |
|
|
|
|
|
if (StringUtils.isEmpty(dcDevice.getChildType())){ |
|
|
|
|
|
return 3; |
|
|
|
|
|
} |
|
|
|
|
|
String deviceType = dcDevice.getChildType(); |
|
|
|
|
|
switch (deviceType) { |
|
|
|
|
|
case "1-2": |
|
|
|
|
|
return 0; |
|
|
|
|
|
case "1-3": |
|
|
|
|
|
return 1; |
|
|
|
|
|
case "1-5": |
|
|
|
|
|
return 2; |
|
|
|
|
|
default: |
|
|
|
|
|
return 3; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* 根据桩号查询附近收费站摄像机 |
|
|
* 根据桩号查询附近收费站摄像机 |
|
|
*/ |
|
|
*/ |
|
|