| | |
| | | @Autowired |
| | | private WrkMastService wrkMastService; |
| | | |
| | | @Transactional |
| | | public ReturnT<String> start(WrkMast wrkMast,WrkMast wrkMastOther) { |
| | | try { |
| | | Date now = new Date(); |
| | |
| | | |
| | | WrkMastCrn wrkMastCrn = new WrkMastCrn(wrkMast,wrkMastOther,now); |
| | | |
| | | wrkMastCrnService.insert(wrkMastCrn); |
| | | |
| | | // 更新目标库位状态 |
| | | LocMast locMast = locMastService.selectById(wrkMast.getLocNo()); |
| | |
| | | throw new CoolException(locMast1.getLocNo()+"目标库位已被占用"); |
| | | } |
| | | |
| | | wrkMastService.updateById(wrkMast); |
| | | |
| | | // 更新目标库位状态 |
| | | LocMast locMastOther = locMastService.selectById(wrkMastOther.getLocNo()); |
| | |
| | | } else { |
| | | throw new CoolException(locMast1.getLocNo()+"目标库位已被占用"); |
| | | } |
| | | wrkMastService.updateById(wrkMast); |
| | | wrkMastService.updateById(wrkMastOther); |
| | | |
| | | wrkMastCrnService.insert(wrkMastCrn); |
| | | |
| | | }catch (Exception e){ |
| | | log.error("异常!!!"+e); |
| | | return FAIL; |