Config.cs 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387
  1. using MathNet.Numerics.Statistics;
  2. using OASystem.Domain.Entities.Groups;
  3. using System.ComponentModel;
  4. namespace OASystem.API.OAMethodLib.QiYeWeChatAPI.AppNotice
  5. {
  6. public enum QiyeWeChatEnum
  7. {
  8. /// <summary>
  9. /// 测试用
  10. /// </summary>
  11. [Description("groupstatuschat01")]
  12. TestChat = 0,
  13. /// <summary>
  14. /// 团组通知-公司客户群(国交部经理、主管、财务部),发送条件(1.确认出团)
  15. /// </summary>
  16. [Description("CompanyCRMChat01")]
  17. CompanyCRMChat = 1,
  18. /// <summary>
  19. /// 团组通知-市场客户群(市场部经理、主管;国交部经理、主管)发送条件(1.确认出团) 暂时不用
  20. /// </summary>
  21. [Description("MarketCRMChat01")]
  22. MarketCRMChat,
  23. /// <summary>
  24. /// 团组通知-财务群(财务部全员),发送条件(1.费用审核-通过;2,团组出访时间出发-7 天,结束-3 天,通知财务三人签合同、收尾款)
  25. /// </summary>
  26. [Description("CaiWuChat01")]
  27. CaiWuChat,
  28. /// <summary>
  29. /// 团组通知-国交管理群(国交部经理、主管),发送条件(1.费用审核-提交)
  30. /// </summary>
  31. [Description("GuoJiaoLeader01")]
  32. GuoJiaoLeaderChat,
  33. }
  34. public class MarkdownLib
  35. {
  36. /// <summary>
  37. /// 通知文本-确认出团
  38. /// </summary>
  39. /// <param name="info"></param>
  40. /// <returns></returns>
  41. public static string GroupStatus_Create(GroupStatus_CreateModel info)
  42. {
  43. string result = string.Format(@" `确认出团`
  44. >团组名称:<font color='info'>{0}</font>
  45. >团组类型:{1}
  46. >出访日期:<font color='comment'>{2}</font>
  47. >出访人数/天数:{3}人/{4}天
  48. >客户单位:{5}
  49. >客户名称:{6}
  50. [详细信息请前往OA系统查看](http://oa.pan-american-intl.com:4399/)
  51. ", info.TeamName, info.TeamDid_Text, info.VisitDateRange, info.VisitPNumber, info.VisitDays, info.ClientUnit, info.ClientName);
  52. return result;
  53. }
  54. /// <summary>
  55. /// 通知文本-费用申请
  56. /// </summary>
  57. /// <returns></returns>
  58. public static string GroupStatus_ApplyFee(GroupStatus_ApplyFeeModel info)
  59. {
  60. string result = string.Format(@" `团组费用录入`
  61. >团组:<font color='info'>{0}</font>
  62. <font color='comment'>- </font>{7}
  63. >费用模块:{1}
  64. >费用名称:<font color='warning'>{2}</font>
  65. >付款金额:<font color='warning'>{3}</font>
  66. >申请人:{4}
  67. >申请时间:<font color='comment'>{5}</font>
  68. <font color='comment'>- </font>当前团组费用待审核数量: {6}
  69. [详细信息请前往OA系统查看](http://oa.pan-american-intl.com:4399/) ", info.TeamName, info.PriceModule, info.PriceName, info.Price, info.CreateUser, info.CreateDt, info.QueueCount,info.TitleStr);
  70. return result;
  71. }
  72. /// <summary>
  73. /// 费用审核通知-团组费用-群聊
  74. /// </summary>
  75. /// <param name="info"></param>
  76. /// <returns></returns>
  77. public static string AuditResult_ApplyFee_Chat(AuditResult_ApplyFee_GroupModel info)
  78. {
  79. string result = string.Format(@" `{0}`
  80. <font color='{1}'>{2}</font>
  81. >审核时间:<font color='comment'>{8}</font>
  82. >团组:{3}
  83. >费用模块:{4}
  84. >费用名称:<font color='warning'>{5}</font>
  85. >付款金额:<font color='warning'>{6}</font>
  86. >申请人:{7}
  87. [详细信息请前往OA系统查看](http://oa.pan-american-intl.com:4399/) ", info.Title, info.ResultColor, info.Result, info.TeamName, info.PriceModule, info.PriceName, info.Price, info.CreateUser, info.GMAuditDate);
  88. return result;
  89. }
  90. /// <summary>
  91. /// 费用审核通知-团组费用-用户
  92. /// </summary>
  93. /// <param name="info"></param>
  94. /// <returns></returns>
  95. public static string AuditResult_ApplyFee_User(AuditResult_ApplyFee_GroupModel info)
  96. {
  97. string result = string.Format(@" `{0}`
  98. <font color='{1}'>{2}</font>
  99. >审核时间:<font color='comment'>{7}</font>
  100. >团组:{3}
  101. >费用模块:{4}
  102. >费用名称:<font color='warning'>{5}</font>
  103. >付款金额:<font color='warning'>{6}</font>
  104. [详细信息请前往OA系统查看](http://oa.pan-american-intl.com:4399/) ", info.Title, info.ResultColor, info.Result, info.TeamName, info.PriceModule, info.PriceName, info.Price, info.GMAuditDate);
  105. return result;
  106. }
  107. /// <summary>
  108. /// 费用支付通知-团组费用-用户
  109. /// </summary>
  110. /// <param name="info"></param>
  111. /// <returns></returns>
  112. public static string PayResult_Group_ToUser(PayResult_Group_ToUserModel info)
  113. {
  114. string result = string.Format(@" `团组费用支付`
  115. >团组:{0}
  116. >费用模块:{1}
  117. >费用名称:<font color='warning'>{2}</font>
  118. >付款金额:<font color='warning'>{3}</font>
  119. ><font color='info'>该笔费用已支付</font>
  120. >支付时间:<font color='comment'>{4}</font>
  121. [详细信息请前往OA系统查看](http://oa.pan-american-intl.com:4399/) ", info.TeamName, info.PriceModule, info.PriceName, info.Price, info.PayDt);
  122. return result;
  123. }
  124. /// <summary>
  125. /// 团组出发前一周提醒财务检查合同、尾款
  126. /// </summary>
  127. /// <returns></returns>
  128. public static string GroupRemindersToCaiwuChat(List<Grp_DelegationInfo> list_7day, List<Grp_DelegationInfo> list_3day)
  129. {
  130. string teamNames1 = "><font color='comment'>暂无</font>";
  131. string teamNames2 = "><font color='comment'>暂无</font>";
  132. if (list_7day.Count > 0)
  133. {
  134. teamNames1 = "";
  135. list_7day.ForEach(s => teamNames1 += ">" + s.TeamName + "\n\n");
  136. }
  137. if (list_3day.Count > 0)
  138. {
  139. teamNames2 = "";
  140. list_3day.ForEach(s => teamNames2 += ">" + s.TeamName + "\n\n");
  141. }
  142. string result = string.Format(@" `团组状态提醒`
  143. ><font color='warning'> - 下列团组将于7天后出发:</font>
  144. {0}
  145. ><font color='warning'> - 下列团组将于3天后结束:</font>
  146. {1}
  147. <font color='info'>请注意检查合同、尾款状态</font>
  148. [详细信息请前往OA系统查看](http://oa.pan-american-intl.com:4399/) ", teamNames1, teamNames2);
  149. return result;
  150. }
  151. /// <summary>
  152. /// 日付申请提交时推送财务群
  153. /// </summary>
  154. /// <returns></returns>
  155. public static string DailyPayReminders_Create_ToCaiwuChat(DailyPayReminders_Create_ToCaiwuChatModel info)
  156. {
  157. string result = string.Format(@" `日付申请录入`
  158. <font color='comment'>- </font>{6}
  159. >费用名称:<font color='warning'>{0}</font>
  160. >公司:<font color='comment'>{5}</font>
  161. >费用标识:<font color='comment'>{4}</font>
  162. >付款金额:<font color='warning'>{1}</font>
  163. >申请人:{2}
  164. >申请时间:<font color='comment'>{3}</font>
  165. [详细信息请前往OA系统查看](http://oa.pan-american-intl.com:4399/) ", info.PriceName, info.Price, info.CreateUser, info.CreateDt, info.FeeSign, info.Company, info.TitleStr);
  166. return result;
  167. }
  168. /// <summary>
  169. /// 日付申请审核结果推送给申请人
  170. /// </summary>
  171. /// <returns></returns>
  172. public static string DailyPayReminder_Audit_ToUser(DailyPayReminder_Audit_ToUserModel info)
  173. {
  174. string result = string.Format(@" `日付申请`
  175. <font color='{0}'>{1}</font>
  176. >费用名称:{2}
  177. >付款金额:<font color='warning'>{3}</font>
  178. >审核时间:<font color='comment'>{4}</font>
  179. ", info.ResultColor, info.Result, info.PriceName, info.Price, info.AuditDate);
  180. return result;
  181. }
  182. /// <summary>
  183. /// 日付申请审核结果推送给财务群(总经理审核通过)
  184. /// </summary>
  185. /// <returns></returns>
  186. public static string DailyPayReminder_Audit_ToCaiwuChat(DailyPayReminder_Audit_ToCaiwuChatModel info)
  187. {
  188. string result = string.Format(@" `日付申请`
  189. <font color='info'> - 新增一笔通过总经理审核的日付申请</font>
  190. >费用名称:{0}
  191. >付款金额:<font color='warning'>{1}</font>
  192. >申请人:{2}
  193. >审核时间:<font color='comment'>{3}</font>
  194. ", info.PriceName, info.Price, info.CreateUser, info.AuditDate);
  195. return result;
  196. }
  197. /// <summary>
  198. /// 日付申请已付款推送给申请人
  199. /// </summary>
  200. /// <returns></returns>
  201. public static string DailyPayReminder_Pay_ToUser(DailyPayReminder_Pay_ToUserModel info)
  202. {
  203. string result = string.Format(@" `日付申请`
  204. <font color='info'>你有一笔日付申请费用已付款</font>
  205. >费用名称:{0}
  206. >付款金额:<font color='warning'>{1}</font>
  207. >支付时间:<font color='comment'>{2}</font>
  208. ", info.PriceName, info.Price, info.PayDt);
  209. return result;
  210. }
  211. }
  212. #region 实体类
  213. public class DailyPayReminder_Pay_ToUserModel
  214. {
  215. public string PriceName { get; set; }
  216. public string Price { get; set; }
  217. public string PayDt { get; set; }
  218. }
  219. public class DailyPayReminder_Audit_ToCaiwuChatModel
  220. {
  221. public string PriceName { get; set; }
  222. public string Price { get; set; }
  223. public string CreateUser { get; set; }
  224. public string AuditDate { get; set; }
  225. }
  226. public class DailyPayReminder_Audit_ToUserModel
  227. {
  228. public string ResultColor { get; set; } = "info"; //warning
  229. public string Result { get; set; } = "你有一笔日付申请已通过审核"; // 你有一笔日付申请未通过财务/总经理审核
  230. public string PriceName { get; set; }
  231. public string Price { get; set; }
  232. /// <summary>
  233. /// 财务或总经理审核时间
  234. /// </summary>
  235. public string AuditDate { get; set; }
  236. }
  237. public class DailyPayReminders_Create_ToCaiwuChatModel
  238. {
  239. public string PriceName { get; set; }
  240. public string Price { get; set; }
  241. public string CreateUser { get; set; }
  242. public string CreateDt { get; set; }
  243. public string FeeSign { get; set; }
  244. public string Company { get; set; }
  245. /// <summary>
  246. /// [更新]一项费用待审核
  247. /// </summary>
  248. public string TitleStr { get; set; } = "[新增]一项费用待审核";
  249. }
  250. public class PayResult_Group_ToUserModel
  251. {
  252. public string TeamName { get; set; }
  253. public string PriceModule { get; set; }
  254. public string PriceName { get; set; }
  255. public string Price { get; set; }
  256. public string PayDt { get; set; }
  257. }
  258. public class AuditResult_ApplyFee_GroupModel
  259. {
  260. public string Title { get; set; } = "团组费用审核结果";
  261. public string ResultColor { get; set; } = "info"; //info 或 warning
  262. public string Result { get; set; } = "总经理审核通过"; //总经理审核通过 或 总经理审核未通过
  263. public string TeamName { get; set; }
  264. public string PriceModule { get; set; }
  265. public string PriceName { get; set; }
  266. public string Price { get; set; }
  267. public string CreateUser { get; set; }
  268. public string GMAuditDate { get; set; }
  269. }
  270. public class GroupStatus_ApplyFeeModel
  271. {
  272. public string TeamName { get; set; }
  273. public string PriceModule { get; set; }
  274. public string PriceName { get; set; }
  275. public string Price { get; set; }
  276. public string CreateUser { get; set; }
  277. public string CreateDt { get; set; }
  278. public int QueueCount { get; set; }
  279. /// <summary>
  280. /// [更新]一项费用待审核
  281. /// </summary>
  282. public string TitleStr { get; set; } = "[新增]一项费用待审核";
  283. }
  284. public class GroupStatus_CreateModel
  285. {
  286. public string TeamName { get; set; }
  287. public string TeamDid_Text { get; set; }
  288. public string VisitDateRange { get; set; }
  289. public int VisitPNumber { get; set; }
  290. public int VisitDays { get; set; }
  291. public string ClientUnit { get; set; }
  292. public string ClientName { get; set; }
  293. }
  294. #endregion
  295. }