浏览代码

支持多舱位城市交通费用计算与展示

新增 CityTranffic1 和 CityTranffic2 字段,分别表示公务舱和头等舱的城市交通费用;调整费用计算逻辑,支持按舱位动态计算;优化字符串拼接方式,提升性能;更新 DTO、ViewModel 和数据库模型,新增字段支持;统一金额格式化输出,修复重复计算问题;增强后端逻辑,支持多舱位费用展示与处理。
Lyyyi 14 小时之前
父节点
当前提交
1827d7bd15

+ 11 - 5
OASystem/OASystem.Api/Controllers/FinancialController.cs

@@ -1181,26 +1181,30 @@ namespace OASystem.API.Controllers
                              *  458	公务舱
                              *  460	经济舱
                              */
-                            decimal airPrice = 0.00M;
+                            decimal airPrice = 0.00M,
+                                    cityTranffic = 0.00M;
                             string airName = string.Empty;
                             if (client.AirType == 457)
                             {
                                 airName = $"头等舱";
                                 airPrice = _EnterExitCosts.AirTD;
+                                cityTranffic = _EnterExitCosts.CityTranffic;
                             }
                             else if (client.AirType == 458)
                             {
                                 airName = $"公务舱";
                                 airPrice = _EnterExitCosts.AirGW;
+                                cityTranffic = _EnterExitCosts.CityTranffic1;
                             }
                             else if (client.AirType == 460)
                             {
                                 airName = $"经济舱";
                                 airPrice = _EnterExitCosts.AirJJ;
+                                cityTranffic = _EnterExitCosts.CityTranffic2;
                             }
 
                             //计算费用总和
-                            decimal AllPrice = airPrice + _EnterExitCosts.CityTranffic + dac1.Sum(x => x.SubTotal) + dac2.Sum(x => x.SubTotal) +
+                            decimal AllPrice = airPrice + cityTranffic + dac1.Sum(x => x.SubTotal) + dac2.Sum(x => x.SubTotal) +
                                                dac3.Sum(x => x.SubTotal) + dac4.Sum(x => x.SubTotal) + _EnterExitCosts.Visa + _EnterExitCosts.Safe +
                                                +_EnterExitCosts.YiMiao + _EnterExitCosts.YiMiao + _EnterExitCosts.Ticket + _EnterExitCosts.Service;
                             WordAllPrice += AllPrice;
@@ -1208,7 +1212,7 @@ namespace OASystem.API.Controllers
                             UsersTop += firstName + "出访费用为¥" + AllPrice.ToString("#0.00") + "元、";
 
                             TeableBookmarkArr.Add("jp", airPrice.ToString("#0.00") + " 元"); //机票金额
-                            TeableBookmarkArr.Add("cs", _EnterExitCosts.CityTranffic.ToString("#0.00") + " 元"); //城市交通费用
+                            TeableBookmarkArr.Add("cs", $"{cityTranffic:#0.00} 元"); //城市交通费用
                             TeableBookmarkArr.Add("zs", dac1.Sum(x => Convert.ToDecimal(x.SubTotal)).ToString("#0.00") + " 元"); //住宿费
                             string zsinfo = string.Empty;
                             string hsinfo = string.Empty;
@@ -1790,7 +1794,7 @@ namespace OASystem.API.Controllers
                .ToListAsync();
 
             decimal visaFee = costInfo?.Visa ?? 0.00M, //签证费
-                    IntercityFare = costInfo?.CityTranffic ?? 0.00M, //城市区间交通费
+                    //intercityFare = costInfo?.CityTranffic ?? 0.00M, //城市区间交通费
                     hotelFee = hotelCostInfos.Sum(x => x.Cost), //住宿费
                     hotelCNYEquivalent = hotelCostInfos.Sum(x => x.SubTotal), //住宿费CNY折算价
                     hotelRate = rateInfos.FirstOrDefault(x => x.CurrencyCode.Equals(hotelCostInfos.FirstOrDefault().Name))?.Rate ?? 0.00M; //住宿费汇率
@@ -1798,7 +1802,9 @@ namespace OASystem.API.Controllers
 
             var costInfosNew = new List<GroupAccFee‌ExcelView>() {
                 new (){ CostName = "酒店",CostAmt = hotelFee,CostCurrency = hotelCurrency, CostRate = hotelRate, CNYEquivalent = hotelCNYEquivalent},
-                new (){ CostName = "市区间交通",CostAmt = IntercityFare,CostCurrency = "人民币" },
+                new (){ CostName = "市区间交通-经济舱",CostAmt = costInfo?.CityTranffic ?? 0.00M,CostCurrency = "人民币" },
+                new (){ CostName = "市区间交通-公务舱",CostAmt = costInfo?.CityTranffic1 ?? 0.00M,CostCurrency = "人民币" },
+                new (){ CostName = "市区间交通-头等舱",CostAmt = costInfo?.CityTranffic2 ?? 0.00M,CostCurrency = "人民币" },
                 new (){ CostName = "签证",CostAmt = visaFee,CostCurrency = "人民币" },
             };
 

+ 100 - 35
OASystem/OASystem.Api/Controllers/GroupsController.cs

@@ -9051,46 +9051,55 @@ FROM
                             dic.Add("Row1Str", row1);
                         }
 
-                        string airTotalStr = string.Empty,
-                               airPriceStr = string.Empty;
+                        var airTotalStr = new StringBuilder();
+                        var airPriceStr = new StringBuilder();
                         //经济舱
                         if (_EnterExitCosts.SumJJC == 1)
                         {
-                            airTotalStr += $"{_EnterExitCosts.OutsideJJPay:#0.00}元/人(经济舱)";
-                            airPriceStr += $"{_EnterExitCosts.AirJJ:#0.00}元/人(经济舱)";
+                            airTotalStr.Append($"{_EnterExitCosts.OutsideJJPay:#0.00}元/人(经济舱)");
+                            airPriceStr.Append($"{_EnterExitCosts.AirJJ:#0.00}元/人(经济舱)");
                         }
                         //公务舱
                         if (_EnterExitCosts.SumGWC == 1)
                         {
-                            airTotalStr += $" {_EnterExitCosts.OutsideGWPay:#0.00} 元/人(公务舱)";
-                            airPriceStr += $" {_EnterExitCosts.AirGW:#0.00} 元/人(公务舱)";
+                            airTotalStr.Append($"{_EnterExitCosts.OutsideGWPay:#0.00} 元/人(公务舱)");
+                            airPriceStr.Append($"{_EnterExitCosts.AirGW:#0.00} 元/人(公务舱)");
                         }
                         //头等舱
                         if (_EnterExitCosts.SumTDC == 1)
                         {
-                            airTotalStr += $" {_EnterExitCosts.OutsideTDPay:#0.00} 元/人(头等舱)";
-                            airPriceStr += $" {_EnterExitCosts.AirTD:#0.00} 元/人(头等舱)";
+                            airTotalStr.Append($"{_EnterExitCosts.OutsideTDPay:#0.00} 元/人(头等舱)");
+                            airPriceStr.Append($"{_EnterExitCosts.AirTD:#0.00} 元/人(头等舱)");
                         }
 
+                        //描述
+                        var remarkLable = new StringBuilder();
+                        //第二项描述
+                        remarkLable.Append("备注:");
+                        if (!string.IsNullOrEmpty(_EnterExitCosts.TwoItemRemark)) remarkLable.Append( _EnterExitCosts.TwoItemRemark);
+
                         //汇率描述
-                        string rateStr = "";
                         if (peiceItemCurrencyInfos.Any())
                         {
-                            rateStr = "\r\n汇率描述:";
+                            remarkLable.AppendLine();
+                            remarkLable.Append("汇率描述:");
                             foreach (var item in peiceItemCurrencyInfos)
                             {
-                                rateStr += $"{item.CurrencyName}({item.CurrencyCode}):{item.Rate:#0.0000}  ";
+                                remarkLable.Append($"{item.CurrencyName}({item.CurrencyCode}):{item.Rate:#0.0000}  ");
                             }
                         }
 
-                        string twoItemRemark = "备注:";
-                        if (!string.IsNullOrEmpty(_EnterExitCosts.TwoItemRemark)) twoItemRemark += _EnterExitCosts.TwoItemRemark;
-                        if (!string.IsNullOrEmpty(rateStr)) twoItemRemark += rateStr;
+                        //城市交通费 处理
+                        var cityTrafficLabel = new StringBuilder()
+                            .AppendFormat("  经济舱:{0:#0.00} 元/人", _EnterExitCosts.CityTranffic)
+                            .AppendFormat("  公务舱:{0:#0.00} 元/人", _EnterExitCosts.CityTranffic1)
+                            .AppendFormat("  头等舱:{0:#0.00} 元/人", _EnterExitCosts.CityTranffic2)
+                            .ToString();
 
-                        dic.Add("AirTotalStr", airTotalStr);
-                        dic.Add("AirPriceStr", airPriceStr);
-                        dic.Add("CityTranffic", _EnterExitCosts.CityTranffic.ToString("#0.00"));
-                        dic.Add("TwoItemRemark", twoItemRemark);
+                        dic.Add("AirTotalStr", airTotalStr.ToString());
+                        dic.Add("AirPriceStr", airPriceStr.ToString());
+                        dic.Add("CityTranffic", cityTrafficLabel);
+                        dic.Add("TwoItemRemark", remarkLable.ToString());
 
                         NodeCollection allTables = doc.GetChildNodes(NodeType.Table, true);
                         Aspose.Words.Tables.Table table1 = allTables[0] as Aspose.Words.Tables.Table;
@@ -9591,7 +9600,13 @@ FROM
                             table1.Rows.RemoveAt(i - 1);
                         }
 
-                        dic.Add("CityTranffic", _EnterExitCosts.CityTranffic.ToString("#0.00"));
+                        var cityTrafficLabel = new StringBuilder()
+                            .AppendFormat("  经济舱:{0:#0.00} 元", _EnterExitCosts.CityTranffic)
+                            .AppendFormat("  公务舱:{0:#0.00} 元", _EnterExitCosts.CityTranffic1)
+                            .AppendFormat("  头等舱:{0:#0.00} ", _EnterExitCosts.CityTranffic2)
+                            .ToString();
+
+                        dic.Add("CityTranffic", cityTrafficLabel);
 
                         string otherFeeStr = "";
                         if (_EnterExitCosts.Visa > 0) otherFeeStr += $"签证费:{_EnterExitCosts.Visa:#0.00} 元,";
@@ -9607,7 +9622,6 @@ FROM
 
                         #endregion
 
-
                         if (otherFeeStr.Length > 0)
                         {
                             otherFeeStr = otherFeeStr.Substring(0, otherFeeStr.Length - 1);
@@ -9823,8 +9837,17 @@ FROM
 
                         designer.SetDataSource("dac1totalPrice", dac1totalPrice.ToString("#0.00"));
                         designer.SetDataSource("dac2totalPrice", dac2totalPrice);
-                        designer.SetDataSource("cityTranffic", @$"其中:国外城市间机票费: {_EnterExitCosts.CityTranffic:#0.00} 元");
-                        designer.SetDataSource("sumCityTranffic", @$"{_EnterExitCosts.CityTranffic:#0.00} ");
+
+                        var cityTrafficLabel = new StringBuilder()
+                            .AppendFormat("  其中:国外城市间")
+                            .AppendFormat("  经济舱费:{0:#0.00} 元、", _EnterExitCosts.CityTranffic)
+                            .AppendFormat("  公务舱费:{0:#0.00} 元、", _EnterExitCosts.CityTranffic1)
+                            .AppendFormat("  头等舱费:{0:#0.00} 元", _EnterExitCosts.CityTranffic2)
+                            .ToString();
+
+                        //decimal cityTraffic =_EnterExitCosts.CityTranffic + _EnterExitCosts.CityTranffic1 + _EnterExitCosts.CityTranffic2;
+                        designer.SetDataSource("cityTranffic", cityTrafficLabel);
+                       // designer.SetDataSource("sumCityTranffic", @$"{cityTraffic:#0.00} ");
 
                         string cell4Str1 = string.Empty;
                         if (_EnterExitCosts.SumJJC == 1) cell4Str1 += $"经济舱:{_EnterExitCosts.AirJJ:#0.00} 元/人;";
@@ -10038,14 +10061,20 @@ FROM
 
                         decimal hotelFeeTotal = dac1.Sum(it => it.SubTotal);//住宿费
                         dic.Add("HotelFeeTotal", hotelFeeTotal.ToString("#0.00"));
+
                         decimal mealsFeeTotal = dac2.Sum(it => it.SubTotal);//伙食费
                         dic.Add("MealsFeeTotal", mealsFeeTotal.ToString("#0.00"));
+
                         decimal miscellaneousFeeTotal = dac3.Sum(it => it.SubTotal);//公杂费
                         dic.Add("MiscellaneousFeeTotal", miscellaneousFeeTotal.ToString("#0.00"));
+
                         decimal trainingFeeTotal = dac4.Sum(it => it.SubTotal);//培训费
                         dic.Add("TrainingFeeTotal", trainingFeeTotal.ToString("#0.00"));
-                        decimal cityTranfficFeeToatal = _EnterExitCosts.CityTranffic; //城市区间交通费
-                        dic.Add("CityTranfficFeeToatal", cityTranfficFeeToatal.ToString("#0.00"));//
+
+                        //decimal cityTranfficFeeToatal = _EnterExitCosts.CityTranffic; //城市区间交通费
+                        decimal cityTranfficFeeToatal = 0.00M;
+                        //dic.Add("CityTranfficFeeToatal", cityTranfficFeeToatal.ToString("#0.00"));
+
                         //其他费用
                         decimal otherFeeTotal = _EnterExitCosts.Visa + _EnterExitCosts.Safe + _EnterExitCosts.Ticket + _EnterExitCosts.YiMiao + _EnterExitCosts.HeSuan + _EnterExitCosts.Service + dac5.Sum(x => x.SubTotal);
                         dic.Add("OtherFeeTotal", otherFeeTotal.ToString("#0.00"));
@@ -10053,8 +10082,8 @@ FROM
                         //其他费用合计
                         decimal _otherFeeTotal = hotelFeeTotal + mealsFeeTotal + miscellaneousFeeTotal + trainingFeeTotal + cityTranfficFeeToatal + otherFeeTotal;
 
-                        decimal _jjcFeeToatal = _EnterExitCosts.AirJJ + _otherFeeTotal; //经济舱
-                        decimal _gwcFeeToatal = _EnterExitCosts.AirGW + _otherFeeTotal; //公务舱
+                        decimal _jjcFeeToatal = _EnterExitCosts.OutsideJJPay + _otherFeeTotal; //经济舱
+                        decimal _gwcFeeToatal = _EnterExitCosts.OutsideGWPay + _otherFeeTotal; //公务舱
 
                         //公务舱合计
 
@@ -10064,18 +10093,18 @@ FROM
                         //string allPriceJJ = "";
                         if (_EnterExitCosts.SumJJC == 1 && _EnterExitCosts.SumGWC == 0)
                         {
-                            dic.Add("AirFeeTotal", _EnterExitCosts.AirJJ.ToString("#0.00"));
+                            dic.Add("AirFeeTotal", _EnterExitCosts.OutsideJJPay.ToString("#0.00"));
                             dic.Add("FeeTotal", _jjcFeeToatal.ToString("#0.00"));
                         }
                         if (_EnterExitCosts.SumGWC == 1 && _EnterExitCosts.SumJJC == 0)
                         {
-                            dic.Add("AirFeeTotal", _EnterExitCosts.AirGW.ToString("#0.00"));
+                            dic.Add("AirFeeTotal", _EnterExitCosts.OutsideGWPay.ToString("#0.00"));
                             dic.Add("FeeTotal", _gwcFeeToatal.ToString("#0.00"));
                         }
 
                         if (_EnterExitCosts.SumJJC == 1 && _EnterExitCosts.SumGWC == 1)
                         {
-                            string airFeeTotalStr = string.Format(@$"经济舱:{_EnterExitCosts.AirJJ:#0.00} 公务舱:{_EnterExitCosts.AirGW:#0.00}");
+                            string airFeeTotalStr = string.Format(@$"经济舱:{_EnterExitCosts.OutsideJJPay:#0.00} 公务舱:{_EnterExitCosts.OutsideGWPay:#0.00}");
                             dic.Add("AirFeeTotal", airFeeTotalStr);
                             string feeTotalStr = string.Format(@$"经济舱:{_jjcFeeToatal:#0.00} 公务舱:{_gwcFeeToatal:#0.00}");
                             dic.Add("FeeTotal", feeTotalStr);
@@ -10317,7 +10346,13 @@ FROM
                         //    }
                         //}
 
-                        dic.Add("CityTranffic", _EnterExitCosts.CityTranffic.ToString("#0.00"));
+                        var citytrafficLable = new StringBuilder()
+                            .AppendFormat($"经济舱费用:{_EnterExitCosts.CityTranffic:#0.00} 元、")
+                            .AppendFormat($"公务舱费用:{_EnterExitCosts.CityTranffic1:#0.00}元、")
+                            .AppendFormat($"头等舱费用:{_EnterExitCosts.CityTranffic2:#0.00}")
+                            .ToString();
+
+                        dic.Add("CityTranffic", citytrafficLable);
 
                         string otherFeeStr = "";
                         if (_EnterExitCosts.Visa > 0) otherFeeStr += $"签证费:{_EnterExitCosts.Visa:#0.00}元,";
@@ -12795,6 +12830,8 @@ FROM
                     AirGW = eecInfo.AirGW,
                     AirTD = eecInfo.AirTD,
                     CityTranffic = eecInfo.CityTranffic,
+                    CityTranffic1 = eecInfo.CityTranffic1,
+                    CityTranffic2 = eecInfo.CityTranffic2,
                     TwoItemRemark = eecInfo.TwoItemRemark
                 };
                 return Ok(JsonView(twoData));
@@ -13408,6 +13445,8 @@ FROM
             info.AirGW = dto.AirGW;
             info.AirTD = dto.AirTD;
             info.CityTranffic = dto.CityTranffic;
+            info.CityTranffic1 = dto.CityTranffic1;
+            info.CityTranffic2 = dto.CityTranffic2;
             info.TwoItemRemark = dto.TwoItemRemark;
             info.SumJJC = dto.ChoiceTwoJJ;
             info.SumGWC = dto.ChoiceTwoGW;
@@ -13445,6 +13484,8 @@ FROM
                         x.AirGW,
                         x.AirTD,
                         x.CityTranffic,
+                        x.CityTranffic1,
+                        x.CityTranffic2,
                         x.TwoItemRemark,
                         x.LastUpdateTime,
                         x.LastUpdateUserId
@@ -13455,8 +13496,8 @@ FROM
             }
 
             jjcItemTotal = info.AirJJ + info.CityTranffic;
-            gwcItemTotal = info.AirGW + info.CityTranffic;
-            tdcItemTotal = info.AirTD + info.CityTranffic;
+            gwcItemTotal = info.AirGW + info.CityTranffic1;
+            tdcItemTotal = info.AirTD + info.CityTranffic2;
 
             //消息通知
             //await EnterExitCostMobileOpNotice(dto.DiId, id, dto.CurrUserId);
@@ -15324,7 +15365,6 @@ FROM
                 eecRates.Insert(0, new CurrencyInfo() { CurrencyCode = "CNY", CurrencyName = "人民币", Rate = 1.00000M });
             }
 
-
             //处理团组人数
             int pplNum = 1;
             if (groupInfo != null) pplNum = groupInfo.VisitPNumber;
@@ -15389,7 +15429,7 @@ FROM
             {
                 ItemId = 1354,
                 Index = intTravelIndex,
-                FeeName = "城市间交通费用",
+                FeeName = "城市间交通费用(经济舱)",
                 UnitPrice = infoView.CityTranffic,
                 Currency = "CNY",
                 Quantity = 1,
@@ -15398,6 +15438,32 @@ FROM
                 Remark = "",
             });
 
+            intTravelCosts.Add(new QuoteSubItemInfo
+            {
+                ItemId = 1354,
+                Index = intTravelIndex,
+                FeeName = "城市间交通费用(公务舱)",
+                UnitPrice = infoView.CityTranffic1,
+                Currency = "CNY",
+                Quantity = 1,
+                PplNum = pplNum,
+                TotalAmt = infoView.CityTranffic1 * pplNum,
+                Remark = "",
+            });
+
+            intTravelCosts.Add(new QuoteSubItemInfo
+            {
+                ItemId = 1354,
+                Index = intTravelIndex,
+                FeeName = "城市间交通费用(头等舱)",
+                UnitPrice = infoView.CityTranffic2,
+                Currency = "CNY",
+                Quantity = 1,
+                PplNum = pplNum,
+                TotalAmt = infoView.CityTranffic2 * pplNum,
+                Remark = "",
+            });
+
             views.AddRange(intTravelCosts);
             #endregion
 
@@ -15635,7 +15701,6 @@ FROM
                 }
             }
 
-
             return Ok(JsonView(result));
         }
 

+ 22 - 14
OASystem/OASystem.Api/OAMethodLib/GeneralMethod.cs

@@ -4565,7 +4565,7 @@ namespace OASystem.API.OAMethodLib
                         if (enterExitCosts.Visa > 0)
                         {
                             //insidePayTotal += enterExitCosts.Visa;
-                            row1_1 = $"签证费: {enterExitCosts.Visa.ToString("#0.00")} 人民币/人";
+                            row1_1 = $"签证费: {enterExitCosts.Visa:#0.00} 人民币/人";
                             //if (!string.IsNullOrEmpty(enterExitCosts.VisaRemark))
                             //{
                             //    row1_1 += $"\t签证费用描述: {enterExitCosts.VisaRemark}";
@@ -4576,29 +4576,29 @@ namespace OASystem.API.OAMethodLib
                         if (enterExitCosts.YiMiao > 0)
                         {
                             //insidePayTotal += enterExitCosts.YiMiao;
-                            row1_2 += $"疫苗费:{enterExitCosts.YiMiao.ToString("#0.00")} 人民币/人";
+                            row1_2 += $"疫苗费:{enterExitCosts.YiMiao:#0.00} 人民币/人";
                         }
                         if (enterExitCosts.HeSuan > 0)
                         {
                             //insidePayTotal += enterExitCosts.HeSuan;
-                            row1_2 += $"核酸检测费:{enterExitCosts.HeSuan.ToString("#0.00")} 人民币/人";
+                            row1_2 += $"核酸检测费:{enterExitCosts.HeSuan:#0.00} 人民币/人";
                         }
                         if (enterExitCosts.Service > 0)
                         {
                             //insidePayTotal += enterExitCosts.Service;
-                            row1_2 += $"服务费:{enterExitCosts.Service.ToString("#0.00")} 人民币/人";
+                            row1_2 += $"服务费:{enterExitCosts.Service:#0.00} 人民币/人";
                         }
 
                         string row1_3 = "";
                         if (enterExitCosts.Safe > 0)
                         {
                             //insidePayTotal += enterExitCosts.Safe;
-                            row1_3 += $"保险费:{enterExitCosts.Safe.ToString("#0.00")} 人民币/人";
+                            row1_3 += $"保险费:{enterExitCosts.Safe:#0.00} 人民币/人";
                         }
                         if (enterExitCosts.Ticket > 0)
                         {
                             //insidePayTotal += enterExitCosts.Ticket;
-                            row1_3 += $"参展门票:{enterExitCosts.Ticket.ToString("#0.00")} 人民币/人";
+                            row1_3 += $"参展门票:{enterExitCosts.Ticket:#0.00} 人民币/人";
                         }
                         string row1 = "";
                         if (!string.IsNullOrEmpty(row1_1)) row1 += $"{row1_1}\r\n";
@@ -4612,7 +4612,14 @@ namespace OASystem.API.OAMethodLib
                         dic.Add("OutsaideGW", enterExitCosts.OutsideGWPay.ToString("#0.00"));
                         dic.Add("AirJJ", enterExitCosts.AirJJ.ToString("#0.00"));
                         dic.Add("AirGW", enterExitCosts.AirGW.ToString("#0.00"));
-                        dic.Add("CityTranffic", enterExitCosts.CityTranffic.ToString("#0.00"));
+
+                        var cityTrafficLable = new StringBuilder()
+                            .AppendFormat($"经济舱费用:{enterExitCosts.CityTranffic:#0.00} 元/人、")
+                            .AppendFormat($"公务舱费用:{enterExitCosts.CityTranffic1:#0.00} 元/人、")
+                            .AppendFormat($"头等舱费用:{enterExitCosts.CityTranffic2:#0.00}")
+                            .ToString();
+
+                        dic.Add("CityTranffic", cityTrafficLable);
                         dic.Add("SubZS", stayFeeTotal.ToString("#0.00"));
                         dic.Add("SubHS", mealsFeeTotal.ToString("#0.00"));
 
@@ -4957,7 +4964,7 @@ namespace OASystem.API.OAMethodLib
                         }
 
 
-                        dic.Add("CityTranffic", enterExitCosts.CityTranffic.ToString("#0.00"));
+                        //dic.Add("CityTranffic", enterExitCosts.CityTranffic.ToString("#0.00"));
 
                         string otherFeeStr = "";
                         if (enterExitCosts.Visa > 0) otherFeeStr += $"签证费: {enterExitCosts.Visa.ToString("#0.00")} 元,";
@@ -5178,8 +5185,8 @@ namespace OASystem.API.OAMethodLib
 
                         designer.SetDataSource("dac1totalPrice", dac1totalPrice.ToString("#0.00"));
                         designer.SetDataSource("dac2totalPrice", dac2totalPrice);
-                        designer.SetDataSource("cityTranffic", @$"其中:国外城市间机票费: {enterExitCosts.CityTranffic.ToString("#0.00")} 元");
-                        designer.SetDataSource("sumCityTranffic", @$"{enterExitCosts.CityTranffic.ToString("#0.00")} ");
+                        //designer.SetDataSource("cityTranffic", @$"其中:国外城市间机票费: {enterExitCosts.CityTranffic.ToString("#0.00")} 元");
+                        //designer.SetDataSource("sumCityTranffic", @$"{enterExitCosts.CityTranffic.ToString("#0.00")} ");
 
 
                         string cell4Str = $"  4.国际旅费:经济舱:{enterExitCosts.AirJJ.ToString("#0.00")} 元/人,公务舱:{enterExitCosts.AirGW.ToString("#0.00")} 元/人";
@@ -5390,9 +5397,10 @@ namespace OASystem.API.OAMethodLib
                         dic.Add("MiscellaneousFeeTotal", miscellaneousFeeTotal.ToString("#0.00"));
                         decimal trainingFeeTotal = dac4.Sum(it => it.SubTotal);//培训费
                         dic.Add("TrainingFeeTotal", trainingFeeTotal.ToString("#0.00"));
-                        decimal cityTranfficFeeToatal = enterExitCosts.CityTranffic; //城市区间交通费
-                        dic.Add("CityTranfficFeeToatal", cityTranfficFeeToatal.ToString("#0.00"));//
-                                                                                                  //其他费用
+                        decimal cityTranfficFeeToatal = 0.00M;
+                        //decimal cityTranfficFeeToatal = enterExitCosts.CityTranffic; //城市区间交通费
+                        //dic.Add("CityTranfficFeeToatal", cityTranfficFeeToatal.ToString("#0.00"));//
+                        //其他费用
                         decimal otherFeeTotal = enterExitCosts.Visa + enterExitCosts.Safe + enterExitCosts.Ticket + enterExitCosts.YiMiao + enterExitCosts.HeSuan + enterExitCosts.Service;
                         dic.Add("OtherFeeTotal", otherFeeTotal.ToString("#0.00"));
 
@@ -5668,7 +5676,7 @@ namespace OASystem.API.OAMethodLib
                             //}
                         }
 
-                        dic.Add("CityTranffic", enterExitCosts.CityTranffic.ToString("#0.00"));
+                        //dic.Add("CityTranffic", enterExitCosts.CityTranffic.ToString("#0.00"));
 
                         string otherFeeStr = "";
                         if (enterExitCosts.Visa > 0) otherFeeStr += $"签证费: {enterExitCosts.Visa.ToString("#0.00")} 元,";

+ 23 - 3
OASystem/OASystem.Domain/Dtos/Groups/EnterExitCostDto.cs

@@ -188,10 +188,20 @@ namespace OASystem.Domain.Dtos.Groups
         public decimal AirTD { get; set; }
 
         /// <summary>
-        ///  国外城市间交通费
+        ///  国外城市间交通费 - 经济舱
         /// </summary>
         public decimal CityTranffic { get; set; }
 
+        /// <summary>
+        ///  国外城市间交通费 - 公务舱 
+        /// </summary>
+        public decimal CityTranffic1 { get; set; }
+
+        /// <summary>
+        ///  国外城市间交通费 - 头等舱
+        /// </summary>
+        public decimal CityTranffic2 { get; set; }
+
         /// <summary>
         ///  多个币种存储
         ///  存储方式: 美元(USD):6.2350|.......|墨西哥比索(MXN):1.0000
@@ -709,7 +719,6 @@ namespace OASystem.Domain.Dtos.Groups
         /// 复选框选中(头等舱)
         /// 0 未选中 1 选中
         /// </summary>
-
         public int ChoiceTwoTD { get; set; }
 
         /// <summary>
@@ -733,9 +742,20 @@ namespace OASystem.Domain.Dtos.Groups
         public decimal AirTD { get; set; }
 
         /// <summary>
-        ///  国外城市间交通费
+        ///  国外城市间交通费 - 经济舱
         /// </summary>
         public decimal CityTranffic { get; set; }
+
+        /// <summary>
+        ///  国外城市间交通费 - 公务舱
+        /// </summary>
+        public decimal CityTranffic1 { get; set; }
+
+        /// <summary>
+        ///  国外城市间交通费 - 头等舱 
+        /// </summary>
+        public decimal CityTranffic2 { get; set; }
+
         public string TwoItemRemark { get; set; }
     }
 

+ 13 - 2
OASystem/OASystem.Domain/Entities/Groups/Grp_EnterExitCost.cs

@@ -93,7 +93,6 @@
         [SugarColumn(IsNullable = true, ColumnDataType = "decimal(10,2)")]
         public decimal OutsideTDPay { get; set; }
 
-
         #region 国际旅费合计(经济舱\公务舱\头等舱)
 
         /// <summary>
@@ -115,11 +114,23 @@
         public decimal AirTD { get; set; }
 
         /// <summary>
-        ///  国外城市间交通费
+        ///  国外城市间交通费 - 经济舱
         /// </summary>
         [SugarColumn(IsNullable = true, ColumnDataType = "decimal(10,2)")]
         public decimal CityTranffic { get; set; }
 
+        /// <summary>
+        ///  国外城市间交通费 - 公务舱
+        /// </summary>
+        [SugarColumn(IsNullable = true, ColumnDataType = "decimal(10,2)")]
+        public decimal CityTranffic1 { get; set; }
+
+        /// <summary>
+        ///  国外城市间交通费 - 头等舱
+        /// </summary>
+        [SugarColumn(IsNullable = true, ColumnDataType = "decimal(10,2)")]
+        public decimal CityTranffic2 { get; set; }
+
         /// <summary>
         ///  第二项费用描述
         /// </summary>

+ 22 - 2
OASystem/OASystem.Domain/ViewModels/Groups/EnterExitCostView.cs

@@ -338,10 +338,20 @@ namespace OASystem.Domain.ViewModels.Groups
         public decimal AirTD { get; set; }
 
         /// <summary>
-        ///  国外城市间交通费
+        ///  国外城市间交通费 - 经济舱
         /// </summary>
         public decimal CityTranffic { get; set; }
 
+        /// <summary>
+        ///  国外城市间交通费 - 公务舱
+        /// </summary>
+        public decimal CityTranffic1 { get; set; }
+
+        /// <summary>
+        ///  国外城市间交通费 - 头等舱
+        /// </summary>
+        public decimal CityTranffic2 { get; set; }
+
         /// <summary>
         /// 第二项备注
         /// </summary>
@@ -718,10 +728,20 @@ namespace OASystem.Domain.ViewModels.Groups
         public decimal AirTD { get; set; }
 
         /// <summary>
-        ///  国外城市间交通费
+        ///  国外城市间交通费 - 经济舱
         /// </summary>
         public decimal CityTranffic { get; set; }
 
+        /// <summary>
+        ///  国外城市间交通费 - 公务舱
+        /// </summary>
+        public decimal CityTranffic1 { get; set; }
+
+        /// <summary>
+        ///  国外城市间交通费 - 头等舱
+        /// </summary>
+        public decimal CityTranffic2 { get; set; }
+
         public string TwoItemRemark { get; set; }
     }
 

+ 3 - 2
OASystem/OASystem.Infrastructure/Repositories/Groups/EnterExitCostRepository.cs

@@ -356,7 +356,6 @@ namespace OASystem.Infrastructure.Repositories.Groups
 
                     //if (dto.DiId == 2775) enterExitCostInfoView.ProvinceId = 122;
 
-
                     //enterExitCostInfoView.FirstItemRemark = enterExitCostData.Remark;
                     var dayAndCostSql = string.Format(@"Select ntf.Country,ntf.City,ssd.Name CurremcyCode,ssd.Remark CurrencyName,gdac.* From Grp_DayAndCost gdac
                                                         Left Join Grp_NationalTravelFee ntf On ntf.Id = gdac.NationalTravelFeeId
@@ -457,7 +456,9 @@ namespace OASystem.Infrastructure.Repositories.Groups
                         AirJJ = enterExitCostData.AirJJ,
                         AirGW = enterExitCostData.AirGW,
                         AirTD = enterExitCostData.AirTD,
-                        CityTranffic = enterExitCostData.CityTranffic
+                        CityTranffic = enterExitCostData.CityTranffic,
+                        CityTranffic1 = enterExitCostData.CityTranffic1,
+                        CityTranffic2 = enterExitCostData.CityTranffic2
                     };
                     mobileInfo.ChoiceThreeDetails = dayAndCostData.Where(it => it.Type == 1).OrderBy(it => it.Days).ToArray(); //住宿费 1
                     mobileInfo.ChoiceFourDetails = dayAndCostData.Where(it => it.Type == 2).OrderBy(it => it.Days).ToArray();  //伙食费 2