标准箱扫描去除锁

This commit is contained in:
hongchao 2026-02-03 11:01:56 +08:00
parent 0609cb6356
commit 9409488c5a
1 changed files with 3 additions and 16 deletions

View File

@ -1063,22 +1063,9 @@ public class RepairInputDetailsServiceImpl implements IRepairInputDetailsService
type.setStyle("2");
type.setInputNum(BigDecimal.valueOf(1));
type.setMaId(inputApplyDetails.getMaId());
lock.lock();
try {
result = typeService.updateNumAddOrSubtractTwo(type);
result = machineMapper.updateStatus(inputApplyDetails.getMaId(), 1);
return result;
} catch (DataAccessException e) {
// 捕获数据库异常特别是死锁
throw new ServiceException("更新出入库次数失败请重试设备id是"+inputApplyDetails.getMaId());
} finally {
lock.unlock();
}
result = typeService.updateNumAddOrSubtractTwo(type);
result = machineMapper.updateStatus(inputApplyDetails.getMaId(), 1);
return result;
}