Просмотр исходного кода

Merge branch 'develop' of http://132.232.92.186:3000/XinXiBu/OA2023 into develop

jiangjc 1 год назад
Родитель
Сommit
f2e8983f4e

+ 34 - 18
OASystem/OASystem.Api/Controllers/GroupsController.cs

@@ -316,7 +316,7 @@ namespace OASystem.API.Controllers
         [ProducesResponseType(typeof(JsonView), StatusCodes.Status200OK)]
         public async Task<IActionResult> PostGroupPageList(GroupPageListDto dto)
         {
-            #region  参数验证
+             #region  参数验证
             if (dto.UserId < 1) return Ok(JsonView(false, "员工Id为空"));
             if (dto.PageId < 1) return Ok(JsonView(false, "页面Id为空"));
 
@@ -4261,28 +4261,27 @@ namespace OASystem.API.Controllers
                         decimal allPrice = dac1totalPrice + dac2totalPrice + _EnterExitCosts.Visa + _EnterExitCosts.Safe + _EnterExitCosts.Ticket;
 
                         //国际旅费
-
                         string outsideJJ = "";
                         string allPriceJJ = "";
                         if (_EnterExitCosts.SumJJC == 1)
                         {
-                            outsideJJ = string.Format(@"经济舱:{0} 元/人", _EnterExitCosts.OutsideJJPay.ToString("#0.00"));
+                            outsideJJ = string.Format(@"经济舱:{0} 元/人", _EnterExitCosts.AirJJ.ToString("#0.00"));
                             allPriceJJ = string.Format(@"经济舱:{0} 元/人", (allPrice + _EnterExitCosts.OutsideJJPay).ToString("#0.00"));
                         }
                         string outsideGW = "";
                         string allPriceGW = "";
                         if (_EnterExitCosts.SumGWC == 1)
                         {
-                            outsideGW = string.Format(@"公务舱:{0}    元/人", _EnterExitCosts.OutsaideGWPay.ToString("#0.00"));
-                            allPriceGW = string.Format(@"公务舱:{0}   元/人", (allPrice + _EnterExitCosts.OutsaideGWPay).ToString("#0.00"));
+                            outsideGW = string.Format(@"公务舱:{0} 元/人", _EnterExitCosts.AirGW.ToString("#0.00"));
+                            allPriceGW = string.Format(@"公务舱:{0} 元/人", (allPrice + _EnterExitCosts.OutsaideGWPay).ToString("#0.00"));
                         }
 
                         if (_EnterExitCosts.SumJJC == 1 || _EnterExitCosts.SumGWC == 1)
                         {
-                            string InTravelPriceStr = string.Format(@" ({0}    {1})", outsideJJ, outsideGW);
+                            string InTravelPriceStr = string.Format(@" ({0} {1})", outsideJJ, outsideGW);
                             dic.Add("InTravelPrice", InTravelPriceStr);
 
-                            string FinalSumPriceStr = string.Format(@" ({0}    {1})", allPriceJJ, allPriceGW);
+                            string FinalSumPriceStr = string.Format(@" ({0} {1})", allPriceJJ, allPriceGW);
                             dic.Add("FinalSumPrice", FinalSumPriceStr);
                         }
 
@@ -4419,8 +4418,8 @@ namespace OASystem.API.Controllers
                             string currency = _CurrDatas.Find(it => it.Id == item.Currency)?.Remark ?? "Unknwon";
                             decimal rate = rateDatas.Find(it => it.CurrencyName == currency)?.Rate ?? 0.00M;
                             row["curr"] = currency;
-                            row["rate"] = rate;
-                            row["criterion"] = item.Cost;
+                            row["rate"] = rate.ToString("#0.0000");
+                            row["criterion"] = item.Cost.ToString("#0.00");
                             row["number"] = 1;
                             row["day"] = dac1.FindAll(x => x.NationalTravelFeeId == item.NationalTravelFeeId).Count;
 
@@ -4443,10 +4442,10 @@ namespace OASystem.API.Controllers
                             string currency = _CurrDatas.Find(it => it.Id == item.Currency)?.Remark ?? "Unknwon";
                             decimal rate = rateDatas.Find(it => it.CurrencyName == currency)?.Rate ?? 0.00M;
                             row["curr"] = currency;
-                            row["rate"] = rate;
-                            row["criterion"] = item.Cost;
+                            row["rate"] = rate.ToString("#0.0000");
+                            row["criterion"] = item.Cost.ToString("#0.00");
                             row["number"] = 1;
-                            row["day"] = dac2.FindAll(x => x.Place == item.Place).Count;
+                            row["day"] = dac2.FindAll(x => x.NationalTravelFeeId == item.NationalTravelFeeId).Count;
                             //row["cost"] = item.SubTotal;
 
                             //row["costRMB"] = rbmPrice;
@@ -4461,21 +4460,38 @@ namespace OASystem.API.Controllers
 
                         designer.SetDataSource("dac1totalPrice", dac1totalPrice.ToString("#0.00"));
                         designer.SetDataSource("dac2totalPrice", dac2totalPrice);
-                        string cell4Str = $"  4.国际旅费:经济舱:{_EnterExitCosts.OutsideJJPay.ToString("#0.00")}元,公务舱:{_EnterExitCosts.OutsaideGWPay.ToString("#0.00")}元";
-                        string cellStr = $"  5.其他费用(签证费:{_EnterExitCosts.Visa.ToString("#0.00")}元,保险费 :{_EnterExitCosts.Safe.ToString("#0.00")}元)";
-                        decimal s = dac1totalPrice + dac2totalPrice + _EnterExitCosts.OutsideJJPay + _EnterExitCosts.OutsaideGWPay + _EnterExitCosts.Visa + _EnterExitCosts.Safe + _EnterExitCosts.Ticket;
+                        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")}元/人";
+                        string cellStr = $"  5.其他费用(";
+                        if (_EnterExitCosts.Visa > 0) cellStr += $"签证费:{_EnterExitCosts.Visa.ToString("#0.00")}元,";
+                        if (_EnterExitCosts.YiMiao > 0) cellStr += $"疫苗费:{_EnterExitCosts.YiMiao.ToString("#0.00")}元,";
+                        if (_EnterExitCosts.HeSuan > 0) cellStr += $"核酸费:{_EnterExitCosts.HeSuan.ToString("#0.00")}元,";
+                        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")}元,";
+                        if (cellStr.Length > 8)
+                        {
+                            cellStr = cellStr.Substring(0, cellStr.Length - 1);
+                        }
+                        cellStr += ")";
+
+
+                        decimal otherFee = _EnterExitCosts.Visa + _EnterExitCosts.YiMiao + _EnterExitCosts.HeSuan + _EnterExitCosts.Safe + _EnterExitCosts.Ticket + _EnterExitCosts.Service;
+                        decimal s = dac1totalPrice + dac2totalPrice + _EnterExitCosts.OutsideJJPay + _EnterExitCosts.OutsaideGWPay + otherFee;
 
                         decimal pxFee = dac4.Sum(it => it.Cost);
                         decimal glvFee = _EnterExitCosts.OutsideJJPay + _EnterExitCosts.OutsaideGWPay;
-                        decimal otherFee = _EnterExitCosts.Visa + _EnterExitCosts.Safe + _EnterExitCosts.Ticket;
                         string celllastStr1 = "";
                         if (dac1totalPrice > 0) celllastStr1 += $"住宿费 {dac1totalPrice.ToString("#0.00")} 元";
                         if (dac2totalPrice > 0) celllastStr1 += $",伙食费和公杂费 {dac2totalPrice.ToString("#0.00")} 元";
                         if (pxFee > 0) celllastStr1 += $",培训费 {pxFee.ToString("#0.00")} 元";
-                        if (glvFee > 0) celllastStr1 += $",国际旅费 {glvFee.ToString("#0.00")} 元";
+                        celllastStr1 += $",国际旅费       元";
                         if (otherFee > 0) celllastStr1 += $",其他费用 {otherFee.ToString("#0.00")} 元";
 
-                        string celllastStr = $"    经审核,{celllastStr1},本次出国经费预算合计为 {s.ToString("#0.00")} 元。其中:市本级安排      。";
+                        string celllastStr = $"    经审核,{celllastStr1},本次出国经费预算合计为         元。其中:市本级安排      。";
 
                         designer.SetDataSource("cell4Str", cell4Str);
                         designer.SetDataSource("cellStr", cellStr);

+ 1 - 1
OASystem/OASystem.Infrastructure/Repositories/Groups/DecreasePaymentsRepository.cs

@@ -420,7 +420,7 @@ Where gdp.DiId = {0} And ccp.CTable = 98 {2} And ccp.IsDel = 0 And gdp.IsDel = 0
         /// <param name="dto"></param>
         /// <returns></returns>
         /// <exception cref="NotImplementedException"></exception>
-        public async Task<Result> _Del(int id, int userId)
+        public async Task<Result>  _Del(int id, int userId)
         {
             Result result = new Result() { Code = -2, Msg = "删除失败!" };
 

+ 19 - 0
OASystem/OASystem.Infrastructure/Repositories/Groups/EnterExitCostRepository.cs

@@ -352,6 +352,25 @@ namespace OASystem.Infrastructure.Repositories.Groups
             return result;
         }
 
+        public async Task<Result> _Del(int id, int diid)
+        {
+            Result result = new Result() { Code = -1 , Msg = "操作成功!" };
+
+            if (id < 1) return result = new Result() { Code = -1, Msg = "请传入有效的Id参数!" };
+
+            if (diid < 1) return result = new Result() { Code = -1, Msg = "请传入有效的Id参数!" };
+
+            BeginTran();
+
+
+            CommitTran();
+
+            RollbackTran();
+            result.Msg = "操作失败";
+            return result;
+        }
+
+
         /// <summary>
         /// 团组模块 - 出入境国家费用标准 - Add Or Update
         /// </summary>

+ 2 - 1
OASystem/OASystem.Infrastructure/Repositories/Groups/TourClientListRepository.cs

@@ -167,6 +167,7 @@ namespace OASystem.Infrastructure.Repositories.Groups
                 var data = await _sqlSugar.SqlQueryable<TourClientListDetailsView>(sql).FirstAsync();
                 if (data != null) 
                 {
+
                     data.BirthDay = data.BirthDay.DateFormat("yyyy-MM-dd");
                     //data.IssueDt = data.IssueDt.DateFormat("yyyy-MM-dd");
                     //data.ExpiryDt = data.ExpiryDt.DateFormat("yyyy-MM-dd");
@@ -275,7 +276,7 @@ namespace OASystem.Infrastructure.Repositories.Groups
                     Pinyin = dto.Pinyin,
                     Phone = dto.Phone,
                     Sex = dto.Sex,
-                    BirthDay = dto.BirthDay == null ? null : Convert.ToDateTime(dto.BirthDay),
+                    BirthDay = dto.BirthDay == "" ? null : Convert.ToDateTime(dto.BirthDay),
                     Job = dto.Job,
                     CreateUserId = dto.UserId
                 };