|
|
@@ -674,9 +674,9 @@ namespace OASystem.API.OAMethodLib.QiYeWeChatAPI
|
|
|
public async Task<object> QueryAssessmentByUser(DateTime startDt, DateTime endDt, List<string> qiyeUidList)
|
|
|
{
|
|
|
AssessmentByUserListView assessmentByUserListView = new AssessmentByUserListView();
|
|
|
- List<AssessmentByUserView> AssessmentByUserView = new List<AssessmentByUserView>();
|
|
|
+ List<AssessmentByUserView> AssessmentByUserView = new List<AssessmentByUserView>();
|
|
|
assessmentByUserListView.Data = AssessmentByUserView;
|
|
|
- assessmentByUserListView.errcode = 0;
|
|
|
+ assessmentByUserListView.errcode = 0;
|
|
|
assessmentByUserListView.errmsg = "成功";
|
|
|
|
|
|
CheckInView? checkInView = new CheckInView();
|
|
|
@@ -744,7 +744,8 @@ namespace OASystem.API.OAMethodLib.QiYeWeChatAPI
|
|
|
});
|
|
|
}
|
|
|
|
|
|
- if (errorUserList.Count > 0) {
|
|
|
+ if (errorUserList.Count > 0)
|
|
|
+ {
|
|
|
|
|
|
var dayInfo = await GetCheckinDataAsync(errorUserList, 3, startDt, endDt);
|
|
|
|
|
|
@@ -773,7 +774,7 @@ namespace OASystem.API.OAMethodLib.QiYeWeChatAPI
|
|
|
{
|
|
|
var linqFind = dic.First(x => x.Value.Contains(item.exception_type));
|
|
|
|
|
|
- var errinfo = new Exception_info
|
|
|
+ var errinfo = new Exception_info
|
|
|
{
|
|
|
Date = item.checkin_time_dt,
|
|
|
Type = linqFind.Key,
|
|
|
@@ -1338,6 +1339,47 @@ namespace OASystem.API.OAMethodLib.QiYeWeChatAPI
|
|
|
return approvalInfoView;
|
|
|
}
|
|
|
|
|
|
+ public async Task<ApprovalInfoView> GetApprovalInfoUpdateAsync(
|
|
|
+ DateTime startTime,
|
|
|
+ DateTime endTime,
|
|
|
+ string newCursor = "",
|
|
|
+ int size = 100,
|
|
|
+ List<IQiYeWeChatApiService.FilterCondition> filters = null)
|
|
|
+ {
|
|
|
+
|
|
|
+ long starttime = (long)(startTime - _1970).TotalSeconds;
|
|
|
+ long endtime = (long)(endTime - _1970).TotalSeconds;
|
|
|
+ var requestData = new
|
|
|
+ {
|
|
|
+ starttime = starttime,
|
|
|
+ endtime = endtime,
|
|
|
+ new_cursor = newCursor,
|
|
|
+ size = size,
|
|
|
+ filters = filters ?? new List<IQiYeWeChatApiService.FilterCondition>()
|
|
|
+ };
|
|
|
+
|
|
|
+ string jsonContent = JsonConvert.SerializeObject(requestData);
|
|
|
+ var httpContent = new StringContent(jsonContent, Encoding.UTF8, "application/json");
|
|
|
+ var token = await GetTokenAsync(5);
|
|
|
+
|
|
|
+ try
|
|
|
+ {
|
|
|
+ string url = "/cgi-bin/oa/getapprovalinfo?access_token=" + token.access_token;
|
|
|
+ HttpResponseMessage response = await _httpClient.PostAsync(url, httpContent);
|
|
|
+ response.EnsureSuccessStatusCode();
|
|
|
+ string responseContent = await response.Content.ReadAsStringAsync();
|
|
|
+ var result = JsonConvert.DeserializeObject<ApprovalInfoView>(responseContent);
|
|
|
+ return result;
|
|
|
+ }
|
|
|
+ catch (Exception ex)
|
|
|
+ {
|
|
|
+ ApprovalInfoView approvalInfoView = new ApprovalInfoView();
|
|
|
+ approvalInfoView.errcode = -1;
|
|
|
+ approvalInfoView.errmsg = ex.Message;
|
|
|
+ return approvalInfoView;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
/// <summary>
|
|
|
/// 获取审批申请详情
|
|
|
/// </summary>
|
|
|
@@ -1683,6 +1725,6 @@ namespace OASystem.API.OAMethodLib.QiYeWeChatAPI
|
|
|
return (dt.ToUniversalTime().Ticks - 621355968000000000) / 10000000;
|
|
|
}
|
|
|
|
|
|
-
|
|
|
+
|
|
|
}
|
|
|
}
|