Bladeren bron

优化费用计算逻辑并新增出入境费用报价类

在 `GroupsController.cs` 文件中:
- 注释掉多余的代码行。
- 添加删除多余行的逻辑。
- 修改费用总计逻辑,增加 `TotalLabel` 字段。

在 `GroupStatementView.cs` 文件中:
- 添加 `GroupReimburseFeeViews` 和 `GroupReimburseFeeStr` 属性的注释。

在 `Grp_EnterExitCostQuote.cs` 文件中:
- 新增 `Grp_EnterExitCostQuote` 类,包含多个属性并使用 `SugarColumn` 特性。
LEIYI 2 maanden geleden
bovenliggende
commit
fced4ccbb3

+ 22 - 9
OASystem/OASystem.Api/Controllers/GroupsController.cs

@@ -8154,7 +8154,7 @@ FROM
 
                             #endregion
                         }
-                        else dic.Add("SubPX", $"六、培训费合计:  0    元/人");
+                        //else dic.Add("SubPX", $"六、培训费合计:  0    元/人");
                         //删除多余行
                         while (table4.Rows.Count > table4Row)
                         {
@@ -8204,7 +8204,8 @@ FROM
 
                             #endregion
                         }
-                        else dic.Add("SubQT", "七、其他费用合计:  0    元/人");
+                        //else dic.Add("SubQT", "七、其他费用合计:  0    元/人");
+                        
                         //删除多余行
                         while (table5.Rows.Count > table5Row)
                         {
@@ -8218,16 +8219,28 @@ FROM
                                 subGWC = 0.00M,
                                 subTDC = 0.00M;
 
+                        //全部费用总计: 元 / 人(经济舱)  元 / 人(公务舱)  元 / 人(头等舱)
+                        string totalLabel = string.Format("全部费用总计:");
                         //经济舱
-                        if (_EnterExitCosts.SumJJC == 1) subJJC = otherFeeTotal + _EnterExitCosts.OutsideJJPay;
+                        if (_EnterExitCosts.SumJJC == 1)
+                        {
+                            subJJC = otherFeeTotal + _EnterExitCosts.OutsideJJPay;
+                            totalLabel += $"{subJJC.ToString("#0.00")} 元/人(经济舱)";
+                        }
                         //公务舱
-                        if (_EnterExitCosts.SumGWC == 1) subGWC = otherFeeTotal + _EnterExitCosts.OutsideGWPay;
+                        if (_EnterExitCosts.SumGWC == 1)
+                        {
+                            subGWC = otherFeeTotal + _EnterExitCosts.OutsideGWPay;
+                            totalLabel += $"{subGWC.ToString("#0.00")} 元/人(公务舱)";
+                        }
                         //头等舱
-                        if (_EnterExitCosts.SumTDC == 1) subTDC = otherFeeTotal + _EnterExitCosts.OutsideTDPay;
-
-                        dic.Add("SubJJC", subJJC.ToString("#0.00"));
-                        dic.Add("SubGWC", subGWC.ToString("#0.00"));
-                        dic.Add("SubTDC", subTDC.ToString("#0.00"));
+                        if (_EnterExitCosts.SumTDC == 1)
+                        {
+                            subTDC = otherFeeTotal + _EnterExitCosts.OutsideTDPay;
+                            totalLabel += $"{subTDC.ToString("#0.00")} 元/人(头等舱)";
+                        }
+                        //TotalLabel
+                        dic.Add("TotalLabel", totalLabel);
 
                         #region 填充word模板书签内容
                         foreach (var key in dic.Keys)

+ 63 - 0
OASystem/OASystem.Domain/Entities/Groups/Grp_EnterExitCostQuote.cs

@@ -0,0 +1,63 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace OASystem.Domain.Entities.Groups
+{
+    /// <summary>
+    /// 团组 - 出入境费用报价
+    /// </summary>
+    [SugarTable("Grp_EnterExitCost", "团组 - 出入境费用报价")]
+    public class Grp_EnterExitCostQuote: EntityBase
+    {
+        /// <summary>
+        /// 团组Id
+        /// </summary>
+        [SugarColumn(ColumnName = "GroupId",ColumnDescription = "团组Id", IsNullable = true, ColumnDataType = "int")]
+        public int GroupId { get; set; }
+
+        /// <summary>
+        /// 项ID
+        /// </summary>
+        [SugarColumn(ColumnName = "ItemId", ColumnDescription = "项ID(1,2,3...)", IsNullable = true, ColumnDataType = "int")]
+        public int ItemId { get; set; }
+
+        /// <summary>
+        /// 费用名称
+        /// </summary>
+        [SugarColumn(ColumnName = "FeeName", ColumnDescription = "费用名称", IsNullable = true, ColumnDataType = "varchar(120)")]
+        public string FeeName { get; set; }
+
+        /// <summary>
+        /// 单价
+        /// </summary>
+        [SugarColumn(ColumnName = "UnitPrice", ColumnDescription = "单价", IsNullable = true, ColumnDataType = "deciaml(10,2)")]
+        public decimal UnitPrice { get; set; }
+
+        /// <summary>
+        /// 数量/天数/间/晚/次
+        /// </summary>
+        [SugarColumn(ColumnName = "Quantity", ColumnDescription = "数量/天数/间/晚/次", IsNullable = true, ColumnDataType = "deciaml(10,2)")]
+        public decimal Quantity { get; set; }
+
+        /// <summary>
+        /// 人数
+        /// </summary>
+        [SugarColumn(ColumnName = "PplNum", ColumnDescription = "人数", IsNullable = true, ColumnDataType = "int")]
+        public int PplNum { get; set; }
+
+        /// <summary>
+        /// 币种
+        /// </summary>
+        [SugarColumn(ColumnName = "Currency", ColumnDescription = "币种", IsNullable = true, ColumnDataType = "int")]
+        public int Currency { get; set; }
+
+        /// <summary>
+        /// 合计(CNY)
+        /// </summary>
+        [SugarColumn(ColumnName = "TotalAmt", ColumnDescription = "合计(CNY)", IsNullable = true, ColumnDataType = "deciaml(10,2)")]
+        public decimal TotalAmt { get; set; }
+    }
+}

+ 6 - 1
OASystem/OASystem.Domain/ViewModels/Statistics/GroupStatementView.cs

@@ -618,8 +618,13 @@ namespace OASystem.Domain.ViewModels.Statistics
         public List<GroupRoyaltyFeeView> GroupRoyaltyFeeViews { get; set; }
         public string? GroupRoyaltyFeeStr { get; set; }
 
-
+        /// <summary>
+        /// 公司人员报销费用集合
+        /// </summary>
         public List<GroupReimburseFeeInfoView> GroupReimburseFeeViews { get; set; }
+        /// <summary>
+        /// 公司人员报销费用描述
+        /// </summary>
         public string? GroupReimburseFeeStr { get; set; }
     }