| 
															
																@@ -13219,7 +13219,7 @@ FROM 
															 | 
														
													
												
													
														
															| 
															 | 
															
																         /// <returns></returns> 
															 | 
															
															 | 
															
																         /// <returns></returns> 
															 | 
														
													
												
													
														
															| 
															 | 
															
																         [HttpPost] 
															 | 
															
															 | 
															
																         [HttpPost] 
															 | 
														
													
												
													
														
															| 
															 | 
															
																         [ProducesResponseType(typeof(JsonView), StatusCodes.Status200OK)] 
															 | 
															
															 | 
															
																         [ProducesResponseType(typeof(JsonView), StatusCodes.Status200OK)] 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-        public async Task<IActionResult> EnterExitCostQuoteNameListDto(EnterExitCostQuoteNameListDto dto) 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+        public async Task<IActionResult> EnterExitCostQuoteNameList(EnterExitCostQuoteNameListDto dto) 
															 | 
														
													
												
													
														
															| 
															 | 
															
																         { 
															 | 
															
															 | 
															
																         { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																             return Ok(await _enterExitCostQuoteRep.QuoteNameListAsync(dto)); 
															 | 
															
															 | 
															
																             return Ok(await _enterExitCostQuoteRep.QuoteNameListAsync(dto)); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																         } 
															 | 
															
															 | 
															
																         } 
															 | 
														
													
												
											
												
													
														
															 | 
															
																@@ -13230,7 +13230,7 @@ FROM 
															 | 
														
													
												
													
														
															| 
															 | 
															
																         /// <returns></returns> 
															 | 
															
															 | 
															
																         /// <returns></returns> 
															 | 
														
													
												
													
														
															| 
															 | 
															
																         [HttpPost] 
															 | 
															
															 | 
															
																         [HttpPost] 
															 | 
														
													
												
													
														
															| 
															 | 
															
																         [ProducesResponseType(typeof(JsonView), StatusCodes.Status200OK)] 
															 | 
															
															 | 
															
																         [ProducesResponseType(typeof(JsonView), StatusCodes.Status200OK)] 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-        public async Task<IActionResult> EnterExitCostQuoteGroupNameListDto(EnterExitCostQuoteGroupNameListDto dto) 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+        public async Task<IActionResult> EnterExitCostQuoteGroupNameList(EnterExitCostQuoteGroupNameListDto dto) 
															 | 
														
													
												
													
														
															| 
															 | 
															
																         { 
															 | 
															
															 | 
															
																         { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																             return Ok(await _enterExitCostQuoteRep.GroupNameListAsync(dto)); 
															 | 
															
															 | 
															
																             return Ok(await _enterExitCostQuoteRep.GroupNameListAsync(dto)); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																         } 
															 | 
															
															 | 
															
																         } 
															 | 
														
													
												
											
												
													
														
															 | 
															
																@@ -13248,8 +13248,54 @@ FROM 
															 | 
														
													
												
													
														
															| 
															 | 
															
																             if (groupId < 1) return Ok(JsonView(false, "请传入有效的GroupId;")); 
															 | 
															
															 | 
															
																             if (groupId < 1) return Ok(JsonView(false, "请传入有效的GroupId;")); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																             if (currUserId < 1) return Ok(JsonView(false, "请传入有效的CurrUserId;")); 
															 | 
															
															 | 
															
																             if (currUserId < 1) return Ok(JsonView(false, "请传入有效的CurrUserId;")); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																  
															 | 
															
															 | 
															
																  
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+            //验证报价数据是否存在 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+            var isNull = await _sqlSugar.Queryable<Grp_EnterExitCostQuote>().FirstAsync(x => x.IsDel == 0 && x.GroupId == dto.DiId); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+            if (isNull != null) 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+            { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+                var info1 = await _enterExitCostQuoteRep.InfoAsync(new EnterExitCostQuoteInfoDto() { Id = isNull.Id }); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+ 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+                if (!info1.Rates.Any()) 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+                { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+                    var rates = await GeneralMethod.EnterExitCostInitRate(); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+                    info1.Rates = rates.ToArray(); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+                } 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+                return Ok(JsonView(info1)); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+            } 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+ 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+            var result = await _enterExitCostQuoteRep.InfoByGroupIdAsync(dto.DiId); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+ 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+            //处理报价名称 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+            var groupInfo = await _sqlSugar.Queryable<Grp_DelegationInfo>().FirstAsync(x => x.Id == dto.DiId && x.IsDel == 0); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+            if (groupInfo != null) 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+            { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+                var visitCountry = groupInfo.VisitCountry; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+                if (!string.IsNullOrEmpty(visitCountry)) 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+                { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+                    string quoteName = string.Empty; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+                    if (visitCountry.Contains("|")) 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+                    { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+                        var countrys = visitCountry.Split("|"); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+                        quoteName = string.Join("、", countrys); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+                    } 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+                    else quoteName = visitCountry; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+ 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+                    quoteName += $"团组报价表"; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+                    result.Name = quoteName; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+                } 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+            } 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+ 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+ 
															 | 
														
													
												
													
														
															| 
															 | 
															
																             var info = await _enterExitCostRep.GetEnterExitCostInfoByDiId(dto); 
															 | 
															
															 | 
															
																             var info = await _enterExitCostRep.GetEnterExitCostInfoByDiId(dto); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-            if (info.Code != StatusCodes.Status200OK) return Ok(info); 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+            if (info.Code != StatusCodes.Status200OK) 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+            { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+                result.GroupId = groupId; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+                if (!result.Rates.Any()) 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+                { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+                    var rates = await GeneralMethod.EnterExitCostInitRate(); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+                    result.Rates = rates.ToArray(); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+                } 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+                return Ok(JsonView(true, $"出入境费用明细未填写!", result)); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+            } 
															 | 
														
													
												
													
														
															| 
															 | 
															
																  
															 | 
															
															 | 
															
																  
															 | 
														
													
												
													
														
															| 
															 | 
															
																             var infoView = info.Data as EnterExitCostInfoView; 
															 | 
															
															 | 
															
																             var infoView = info.Data as EnterExitCostInfoView; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																             if (infoView == null) return Ok(JsonView(false, "数据类型转换失败!;")); 
															 | 
															
															 | 
															
																             if (infoView == null) return Ok(JsonView(false, "数据类型转换失败!;")); 
															 | 
														
													
												
											
												
													
														
															 | 
															
																@@ -13259,7 +13305,7 @@ FROM 
															 | 
														
													
												
													
														
															| 
															 | 
															
																             var currencys = await _sqlSugar.Queryable<Sys_SetData>().Where(x => x.IsDel == 0 && x.STid == 66).ToListAsync(); 
															 | 
															
															 | 
															
																             var currencys = await _sqlSugar.Queryable<Sys_SetData>().Where(x => x.IsDel == 0 && x.STid == 66).ToListAsync(); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																             var eecRates = infoView.Currencys; 
															 | 
															
															 | 
															
																             var eecRates = infoView.Currencys; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																               
															 | 
															
															 | 
															
																               
															 | 
														
													
												
													
														
															| 
															 | 
															
																-            var groupInfo = await _sqlSugar.Queryable<Grp_DelegationInfo>().FirstAsync(x => x.Id == dto.DiId && x.IsDel == 0); 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+            //处理团组人数 
															 | 
														
													
												
													
														
															| 
															 | 
															
																             int pplNum = 1; 
															 | 
															
															 | 
															
																             int pplNum = 1; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																             if (groupInfo != null) pplNum = groupInfo.VisitPNumber; 
															 | 
															
															 | 
															
																             if (groupInfo != null) pplNum = groupInfo.VisitPNumber; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																  
															 | 
															
															 | 
															
																  
															 | 
														
													
												
											
												
													
														
															 | 
															
																@@ -13546,9 +13592,6 @@ FROM 
															 | 
														
													
												
													
														
															| 
															 | 
															
																  
															 | 
															
															 | 
															
																  
															 | 
														
													
												
													
														
															| 
															 | 
															
																             #endregion 
															 | 
															
															 | 
															
																             #endregion 
															 | 
														
													
												
													
														
															| 
															 | 
															
																  
															 | 
															
															 | 
															
																  
															 | 
														
													
												
													
														
															| 
															 | 
															
																-            var result = await _enterExitCostQuoteRep.InfoAsync(new EnterExitCostQuoteInfoDto() { }); 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																- 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-            result.Rates = eecRates.ToArray(); 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																             if (result.FeeItems.Any()) 
															 | 
															
															 | 
															
																             if (result.FeeItems.Any()) 
															 | 
														
													
												
													
														
															| 
															 | 
															
																             { 
															 | 
															
															 | 
															
																             { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                 result.FeeItems.Select(x => 
															 | 
															
															 | 
															
																                 result.FeeItems.Select(x => 
															 | 
														
													
												
											
												
													
														
															 | 
															
																@@ -13557,11 +13600,22 @@ FROM 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                             if (feeInfos.Any()) x.Infos = feeInfos; 
															 | 
															
															 | 
															
																                             if (feeInfos.Any()) x.Infos = feeInfos; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                             return x; 
															 | 
															
															 | 
															
																                             return x; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                         } 
															 | 
															
															 | 
															
																                         } 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-                    ) 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-                    .OrderBy(x => x.Index) 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+                    ).OrderBy(x => x.Index) 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                     .ToList(); 
															 | 
															
															 | 
															
																                     .ToList(); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+ 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+                if (!result.Rates.Any()) 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+                { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+                    if (eecRates.Any()) result.Rates = eecRates?.ToArray() ?? Array.Empty<CurrencyInfo>(); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+                    else 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+                    { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+                        var rates = await GeneralMethod.EnterExitCostInitRate(); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+                        result.Rates = rates.ToArray(); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+                    } 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+                } 
															 | 
														
													
												
													
														
															| 
															 | 
															
																             } 
															 | 
															
															 | 
															
																             } 
															 | 
														
													
												
													
														
															| 
															 | 
															
																  
															 | 
															
															 | 
															
																  
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+            result.Rates = eecRates.ToArray(); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+ 
															 | 
														
													
												
													
														
															| 
															 | 
															
																             return Ok(JsonView(result)); 
															 | 
															
															 | 
															
																             return Ok(JsonView(result)); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																         } 
															 | 
															
															 | 
															
																         } 
															 | 
														
													
												
													
														
															| 
															 | 
															
																  
															 | 
															
															 | 
															
																  
															 |