Browse Source

Merge remote-tracking branch 'origin/develop' into develop

develop
lau572 4 weeks ago
parent
commit
b77be2e8e2
  1. 16
      zc-business/src/main/java/com/zc/business/controller/VideoController.java

16
zc-business/src/main/java/com/zc/business/controller/VideoController.java

@ -35,12 +35,9 @@ import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource; import javax.annotation.Resource;
import java.io.IOException; import java.io.IOException;
import java.util.ArrayList; import java.util.*;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeUnit;
import java.util.stream.Collectors;
/** /**
@ -527,7 +524,14 @@ public class VideoController extends BaseController {
List<DcDevice> centerCameraList = iDcDeviceService.selectNearCamPile(UniversalEnum.TWO.getValue(), startMileage,endMileage); List<DcDevice> centerCameraList = iDcDeviceService.selectNearCamPile(UniversalEnum.TWO.getValue(), startMileage,endMileage);
upCameraList.addAll(centerCameraList); upCameraList.addAll(centerCameraList);
List<DcDevice> downCameraList = iDcDeviceService.selectNearCamPile(UniversalEnum.THREE.getValue(),startMileage,endMileage); 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); result.put("downCamera",downCameraList);
return AjaxResult.success(result); return AjaxResult.success(result);

Loading…
Cancel
Save