Selaa lähdekoodia

优化舱位费用计算逻辑,移除重复判断

优化了经济舱、公务舱和头等舱的费用计算逻辑:
- 删除了对 `SGRNumber > 0` 的重复判断。
- 新增了对 `JSESNumber > 0` 和 `SUITENumber > 0` 的判断条件。
- 增加了注释,明确各舱位费用计算逻辑范围。
- 提升了代码可读性和维护性。
Lyyyi 1 päivä sitten
vanhempi
commit
de78dc2614

+ 9 - 7
OASystem/OASystem.Domain/Entities/Groups/Grp_GroupCostParameter.cs

@@ -389,7 +389,7 @@
                 var list = new List<ChildFeeInfo>();
                 var otherSinglePrice = VisaSinglePrice + PolicySinglePrice + TicketSinglePrice + FerryTicketSinglePrice + 
                     NucleicAcidTesSinglePrice + GroundSinglePrice + BusinessActivitySinglePrice + PettyCashSinglePrice;
-                //经济舱 TBR、经济舱 SGR、经济舱 JS/ES、经济舱 SUITE、公务舱 TBR、公务舱 SGR、公务舱 JS/ES、公务舱 SUITE、头等舱 JS/ES、头等舱 SUITE
+                //经济舱 TBR、经济舱 SGR、经济舱 JS/ES、经济舱 SUITE、
                 if (JJCRS > 0)
                 {
                     if (TBRNumber > 0)
@@ -400,16 +400,17 @@
                     {
                         list.Add(new ChildFeeInfo("经济舱 SGR", EconomySinglePrice + HotelSGRSinglePrice + otherSinglePrice, JJCRS));
                     }
-                    else if(SGRNumber > 0)
+                    else if(JSESNumber > 0)
                     {
                         list.Add(new ChildFeeInfo("经济舱 JS/ES", EconomySinglePrice + HotelJSESSinglePrice + otherSinglePrice, JJCRS));
                     }
-                    else if(SGRNumber > 0)
+                    else if(SUITENumber > 0)
                     {
                         list.Add(new ChildFeeInfo("经济舱 SUITE", EconomySinglePrice + HotelSuiteSinglePrice + otherSinglePrice, JJCRS));
                     }
                 }
 
+                //公务舱 TBR、公务舱 SGR、公务舱 JS/ES、公务舱 SUITE
                 if (GWCRS > 0)
                 {
                     if (TBRNumber > 0)
@@ -420,23 +421,24 @@
                     {
                         list.Add(new ChildFeeInfo("公务舱 SGR", BusinessSinglePrice + HotelSGRSinglePrice + otherSinglePrice, GWCRS));
                     }
-                    else if(SGRNumber > 0)
+                    else if(JSESNumber > 0)
                     {
                         list.Add(new ChildFeeInfo("公务舱 JS/ES", BusinessSinglePrice + HotelJSESSinglePrice + otherSinglePrice, GWCRS));
                     }
-                    else if(SGRNumber > 0)
+                    else if(SUITENumber > 0)
                     {
                         list.Add(new ChildFeeInfo("公务舱 SUITE", BusinessSinglePrice + HotelSuiteSinglePrice + otherSinglePrice, GWCRS));
                     }
                 }
 
+                //头等舱 JS/ES、头等舱 SUITE
                 if (TDCRS > 0)
                 {
-                    if (SGRNumber > 0)
+                    if (JSESNumber > 0)
                     {
                         list.Add(new ChildFeeInfo("头等舱 JS/ES", FirstClassSinglePrice + HotelJSESSinglePrice + otherSinglePrice, TDCRS));
                     }
-                    else if(SGRNumber > 0)
+                    else if(SUITENumber > 0)
                     {
                         list.Add(new ChildFeeInfo("头等舱 SUITE", FirstClassSinglePrice + HotelSuiteSinglePrice + otherSinglePrice, TDCRS));
                     }