| | |
| | | } |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public R releaseAllLocks() { |
| | | EntityWrapper<LocAroundBind> frozenWrapper = new EntityWrapper<>(); |
| | | frozenWrapper.eq("freeze", 1); |
| | | int frozenCount = locAroundBindService.selectCount(frozenWrapper); |
| | | if (frozenCount <= 0) { |
| | | return R.ok("全部机台工位均未冻结"); |
| | | } |
| | | |
| | | LocAroundBind updateEntity = new LocAroundBind(); |
| | | updateEntity.setFreeze(0); |
| | | EntityWrapper<LocAroundBind> updateWrapper = new EntityWrapper<>(); |
| | | updateWrapper.eq("freeze", 1); |
| | | if (!locAroundBindService.update(updateEntity, updateWrapper)) { |
| | | throw new CoolException("全部机台工位解冻失败,请检查后再操作!!"); |
| | | } |
| | | return R.ok("全部机台工位解冻成功,共处理" + frozenCount + "个工位"); |
| | | } |
| | | |
| | | @Override |
| | | public R getDeviceFreezeStatus(String devNo) { |
| | | EntityWrapper<BasDevice> deviceWrapper = new EntityWrapper<>(); |
| | | deviceWrapper.eq("status", 1); |