This commit is contained in:
psh
2024-03-27 16:23:05 +08:00
parent 77a744f7d9
commit 5c2907f844

View File

@@ -160,18 +160,16 @@ public class MJXLTask extends AbstractTask {
if(!flag){ if(!flag){
continue; continue;
} }
log.info("满架下料找到当前符合条件的点位{},当前列总数{}", schBasePoint.getPoint_code(),qty); log.info("满架下料找到当前符合条件的点位{},当前列库存总数{}", schBasePoint.getPoint_code(),qty);
pointMap.put(schBasePoint,qty); pointMap.put(schBasePoint,qty);
} }
} }
SchBasePoint schBasePoint=null; SchBasePoint schBasePoint=null;
int qty=0; int qty=0;
Iterator<Map.Entry<SchBasePoint,Integer>> iterator = pointMap.entrySet().iterator(); for (Map.Entry<SchBasePoint, Integer> next : pointMap.entrySet()) {
while (iterator.hasNext()){ if (next.getValue() >= qty) {
Map.Entry<SchBasePoint,Integer> next = iterator.next(); qty = next.getValue();
if (next.getValue()>qty){ schBasePoint = next.getKey();
qty=next.getValue();
schBasePoint=next.getKey();
} }
} }
return schBasePoint; return schBasePoint;