| | |
| | | package com.zy.asrs.utils; |
| | | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.core.common.Cools; |
| | | import com.zy.asrs.entity.WrkMast; |
| | | import com.zy.asrs.entity.param.StockOutParam; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.Collections; |
| | | import java.util.List; |
| | | import java.util.Random; |
| | | |
| | | public class OutboundAllocationUtil { |
| | | // public static void main(String[] args) { |
| | | // List<Integer> STA_WORK_CU = new ArrayList<Integer>() {{ |
| | | // add(101);add(102);add(104);add(105);add(107);add(108); |
| | | // add(111);add(1202);add(1104);add(33105);add(1307);add(108); |
| | | // }}; |
| | | // List<Integer> integersStaArr = new ArrayList<>(); |
| | | // List<int[]> stalistArr = new ArrayList<>(); |
| | | // for(Integer staNo : STA_WORK_CU){ |
| | | // int selectCount = staNo*2; |
| | | // if (staNo == 111){ |
| | | // selectCount = 9999999; |
| | | // } |
| | | // stalistArr.add(new int[]{staNo, selectCount}); |
| | | // } |
| | | // |
| | | //// 按selectCount降序排序(最大的排第一位) |
| | | // Collections.sort(stalistArr, (a, b) -> b[1] - a[1]); // 降序排列 |
| | | //// 如果您需要转为数组(可选) |
| | | // for (int[] staNowArr : stalistArr){ |
| | | // integersStaArr.add(staNowArr[0]); |
| | | // } |
| | | // System.out.println(JSON.toJSONString(integersStaArr)); |
| | | // } |
| | | public static void main(String[] args) { |
| | | int numLanes = 3; |
| | | int numWarehouses = 2; |