Browse Source

1、机票费用录入变更通知指定人员 代码编写
2、出入境费用明细 保存发送消息 上线

amigotrip 11 months ago
parent
commit
862f6b42f9

+ 1 - 1
OASystem/OASystem.Api/Controllers/FinancialController.cs

@@ -1820,7 +1820,7 @@ namespace OASystem.API.Controllers
                     sumAll_pr += (sum_pr - sum_refund);
                     sumAll_balance += ((sum_fr + sum_extra) - (sum_pr - sum_refund));
 
-                    #region 单位应收已收细项(以应收费用名称为主去(已收费用)匹配) 新增 雷怡 2024-35-08 16:35:28
+                    #region 单位应收已收细项(以应收费用名称为主去(已收费用)匹配) 新增 雷怡 2024-5-08 16:35:28
 
                     List<ClientFeeInfoView> feeDatas = new List<ClientFeeInfoView>();
 

+ 4 - 1
OASystem/OASystem.Api/Controllers/GroupsController.cs

@@ -2315,6 +2315,9 @@ namespace OASystem.API.Controllers
                     int sign = groupData.Data.GetType().GetProperty("sign").GetValue(groupData.Data, null);
 
                     await AppNoticeLibrary.SendChatMsg_GroupStatus_ApplyFee(ccpId, sign, QiyeWeChatEnum.GuoJiaoLeaderChat);
+
+                    //机票费用录入变更通知
+                    await AppNoticeLibrary.SendUserMsg_GroupShare_ToDP(dto.CardPaymentOpData.DIId, dto.CardPaymentOpData.CreateUserId);
                 }
                 catch (Exception ex)
                 {
@@ -4086,7 +4089,7 @@ namespace OASystem.API.Controllers
                 int sign = (int)data.Data.GetType().GetProperty("sign").GetValue(data.Data, null);
                 string md5Sign = GeneralMethod.Encrypt($"{sign}&fileName={fileUrl}");
                 string url = string.Format("http://oa.pan-american-intl.com:4399/#/Sankunginfo?sign={0}&fileName={1}", sign,fileUrl);
-                await AppNoticeLibrary.SendUserMsg_GroupShare_ToGM(dto.DiId, new List<string>() { "208","5","233" }, dto.UserId, url);
+                await AppNoticeLibrary.SendUserMsg_GroupShare_ToGM(dto.DiId, new List<string>() { "208","233","21" }, dto.UserId, url);
 
 
                 return Ok(JsonView(true, data.Msg, data.Data));

+ 53 - 5
OASystem/OASystem.Api/OAMethodLib/QiYeWeChatAPI/AppNotice/Library.cs

@@ -41,6 +41,7 @@ namespace OASystem.API.OAMethodLib.QiYeWeChatAPI.AppNotice
 
         #endregion
 
+
         #region 确认出团
 
         /// <summary>
@@ -120,7 +121,7 @@ namespace OASystem.API.OAMethodLib.QiYeWeChatAPI.AppNotice
         }
 
         #endregion
-
+       
         #region 团组费用审核
 
 
@@ -788,6 +789,7 @@ namespace OASystem.API.OAMethodLib.QiYeWeChatAPI.AppNotice
         #endregion
 
 
+        #region 费用保存发送消息
         #region 三公费用更改通知
 
         /// <summary>
@@ -795,11 +797,11 @@ namespace OASystem.API.OAMethodLib.QiYeWeChatAPI.AppNotice
         /// </summary>
         /// <param name="sign"></param>
         /// <returns></returns>
-        public static async Task<bool> SendUserMsg_GroupShare_ToGM(int diId,List<string> receivedUserIds, int updateUserId, string url)
+        public static async Task<bool> SendUserMsg_GroupShare_ToGM(int diId, List<string> receivedUserIds, int updateUserId, string url)
         {
 
             Grp_DelegationInfo groupInfo = _grpDeleRep.Query<Grp_DelegationInfo>(s => s.Id == diId).First();
-            
+
             GroupShare_ToGMModel info = new GroupShare_ToGMModel()
             {
                 RefreshDate = DateTime.Now.ToString("yyyy-MM-dd HH:mm"),
@@ -829,7 +831,6 @@ namespace OASystem.API.OAMethodLib.QiYeWeChatAPI.AppNotice
         /// <returns></returns>
         public static async Task<bool> SendUserMsg_GroupShare_ToFinance(int diId)
         {
-
             Grp_DelegationInfo groupInfo = _grpDeleRep.Query<Grp_DelegationInfo>(s => s.Id == diId).First();
 
             GroupShare_ToUserModel info = new GroupShare_ToUserModel()
@@ -839,7 +840,10 @@ namespace OASystem.API.OAMethodLib.QiYeWeChatAPI.AppNotice
             };
 
             List<string> receivedUserIds = _grpDeleRep.Query<Sys_Users>(s => s.IsDel == 0 && s.DepId == 3).Select(x => x.Id.ToString()).ToList();
-            receivedUserIds = new List<string>() { "208","4", "233" };
+            var defaultUserIds = new List<string>() { "208", "233" };
+            receivedUserIds.AddRange(defaultUserIds);
+            if (receivedUserIds.Contains("150")) receivedUserIds.Remove("150");
+
             if (receivedUserIds.Count > 0)
             {
                 List<string> qwUserIdList = GetQiyeChatUserIdList(receivedUserIds);
@@ -854,10 +858,54 @@ namespace OASystem.API.OAMethodLib.QiYeWeChatAPI.AppNotice
             return true;
         }
 
+        #endregion
+
+        /// <summary>
+        /// 机票费用录入确认通知发送国交经理、主管、王鸽
+        /// </summary>
+        /// <param name="diId"></param>
+        /// <param name="operationId"></param>
+        /// <returns></returns>
+        public static async Task<bool> SendUserMsg_GroupShare_ToDP(int diId,int operationId)
+        {
+            Grp_DelegationInfo groupInfo = _grpDeleRep.Query<Grp_DelegationInfo>(s => s.Id == diId).First();
+
+            var operationName = _grpDeleRep.Query<Sys_Users>(s => s.IsDel == 0 && s.Id == operationId).First()?.CnName ?? "Unknown";
+            var defaultJobPostIds = new List<int>() { 22, 32 };
+            List<string> receivedUserIds = _grpDeleRep.Query<Sys_Users>(s => s.IsDel == 0 && s.DepId == 7 && defaultJobPostIds.Contains(s.JobPostId)).Select(x => x.Id.ToString()).ToList();
+            var defaultUserIds = new List<string>() { "208", "233" };
+            receivedUserIds.AddRange(defaultUserIds);
+
+            if (receivedUserIds.Count > 0)
+            {
+                List<string> qwUserIdList = GetQiyeChatUserIdList(receivedUserIds);
+
+                string resMsg = string.Format(@" `机票费用录入操作通知`  
+
+>团组:<font color='info'>{0}</font> 
+
+>操作人员:<font color='comment'>{1}</font> 
+>操作时间:<font color='comment'>{2}</font> 
+
+[详细信息请前往OA系统查看](http://oa.pan-american-intl.com:4399/)   ", groupInfo.TeamName, operationName, DateTime.Now.ToString("yyyy-MM-dd HH:mm"));
+
+
+                ResponseBase result = await _qiYeWeChatApiService.GroupStatus_SendMessage_ToUser_Markdown(qwUserIdList, resMsg);
+                if (result.errcode != 0)
+                {
+                    //抄送日志 
+                    return false;
+                }
+            }
+
+            return true;
+        }
+
 
         #endregion
 
 
+
         #region 成本通知
 
         /// <summary>

+ 1 - 2
OASystem/OASystem.Infrastructure/Repositories/Groups/DecreasePaymentsRepository.cs

@@ -306,7 +306,6 @@ namespace OASystem.Infrastructure.Repositories.Groups
                                 grp_CreditCardPayment.DayRate = teamRate.Rate;
                                 grp_CreditCardPayment.RMBPrice = grp_CreditCardPayment.PayMoney * grp_CreditCardPayment.DayRate;
                             }
-
                         }
                         else
                         {
@@ -315,7 +314,7 @@ namespace OASystem.Infrastructure.Repositories.Groups
                         }
 
                         int ispay = 0;
-                        if (dto.PayDId == 72) ispay = 1;
+                        //if (dto.PayDId == 72) ispay = 1;
 
 
                         int CTable = await _sqlSugar.Updateable<Grp_CreditCardPayment>()