瀏覽代碼

商邀任务添加备注操作

yuanrf 1 周之前
父節點
當前提交
473d7c316c

+ 0 - 1
OASystem/OASystem.Api/Controllers/PersonnelModuleController.cs

@@ -3283,7 +3283,6 @@ OPTION (MAXRECURSION 0); -- 允许无限递归      ";
         /// <param name="end">结束时间</param>
         /// <param name="jw">JsonView对象,用于返回错误信息</param>
         /// <param name="errorMessagePrefix">错误消息前缀(用于区分不同的分析类型)</param>
-        /// <param name="ApprovalDetailList">审批详情列表</param>
         /// <returns>考勤分析结果,失败时返回null</returns>
         private async Task<string> GetKaoqinAnalysisAsync(Sys_Users user_entity, DateTime start, DateTime end, JsonView jw, string errorMessagePrefix = "Ai分析用户绩效")
         {

+ 43 - 0
OASystem/OASystem.Api/Controllers/TaskController.cs

@@ -1047,5 +1047,48 @@ namespace OASystem.API.Controllers
             return Ok(jw);
         }
 
+        /// <summary>
+        /// 设置回执备注信息
+        /// </summary>
+        /// <param name="dto"></param>
+        /// <returns></returns>
+        [HttpPost]
+        public async Task<IActionResult> SetWorkTaskReceiptRemark(SetWorkTaskReceiptRemarkDto dto)
+        {
+            var jw = JsonView(false);
+
+            if (dto.ReceiptId < 1 || string.IsNullOrWhiteSpace(dto.Remark))
+            {
+                jw.Msg = "参数有误!";
+                return Ok(jw);
+            }
+
+            var receipt = _sqlsugar.Queryable<Task_WorkTaskReceipt>()
+                .First(x => x.Id == dto.ReceiptId && x.IsDel == 0);
+            if (receipt == null)
+            {
+                jw.Msg = "回执单不存在或已删除!";
+                return Ok(jw);
+            }
+
+            _sqlsugar.Updateable<Task_WorkTaskReceipt>()
+                .SetColumns(x => new Task_WorkTaskReceipt
+                {
+                    Remark = dto.Remark
+                })
+                .Where(x => x.Id == dto.ReceiptId)
+                .ExecuteCommand();
+
+            jw.Code = 200;
+            jw.Msg = "设置回执备注信息成功!";
+            jw.Data = new
+            {
+                dto.ReceiptId,
+                dto.Remark
+            };
+
+            return Ok(jw);
+        }
+
     }
 }

+ 6 - 0
OASystem/OASystem.Domain/Dtos/Task/GetTaskDefaultDto.cs

@@ -321,4 +321,10 @@ namespace OASystem.Domain.Dtos.Task
         /// </summary>
         public int UserId { get; set; }
     }
+
+    public class SetWorkTaskReceiptRemarkDto
+    {
+        public int ReceiptId { get; set; }
+        public string Remark { get; set; }
+    }
 }