| 
					
				 | 
			
			
				@@ -13,6 +13,32 @@ namespace OASystem.API.OAMethodLib.QiYeWeChatAPI.AppNotice 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         private static readonly DelegationInfoRepository _grpDeleRep = AutofacIocManager.Instance.GetService<DelegationInfoRepository>(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        #region 获取企微Id 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        public static List<string> GetQiyeChatUserIdList(List<string> userId) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            List<string> result = new List<string>(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            try 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                foreach (string item in userId) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    int uid = int.Parse(item); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    Sys_Users users = _grpDeleRep.Query<Sys_Users>(s => s.Id == uid).First(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    if (!string.IsNullOrEmpty(users.QiyeChatUserId)) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        result.Add(users.QiyeChatUserId); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            catch (Exception ex) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            return result; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        #endregion 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         #region 确认出团 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         /// <summary> 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -77,13 +103,17 @@ namespace OASystem.API.OAMethodLib.QiYeWeChatAPI.AppNotice 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             }; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             //发送信息 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            ResponseBase result = await _qiYeWeChatApiService.GroupStatus_SendMessage_ToUser_Markdown(userId, MarkdownLib.GroupStatus_Create(info)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            if (result.errcode != 0) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            List<string> qwUserIdList = GetQiyeChatUserIdList(userId); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            if (qwUserIdList.Count > 0) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                //抄送日志  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                return false; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                ResponseBase result = await _qiYeWeChatApiService.GroupStatus_SendMessage_ToUser_Markdown(userId, MarkdownLib.GroupStatus_Create(info)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                if (result.errcode != 0) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    //抄送日志  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    return false; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             return true; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -111,7 +141,7 @@ namespace OASystem.API.OAMethodLib.QiYeWeChatAPI.AppNotice 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             List<Grp_CreditCardPayment> entityList = _grpDeleRep 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    .Query<Grp_CreditCardPayment>(s => s.DIId == ccp.DIId && s.IsDel == 0 && s.CreateUserId > 0 && s.IsAuditGM == 0) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    .ToList(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-             
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             GroupStatus_ApplyFeeModel info = new GroupStatus_ApplyFeeModel() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 QueueCount = entityList.Count, 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -467,17 +497,21 @@ namespace OASystem.API.OAMethodLib.QiYeWeChatAPI.AppNotice 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             #endregion 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             //发送信息 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            ResponseBase result = await _qiYeWeChatApiService.GroupStatus_SendMessage_ToUser_Markdown(userId, MarkdownLib.AuditResult_ApplyFee_User(info)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            if (ccp.IsAuditGM == 1) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            List<string> qwUserIdList = GetQiyeChatUserIdList(userId); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            if (qwUserIdList.Count > 0) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                await SendChatMsg_GroupStatus_AuditFee(Grp_CreditCardPaymentId, qwEnum); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            if (result.errcode != 0) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                //抄送日志  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                return false; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                ResponseBase result = await _qiYeWeChatApiService.GroupStatus_SendMessage_ToUser_Markdown(userId, MarkdownLib.AuditResult_ApplyFee_User(info)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                if (ccp.IsAuditGM == 1) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    await SendChatMsg_GroupStatus_AuditFee(Grp_CreditCardPaymentId, qwEnum); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                if (result.errcode != 0) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    //抄送日志  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    return false; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             return true; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -558,13 +592,17 @@ namespace OASystem.API.OAMethodLib.QiYeWeChatAPI.AppNotice 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             #endregion 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             //发送信息 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            ResponseBase result = await _qiYeWeChatApiService.GroupStatus_SendMessage_ToUser_Markdown(userId, MarkdownLib.PayResult_Group_ToUser(info)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            if (result.errcode != 0) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            List<string> qwUserIdList = GetQiyeChatUserIdList(userId); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            if (qwUserIdList.Count > 0) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                //抄送日志  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                return false; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                ResponseBase result = await _qiYeWeChatApiService.GroupStatus_SendMessage_ToUser_Markdown(userId, MarkdownLib.PayResult_Group_ToUser(info)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                if (result.errcode != 0) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    //抄送日志  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    return false; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             return true; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -603,7 +641,7 @@ namespace OASystem.API.OAMethodLib.QiYeWeChatAPI.AppNotice 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             Sys_Users user = _grpDeleRep.Query<Sys_Users>(s => s.Id == fin_DailyFeePayment.CreateUserId).First(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             Sys_JobPost job = _grpDeleRep.Query<Sys_JobPost>(s => s.Id == user.JobPostId).First(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            string users = string.Format(@"{0}-{1}", user.CnName, job.JobName); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            string users = string.Format(@"{0}-{1}", job.JobName, user.CnName ); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             string[] companyArr = new string[] { "未知", "成都泛美商务有限公司", "四川泛美交流有限公司", "成都纽茵教育科技有限公司", "成都鸿企中元科技有限公司", "测试公司1" }; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             string companyStr = "未知"; 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -659,7 +697,7 @@ namespace OASystem.API.OAMethodLib.QiYeWeChatAPI.AppNotice 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             Sys_Users user = _grpDeleRep.Query<Sys_Users>(s => s.Id == fin_DailyFeePayment.CreateUserId).First(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             Sys_JobPost job = _grpDeleRep.Query<Sys_JobPost>(s => s.Id == user.JobPostId).First(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            string users = string.Format(@"{0}-{1}", user.CnName, job.JobName); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            string users = string.Format(@"{0}-{1}", job.JobName, user.CnName); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             string priceStr = fin_DailyFeePayment.SumPrice.ToString("#0.00"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -702,12 +740,15 @@ namespace OASystem.API.OAMethodLib.QiYeWeChatAPI.AppNotice 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 info.Result = "你有一笔日付申请未通过财务审核"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 info.ResultColor = "warning"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            ResponseBase result = await _qiYeWeChatApiService.GroupStatus_SendMessage_ToUser_Markdown(userId, MarkdownLib.DailyPayReminder_Audit_ToUser(info)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            if (result.errcode != 0) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            List<string> qwUserIdList = GetQiyeChatUserIdList(userId); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            if (qwUserIdList.Count > 0) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                //抄送日志  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                return false; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                ResponseBase result = await _qiYeWeChatApiService.GroupStatus_SendMessage_ToUser_Markdown(userId, MarkdownLib.DailyPayReminder_Audit_ToUser(info)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                if (result.errcode != 0) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    //抄送日志  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    return false; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             return true; 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -728,14 +769,16 @@ namespace OASystem.API.OAMethodLib.QiYeWeChatAPI.AppNotice 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 PriceName = fin_DailyFeePayment.Instructions, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 Price = priceStr 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             }; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            ResponseBase result = await _qiYeWeChatApiService.GroupStatus_SendMessage_ToUser_Markdown(userId, MarkdownLib.DailyPayReminder_Pay_ToUser(info)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            if (result.errcode != 0) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            List<string> qwUserIdList = GetQiyeChatUserIdList(userId); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            if (qwUserIdList.Count > 0) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                //抄送日志  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                return false; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                ResponseBase result = await _qiYeWeChatApiService.GroupStatus_SendMessage_ToUser_Markdown(userId, MarkdownLib.DailyPayReminder_Pay_ToUser(info)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                if (result.errcode != 0) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    //抄送日志  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    return false; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             return true; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 |