fix: notIn(SchBasePoint::getParent_point_code, noInCodes)

This commit is contained in:
2024-08-03 15:43:30 +08:00
parent 59dd4392d5
commit 078554d16e

View File

@@ -33,6 +33,7 @@ import org.springframework.stereotype.Component;
import java.util.Arrays; import java.util.Arrays;
import java.util.List; import java.util.List;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import java.util.stream.Stream;
/** /**
* @Author: lyd * @Author: lyd
@@ -103,6 +104,7 @@ public class KJSKTask extends AbstractTask {
* @return * @return
*/ */
private SchBasePoint findNextPoint(List<String> nextRegionStr, JSONObject jsonObject) { private SchBasePoint findNextPoint(List<String> nextRegionStr, JSONObject jsonObject) {
List<String> noInCodes = Stream.of("ZCSSX05", "ZCSSX06").collect(Collectors.toList());
SchBasePoint device = pointService.getById(jsonObject.getString("device_code")); SchBasePoint device = pointService.getById(jsonObject.getString("device_code"));
// 先找暂存输送线有没有空位 // 先找暂存输送线有没有空位
List<SchBasePoint> zcssxList = pointService.list(new LambdaQueryWrapper<SchBasePoint>() List<SchBasePoint> zcssxList = pointService.list(new LambdaQueryWrapper<SchBasePoint>()
@@ -113,7 +115,8 @@ public class KJSKTask extends AbstractTask {
.eq(SchBasePoint::getCan_vehicle_type, device.getCan_vehicle_type()) .eq(SchBasePoint::getCan_vehicle_type, device.getCan_vehicle_type())
.eq(SchBasePoint::getIs_used, true) .eq(SchBasePoint::getIs_used, true)
.eq(SchBasePoint::getPoint_status, PointStatusEnum.EMPTY_POINT.getCode()) .eq(SchBasePoint::getPoint_status, PointStatusEnum.EMPTY_POINT.getCode())
.eq(SchBasePoint::getPoint_type, PointTypeConstant.ENTRANCE)); .eq(SchBasePoint::getPoint_type, PointTypeConstant.ENTRANCE)
.notIn(SchBasePoint::getParent_point_code, noInCodes));
if (zcssxList.size() == 0) { if (zcssxList.size() == 0) {
// 如果暂存输送线找不到,就去暂存位存放。 // 如果暂存输送线找不到,就去暂存位存放。
// 1、先获取相同类型且不是最开始的位置最外面1最里面2 // 1、先获取相同类型且不是最开始的位置最外面1最里面2