修试入库锁提示修改
This commit is contained in:
parent
3ff07f0bcd
commit
168d772586
|
|
@ -35,6 +35,7 @@ import com.bonus.material.task.domain.TmTask;
|
||||||
import com.bonus.material.task.domain.TmTaskAgreement;
|
import com.bonus.material.task.domain.TmTaskAgreement;
|
||||||
import com.bonus.material.task.mapper.TmTaskAgreementMapper;
|
import com.bonus.material.task.mapper.TmTaskAgreementMapper;
|
||||||
import com.bonus.material.task.mapper.TmTaskMapper;
|
import com.bonus.material.task.mapper.TmTaskMapper;
|
||||||
|
import org.springframework.dao.DataAccessException;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import com.bonus.material.repair.mapper.RepairInputDetailsMapper;
|
import com.bonus.material.repair.mapper.RepairInputDetailsMapper;
|
||||||
import com.bonus.common.biz.domain.repair.RepairInputDetails;
|
import com.bonus.common.biz.domain.repair.RepairInputDetails;
|
||||||
|
|
@ -1052,6 +1053,9 @@ public class RepairInputDetailsServiceImpl implements IRepairInputDetailsService
|
||||||
*/
|
*/
|
||||||
private int updateStorageNum(RepairInputDetails inputApplyDetails) {
|
private int updateStorageNum(RepairInputDetails inputApplyDetails) {
|
||||||
int result = 0;
|
int result = 0;
|
||||||
|
|
||||||
|
|
||||||
|
try {
|
||||||
Type type = new Type();
|
Type type = new Type();
|
||||||
type.setModelTitle("修试入库");
|
type.setModelTitle("修试入库");
|
||||||
type.setCode(inputApplyDetails.getInputCode());
|
type.setCode(inputApplyDetails.getInputCode());
|
||||||
|
|
@ -1059,9 +1063,20 @@ 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());
|
||||||
result = typeService.updateNumAddOrSubtract(type);
|
|
||||||
result = machineMapper.updateStatus(inputApplyDetails.getMaId(), 1);
|
result = machineMapper.updateStatus(inputApplyDetails.getMaId(), 1);
|
||||||
|
result = typeService.updateNumAddOrSubtract(type);
|
||||||
|
|
||||||
|
|
||||||
|
} catch (DataAccessException e) {
|
||||||
|
// 捕获数据库异常,特别是死锁
|
||||||
|
|
||||||
|
throw new ServiceException("更新出入库次数失败,请重试,设备id是:"+inputApplyDetails.getMaId());
|
||||||
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private int updateInputNum(RepairInputDetails inputApplyDetails) {
|
private int updateInputNum(RepairInputDetails inputApplyDetails) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue