| 
					
				 | 
			
			
				@@ -3629,61 +3629,79 @@ namespace OASystem.API.Controllers 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         [ProducesResponseType(typeof(JsonView), StatusCodes.Status200OK)] 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         public async Task<IActionResult> GetEnterExitCostRealTimeRateAndVisaTips(EnterExitCostInfobyDiIdDto dto) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            try 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            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) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                var groupInfo = await _sqlSugar.Queryable<Grp_DelegationInfo>().FirstAsync(it => it.Id == dto.DiId && it.IsDel == 0); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                dynamic visaInfo; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                if (groupInfo != null) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                List<string> countrys = _groupRepository.GroupSplitCountry(groupInfo.VisitCountry); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                if (countrys.Count > 0) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    List<string> countrys = _groupRepository.GroupSplitCountry(groupInfo.VisitCountry); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    if (countrys.Count > 0) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    foreach (var item in countrys) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                        var countryVisaFees = await _sqlSugar.Queryable<Res_CountryFeeCost>().ToListAsync(it => it.IsDel == 0 && countrys.Contains(it.VisaCountry)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        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>() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     new CurrencyInfo (){ CurrencyCode="USD",CurrencyName = "美元",Rate = 0.0000M }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     new CurrencyInfo (){ CurrencyCode="EUR",CurrencyName = "欧元",Rate = 0.0000M }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     new CurrencyInfo (){ CurrencyCode="GBP",CurrencyName = "英镑",Rate = 0.0000M }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     new CurrencyInfo (){ CurrencyCode="JPY",CurrencyName = "日元",Rate = 0.0000M }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     new CurrencyInfo (){ CurrencyCode="HKD",CurrencyName = "港币",Rate = 0.0000M }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 }; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                var _currencyRate = await _juHeApi.PostItemRateAsync(_currencyInfos.Select(it => it.CurrencyCode).ToArray()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                if (_currencyRate.Count > 0) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            var _currencyRate = await _juHeApi.PostItemRateAsync(_currencyInfos.Select(it => it.CurrencyCode).ToArray()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            List<dynamic> reteInfos = new List<dynamic>(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            if (_currencyRate.Count > 0) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                foreach (var item in _currencyInfos) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    foreach (var item in _currencyInfos) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    var rateInfo = _currencyRate.Where(it => it.Name.Equals(item.CurrencyName)).FirstOrDefault(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    if (rateInfo != null) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                        var rateInfo = _currencyRate.Where(it => it.Name.Equals(item.CurrencyName)).FirstOrDefault(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                        if (rateInfo != null) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                        { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                            item.Rate = Convert.ToDecimal(rateInfo.FSellPri) / 100.00M; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        item.Rate = Convert.ToDecimal((Convert.ToDecimal(rateInfo.FSellPri == null ? 0.00M : rateInfo.FSellPri) / 100.00M).ToString("#0.0000")); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        reteInfos.Add(new {  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                            currCode= item.CurrencyCode, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                            currName = item.CurrencyName, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                            rate = item.Rate, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                            lastUpdateDt = rateInfo.Date + " "+ rateInfo.Time 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        }); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                return Ok(JsonView(true, "查询成功!", new 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    //GroupNameData = groupNameData.Data, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    CurrencyInit = _currencyInfos 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                })); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            catch (Exception ex) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            return Ok(JsonView(true, "查询成功!", new 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                return Ok(JsonView(false, ex.Message)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                throw; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                //GroupNameData = groupNameData.Data, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                visaInfos = visaInfos, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                reteInfos = reteInfos 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            })); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 |