浏览代码

部分BUG调整

yuanrf 1 天之前
父节点
当前提交
716b62472b

+ 2 - 1
OASystem/OASystem.Api/Controllers/TaskController.cs

@@ -736,6 +736,7 @@ namespace OASystem.API.Controllers
             }
 
             var receipt = _sqlsugar.Queryable<Task_WorkTaskReceipt>()
+                .Includes<Task_WorkTask>(o => o.WorkTask)
                 .First(x => x.Id == dto.ReceiptId && x.IsDel == 0);
 
             if (receipt == null)
@@ -761,7 +762,7 @@ namespace OASystem.API.Controllers
                     .Where(x => x.Id == dto.ReceiptId)
                     .ExecuteCommand();
 
-                if (existsApproved == null)
+                if (existsApproved == null && dto.Approve == 1 && !receipt.WorkTask.IsExtraTask)
                 {
                     _sqlsugar.Updateable<Task_WorkOrder>()
                                     .SetColumns(x => new Task_WorkOrder

+ 1 - 0
OASystem/OASystem.Domain/Entities/Task/WorkOrder.cs

@@ -188,6 +188,7 @@ namespace OASystem.Domain.Entities.WorkOrder
         /// 任务导航属性(不映射数据库)
         /// </summary>
         [SugarColumn(IsIgnore = true)]
+        [Navigate(NavigateType.OneToOne, nameof(WorkTaskId))]
         public Task_WorkTask WorkTask { get; set; }
 
         /// <summary>