Ver código fonte

三公费用 --> 模板(因公出国(境)经费测算明细表、四川省商务厅出国经费财政先行审核表.、成都市因公临时出国任务和预算审批意见表、省级单位出(境)经费报销单)导出增加其他费用信息

LEIYI 3 meses atrás
pai
commit
9f6c1106b0

+ 46 - 17
OASystem/OASystem.Api/Controllers/GroupsController.cs

@@ -5359,12 +5359,12 @@ FROM
                 }
 
                 //数据源
-                List<Grp_DayAndCost> dac1 = _DayAndCosts.Where(it => it.Type == 1).ToList(); //住宿费
-                List<Grp_DayAndCost> dac2 = _DayAndCosts.Where(it => it.Type == 2).ToList(); //伙食费
-                List<Grp_DayAndCost> dac3 = _DayAndCosts.Where(it => it.Type == 3).ToList(); //公杂费
-                List<Grp_DayAndCost> dac4 = _DayAndCosts.Where(it => it.Type == 4).ToList(); //培训费
+                var dac1 = _DayAndCosts.Where(it => it.Type == 1).ToList(); //住宿费
+                var dac2 = _DayAndCosts.Where(it => it.Type == 2).ToList(); //伙食费
+                var dac3 = _DayAndCosts.Where(it => it.Type == 3).ToList(); //公杂费
+                var dac4 = _DayAndCosts.Where(it => it.Type == 4).ToList(); //培训费
                 var dac5 = _sqlSugar.Queryable<Grp_DayOtherPrice>()
-                            .LeftJoin<Sys_SetData>((x,a)=> a.IsDel == 0 && a.Id == x.SetDataId)
+                            .LeftJoin<Sys_SetData>((x, a) => a.IsDel == 0 && a.Id == x.SetDataId)
                             .LeftJoin<Sys_SetData>((x, a, b) => a.IsDel == 0 && a.Id == x.Currency)
                             .Where((x, a, b) => x.IsDel == 0 && x.Diid == dto.DiId)
                             .Select((x, a, b) => new
@@ -5373,10 +5373,10 @@ FROM
                                 itemName = a.Name,
                                 CurrencyStr = b.Name,
                                 x.Cost,
-                                x.SubTotal, 
+                                x.SubTotal,
                             })
                             .OrderBy((x) => x.Index)
-                            .ToList();
+                            .ToList();                                       //其他款项费用
 
                 var _CurrDatas = _sqlSugar.Queryable<Sys_SetData>().Where(it => it.IsDel == 0 && it.STid == 66).ToList();
                 var _DelegationInfo = _sqlSugar.Queryable<Grp_DelegationInfo>().Where(it => it.IsDel == 0 && it.Id == dto.DiId).First();
@@ -5398,7 +5398,6 @@ FROM
                 var placeData = _sqlSugar.Queryable<Grp_NationalTravelFee>().Where(it => it.IsDel == 0).ToList();
                 var rateDatas = await _EnterExitCosts.CurrencyRemark.SplitExchangeRate();
 
-
                 _DelegationInfo.VisitCountry = _DelegationInfo.VisitCountry.Replace("|", "、");
 
                 if (dto.ExportType == 1) //明细表
@@ -5475,7 +5474,6 @@ FROM
                             dic.Add("Row1Str", row1);
                         }
 
-
                         string airTotalStr = string.Empty,
                                airPriceStr = string.Empty;
                         //经济舱
@@ -5966,6 +5964,16 @@ FROM
                         if (_EnterExitCosts.Safe > 0) otherFeeStr += $"保险费: {_EnterExitCosts.Safe.ToString("#0.00")} 元,";
                         if (_EnterExitCosts.Ticket > 0) otherFeeStr += $"参展门票费: {_EnterExitCosts.Ticket.ToString("#0.00")} 元,";
 
+                        #region 其他款项费用 增加位置:模板第6项其他费用字符串追加
+
+                        foreach (var otherInfo in dac5)
+                        {
+                            otherFeeStr += $"{otherInfo.itemName}:{otherInfo.SubTotal.ToString("#0.00")} 元,";
+                        }
+
+                        #endregion
+
+
                         if (otherFeeStr.Length > 0)
                         {
                             otherFeeStr = otherFeeStr.Substring(0, otherFeeStr.Length - 1);
@@ -6195,6 +6203,17 @@ FROM
                         if (_EnterExitCosts.Safe > 0) cellStr += $"保险费:{_EnterExitCosts.Safe.ToString("#0.00")}元,";
                         if (_EnterExitCosts.Ticket > 0) cellStr += $"参展门票费:{_EnterExitCosts.Ticket.ToString("#0.00")}元,";
                         if (_EnterExitCosts.Service > 0) cellStr += $"服务费:{_EnterExitCosts.Service.ToString("#0.00")}元,";
+
+                        #region 其他款项费用 增加位置:模板第5项其他费用字符串追加
+
+                        var otherPriceTotal = dac5.Sum(x => x.SubTotal);
+                        foreach (var otherInfo in dac5)
+                        {
+                            cellStr += $"{otherInfo.itemName}:{otherInfo.SubTotal.ToString("#0.00")} 元,";
+                        }
+
+                        #endregion
+
                         if (cellStr.Length > 8)
                         {
                             cellStr = cellStr.Substring(0, cellStr.Length - 1);
@@ -6202,7 +6221,7 @@ FROM
                         cellStr += ")";
 
 
-                        decimal otherFee = _EnterExitCosts.Visa + _EnterExitCosts.YiMiao + _EnterExitCosts.HeSuan + _EnterExitCosts.Safe + _EnterExitCosts.Ticket + _EnterExitCosts.Service;
+                        decimal otherFee = _EnterExitCosts.Visa + _EnterExitCosts.YiMiao + _EnterExitCosts.HeSuan + _EnterExitCosts.Safe + _EnterExitCosts.Ticket + _EnterExitCosts.Service + otherPriceTotal;
                         decimal s = dac1totalPrice + dac2totalPrice + _EnterExitCosts.OutsideJJPay + _EnterExitCosts.OutsideGWPay + otherFee;
 
                         decimal pxFee = dac4.Sum(it => it.Cost);
@@ -6218,7 +6237,7 @@ FROM
 
                         designer.SetDataSource("cell4Str", cell4Str);
                         designer.SetDataSource("cellStr", cellStr);
-                        designer.SetDataSource("cellSum", (_EnterExitCosts.Visa + _EnterExitCosts.Safe).ToString("#0.00"));
+                        designer.SetDataSource("cellSum", otherFee.ToString("#0.00"));
                         designer.SetDataSource("cellSum4", (_EnterExitCosts.OutsideJJPay + _EnterExitCosts.OutsideGWPay).ToString("#0.00"));
                         designer.SetDataSource("celllastStr", celllastStr);
 
@@ -6288,7 +6307,6 @@ FROM
                         dic.Add("MissionLeaderJob", missionLeaderJob); //团负责人job
                         dic.Add("GroupNumber", _DelegationInfo.VisitPNumber.ToString()); //团人数
 
-
                         #region MyRegion
                         //if (blackCode != null && !string.IsNullOrWhiteSpace(blackCode.BlackCode))
                         //{
@@ -6325,7 +6343,6 @@ FROM
                         dic.Add("ReturnCode", string.Join("、", countrys));
                         #endregion
 
-
                         //dic.Add("ReturnCodeAir", dic["ReturnCode"]);
                         //dic.Add("VisitStartDate", _DelegationInfo.VisitStartDate.ToString("yyyy年MM月dd日"));
                         //dic.Add("VisitEndDate", _DelegationInfo.VisitEndDate.ToString("yyyy年MM月dd日"));
@@ -6396,7 +6413,7 @@ FROM
                         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;
+                        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"));
 
                         //其他费用合计
@@ -6668,9 +6685,21 @@ FROM
                         dic.Add("CityTranffic", _EnterExitCosts.CityTranffic.ToString("#0.00"));
 
                         string otherFeeStr = "";
-                        if (_EnterExitCosts.Visa > 0) otherFeeStr += $"签证费: {_EnterExitCosts.Visa.ToString("#0.00")} 元,";
-                        if (_EnterExitCosts.Safe > 0) otherFeeStr += $"保险费: {_EnterExitCosts.Safe.ToString("#0.00")} 元,";
-                        if (_EnterExitCosts.Ticket > 0) otherFeeStr += $"参展门票费: {_EnterExitCosts.Ticket.ToString("#0.00")} 元,";
+                        if (_EnterExitCosts.Visa > 0) otherFeeStr += $"签证费:{_EnterExitCosts.Visa.ToString("#0.00")}元,";
+                        if (_EnterExitCosts.YiMiao > 0) otherFeeStr += $"疫苗费:{_EnterExitCosts.YiMiao.ToString("#0.00")}元,";
+                        if (_EnterExitCosts.HeSuan > 0) otherFeeStr += $"核酸费:{_EnterExitCosts.HeSuan.ToString("#0.00")}元,";
+                        if (_EnterExitCosts.Safe > 0) otherFeeStr += $"保险费:{_EnterExitCosts.Safe.ToString("#0.00")}元,";
+                        if (_EnterExitCosts.Ticket > 0) otherFeeStr += $"参展门票费:{_EnterExitCosts.Ticket.ToString("#0.00")}元,";
+                        if (_EnterExitCosts.Service > 0) otherFeeStr += $"服务费:{_EnterExitCosts.Service.ToString("#0.00")}元,";
+
+                        #region 其他款项费用 增加位置:模板第6项其他费用字符串追加
+
+                        foreach (var otherInfo in dac5)
+                        {
+                            otherFeeStr += $"{otherInfo.itemName}:{otherInfo.SubTotal.ToString("#0.00")} 元,";
+                        }
+
+                        #endregion
 
                         if (otherFeeStr.Length > 0)
                         {

+ 1 - 4
OASystem/OASystem.Api/OAMethodLib/GeneralMethod.cs

@@ -829,7 +829,6 @@ namespace OASystem.API.OAMethodLib
 
         #region 三公费用相关
 
-
         /// <summary>
         /// 保存操作前汇率
         /// </summary>
@@ -873,11 +872,9 @@ namespace OASystem.API.OAMethodLib
                 })
                 .ExecuteCommandAsync();
 
-
             return add > 0 ? true : false;
         }
 
-
         /// <summary>
         /// 三公费用导入收款账单数据
         /// </summary>
@@ -895,7 +892,7 @@ namespace OASystem.API.OAMethodLib
             //数据源
             var stayData = dayAndCosts.Where(it => it.Type == 1).ToList();          //住宿费
             var mealData = dayAndCosts.Where(it => it.Type == 2).ToList();          //伙食费
-            var miscellaneousData = dayAndCosts.Where(it => it.Type == 3).ToList();  //公杂费
+            var miscellaneousData = dayAndCosts.Where(it => it.Type == 3).ToList(); //公杂费
             var trainData = dayAndCosts.Where(it => it.Type == 4).ToList();         //培训费
 
             //筛选 陪同人员 = 1