| | |
| | | import com.zy.asrs.service.AgvBasDevpService; |
| | | import com.zy.asrs.service.AgvLocMastService; |
| | | import com.zy.asrs.service.AgvWrkMastService; |
| | | import com.zy.asrs.task.core.ProcesTimeData; |
| | | import com.zy.asrs.task.handler.AutoMoveHandler; |
| | | import com.zy.asrs.utils.TimeUtils; |
| | | import com.zy.system.entity.Config; |
| | | import com.zy.system.service.ConfigService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | |
| | | */ |
| | | @Scheduled(cron = "0/1 * * * * ? ") |
| | | private synchronized void execute2() { |
| | | List<AgvWrkMast> agvWrkMastList = agvWrkMastService.selectList(new EntityWrapper<AgvWrkMast>() |
| | | .eq("wrk_sts", 22) |
| | | .andNew().eq("io_type", 108) |
| | | .andNew() |
| | | .eq("crn_no", 2).or().eq("crn_no", 3) |
| | | .orderBy("io_pri", false).orderBy("appe_time", true) |
| | | ); |
| | | List<AgvWrkMast> agvWrkMastList = agvWrkMastService.selectList(new EntityWrapper<AgvWrkMast>().eq("wrk_sts", 22).andNew().eq("io_type", 108).andNew().eq("crn_no", 2).or().eq("crn_no", 3).orderBy("io_pri", false).orderBy("appe_time", true)); |
| | | if (agvWrkMastList.isEmpty()) { |
| | | return; |
| | | } |
| | |
| | | */ |
| | | @Scheduled(cron = "0/2 * * * * ? ") |
| | | private void execute3() { |
| | | List<AgvWrkMast> agvWrkMastList = agvWrkMastService.selectList(new EntityWrapper<AgvWrkMast>() |
| | | .eq("wrk_sts", 22) |
| | | .andNew().eq("io_type", 111) |
| | | .orderBy("io_pri", false) |
| | | .orderBy("appe_time", true) |
| | | ); |
| | | List<AgvWrkMast> agvWrkMastList = agvWrkMastService.selectList(new EntityWrapper<AgvWrkMast>().eq("wrk_sts", 22).andNew().eq("io_type", 111).orderBy("io_pri", false).orderBy("appe_time", true)); |
| | | if (agvWrkMastList.isEmpty()) { |
| | | return; |
| | | } |
| | |
| | | |
| | | @Scheduled(cron = "0/2 * * * * ? ") |
| | | private void execute4() { |
| | | List<AgvWrkMast> agvWrkMastList = agvWrkMastService.selectList(new EntityWrapper<AgvWrkMast>() |
| | | .eq("wrk_sts", 22) |
| | | .andNew().eq("io_type", 114) |
| | | .orderBy("io_pri", false) |
| | | .orderBy("appe_time", true) |
| | | ); |
| | | List<AgvWrkMast> agvWrkMastList = agvWrkMastService.selectList(new EntityWrapper<AgvWrkMast>().eq("wrk_sts", 22).andNew().eq("io_type", 114).orderBy("io_pri", false).orderBy("appe_time", true)); |
| | | if (agvWrkMastList.isEmpty()) { |
| | | return; |
| | | } |
| | |
| | | @Scheduled(cron = "0/2 * * * * ? ") |
| | | private void autoEmptyBack3() { |
| | | // 工作档为201 且 入出库类型为109 |
| | | List<AgvWrkMast> agvWrkMastList = agvWrkMastService.selectList(new EntityWrapper<AgvWrkMast>() |
| | | .eq("wrk_sts", 214) |
| | | .eq("loc_no", "") |
| | | .eq("io_type", 113) |
| | | .orderBy("io_pri", false)); |
| | | List<AgvWrkMast> agvWrkMastList = agvWrkMastService.selectList(new EntityWrapper<AgvWrkMast>().eq("wrk_sts", 214).eq("loc_no", "").eq("io_type", 113).orderBy("io_pri", false)); |
| | | if (agvWrkMastList.isEmpty()) { |
| | | return; |
| | | } |
| | |
| | | @Scheduled(cron = "0/2 * * * * ? ") |
| | | private void autoEmptyBack4() { |
| | | // 查询 不为1楼的空货架 |
| | | List<AgvLocMast> agvLocMasts = agvLocMastService.selectList( |
| | | new EntityWrapper<AgvLocMast>() |
| | | // TODO 四期 |
| | | .eq("loc_sts", "D") |
| | | .eq("loc_type1", 3) |
| | | .ne("floor", 1) |
| | | .ne("lve1", 1)); |
| | | List<AgvLocMast> agvLocMasts = agvLocMastService.selectList(new EntityWrapper<AgvLocMast>() |
| | | // TODO 四期 |
| | | .eq("loc_sts", "D").eq("loc_type1", 3).ne("floor", 1).ne("lev1", 1)); |
| | | if (agvLocMasts.isEmpty()) { |
| | | return; |
| | | } |
| | |
| | | |
| | | |
| | | /** |
| | | // TODO 四期 |
| | | * 将二厂的6类型的空货架调拨回吸塑二楼 |
| | | */ |
| | | // TODO 四期 |
| | | @Scheduled(cron = "0/2 * * * * ? ") |
| | | private void autoEmptyBackSiqi() { |
| | | // 查询6类型空货架返回的执行时间点 |
| | | Config config = configService.selectOne(new EntityWrapper<Config>().eq("code", "RETURN_6_TIME")); |
| | | if (config != null && !Cools.isEmpty(config.getValue())) { |
| | | boolean flag = false; |
| | | try { |
| | | // 判断是否在执行时间内 |
| | | ProcesTimeData procesTimeData = JSONObject.parseObject(config.getValue(), ProcesTimeData.class); |
| | | if (procesTimeData != null && TimeUtils.between(procesTimeData)) { |
| | | flag = true; |
| | | } |
| | | } catch (Exception e) { |
| | | log.error("6类型空货架返回的执行时间点解析异常:===》异常原因:" + e.getMessage()); |
| | | flag = true; |
| | | } |
| | | if (flag) { |
| | | executeLocType6(); |
| | | } |
| | | } else { |
| | | executeLocType6(); |
| | | } |
| | | } |
| | | |
| | | |
| | | 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)); |
| | | if (agvLocMasts.isEmpty()) { |
| | | return; |
| | | } |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | private boolean determineFloorConnection(Integer floor) { |
| | | try { |
| | |
| | | */ |
| | | @Scheduled(cron = "0/2 * * * * ? ") |
| | | private void autoEmptyBack5() { |
| | | List<AgvBasDevp> agvBasDevps = agvBasDevpService.selectList(new EntityWrapper<AgvBasDevp>() |
| | | .ne("floor", 1) |
| | | .eq("loc_sts", "F") |
| | | .like("dev_no", "DB")); |
| | | List<AgvBasDevp> agvBasDevps = agvBasDevpService.selectList(new EntityWrapper<AgvBasDevp>().ne("floor", 1).eq("loc_sts", "F").like("dev_no", "DB")); |
| | | if (agvBasDevps.isEmpty()) { |
| | | return; |
| | | } |
| | |
| | | */ |
| | | @Scheduled(cron = "0/2 * * * * ? ") |
| | | private void autoEmptyBack6() { |
| | | List<AgvBasDevp> agvBasDevps = agvBasDevpService.selectList(new EntityWrapper<AgvBasDevp>() |
| | | .eq("floor", 1) |
| | | .eq("loc_sts", "F") |
| | | .like("dev_no", "DB")); |
| | | List<AgvBasDevp> agvBasDevps = agvBasDevpService.selectList(new EntityWrapper<AgvBasDevp>().eq("floor", 1).eq("loc_sts", "F").like("dev_no", "DB")); |
| | | if (agvBasDevps.isEmpty()) { |
| | | return; |
| | | } |
| | |
| | | return; |
| | | } |
| | | |
| | | List<AgvLocMast> agvLocMasts = agvLocMastService.selectList( |
| | | new EntityWrapper<AgvLocMast>() |
| | | .eq("floor", 1) |
| | | .eq("lev1", 1) |
| | | .eq("loc_sts", "F") |
| | | .eq("loc_type1", 3)); |
| | | List<AgvLocMast> agvLocMasts = agvLocMastService.selectList(new EntityWrapper<AgvLocMast>().eq("floor", 1).eq("lev1", 1).eq("loc_sts", "F").eq("loc_type1", 3)); |
| | | if (agvLocMasts.isEmpty()) { |
| | | return; |
| | | } |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | } |