| | |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.*; |
| | | import java.util.concurrent.TimeUnit; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | |
| | | .setPath(MesConstant.GWCS_DCKK_URL) |
| | | .setHeaders(headers) |
| | | .setJson(body) |
| | | .setTimeout(30, TimeUnit.SECONDS) // 设置连接 + 读取超时为30秒 |
| | | .build() |
| | | .doPost(); |
| | | if (!Cools.isEmpty(response)) { |
| | |
| | | // 寻找一箱一卷的,没有理货的,不在备货区的物料明细 |
| | | List<LocDetl> tallyGoosList = locDetlMapper.selectTallyGoosList(columnNum); |
| | | |
| | | // 过滤掉木箱规格宽度大于600的(大于600一个托盘只能放一箱) |
| | | tallyGoosList = tallyGoosList.stream().filter(locDetl -> { |
| | | String[] split = locDetl.getColor().split("\\*"); |
| | | if (split.length == 3) { // 高度也要低于614才能理货 |
| | | return Integer.parseInt(split[1]) <= 600 && Integer.parseInt(split[2]) <= 614; |
| | | } else { |
| | | return false; |
| | | } |
| | | }).collect(Collectors.toList()); |
| | | |
| | | // 寻找满足理货条件的两个木箱 |
| | | LocDetl leftLocDetl = null; |
| | | LocDetl rightLocDetl = null; |