| | |
| | | |
| | | public interface AgvWrkMastService extends IService<AgvWrkMast> { |
| | | |
| | | public void updateWrkStsByWrkNo(int wrkNo, long wrkSts); |
| | | public Boolean updateWrkStsByWrkNo(int wrkNo, long wrkSts); |
| | | |
| | | public void updateWrkStsByWrkNo(int wrkNo, long wrkSts,String manuType,long userId); |
| | | |
| | |
| | | private AgvWrkMastService agvWrkMastService; |
| | | |
| | | |
| | | public void updateWrkStsByWrkNo(int wrkNo, long wrkSts) { |
| | | public Boolean updateWrkStsByWrkNo(int wrkNo, long wrkSts) { |
| | | AgvWrkMast agvWrkMast = this.selectById(wrkNo); |
| | | //判断要修改的工作档状态是否合理,如果不合理则抛出异常 |
| | | checkWrkSts(agvWrkMast, wrkSts); |
| | | agvWrkMast.setWrkSts(wrkSts); |
| | | agvWrkMast.setModiTime(new Date()); |
| | | this.updateById(agvWrkMast); |
| | | return this.updateById(agvWrkMast); |
| | | } |
| | | |
| | | public void updateWrkStsByWrkNo(int wrkNo, long wrkSts, String manuType, long userId) { |
| | |
| | | throw new CoolException("任务下发失败"); |
| | | } |
| | | |
| | | agvWrkMast.setWrkSts(202L); |
| | | agvWrkMast.setModiTime(new Date()); |
| | | boolean b = agvWrkMastService.updateById(agvWrkMast); |
| | | //agvWrkMast.setWrkSts(202L); |
| | | //agvWrkMast.setModiTime(new Date()); |
| | | //boolean b = agvWrkMastService.updateById(agvWrkMast); |
| | | boolean b = agvWrkMastService.updateWrkStsByWrkNo(Math.abs(agvWrkMast.getWrkNo()), 202L); |
| | | if (!b) { |
| | | log.info("更新任务状态失败,{}", agvWrkMast.getWrkNo()); |
| | | throw new CoolException("更新任务状态失败"); |