| | |
| | | /** |
| | | * 自动出满托 |
| | | */ |
| | | @Scheduled(cron = "0/3 * * * * ? ") |
| | | @Scheduled(cron = "0/5 * * * * ? ") |
| | | private void execute(){ |
| | | Config config = configService.selectConfigByCode("AutomaticOutboundShipment"); |
| | | if(config.getStatus()==0){ |
| | | return; |
| | | } |
| | | |
| | | WrkMast wrkMast1 = wrkMastService.selectOne(new EntityWrapper<WrkMast>().eq("sta_no",200)); |
| | | if(!Cools.isEmpty(wrkMast1)){ |
| | | return; |
| | | } |
| | | BasDevp basDevp = basDevpService.selectOne(new EntityWrapper<BasDevp>().eq("dev_no", 200)); |
| | | if (Cools.isEmpty(basDevp.getLoading())||basDevp.getLoading().equals("N")) { |
| | | //找到入库最早的 |
| | | LocMast locMastIoTime=locMastService.selectOne(new EntityWrapper<LocMast>().eq("loc_sts", "F").orderBy("io_time")); |
| | | List<LocDetl> locDetlss = locDetlService.selectList(new EntityWrapper<LocDetl>().orderBy("appe_time")); |
| | | LocMast locMastIoTime=new LocMast(); |
| | | for (LocDetl locDetl : locDetlss) { |
| | | LocMast locMast = locMastService.selectOne(new EntityWrapper<LocMast>().eq("loc_no", locDetl.getLocNo())); |
| | | if(!Cools.isEmpty(locMast)&&locMast.getLocSts().equals("F")){ |
| | | locMastIoTime=locMast; |
| | | break; |
| | | } |
| | | } |
| | | // LocMast locMastIoTime=locMastService.selectOne(new EntityWrapper<LocMast>().eq("loc_sts", "F").orderBy("io_time")); |
| | | //最早入库的可能不是最靠近出库口的,所以需要再去找这层最靠近出库口的货 |
| | | LocMast locMast =locMastService.selectOne(new EntityWrapper<LocMast>().eq("loc_sts", "F").eq("lev1",locMastIoTime.getLev1()).orderBy("bay1",false)); |
| | | |