| | |
| | | try { |
| | | List<LocMast> locMasts = locMastService.selectList(new EntityWrapper<LocMast>() |
| | | .eq("fire_status", 1) |
| | | .eq("loc_sts", "F")); |
| | | Integer ioType = 101; //移库 |
| | | .andNew() |
| | | .eq("loc_sts", "F") |
| | | .or() |
| | | .eq("loc_sts", "R")); |
| | | Integer ioType = 101; //出库 |
| | | Date now = new Date(); |
| | | //优先级99,移库到0102501 |
| | | for(LocMast locMast : locMasts){ |
| | | if (Cools.isEmpty(locMast)){ |
| | | continue; |
| | | } |
| | | WrkMast wrkMast2=wrkMastService.selectOne(new EntityWrapper<WrkMast>().eq("sta_no",1000) |
| | | .eq("source_loc_no",locMast.getLocNo())); |
| | | if(!Cools.isEmpty(wrkMast2)){ |
| | | continue; |
| | | } |
| | | WrkMast wrkMast1=wrkMastService.selectOne(new EntityWrapper<WrkMast>().eq("source_loc_no",locMast.getLocNo())); |
| | | if(!Cools.isEmpty(wrkMast1)){ |
| | | wrkMastService.delete(new EntityWrapper<WrkMast>().eq("source_loc_no",locMast.getLocNo())); |
| | | wrkDetlService.delete(new EntityWrapper<WrkDetl>().eq("zpallet",locMast.getBarcode())); |
| | | } |
| | | // 获取路径 |
| | | StaDesc staDesc = staDescService.queryCrnStn(ioType, locMast.getCrnNo(), 1000); |
| | |
| | | wrkMast.setAppeTime(now); |
| | | wrkMast.setModiUser(9999L); |
| | | wrkMast.setModiTime(now); |
| | | log.info("生成火警报警任务,"+wrkMast); |
| | | if (!wrkMastService.insert(wrkMast)) { |
| | | throw new CoolException("保存工作档失败,出库库位号:"+locMast.getLocNo()); |
| | | } |
| | |
| | | if (!locMastService.updateById(locMast)) { |
| | | throw new CoolException("预约库位状态失败,库位号:"+locMast.getLocNo()); |
| | | } |
| | | log.info("生成火警报警任务成功,等待操作人员确定拔线后,堆垛机作业"+wrkMast); |
| | | }else if(locMast.getLocSts().equals("R")){ |
| | | |
| | | } else { |
| | | throw new CoolException(locMast.getLocNo() + "库位不是在库状态"); |
| | | } |