修试入库锁提示修改

This commit is contained in:
bonus 2026-01-31 12:32:30 +08:00
parent 3ff07f0bcd
commit 168d772586
1 changed files with 24 additions and 9 deletions

View File

@ -35,6 +35,7 @@ import com.bonus.material.task.domain.TmTask;
import com.bonus.material.task.domain.TmTaskAgreement;
import com.bonus.material.task.mapper.TmTaskAgreementMapper;
import com.bonus.material.task.mapper.TmTaskMapper;
import org.springframework.dao.DataAccessException;
import org.springframework.stereotype.Service;
import com.bonus.material.repair.mapper.RepairInputDetailsMapper;
import com.bonus.common.biz.domain.repair.RepairInputDetails;
@ -1052,6 +1053,9 @@ public class RepairInputDetailsServiceImpl implements IRepairInputDetailsService
*/
private int updateStorageNum(RepairInputDetails inputApplyDetails) {
int result = 0;
try {
Type type = new Type();
type.setModelTitle("修试入库");
type.setCode(inputApplyDetails.getInputCode());
@ -1059,9 +1063,20 @@ public class RepairInputDetailsServiceImpl implements IRepairInputDetailsService
type.setStyle("2");
type.setInputNum(BigDecimal.valueOf(1));
type.setMaId(inputApplyDetails.getMaId());
result = typeService.updateNumAddOrSubtract(type);
result = machineMapper.updateStatus(inputApplyDetails.getMaId(), 1);
result = typeService.updateNumAddOrSubtract(type);
} catch (DataAccessException e) {
// 捕获数据库异常特别是死锁
throw new ServiceException("更新出入库次数失败请重试设备id是"+inputApplyDetails.getMaId());
}
return result;
}
private int updateInputNum(RepairInputDetails inputApplyDetails) {