opt:语音盘点增加盘点规则

This commit is contained in:
2026-12-02 16:08:10 +08:00
parent b31fb55cc2
commit 02449ac5aa

View File

@@ -488,6 +488,11 @@ public class VoiceCallbackService {
shallowList = shallowList.stream()
.filter(shallow -> stockVehicleCodes.contains(shallow.getStoragevehicle_code()))
.collect(Collectors.toList());
// 盘点规则:先找浅货位有货的最小的列,然后把这一列里所有从上到下浅货位有货的都盘点完,再找下一个最接近的列里浅货位有货的
shallowList.sort(Comparator.comparingInt(Structattr::getCol_num)
.thenComparingInt(Structattr::getLayer_num)
.thenComparingInt(Structattr::getRow_num));
log.info("含载具货位:{}", shallowList.size());
if (CollectionUtils.isEmpty(shallowList)) {
JSONObject resultJson = new JSONObject();