|
|
@ -35,12 +35,9 @@ import org.springframework.web.bind.annotation.RestController; |
|
|
|
|
|
|
|
import javax.annotation.Resource; |
|
|
|
import java.io.IOException; |
|
|
|
import java.util.ArrayList; |
|
|
|
import java.util.HashMap; |
|
|
|
import java.util.List; |
|
|
|
import java.util.Map; |
|
|
|
import java.util.Objects; |
|
|
|
import java.util.*; |
|
|
|
import java.util.concurrent.TimeUnit; |
|
|
|
import java.util.stream.Collectors; |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
@ -523,7 +520,14 @@ public class VideoController extends BaseController { |
|
|
|
List<DcDevice> centerCameraList = iDcDeviceService.selectNearCamPile(UniversalEnum.TWO.getValue(), startMileage,endMileage); |
|
|
|
upCameraList.addAll(centerCameraList); |
|
|
|
List<DcDevice> downCameraList = iDcDeviceService.selectNearCamPile(UniversalEnum.THREE.getValue(),startMileage,endMileage); |
|
|
|
result.put("upCamera",upCameraList); |
|
|
|
// 排序
|
|
|
|
List<DcDevice> sortedList = upCameraList.stream() |
|
|
|
.sorted(Comparator.comparingInt((DcDevice d) -> |
|
|
|
"1-2".equals(d.getChildType()) ? 0 : 1) |
|
|
|
.thenComparing(DcDevice::getStakeMark, Comparator.reverseOrder())) |
|
|
|
.collect(Collectors.toList()); |
|
|
|
|
|
|
|
result.put("upCamera",sortedList); |
|
|
|
result.put("downCamera",downCameraList); |
|
|
|
|
|
|
|
return AjaxResult.success(result); |
|
|
|