ソースを参照

Merge branch 'develop' of http://132.232.92.186:3000/XinXiBu/OA2023 into develop

LEIYI 2 ヶ月 前
コミット
b40425680a
共有2 個のファイルを変更した13 個の追加4 個の削除を含む
  1. 11 2
      OASystem/OASystem.Api/Controllers/PersonnelModuleController.cs
  2. 2 2
      OASystem/OASystem.Domain/Dtos/PersonnelModule/TreeNode.cs

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

@@ -2304,16 +2304,25 @@ OPTION (MAXRECURSION 0); -- 允许无限递归      ";
 
 
         [HttpPost]
-        public IActionResult QueryAssessmentByUser(QueryAssessmentByUser Dto)
+        public async Task<IActionResult> QueryAssessmentByUser(QueryAssessmentByUser Dto)
         {
             var jw = JsonView(false);
             var user_entity = _sqlSugar.Queryable<Sys_Users>()
                               .First(e => e.Id == Dto.UserId && e.IsDel == 0);
 
+            var start_Bool = DateTime.TryParse(Dto.Start, out DateTime start);
+            var end_Bool = DateTime.TryParse(Dto.End, out DateTime end);
+
+            if (!start_Bool || !end_Bool)
+            {
+                jw.Msg = "时间格式不正确!";
+                return Ok(jw);
+            }
+
             jw.Msg = "用户企业微信Id未绑定!";
             if (user_entity != null && !string.IsNullOrEmpty(user_entity.QiyeChatUserId))
             {
-                var data = _qiYeWeChatApiService.QueryAssessmentByUser(Dto.Start, Dto.End, new List<string> { user_entity.QiyeChatUserId });
+                var data = await _qiYeWeChatApiService.QueryAssessmentByUser(start, end, new List<string> { user_entity.QiyeChatUserId });
                 jw.Data = data;
                 jw.Msg = "查询成功!";
                 jw.Code = 200;

+ 2 - 2
OASystem/OASystem.Domain/Dtos/PersonnelModule/TreeNode.cs

@@ -174,7 +174,7 @@ namespace OASystem.Domain.Dtos.PersonnelModule
     {
         public int UserId { get; set; }
 
-        public DateTime Start { get; set; }
-        public DateTime End { get; set; }
+        public string Start { get; set; }
+        public string End { get; set; }
     }
 }