|
@@ -23,6 +23,7 @@ using OASystem.Domain.Dtos.Groups;
|
|
|
using OASystem.Domain.Entities.Customer;
|
|
|
using OASystem.Domain.Entities.Financial;
|
|
|
using OASystem.Domain.Entities.Groups;
|
|
|
+using OASystem.Domain.ViewModels;
|
|
|
using OASystem.Domain.ViewModels.Groups;
|
|
|
using OASystem.Domain.ViewModels.Statistics;
|
|
|
using OASystem.Infrastructure.Repositories.Financial;
|
|
@@ -98,6 +99,7 @@ namespace OASystem.API.Controllers
|
|
|
|
|
|
private readonly VisaCommissionRepository _visaCommissionRep;
|
|
|
private readonly ForeignReceivablesRepository _ffrRep; //对外收款账单仓库
|
|
|
+ private readonly OpinionaireRepository _opinionaireRep; //对外收款账单仓库
|
|
|
|
|
|
public GroupsController(ILogger<GroupsController> logger, IMapper mapper, SqlSugarClient sqlSugar, GrpScheduleRepository grpScheduleRep, DelegationInfoRepository groupRepository,
|
|
|
TaskAssignmentRepository taskAssignmentRep, AirTicketResRepository airTicketResRep, DecreasePaymentsRepository decreasePaymentsRep,
|
|
@@ -107,7 +109,8 @@ namespace OASystem.API.Controllers
|
|
|
GroupCostParameterRepository GroupCostParameterRepository, HotelPriceRepository hotelPriceRep, CustomersRepository customersRep, SetDataRepository setDataRep,
|
|
|
TourClientListRepository tourClientListRep, TeamRateRepository teamRateRep, IHubContext<ChatHub, IChatClient> hubContext, UsersRepository usersRep, IJuHeApiService juHeApi,
|
|
|
InvertedListRepository invertedListRep, VisaFeeInfoRepository visaFeeInfoRep, TicketBlackCodeRepository ticketBlackCodeRep, HotelInquiryRepository hotelInquiryRep,
|
|
|
- ThreeCodeRepository threeCodeRepository, FeeAuditRepository feeAuditRep, VisaCommissionRepository visaCommissionRep, ForeignReceivablesRepository ffrRep)
|
|
|
+ ThreeCodeRepository threeCodeRepository, FeeAuditRepository feeAuditRep, VisaCommissionRepository visaCommissionRep, ForeignReceivablesRepository ffrRep,
|
|
|
+ OpinionaireRepository opinionaireRep)
|
|
|
{
|
|
|
_logger = logger;
|
|
|
_mapper = mapper;
|
|
@@ -150,6 +153,7 @@ namespace OASystem.API.Controllers
|
|
|
_feeAuditRep = feeAuditRep;
|
|
|
_visaCommissionRep = visaCommissionRep;
|
|
|
_ffrRep = ffrRep;
|
|
|
+ _opinionaireRep = opinionaireRep;
|
|
|
}
|
|
|
|
|
|
#region 流程管控
|
|
@@ -4880,7 +4884,8 @@ FROM
|
|
|
string md5Sign = GeneralMethod.Encrypt($"{sign}&fileName={fileUrl}");
|
|
|
string url = string.Format("http://oa.pan-american-intl.com:4399/#/Sankunginfo?sign={0}&fileName={1}", sign, fileUrl);
|
|
|
await AppNoticeLibrary.SendUserMsg_GroupShare_ToGM(dto.DiId, new List<string>() { "208", "233", "21" }, dto.UserId, url);
|
|
|
-
|
|
|
+ //保存 汇率信息记录
|
|
|
+ await RateRecordSave(dto.UserId,sign,"出入境费用");
|
|
|
|
|
|
return Ok(JsonView(true, data.Msg, data.Data));
|
|
|
}
|
|
@@ -4890,6 +4895,54 @@ FROM
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ /// <summary>
|
|
|
+ /// 保存操作前汇率
|
|
|
+ /// </summary>
|
|
|
+ /// <param name="currUserId"></param>
|
|
|
+ /// <returns></returns>
|
|
|
+ public async Task<bool> RateRecordSave(int currUserId,int diId,string linkModule)
|
|
|
+ {
|
|
|
+ //var selectData = await _enterExitCostRep._sqlSugar.Queryable<Sys_ExchangeRateRecord>()
|
|
|
+ // .Where(x => Convert.ToDateTime(x.RateDateTime).ToString("yyyy-MM-dd").Equals(DateTime.Now.ToString("yyyy-MM-dd")))
|
|
|
+ // .FirstAsync();
|
|
|
+ //if (selectData != null) return false;
|
|
|
+
|
|
|
+ var _currencyRate = await _juHeApi.PostItemRateAsync(new string[]{});
|
|
|
+
|
|
|
+ string rateInfoStr = string.Empty;
|
|
|
+
|
|
|
+ var oaCurrencyData = await _enterExitCostRep._sqlSugar.Queryable<Sys_SetData>()
|
|
|
+ .Where(x => x.IsDel == 0 && x.STid == 66)
|
|
|
+ .ToListAsync();
|
|
|
+
|
|
|
+ foreach (var rate in _currencyRate)
|
|
|
+ {
|
|
|
+ var oaCurrncy = oaCurrencyData.Find(x => x.Remark.Equals(rate.Name));
|
|
|
+ if (oaCurrncy == null) continue;
|
|
|
+
|
|
|
+ //美元(USD):7.5|
|
|
|
+ rateInfoStr += $"{rate.Name}({oaCurrncy.Name}):{rate.FSellPri}|";
|
|
|
+ }
|
|
|
+
|
|
|
+ if (string.IsNullOrEmpty(rateInfoStr)) return false;
|
|
|
+
|
|
|
+ var add = await _enterExitCostRep.
|
|
|
+ _sqlSugar.Insertable<Sys_ExchangeRateRecord>(new Sys_ExchangeRateRecord()
|
|
|
+ {
|
|
|
+ DiId = diId,
|
|
|
+ LinkModule = linkModule,
|
|
|
+ RateDateTime = DateTime.Now,
|
|
|
+ RateInfo = rateInfoStr,
|
|
|
+ CreateUserId = currUserId,
|
|
|
+ IsDel = 0
|
|
|
+ })
|
|
|
+ .ExecuteCommandAsync();
|
|
|
+
|
|
|
+
|
|
|
+ return add > 0 ? true : false;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
/// <summary>
|
|
|
/// 团组模块 - 出入境费用 - Confirm 费用
|
|
|
/// </summary>
|
|
@@ -15217,6 +15270,32 @@ And (UnitName != '' Or UnitName != null) {sqlWhere}");
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
+
|
|
|
+ #region 团组接待意见调查 Grp_ReceptionOpinionSurvey
|
|
|
+ /// <summary>
|
|
|
+ /// 团组接待意见调查
|
|
|
+ /// 基础数据(团组)
|
|
|
+ /// </summary>
|
|
|
+ /// <param name="dto"></param>
|
|
|
+ /// <returns></returns>
|
|
|
+ [HttpGet]
|
|
|
+ [ProducesResponseType(typeof(JsonView), StatusCodes.Status200OK)]
|
|
|
+ public async Task<IActionResult> OpinionaireInit()
|
|
|
+ {
|
|
|
+ var groupData = await _groupRepository.Query(x => x.IsDel == 0)
|
|
|
+ .Select(x => new
|
|
|
+ {
|
|
|
+ x.Id,
|
|
|
+ GroupName = $"[{x.VisitDate.ToString("yyyy-MM-dd")}]{x.TeamName}"
|
|
|
+ })
|
|
|
+ .OrderByDescending(x => x.Id)
|
|
|
+ .ToListAsync();
|
|
|
+
|
|
|
+ return Ok(JsonView(groupData, groupData.Count));
|
|
|
+ }
|
|
|
+
|
|
|
+ #endregion
|
|
|
+
|
|
|
// /// <summary>
|
|
|
// ///
|
|
|
// /// </summary>
|