|
@@ -52,6 +52,7 @@ using Microsoft.AspNetCore.SignalR;
|
|
|
using OASystem.API.OAMethodLib.Hub.HubClients;
|
|
|
using OASystem.API.OAMethodLib.Hub.Hubs;
|
|
|
using System.Collections.Generic;
|
|
|
+using OASystem.API.OAMethodLib.JuHeAPI;
|
|
|
|
|
|
namespace OASystem.API.Controllers
|
|
|
{
|
|
@@ -94,6 +95,7 @@ namespace OASystem.API.Controllers
|
|
|
private readonly EnterExitCostRepository _enterExitCostRep;
|
|
|
private readonly IHubContext<ChatHub, IChatClient> _hubContext;
|
|
|
private readonly UsersRepository _usersRep;
|
|
|
+ private readonly IJuHeApiService _juHeApi;
|
|
|
|
|
|
public GroupsController(IMapper mapper, SqlSugarClient sqlSugar, GrpScheduleRepository grpScheduleRep, DelegationInfoRepository groupRepository,
|
|
|
TaskAssignmentRepository taskAssignmentRep, AirTicketResRepository airTicketResRep, DecreasePaymentsRepository decreasePaymentsRep,
|
|
@@ -101,7 +103,7 @@ namespace OASystem.API.Controllers
|
|
|
, DelegationVisaRepository delegationVisaRep, MessageRepository message, VisaPriceRepository visaPriceRep, CarTouristGuideGroundRepository carTouristGuideGroundRep,
|
|
|
CheckBoxsRepository checkBoxs, GroupCostRepository GroupCostRepository, CostTypeHotelNumberRepository CostTypeHotelNumberRepository,
|
|
|
GroupCostParameterRepository GroupCostParameterRepository, HotelPriceRepository hotelPriceRep, CustomersRepository customersRep, SetDataRepository setDataRep,
|
|
|
- TourClientListRepository tourClientListRep, TeamRateRepository teamRateRep, IHubContext<ChatHub, IChatClient> hubContext, UsersRepository usersRep)
|
|
|
+ TourClientListRepository tourClientListRep, TeamRateRepository teamRateRep, IHubContext<ChatHub, IChatClient> hubContext, UsersRepository usersRep, IJuHeApiService juHeApi)
|
|
|
{
|
|
|
_mapper = mapper;
|
|
|
_grpScheduleRep = grpScheduleRep;
|
|
@@ -134,6 +136,7 @@ namespace OASystem.API.Controllers
|
|
|
_teamRateRep = teamRateRep;
|
|
|
_hubContext = hubContext;
|
|
|
_usersRep = usersRep;
|
|
|
+ _juHeApi = juHeApi;
|
|
|
}
|
|
|
|
|
|
#region 流程管控
|
|
@@ -3351,7 +3354,7 @@ namespace OASystem.API.Controllers
|
|
|
List<SetDataInfoView> _ExcelTypeData = _mapper.Map<List<SetDataInfoView>>(excelTypeData);
|
|
|
|
|
|
//默认币种显示
|
|
|
- List<CurrencyInfo> CurrencyInfos = new List<CurrencyInfo>()
|
|
|
+ List<CurrencyInfo> _currencyInfos = new List<CurrencyInfo>()
|
|
|
{
|
|
|
new CurrencyInfo (){ CurrencyCode="USD",CurrencyName = "美元",Rate = 0.0000M },
|
|
|
new CurrencyInfo (){ CurrencyCode="EUR",CurrencyName = "欧元",Rate = 0.0000M },
|
|
@@ -3361,14 +3364,28 @@ namespace OASystem.API.Controllers
|
|
|
|
|
|
};
|
|
|
|
|
|
+ var _currencyRate = await _juHeApi.PostItemRateAsync(_currencyInfos.Select(it => it.CurrencyCode).ToArray());
|
|
|
+ if (_currencyRate.Count > 0)
|
|
|
+ {
|
|
|
+
|
|
|
+ foreach (var item in _currencyInfos)
|
|
|
+ {
|
|
|
+ var rateInfo = _currencyRate.Where(it => it.Name.Equals(item.CurrencyName)).FirstOrDefault();
|
|
|
+ if (rateInfo != null)
|
|
|
+ {
|
|
|
+ item.Rate = Convert.ToDecimal(rateInfo.FSellPri) / 100.00M;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
return Ok(JsonView(true, "查询成功!", new
|
|
|
{
|
|
|
GroupNameData = groupNameData.Data,
|
|
|
CurrencyData = _CurrencyData,
|
|
|
WordTypeData = _WordTypeData,
|
|
|
ExcelTypeData = _ExcelTypeData,
|
|
|
- CurrencyInit = CurrencyInfos
|
|
|
- //NationalTravelFeeData = nationalTravelFeeData
|
|
|
+ CurrencyInit = _currencyInfos
|
|
|
}));
|
|
|
}
|
|
|
catch (Exception ex)
|