yuanrf 3 天之前
父節點
當前提交
058153c9ee

+ 10 - 2
OASystem/OASystem.Api/Controllers/PersonnelModuleController.cs

@@ -3130,9 +3130,10 @@ OPTION (MAXRECURSION 0); -- 允许无限递归      ";
         /// <param name="start"></param>
         /// <param name="end"></param>
         /// <param name="createUserId"></param>
+        /// <param name="isMonthData"></param>
         /// <returns></returns>
         [HttpGet]
-        public async Task<IActionResult> AiPerformanceAnalysis_AllDepartmentAsync(int userId, DateTime start, DateTime end, int createUserId)
+        public async Task<IActionResult> AiPerformanceAnalysis_AllDepartmentAsync(int userId, DateTime start, DateTime end, int createUserId, bool isMonthData = false)
         {
             var jw = JsonView(false, "该员工暂无生成逻辑!");
             var user = await _sqlSugar.Queryable<Sys_Users>()
@@ -3176,7 +3177,14 @@ OPTION (MAXRECURSION 0); -- 允许无限递归      ";
             //职位
             if (jobHandlers.Keys.Contains(user.JobName))
             {
-                return await jobHandlers[user.JobName]();
+                if (isMonthData)
+                {
+                    return await this.AiPerformanceAnalysis_GuoJiaoAsync(userId, start, end, createUserId);
+                }
+                else
+                {
+                    return await jobHandlers[user.JobName]();
+                }
             }
 
             //部门

+ 2 - 1
OASystem/OASystem.Api/OAMethodLib/Quartz/Jobs/PerformanceJob.cs

@@ -109,7 +109,8 @@ namespace OASystem.API.OAMethodLib.Quartz.Jobs
                             { "userId", user.Id.ToString() },
                             { "start", startDate.ToString("yyyy-MM-dd HH:mm:ss") },
                             { "end", endDate.ToString("yyyy-MM-dd HH:mm:ss") },
-                            { "createUserId", createUserId.ToString() }
+                            { "createUserId", createUserId.ToString() },
+                            { "isMonthData", "true" }
                         };
 
                         // 构建完整URL