| | |
| | | boolean flag = false; |
| | | if (config != null && !Cools.isEmpty(config.getValue())) { |
| | | try { |
| | | |
| | | |
| | | // 判断是否在执行时间内 |
| | | ProcesTimeData procesTimeData = JSONObject.parseObject(config.getValue(), ProcesTimeData.class); |
| | | if (procesTimeData != null && config.getStatus() == 1 && TimeUtils.between(procesTimeData)) { |
| | |
| | | * 将二厂的6类型的空货架调拨回吸塑二楼 |
| | | */ |
| | | // TODO 四期 |
| | | @Scheduled(cron = "0/30 * * * * ? ") |
| | | @Scheduled(cron = "0/10 * * * * ? ") |
| | | private void autoEmptyBackSiqi() { |
| | | Config config2 = configService.selectOne(new EntityWrapper<Config>().eq("code", "RETURN_6_EMPTY")); |
| | | //先判断空库位数了 |
| | | List<AgvLocMast> agvLocMasts = agvLocMastService.selectList(new EntityWrapper<AgvLocMast>().eq("loc_type1", 6).eq("floor", 1).eq("lev1", 2).eq("loc_sts", "O")); |
| | | int size = 0; |
| | | if (agvLocMasts != null) { |
| | | size = agvLocMasts.size(); |
| | | } |
| | | if (config2 != null && config2.getStatus() == 1 && !Cools.isEmpty(config2.getValue())) { |
| | | if (size < Integer.parseInt(config2.getValue())) { |
| | | return; |
| | | } |
| | | } else { |
| | | if (size < 20) { |
| | | return; |
| | | } |
| | | } |
| | | // 查询6类型空货架返回的执行时间点 |
| | | Config config = configService.selectOne(new EntityWrapper<Config>().eq("code", "RETURN_6_TIME")); |
| | | if (config != null && !Cools.isEmpty(config.getValue())) { |
| | |
| | | |
| | | private void executeLocType6() { |
| | | // 查询 二厂的的半成品箱壳类型的空货架 |
| | | List<AgvLocMast> agvLocMasts = agvLocMastService.selectList(new EntityWrapper<AgvLocMast>().eq("loc_sts", "D").eq("loc_type1", 6).eq("floor", 2)); |
| | | List<AgvLocMast> agvLocMasts = agvLocMastService.selectList(new EntityWrapper<AgvLocMast>().eq("loc_sts", "D").eq("loc_type1", 6).eq("floor", 2).orderBy("bay1",false)); |
| | | if (agvLocMasts.isEmpty()) { |
| | | return; |
| | | } |