|
@@ -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;
|