Browse Source

成本添加国家签证数据

yuanrf 11 months ago
parent
commit
7ecd986474
1 changed files with 34 additions and 0 deletions
  1. 34 0
      OASystem/OASystem.Api/Controllers/GroupsController.cs

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

@@ -5084,6 +5084,34 @@ namespace OASystem.API.Controllers
             ").ToList(); //团组列表
             int diid = dto.Diid == -1 ? groupList.First().Id : dto.Diid;
             var groupInfo = await _groupRepository.PostShareGroupInfo(new ShareGroupInfoDto { PortType = 1, Id = diid }); //团组信息
+
+
+            List<Res_CountryFeeCost> visaCountryInfoArr = new List<Res_CountryFeeCost>();
+            var groupinfoValue = (groupInfo.Data as Web_ShareGroupInfoView);
+            if (groupinfoValue != null)
+            {
+                var countryArr = groupinfoValue.VisitCountry ??= string.Empty;
+                var spArr = new string[1] { countryArr };
+                if (countryArr.Contains("|"))
+                {
+                    spArr = countryArr.Split("|");
+                }
+                else if (countryArr.Contains("、"))
+                {
+                    spArr = countryArr.Split("、");
+                }
+
+                foreach (var item in spArr)
+                {
+                   var dbQueryCountry = _sqlSugar.Queryable<Res_CountryFeeCost>().First(x => x.VisaCountry.Contains(item));
+                    if (dbQueryCountry != null)
+                    {
+                        visaCountryInfoArr.Add(dbQueryCountry);
+                    }
+                }
+
+            }
+
             var groupChecks = _checkBoxs.GetCheckBoxsByDiid(diid);  //团组选中信息  可枚举
             var groupCost = _GroupCostRepository.GetAllByDiid(diid);  //团组列表信息  
             var groupCostMap = _mapper.Map<List<Grp_GroupCostDto>>(groupCost);
@@ -5102,6 +5130,12 @@ namespace OASystem.API.Controllers
                 groupCost = groupCostMap,
                 hotelNumber,
                 GroupCostParameter = GroupCostParameterMap,
+                visaCountryInfoArr = visaCountryInfoArr.Select(x => new
+                {
+                    x.VisaCountry,
+                    x.VisaPrice,
+                    x.Id,
+                }).ToList()
             }));
         }