Explorar o código

国交群聊提醒

jiangjc hai 1 ano
pai
achega
29e51bddd2

+ 4 - 4
OASystem/OASystem.Api/Controllers/PersonnelModuleController.cs

@@ -1730,8 +1730,8 @@ namespace OASystem.API.Controllers
             //推送消息(模板)
 
             //List<string> userList = new List<string>() { "Feint", "huaju.liu", "johnny.yang@pan-american-intl.com" };
-            //List<string> userList = new List<string>() { "Feint", "johnny.yang@pan-american-intl.com", "huaju.liu" };
-            //GroupStatus_CreateChatView rst1 = await _qiYeWeChatApiService.GroupStatus_CreateChat("团组出行通知", "Feint", userList, "CaiWuChat02");
+            List<string> userList = new List<string>() { "Feint", "johnny.yang@pan-american-intl.com" };
+            GroupStatus_CreateChatView rst1 = await _qiYeWeChatApiService.GroupStatus_CreateChat("团组费用提示", "Feint", userList, "GuoJiaoChat01");
 
             //团组出发
             //AppNoticeLibrary.SendUserMsg_GroupStatus_Create(2358, userList);
@@ -1740,8 +1740,8 @@ namespace OASystem.API.Controllers
             //AppNoticeLibrary.SendChatMsg_GroupStatus_ApplyFee(_dto.DiId, QiyeWeChatEnum.TestChat);
 
             //费用审核结果通知(通过情况下发送财务群)
-            List<string> userList = new List<string>() { "234" };
-            AppNoticeLibrary.SendUserMsg_GroupStatus_AuditFee(_dto.DiId, userList, QiyeWeChatEnum.CaiWuChat02);
+            //List<string> userList = new List<string>() { "234" };
+            //AppNoticeLibrary.SendUserMsg_GroupStatus_AuditFee(_dto.DiId, userList, QiyeWeChatEnum.CaiWuChat02);
 
             //4、财务付款时:(1)对应版块人员【单独发,状态为已付款才发】
             //AppNoticeLibrary.SendUserMsg_GroupStatus_PayResult(_dto.DiId, userList);

+ 39 - 0
OASystem/OASystem.Api/OAMethodLib/QiYeWeChatAPI/AppNotice/Config.cs

@@ -41,6 +41,12 @@ namespace OASystem.API.OAMethodLib.QiYeWeChatAPI.AppNotice
         /// </summary>
         [Description("GuoJiaoLeader01")]
         GuoJiaoLeaderChat,
+
+        /// <summary>
+        /// 团组通知-国交群(3天内结束行程)
+        /// </summary>
+        [Description("GuoJiaoChat01")]
+        GuoJiaoChat01,
     }
 
     public class MarkdownLib
@@ -167,6 +173,39 @@ namespace OASystem.API.OAMethodLib.QiYeWeChatAPI.AppNotice
             return result;
         }
 
+        /// <summary>
+        /// 团组出发前一周提醒财务检查合同、尾款
+        /// </summary>
+        /// <returns></returns>
+        public static string GroupRemindersToGuojiao( List<Grp_DelegationInfo> list_3day)
+        {
+            string teamNames2 = "><font color='comment'>暂无</font>";
+
+            if (list_3day.Count > 0)
+            {
+                teamNames2 = "";
+                foreach (var item in list_3day)
+                {
+                    string endDt = item.VisitEndDate.ToString("yyyy-MM-dd");
+                    teamNames2 += ">(" + endDt + ")" + item.TeamName + " \n\n";
+                }
+                //list_3day.ForEach(s => teamNames2 += ">" + s.TeamName + "\n\n");
+            }
+
+
+            string result = string.Format(@" `团组行程结束提醒`  
+
+><font color='warning'> - 下列团组将于3天内结束:</font>
+{0}
+
+<font color='info'>请注意检查各自业务费用是否完全录入</font>
+
+[详细信息请前往OA系统查看](http://oa.pan-american-intl.com:4399/)  ",  teamNames2);
+
+            return result;
+        }
+
+
         /// <summary>
         /// 团组出发前一周提醒财务检查合同、尾款
         /// </summary>

+ 18 - 0
OASystem/OASystem.Api/OAMethodLib/QiYeWeChatAPI/AppNotice/Library.cs

@@ -630,6 +630,24 @@ namespace OASystem.API.OAMethodLib.QiYeWeChatAPI.AppNotice
 
         #endregion
 
+        #region 团组结束提醒(国交群)
+
+        public static async Task<bool> SendChatMsg_GroupRemindersToGuojiao(List<Grp_DelegationInfo> list_3day, QiyeWeChatEnum qwEnum)
+        {
+            string chatId = qwEnum.GetEnumDescription();
+
+            ResponseBase result = await _qiYeWeChatApiService.GroupStatus_SendChatMsg_Markdown(chatId, MarkdownLib.GroupRemindersToGuojiao(list_3day));
+            if (result.errcode != 0)
+            {
+                //抄送日志 
+                return false;
+            }
+
+            return true;
+        }
+
+        #endregion
+
         #region 日付申请审核
 
         /// <summary>

+ 1 - 0
OASystem/OASystem.Api/OAMethodLib/Quartz/Business/DeleReminderMessage.cs

@@ -112,6 +112,7 @@ namespace OASystem.API.OAMethodLib.Quartz.Business
             List<Grp_DelegationInfo> listMinus1day = _grpDeleRep._sqlSugar.SqlQueryable<Grp_DelegationInfo>(sqlm1day).ToList();
 
             await AppNoticeLibrary.SendChatMsg_GroupRemindersToCaiwu(listAdd7day, listAdd3day, listMinus1day, QiyeWeChatEnum.CaiWuChat02);
+            await AppNoticeLibrary.SendChatMsg_GroupRemindersToGuojiao(listAdd3day, QiyeWeChatEnum.GuoJiaoChat01);
 
         }
     }