| 
					
				 | 
			
			
				@@ -1,4 +1,5 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 using OASystem.API.OAMethodLib.ALiYun; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+using OASystem.API.OAMethodLib.QiYeWeChatAPI; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 using OASystem.Domain.Dtos.Business; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 using OASystem.Domain.Entities.Business; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 using OASystem.Domain.Entities.Groups; 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -12,6 +13,7 @@ namespace OASystem.API.OAMethodLib.Quartz.Business 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     public static class DeleReminderMessage 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         private readonly static DelegationInfoRepository _grpDeleRep = AutofacIocManager.Instance.GetService<DelegationInfoRepository>(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        private static readonly IQiYeWeChatApiService _qiYeWeChatApiService = AutofacIocManager.Instance.GetService<IQiYeWeChatApiService>(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         /// <summary> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         /// 检查团组结束日期,将当天和2天后的团组整理并发送短信提醒 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -100,24 +102,27 @@ namespace OASystem.API.OAMethodLib.Quartz.Business 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 List<Grp_DelegationInfo> listAdd7day = list_source.Where(s => s.VisitStartDate.Equals(add7day)).ToList(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 List<Grp_DelegationInfo> listAdd2day = list_source.Where(s => s.VisitEndDate.Equals(add2day)).ToList(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 string dayStr = dtNow.ToString("yyyy年MM月dd日"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                string content = string.Format(@" 今天是{0},\n "); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                string content = string.Format(@" 今天是{0},\n ", dayStr); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 if (listAdd7day.Count > 0) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                     
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    string tempStr1 = string.Format(@" 检查到7天后开始的团组数量: <font color='warning'>{1}</font>\n ", dayStr,listAdd7day.Count); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    listAdd7day.ForEach(s => tempStr1 += string.Format(@"> {0}", s.TeamName)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    string tempStr1 = string.Format(@" \n\n检查到7天后开始的团组数量: <font color='warning'>** {1} **</font>\n ", dayStr, listAdd7day.Count); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    listAdd7day.ForEach(s => tempStr1 += string.Format(@">{0} \n", s.TeamName)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     content += tempStr1; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 if (listAdd2day.Count > 0) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    string tempStr2 = string.Format(@" 检查到3天后结束的团组数量: <font color='warning'>{1}</font>\n ", dayStr, listAdd2day.Count); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    listAdd7day.ForEach(s => tempStr2 += string.Format(@"> {0}", s.TeamName)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    string tempStr2 = string.Format(@" \n\n检查到3天后结束的团组数量: <font color='info'>** {1} **</font>\n ", dayStr, listAdd2day.Count); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    listAdd7day.ForEach(s => tempStr2 += string.Format(@">{0} \n", s.TeamName)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     content += tempStr2; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                content += string.Format(@""); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                content += string.Format(@"\n\n请注检查合同、款项等信息"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                OASystem.Domain.ViewModels.QiYeWeChat.ResponseBase result = await _qiYeWeChatApiService.RobotSendMsg_GroupInfo(content); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 |