Sfoglia il codice sorgente

商邀费用录入 -> 商邀费用名称更改:单项费用不等于0,则在名称后面最佳费用类型名称。

Lyyyi 1 settimana fa
parent
commit
d988e45d7c

+ 2 - 2
OASystem/OASystem.Api/Controllers/GroupsController.cs

@@ -95,7 +95,7 @@ namespace OASystem.API.Controllers
         private readonly EnterExitCostRepository _enterExitCostRep;
         private readonly IHubContext<ChatHub, IChatClient> _hubContext;
         private readonly UsersRepository _usersRep;
-        private readonly IJuHeApiService _juHeApi;
+        private readonly IJuHeApiService _juHeApi; 
         private readonly InvertedListRepository _invertedListRep;
         private readonly VisaFeeInfoRepository _visaFeeInfoRep;
         private readonly TicketBlackCodeRepository _ticketBlackCodeRep;
@@ -4089,7 +4089,7 @@ FROM
 
                                 _detail.PriceNameContent = _ioa.InviterArea;
 
-                                //2025-09-08 商邀费用名称更改:单项费用不等于0,则在名称后面最费用类型名称。
+                                //2025-09-08 商邀费用名称更改:单项费用不等于0,则在名称后面最费用类型名称。
                                 List<string> priceExpNames = new List<string>();
                                 if (_ioa.InviteCost != 0.00M) priceExpNames.Add("邀请费");
                                 if (_ioa.SendCost != 0.00M) priceExpNames.Add("快递费");

+ 16 - 0
OASystem/OASystem.Infrastructure/Repositories/Groups/InvitationOfficialActivitiesRepository.cs

@@ -194,6 +194,22 @@ Order By i.id  Desc ", sqlWhere);
                 var _DecreasePayments = await _sqlSugar.SqlQueryable<InvitationOfficialActivitiesView>(sql).ToListAsync();
                 if (_DecreasePayments.Count != 0)
                 {
+                    //2025-09-08 商邀费用名称更改:单项费用不等于0,则在名称后面最佳费用类型名称。
+                    for (int i = 0; i < _DecreasePayments.Count; i++)
+                    {
+                        var info  = _DecreasePayments[i];
+                        var priceExpNames = new List<string>();
+                        if (info.InviteCost > 0) priceExpNames.Add("邀请费");
+                        if (info.SendCost > 0) priceExpNames.Add("快递费");
+                        if (info.EventsCost > 0) priceExpNames.Add("公务活动费");
+                        if (info.TranslateCost > 0) priceExpNames.Add("公务翻译费");
+
+                        if (priceExpNames != null && priceExpNames.Count > 0)
+                        {
+                            _DecreasePayments[i].InviterArea += $"({string.Join(",",priceExpNames)})";
+                        }
+                    }
+
                     if (dto.PageIndex != 0 && dto.PageSize != 0)
                     {