Browse Source

根据桩号查询上下行相机加排序,球机在前

develop
王兴琳 4 weeks ago
parent
commit
b6e33cc292
  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 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);

Loading…
Cancel
Save