Преглед на файлове

默认完成签证步骤并添加更新失败处理逻辑

在 VisaProcessRepository.cs 中:
- 在处理 visaSteps 的循环中,新增逻辑默认将步骤标记为完成(item.IsCompleted = true)。
- 使用 _sqlSugar.Updateable 方法更新签证步骤数据,指定更新列为 StoreVal、LastUpdateUserId 和 LastUpdateTime。
- 添加更新失败时的返回逻辑:若更新影响行数小于 1,则返回 Result(400, "更新失败!")。
Lyyyi преди 1 месец
родител
ревизия
9c547c9cc5
променени са 1 файла, в които са добавени 4 реда и са изтрити 0 реда
  1. 4 0
      OASystem/OASystem.Infrastructure/Repositories/Groups/VisaProcessRepository.cs

+ 4 - 0
OASystem/OASystem.Infrastructure/Repositories/Groups/VisaProcessRepository.cs

@@ -263,6 +263,8 @@ namespace OASystem.Infrastructure.Repositories.Groups
             //设置操作人和时间
             foreach (var item in visaSteps)
             {
+                //默认确认完成
+                item.IsCompleted = true;
                 item.LastUpdateUserId = currUserId;
                 item.LastUpdateTime = DateTime.Now;
             }
@@ -279,6 +281,8 @@ namespace OASystem.Infrastructure.Repositories.Groups
             //step=4 预计出签时间
             visaSteps.FirstOrDefault(x => x.Step == 4).TypedValue = invertedInfo.IssueVisaDt;
 
+            
+
             var update = await _sqlSugar.Updateable(visaSteps)
                 .UpdateColumns(it => new { it.StoreVal, it.LastUpdateUserId,it.LastUpdateTime })
                 .ExecuteCommandAsync();