Browse Source

Merge branch 'develop' of http://132.232.92.186:3000/XinXiBu/OA2023 into develop

jiangjc 1 month ago
parent
commit
f33ea2cc36

+ 4 - 0
OASystem/OASystem.Api/Controllers/FinancialController.cs

@@ -198,6 +198,8 @@ namespace OASystem.API.Controllers
                 string content = $"[新增-日付申请]一项费用:[费用说明:{dailyInfo.Instructions}]{dailyInfo.SumPrice.ToString("#0.00")} CNY;";
 
                 await GeneralMethod.MessageIssueAndNotification(MessageTypeEnum.DailyPayment, title, content, userIds, 0);
+
+                await GeneralMethod.iOS_PushNotifications("051", $"日付费用审核", "", content);
             }
             catch (Exception ex)
             {
@@ -239,6 +241,8 @@ namespace OASystem.API.Controllers
                 string content = $"[更新-日付申请]一项费用:[费用说明:{dailyInfo.Instructions}]{dailyInfo.SumPrice.ToString("#0.00")} CNY;";
 
                 await GeneralMethod.MessageIssueAndNotification(MessageTypeEnum.DailyPayment, title, content, userIds, 0);
+
+                await GeneralMethod.iOS_PushNotifications("051", $"日付费用审核", "", content);
             }
             catch (Exception ex)
             {

+ 34 - 31
OASystem/OASystem.Api/Controllers/GroupsController.cs

@@ -2739,47 +2739,41 @@ FROM
         [ProducesResponseType(typeof(JsonView), StatusCodes.Status200OK)]
         public async Task<IActionResult> OpAirTicketRes(AirTicketResOpDto dto)
         {
-            try
+            Result groupData = await _airTicketResRep.OpAirTicketRes(dto, _setDataRep.PostCurrencyByDiid);
+            if (groupData.Code != 0)
             {
-                Result groupData = await _airTicketResRep.OpAirTicketRes(dto, _setDataRep.PostCurrencyByDiid);
-                if (groupData.Code != 0)
-                {
-                    return Ok(JsonView(false, groupData.Msg));
-                }
+                return Ok(JsonView(false, groupData.Msg));
+            }
 
-                #region 应用推送
-                try
-                {
-                    int ccpId = groupData.Data.GetType().GetProperty("ccpId").GetValue(groupData.Data, null);
-                    int sign = groupData.Data.GetType().GetProperty("sign").GetValue(groupData.Data, null);
+            #region 应用推送
+            try
+            {
+                int ccpId = groupData.Data.GetType().GetProperty("ccpId").GetValue(groupData.Data, null);
+                int sign = groupData.Data.GetType().GetProperty("sign").GetValue(groupData.Data, null);
 
-                    await AppNoticeLibrary.SendChatMsg_GroupStatus_ApplyFee(ccpId, sign, QiyeWeChatEnum.GuoJiaoLeaderChat);
+                await AppNoticeLibrary.SendChatMsg_GroupStatus_ApplyFee(ccpId, sign, QiyeWeChatEnum.GuoJiaoLeaderChat);
 
-                    //2024-10-21 新增LZ UID
-                    var userIds = new List<int>() { 21 };
-                    string title = $"系统通知";
-                    string content = "";
-                    var diId = dto.AirTicketResOpData.DiId;
-                    var groupInfo = await _groupRepository.Query(x => x.Id == diId).FirstAsync();
-                    var ccpInfo = await _sqlSugar.Queryable<Grp_CreditCardPayment>().Where(x => x.Id == ccpId).FirstAsync();
-                    if (dto.Status == 1) content = $"[新增-机票费用录入({groupInfo?.TeamName ?? "-"})]一项费用:{(ccpInfo.PayMoney * ccpInfo.DayRate).ToString("#0.00")} CNY;";
-                    else if (dto.Status == 2) content = $"[更新-机票费用录入({groupInfo?.TeamName ?? "-"})]一项费用:{(ccpInfo.PayMoney * ccpInfo.DayRate).ToString("#0.00")} CNY;";
+                //2024-10-21 新增LZ UID
+                var userIds = new List<int>() { 21 };
+                string title = $"系统通知";
+                string content = "";
+                var diId = dto.AirTicketResOpData.DiId;
+                var groupInfo = await _groupRepository.Query(x => x.Id == diId).FirstAsync();
+                var ccpInfo = await _sqlSugar.Queryable<Grp_CreditCardPayment>().Where(x => x.Id == ccpId).FirstAsync();
+                if (dto.Status == 1) content = $"[新增-机票费用录入({groupInfo?.TeamName ?? "-"})]一项费用:{(ccpInfo.PayMoney * ccpInfo.DayRate).ToString("#0.00")} CNY;";
+                else if (dto.Status == 2) content = $"[更新-机票费用录入({groupInfo?.TeamName ?? "-"})]一项费用:{(ccpInfo.PayMoney * ccpInfo.DayRate).ToString("#0.00")} CNY;";
 
-                    await GeneralMethod.MessageIssueAndNotification(MessageTypeEnum.GroupBusinessOperations, title, content, userIds, diId);
+                await GeneralMethod.MessageIssueAndNotification(MessageTypeEnum.GroupBusinessOperations, title, content, userIds, diId);
 
-                }
-                catch (Exception ex)
-                {
-                }
-                #endregion
+                await GeneralMethod.iOS_PushNotifications("051", $"机票费用审核", "", content);
 
-                return Ok(JsonView(true, groupData.Msg, groupData.Data));
             }
             catch (Exception ex)
             {
-                return Ok(JsonView(false, "程序错误!"));
-                throw;
             }
+            #endregion
+
+            return Ok(JsonView(true, groupData.Msg, groupData.Data));
         }
 
         /// <summary>
@@ -3663,6 +3657,10 @@ FROM
 
             await GeneralMethod.MessageIssueAndNotification(MessageTypeEnum.GroupBusinessOperations, title, content, userIds, diId);
 
+            await GeneralMethod.iOS_PushNotifications("051", $"其他款项费用审核", "", content);
+
+
+
             #endregion
 
             return Ok(JsonView(true, groupData.Msg, groupData.Data));
@@ -4263,6 +4261,8 @@ FROM
                 else if (dto.Status == 2) 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);
             }
             catch (Exception ex)
             {
@@ -7139,7 +7139,9 @@ FROM
                 if (dto.Status == 1) content = $"[新增-签证费用录入({groupInfo?.TeamName ?? "-"})]一项费用:{(ccpInfo.PayMoney * ccpInfo.DayRate).ToString("#0.00")} CNY;";
                 else if (dto.Status == 2) content = $"[更新-签证费用录入({groupInfo?.TeamName ?? "-"})]一项费用:{(ccpInfo.PayMoney * ccpInfo.DayRate).ToString("#0.00")} CNY;";
 
-                await GeneralMethod.MessageIssueAndNotification(MessageTypeEnum.GroupBusinessOperations, title, content, userIds, diId);
+                await GeneralMethod.MessageIssueAndNotification(MessageTypeEnum.GroupBusinessOperations, title, content, userIds, diId); 
+                
+                await GeneralMethod.iOS_PushNotifications("051", $"签证费用审核", "", content);
             }
             catch (Exception ex)
             {
@@ -13180,6 +13182,7 @@ ORDER by  gctggrc.id DESC
                 else if (dto.Status == 2) 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);
             }
             catch (Exception ex)
             {