Browse Source

酒店ios推送通知

jiangjc 1 month ago
parent
commit
0cc33d9bad
1 changed files with 25 additions and 1 deletions
  1. 25 1
      OASystem/OASystem.Api/Controllers/GroupsController.cs

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

@@ -30,6 +30,7 @@ using OASystem.Domain.ViewModels.Statistics;
 using OASystem.Infrastructure.Repositories.Financial;
 using OASystem.Infrastructure.Repositories.Groups;
 using OfficeOpenXml;
+using Org.BouncyCastle.Asn1.Ocsp;
 using Quartz.Util;
 using SqlSugar;
 using SqlSugar.Extensions;
@@ -11032,6 +11033,29 @@ ORDER by  gctggrc.id DESC
 
             #region 应用推送
 
+            try
+            {
+                int ccpId = (int)_view.Data.GetType().GetProperty("ccpId").GetValue(_view.Data, null);
+                int sign = (int)_view.Data.GetType().GetProperty("sign").GetValue(_view.Data, null);
+                int hotelId = (int)_view.Data.GetType().GetProperty("hotelId").GetValue(_view.Data, null);
+
+                //2024-10-21 新增LZ UID
+                var userIds = new List<int>() { 21 };
+                string title = $"费用审核";
+                var diId = _dto.DiId;
+                var groupInfo = await _groupRepository.Query(x => x.Id == diId).FirstAsync();
+                var ccpInfo = await _sqlSugar.Queryable<Grp_CreditCardPayment>().Where(x => x.Id == ccpId).FirstAsync();
+                string content = "";
+                if (_dto.Id == 0) content = $"[新增-酒店费用录入({groupInfo?.TeamName ?? "-"})]一项费用:{(ccpInfo.PayMoney * ccpInfo.DayRate).ToString("#0.00")} CNY;";
+                else if (_dto.Id > 0) content = $"[更新-酒店费用录入({groupInfo?.TeamName ?? "-"})]一项费用:{(ccpInfo.PayMoney * ccpInfo.DayRate).ToString("#0.00")} CNY;";
+
+                await GeneralMethod.iOS_PushNotifications("051", title, "", content);
+            }
+            catch (Exception ex)
+            {
+
+            }
+
             try
             {
                 int ccpId = (int)_view.Data.GetType().GetProperty("ccpId").GetValue(_view.Data, null);
@@ -11057,7 +11081,7 @@ ORDER by  gctggrc.id DESC
                 else if (_dto.Id > 0) content = $"[更新-酒店费用录入({groupInfo?.TeamName ?? "-"})]一项费用:{(ccpInfo.PayMoney * ccpInfo.DayRate).ToString("#0.00")} CNY;";
 
                 await GeneralMethod.MessageIssueAndNotification(MessageTypeEnum.GroupBusinessOperations, title, content, userIds, diId);
-                await GeneralMethod.iOS_PushNotifications("051", "费用审核", "", content);
+                //await GeneralMethod.iOS_PushNotifications("051", "费用审核", "", content);
 
             }
             catch (Exception ex)