Revert "检查问题"

This reverts commit 636cd2ddc2.
This commit is contained in:
sxu 2024-11-14 19:32:35 +08:00
parent 636cd2ddc2
commit 5faf388b33
1 changed files with 0 additions and 10 deletions

View File

@ -161,20 +161,16 @@ public class LeaseOutDetailsServiceImpl implements LeaseOutDetailsService {
public AjaxResult submitOut(LeaseOutDetails record) {
int res = 0;
try {
log.error("check001");
// 1判断是否重复提交
res = checkRepeatSubmit(record);
log.error("check002");
record.setPreStoreNum(getStorageNum(record));
if (res > 0) {
if ((record.getManageType() == 1 || record.getManageType() == 2) && record.getInputNum() != null) {
record.setOutNum(record.getInputNum());
}
log.error("check003");
//2判断成套机具出库库存是否足够
if (record.getManageType() == 2) {
res = checkStorageNumCt(record);
log.error("check004");
if (res == 0) {
throw new RuntimeException("出库失败,库存不足");
}
@ -182,30 +178,24 @@ public class LeaseOutDetailsServiceImpl implements LeaseOutDetailsService {
res = checkStorageNum(record);
}
log.error("check005");
if (res > 0) {
// 3插入出库记录修改库存修改机具状态
res = insertRecords(record);
log.error("check006");
if (res == 0) {
throw new RuntimeException("出库失败,更新设备规格库存数量时出错!");
}
// 4修改任务状态tm_task
res = updateTaskStatus(record);
log.error("check007");
if (res == 0) {
throw new RuntimeException("出库失败,修改任务状态失败");
}
// 5插入结算记录
String taskId = leaseOutDetailsMapper.getTaskId(record.getParentId());
log.error("check008");
res = insSltInfo(taskId, record);
log.error("check009");
if (res == 0) {
throw new RuntimeException("出库失败,插入结算记录失败");
}
record.setPostStoreNum(getStorageNum(record));
log.error("check0010");
} else {
return AjaxResult.error("领料出库失败,机具库存不足");
}