标准箱扫描去除锁
This commit is contained in:
parent
0609cb6356
commit
9409488c5a
|
|
@ -1063,22 +1063,9 @@ public class RepairInputDetailsServiceImpl implements IRepairInputDetailsService
|
||||||
type.setStyle("2");
|
type.setStyle("2");
|
||||||
type.setInputNum(BigDecimal.valueOf(1));
|
type.setInputNum(BigDecimal.valueOf(1));
|
||||||
type.setMaId(inputApplyDetails.getMaId());
|
type.setMaId(inputApplyDetails.getMaId());
|
||||||
lock.lock();
|
result = typeService.updateNumAddOrSubtractTwo(type);
|
||||||
try {
|
result = machineMapper.updateStatus(inputApplyDetails.getMaId(), 1);
|
||||||
result = typeService.updateNumAddOrSubtractTwo(type);
|
return result;
|
||||||
result = machineMapper.updateStatus(inputApplyDetails.getMaId(), 1);
|
|
||||||
|
|
||||||
return result;
|
|
||||||
} catch (DataAccessException e) {
|
|
||||||
// 捕获数据库异常,特别是死锁
|
|
||||||
|
|
||||||
throw new ServiceException("更新出入库次数失败,请重试,设备id是:"+inputApplyDetails.getMaId());
|
|
||||||
} finally {
|
|
||||||
lock.unlock();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue