jiangjc 1 year ago
parent
commit
c6f213045c

+ 2 - 2
OASystem/OASystem.Api/Controllers/BaiduOCRController.cs

@@ -67,12 +67,12 @@ namespace OASystem.API.Controllers
                     List<string> listNameStr = new List<string>() { "姓名", "name", "姓 名" };
                     List<string> listNameStr = new List<string>() { "姓名", "name", "姓 名" };
                     List<string> listSexStr = new List<string>() { "性别", "gender", "sex" };
                     List<string> listSexStr = new List<string>() { "性别", "gender", "sex" };
                     List<string> listDOBStr = new List<string>() { "D.O.B", "出生年月", "生日", "出生日期" };
                     List<string> listDOBStr = new List<string>() { "D.O.B", "出生年月", "生日", "出生日期" };
-                    List<string> listIdCard = new List<string>() { "身份证号码", "身份证" };
+                    List<string> listIdCard = new List<string>() { "身份证号码", "身份证", "身份证号" };
                     List<string> listOrganizationStr = new List<string>() { "工作单位", "organization", "单位"};
                     List<string> listOrganizationStr = new List<string>() { "工作单位", "organization", "单位"};
                     List<string> listJobStr = new List<string>() { "职务", "title", "职位", "所在单位及职务" , "单位及职务" };
                     List<string> listJobStr = new List<string>() { "职务", "title", "职位", "所在单位及职务" , "单位及职务" };
                     List<string> listMobileStr = new List<string>() { "联系电话", "mobile" };
                     List<string> listMobileStr = new List<string>() { "联系电话", "mobile" };
                     List<string> listAgeStr = new List<string>() { "年龄", "age" };
                     List<string> listAgeStr = new List<string>() { "年龄", "age" };
-                    List<string> listBeiZhu = new List<string>() { "备注" };
+                    List<string> listBeiZhu = new List<string>() { "备注", "本团职务" };
 
 
                     for (int i = 0; i < headerList.Count; i++)
                     for (int i = 0; i < headerList.Count; i++)
                     {
                     {

+ 11 - 41
OASystem/OASystem.Api/Controllers/GroupsController.cs

@@ -112,6 +112,7 @@ namespace OASystem.API.Controllers
         private readonly IJuHeApiService _juHeApi;
         private readonly IJuHeApiService _juHeApi;
         private readonly InvertedListRepository _invertedListRep;
         private readonly InvertedListRepository _invertedListRep;
         private readonly VisaFeeInfoRepository _visaFeeInfoRep;
         private readonly VisaFeeInfoRepository _visaFeeInfoRep;
+        private readonly TicketBlackCodeRepository _ticketBlackCodeRep;
 
 
         public GroupsController(IMapper mapper, SqlSugarClient sqlSugar, GrpScheduleRepository grpScheduleRep, DelegationInfoRepository groupRepository,
         public GroupsController(IMapper mapper, SqlSugarClient sqlSugar, GrpScheduleRepository grpScheduleRep, DelegationInfoRepository groupRepository,
             TaskAssignmentRepository taskAssignmentRep, AirTicketResRepository airTicketResRep, DecreasePaymentsRepository decreasePaymentsRep,
             TaskAssignmentRepository taskAssignmentRep, AirTicketResRepository airTicketResRep, DecreasePaymentsRepository decreasePaymentsRep,
@@ -120,7 +121,7 @@ namespace OASystem.API.Controllers
             CheckBoxsRepository checkBoxs, GroupCostRepository GroupCostRepository, CostTypeHotelNumberRepository CostTypeHotelNumberRepository,
             CheckBoxsRepository checkBoxs, GroupCostRepository GroupCostRepository, CostTypeHotelNumberRepository CostTypeHotelNumberRepository,
             GroupCostParameterRepository GroupCostParameterRepository, HotelPriceRepository hotelPriceRep, CustomersRepository customersRep, SetDataRepository setDataRep,
             GroupCostParameterRepository GroupCostParameterRepository, HotelPriceRepository hotelPriceRep, CustomersRepository customersRep, SetDataRepository setDataRep,
             TourClientListRepository tourClientListRep, TeamRateRepository teamRateRep, IHubContext<ChatHub, IChatClient> hubContext, UsersRepository usersRep, IJuHeApiService juHeApi,
             TourClientListRepository tourClientListRep, TeamRateRepository teamRateRep, IHubContext<ChatHub, IChatClient> hubContext, UsersRepository usersRep, IJuHeApiService juHeApi,
-            InvertedListRepository invertedListRep, VisaFeeInfoRepository visaFeeInfoRep)
+            InvertedListRepository invertedListRep, VisaFeeInfoRepository visaFeeInfoRep, TicketBlackCodeRepository ticketBlackCodeRep)
         {
         {
             _mapper = mapper;
             _mapper = mapper;
             _grpScheduleRep = grpScheduleRep;
             _grpScheduleRep = grpScheduleRep;
@@ -156,6 +157,7 @@ namespace OASystem.API.Controllers
             _juHeApi = juHeApi;
             _juHeApi = juHeApi;
             _invertedListRep = invertedListRep;
             _invertedListRep = invertedListRep;
             _visaFeeInfoRep = visaFeeInfoRep;
             _visaFeeInfoRep = visaFeeInfoRep;
+            _ticketBlackCodeRep = ticketBlackCodeRep;
         }
         }
 
 
         #region 流程管控
         #region 流程管控
@@ -3656,45 +3658,10 @@ namespace OASystem.API.Controllers
         /// <returns></returns>
         /// <returns></returns>
         [HttpPost]
         [HttpPost]
         [ProducesResponseType(typeof(JsonView), StatusCodes.Status200OK)]
         [ProducesResponseType(typeof(JsonView), StatusCodes.Status200OK)]
-        public async Task<IActionResult> GetEnterExitCostRealTimeRateAndVisaTips(EnterExitCostInfobyDiIdDto dto)
+        public async Task<IActionResult> GetEnterExitCostCorrelationTips(EnterExitCostInfobyDiIdDto dto)
         {
         {
             var groupInfo = await _sqlSugar.Queryable<Grp_DelegationInfo>().FirstAsync(it => it.Id == dto.DiId && it.IsDel == 0);
             var groupInfo = await _sqlSugar.Queryable<Grp_DelegationInfo>().FirstAsync(it => it.Id == dto.DiId && it.IsDel == 0);
 
 
-            //签证费用 tips
-            List<dynamic> visaInfos = new List<dynamic>();
-            if (groupInfo != null)
-            {
-                List<string> countrys = _groupRepository.GroupSplitCountry(groupInfo.VisitCountry);
-                if (countrys.Count > 0)
-                {
-                    foreach (var item in countrys)
-                    {
-                        var countryVisaFees = _sqlSugar.Queryable<Res_CountryFeeCost>().First(it => it.IsDel == 0 && countrys.Contains(it.VisaCountry));
-                        if (countryVisaFees != null)
-                        {
-                            visaInfos.Add(new
-                            {
-                                isExist = true,
-                                country = item,
-                                visaFee = countryVisaFees.VisaPrice,
-                                lastUpdateDt = countryVisaFees.LastUpdateTime
-                            });
-                        }
-                        else
-                        {
-                            visaInfos.Add(new
-                            {
-                                isExist = false,
-                                country = $"“{item}”未在签证费用模块录入!",
-                                visaFee = 0.00M,
-                                lastUpdateDt = ""
-                            });
-                        }
-                    }
-                }
-            }
-
-
             //默认币种显示
             //默认币种显示
             List<CurrencyInfo> _currencyInfos = new List<CurrencyInfo>()
             List<CurrencyInfo> _currencyInfos = new List<CurrencyInfo>()
                 {
                 {
@@ -3726,10 +3693,13 @@ namespace OASystem.API.Controllers
                 }
                 }
             }
             }
 
 
+            var visaData = await _visaFeeInfoRep.EntryAndExitTips(dto.DiId);
+            var airData = await _ticketBlackCodeRep.EntryAndExitTips(dto.DiId);
             return Ok(JsonView(true, "查询成功!", new
             return Ok(JsonView(true, "查询成功!", new
             {
             {
                 //GroupNameData = groupNameData.Data,
                 //GroupNameData = groupNameData.Data,
-                visaInfos = visaInfos,
+                visaData = visaData.Data,
+                airData = airData.Data,
                 reteInfos = reteInfos
                 reteInfos = reteInfos
             }));
             }));
         }
         }
@@ -11128,10 +11098,10 @@ namespace OASystem.API.Controllers
 
 
         #endregion
         #endregion
 
 
-        #region 签证费用(签证费、代办费)
+        #region 三公签证费用(签证费、代办费)
 
 
         /// <summary>
         /// <summary>
-        /// 签证费用(签证费、代办费)
+        /// 三公签证费用(签证费、代办费)
         /// List
         /// List
         /// </summary>
         /// </summary>
         /// <returns></returns>
         /// <returns></returns>
@@ -11149,7 +11119,7 @@ namespace OASystem.API.Controllers
         }
         }
 
 
         /// <summary>
         /// <summary>
-        /// 签证费用(签证费、代办费)
+        /// 三公签证费用(签证费、代办费)
         /// Add Or Update
         /// Add Or Update
         /// </summary>
         /// </summary>
         /// <returns></returns>
         /// <returns></returns>

+ 55 - 0
OASystem/OASystem.Infrastructure/Repositories/Groups/VisaFeeInfoRepository.cs

@@ -159,5 +159,60 @@ namespace OASystem.Infrastructure.Repositories.Groups
             RollbackTran();
             RollbackTran();
             return _result;
             return _result;
         }
         }
+
+        /// <summary>
+        /// 三公费用签证费用提示
+        /// </summary>
+        /// <param name="portType"></param>
+        /// <param name="diId"></param>
+        /// <returns></returns>
+        public async Task<Result> EntryAndExitTips(int diId)
+        {
+            if (diId < 1) return _result = new Result() { Code = -1, Msg = "请传入有效的DiId参数" };
+
+            var visaData = await _sqlSugar.Queryable<Grp_VisaFeeInfo>().Where(it => it.IsDel == 0).ToListAsync();
+            List<int> ids = visaData.Select (it => it.CountryVisaFeeId).ToList();
+            var visaCountryDatas = await _sqlSugar.Queryable< Res_CountryFeeCost >().Where(it => ids.Contains(it.Id)).ToListAsync();
+
+            List<dynamic> datas = new List<dynamic>();
+            string remark = "";
+            decimal feeTotal = 0.00M;
+            foreach (var item in visaData)
+            {
+                if (item.IsChecked == 1)
+                {
+                    var countryData = visaCountryDatas.Find(it => it.Id == item.CountryVisaFeeId);
+
+                    decimal visaFeeTotal = countryData?.VisaPrice ?? 0.00M + item.AgencyFee + item.OtherFee;
+                    remark += $@"{countryData?.VisaCountry ?? ""}:签证总费用:{visaFeeTotal}元/人 其中(";
+                    if (countryData?.VisaPrice > 0) remark += $@"签证费用:{countryData?.VisaPrice.ToString("#0.00")}元、";
+                    if (item.AgencyFee > 0) remark += $@"代办费:{item.AgencyFee.ToString("#0.00")}元、";
+                    if (item.OtherFee > 0) remark += $@"其他费用:{item.OtherFee.ToString("#0.00")}元";
+
+                    if (visaFeeTotal > 0) remark = remark.Substring(0,remark.Length -1);
+
+                    remark += ");";
+                    feeTotal += visaFeeTotal;
+                    datas.Add(new
+                    {
+                        Country = countryData?.VisaCountry ?? "",
+                        visaFeeTotal = visaFeeTotal,
+                        VisaFee = countryData?.VisaPrice ?? 0.00M,
+                        item.AgencyFee,
+                        item.OtherFee
+
+                    });
+                }
+            }
+
+            _result.Code = 0;
+            _result.Data = new { 
+                feeTotal = feeTotal,
+                data = datas,
+                remark = remark
+            };
+
+            return _result;
+        }
     }
     }
 }
 }

+ 30 - 0
OASystem/OASystem.Infrastructure/Repositories/Resource/TicketBlackCodeRepository.cs

@@ -180,5 +180,35 @@ namespace OASystem.Infrastructure.Repositories.Resource
                 throw;
                 throw;
             }
             }
         }
         }
+
+        /// <summary>
+        /// 三公费用提示
+        /// 使用
+        /// </summary>
+        /// <param name="diId"></param>
+        /// <returns></returns>
+        public async Task<Result> EntryAndExitTips(int diId)
+        {
+            if (diId < 1) return new Result() { Code = -1, Msg = "请输入有效的DiId参数!" };
+
+            Air_TicketBlackCode _TicketBlackCode = await _sqlSugar.Queryable<Air_TicketBlackCode>().FirstAsync(a => a.IsDel == 0 && a.DiId == diId);
+
+            if (_TicketBlackCode != null)
+            {
+                return new Result()
+                {
+                    Code = 0,
+                    Msg = "操作成功!",
+                    Data = new
+                    {
+                        jjcCurrentRate = _TicketBlackCode.ECPrice,
+                        gwcCurrentRate = _TicketBlackCode.BCPrice,
+                        Remark = $"经济舱现价:{_TicketBlackCode.ECPrice.ToString("#0.00")} 元/人 公务舱:{_TicketBlackCode.BCPrice.ToString("#0.00")} 元/人"
+                    }
+                };
+            }
+
+            return new Result() { Code = -1,Msg="操作失败" };
+        }
     }
     }
 }
 }