IQiYeWeChatApiService.cs 7.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209
  1. using OASystem.Domain.Dtos.QiYeWeChat;
  2. using OASystem.Domain.ViewModels.QiYeWeChat;
  3. namespace OASystem.API.OAMethodLib.QiYeWeChatAPI
  4. {
  5. /// <summary>
  6. /// 企业微信Api 服务
  7. /// </summary>
  8. public interface IQiYeWeChatApiService
  9. {
  10. ///// <summary>
  11. ///// 获取access_token
  12. ///// </summary>
  13. ///// <param name="applicationType">
  14. ///// 1:人事助手
  15. ///// 2:打卡
  16. ///// 3:邮件
  17. ///// 6:团组状态通知
  18. ///// </param>
  19. ///// <returns></returns>
  20. //Task<Access_TokenView> GetToken(int applicationType);
  21. /// <summary>
  22. /// 创建员工
  23. /// </summary>
  24. /// <param name="create_Request"></param>
  25. /// <returns></returns>
  26. Task<ResponseBase> CreateAsync(Create_Request create_Request);
  27. /// <summary>
  28. /// 获取成员ID列表
  29. /// </summary>
  30. /// <returns></returns>
  31. Task<UserIdListView> GetUserIdListAsync();
  32. /// <summary>
  33. /// 获取成员信息
  34. /// </summary>
  35. /// <returns></returns>
  36. Task<QYWX_UserInfosView> GetUserInfosAsync();
  37. /// <summary>
  38. /// 获取企业所有打卡规则
  39. /// </summary>
  40. /// <returns></returns>
  41. Task<CorpCheckInRuleView> GetCheckIn_CorpCheckInOptionAsync();
  42. /// <summary>
  43. /// 获取月打卡数据
  44. /// </summary>
  45. /// <param name="startDt"></param>
  46. /// <param name="endDt"></param>
  47. /// <returns></returns>
  48. Task<CheckInView> GetCheckin_MonthDataAsync(DateTime startDt, DateTime endDt);
  49. /// 获取月打卡数据
  50. /// </summary>
  51. /// <param name="startDt"></param>
  52. /// <param name="endDt"></param>
  53. /// <returns></returns>
  54. Task<CheckInView> GetCheckin_MonthDataAsync1(DateTime startDt, DateTime endDt);
  55. /// <summary>
  56. /// 获取用户考核打卡记录
  57. /// </summary>
  58. /// <param name="startDt"></param>
  59. /// <param name="endDt"></param>
  60. /// <param name="qiyeUid"></param>
  61. /// <returns></returns>
  62. Task<object> QueryAssessmentByUser(DateTime startDt, DateTime endDt, List<string> qiyeUidList);
  63. /// <summary>
  64. /// 获取月打卡数据 Redis
  65. /// </summary>
  66. /// <param name="startDt"></param>
  67. /// <param name="endDt"></param>
  68. /// <returns></returns>
  69. Task<CheckInView> GetCheckin_MonthDataRedisAsync(DateTime startDt, DateTime endDt);
  70. /// <summary>
  71. /// 获取打卡记录数据
  72. /// </summary>
  73. /// <param name="useridlist">需要获取打卡记录的用户列表</param>
  74. /// <param name="opencheckindatatype">打卡类型。1:上下班打卡;2:外出打卡;3:全部打卡</param>
  75. /// <param name="startDt">获取打卡记录的开始时间。Unix时间戳</param>
  76. /// <param name="endDt">获取打卡记录的结束时间。Unix时间戳</param>
  77. /// <returns></returns>
  78. Task<CheckInDataView> GetCheckinDataAsync(List<string> useridlist, int opencheckindatatype, DateTime startDt, DateTime endDt);
  79. /// <summary>
  80. /// 获取打卡日报数据
  81. /// </summary>
  82. /// <param name="useridlist"></param>
  83. /// <param name="startDt"></param>
  84. /// <param name="endDt"></param>
  85. /// <returns></returns>
  86. Task<CheckInDayDataView> GetCheckInDayDataAsync(List<string> useridlist, DateTime startDt, DateTime endDt);
  87. /// <summary>
  88. /// 获取审批数据(旧)
  89. /// </summary>
  90. /// <param name="startDt"></param>
  91. /// <param name="endDt"></param>
  92. /// <returns></returns>
  93. Task<ApprovalDataView> GetApprovalDataAsync(DateTime startDt, DateTime endDt);
  94. /// <summary>
  95. /// 获取审批数据(旧)
  96. /// </summary>
  97. /// <param name="startDt"></param>
  98. /// <param name="endDt"></param>
  99. /// <returns></returns>
  100. Task<List<Sp_Info>> GetApprovalDatasAsync(DateTime startDt, DateTime endDt);
  101. /// <summary>
  102. /// 获取审批数据(旧)(redis缓存)
  103. /// </summary>
  104. /// <param name="startDt"></param>
  105. /// <param name="endDt"></param>
  106. /// <returns></returns>
  107. Task<List<Sp_Info>> GetApprovalDatasRedisAsync(DateTime startDt, DateTime endDt);
  108. ///// <summary>
  109. ///// 批量获取审批单号
  110. ///// </summary>
  111. ///// <param name="startDt"></param>
  112. ///// <param name="endDt"></param>
  113. ///// <param name="record_type">
  114. ///// sp_status-审批单状态(1-审批中;2-已通过;3-已驳回;4-已撤销;6-通过后撤销;7-已删除;10-已支付)
  115. ///// </param>
  116. ///// <returns></returns>
  117. //Task<ApprovalInfoView> GetApprovalInfoAsync(DateTime startDt, DateTime endDt, int record_type);
  118. //// <summary>
  119. /// 批量获取审批详情
  120. /// <param name="startDt"></param>
  121. /// <param name="endDt"></param>
  122. /// <param name="creator">
  123. /// 申请人
  124. /// </param>
  125. /// <param name="sp_status">
  126. /// sp_status-审批单状态(1-审批中;2-已通过;3-已驳回;4-已撤销;6-通过后撤销;7-已删除;10-已支付)
  127. /// </param>
  128. /// <param name="record_type">
  129. /// record_type - 审批单类型属性,1-请假;2-打卡补卡;3-出差;4-外出;5-加班; 6- 调班;7-会议室预定;8-退款审批;9-红包报销审批
  130. /// </param>
  131. /// <returns></returns>
  132. Task<List<Sp_Detail>> GetApprovalDetailsAsync(DateTime startDt, DateTime endDt, string creator, int sp_status, int record_type);
  133. /// <summary>
  134. /// 获取审批模板详情
  135. /// </summary>
  136. /// <param name="template_id">模板Id</param>
  137. /// <returns></returns>
  138. Task<TemplateDetailView> GetTemplateDetailAsync(string template_id);
  139. /// <summary>
  140. /// 获取审批详情
  141. /// </summary>
  142. /// <param name="spNo">审批No</param>
  143. /// <returns></returns>
  144. Task<ApprovalDetailView> GetApprovalDetailAsync(string spNo);
  145. /// <summary>
  146. /// hook 发送团组出发信息给财务群
  147. /// </summary>
  148. /// <param name="msg"></param>
  149. /// <returns></returns>
  150. Task<ResponseBase> RobotSendMsg_GroupInfo(string msg);
  151. #region 团组状态通知
  152. /// <summary>
  153. /// 获取部门成员
  154. /// </summary>
  155. /// <returns></returns>
  156. Task<GroupStatus_UserSimplelistView> GroupStatus_GetUserList(int departmentId = 8402038);
  157. /// <summary>
  158. /// 创建群聊
  159. /// </summary>
  160. /// <returns></returns>
  161. Task<GroupStatus_CreateChatView> GroupStatus_CreateChat(string chatName, string owner, List<string> userList, string chatId);
  162. /// <summary>
  163. /// 向群聊发送消息
  164. /// </summary>
  165. /// <param name="chatId"></param>
  166. /// <param name="msgContent"></param>
  167. /// <returns></returns>
  168. Task<ResponseBase> GroupStatus_SendChatMsg_Markdown(string chatId, string msgContent, string msgType = "markdown");
  169. /// <summary>
  170. /// 向用户发送信息
  171. /// </summary>
  172. /// <param name="toUser"></param>
  173. /// <param name="msgContent"></param>
  174. /// <param name="msgType"></param>
  175. /// <returns></returns>
  176. Task<GroupStatus_SendMessageView> GroupStatus_SendMessage_ToUser_Markdown(List<string> toUser, string msgContent, string msgType = "markdown");
  177. #endregion
  178. }
  179. }