|
@@ -128,15 +128,39 @@ namespace OASystem.Infrastructure.Repositories.Resource
|
|
|
|
|
|
var ids = pageList.Select(x => x.Id).ToList();
|
|
|
var detailsList = await _sqlSugar.Queryable<Res_VisaFeeStandardDetails>()
|
|
|
- .Where(x => x.IsDel == 0 && ids.Contains(x.ParentId))
|
|
|
- .ToListAsync();
|
|
|
+ .LeftJoin<Sys_Cities>((x, y) => x.ProvinceId == y.Id && (y.Level == 1 || y.Level == 4))
|
|
|
+ .Where((x, y) => ids.Contains( x.ParentId ) && x.IsDel == 0)
|
|
|
+ .Select((x, y) => new VisaFeeStandardDetails
|
|
|
+ {
|
|
|
+ Id = x.Id,
|
|
|
+ ParentId = x.ParentId,
|
|
|
+ ProvinceId = x.ProvinceId,
|
|
|
+ ProvinceName = y.Name_CN,
|
|
|
+ VisaAddress = x.VisaAddress,
|
|
|
+ IsVisaOnArrival = x.IsVisaOnArrival,
|
|
|
+ IsElectronicSign = x.IsElectronicSign,
|
|
|
+ VisaTime = x.VisaTime,
|
|
|
+ IsVisaExemptionLarge = x.IsVisaExemptionLarge,
|
|
|
+ LargeVisaPrice = x.LargeVisaPrice,
|
|
|
+ LargeAgencyFee = x.LargeAgencyFee,
|
|
|
+ IsVisaExemptionSmall = x.IsVisaExemptionSmall,
|
|
|
+ SmallVisaPrice = x.SmallVisaPrice,
|
|
|
+ SmallAgencyFee = x.SmallAgencyFee,
|
|
|
+ NormExtFee = x.NormExtFee,
|
|
|
+ UrgExtFee = x.UrgExtFee,
|
|
|
+ IsUrgent = x.IsUrgent,
|
|
|
+ UrgentTime = x.UrgentTime,
|
|
|
+ UrgentPrice = x.UrgentPrice,
|
|
|
+ UrgentPriceDesc = x.UrgentPriceDesc,
|
|
|
+ Remark = y.Remark,
|
|
|
+ })
|
|
|
+ .ToListAsync();
|
|
|
|
|
|
- var mappedDetails = _mapper.Map<List<VisaFeeStandardDetails>>(detailsList);
|
|
|
var specifiedOrder = new List<string> { "四川", "重庆", "贵州", "云南" };
|
|
|
|
|
|
foreach (var item in pageList)
|
|
|
{
|
|
|
- var provinceDetails = mappedDetails.Where(x => x.ParentId == item.Id).ToList();
|
|
|
+ var provinceDetails = detailsList.Where(x => x.ParentId == item.Id).ToList();
|
|
|
if (provinceDetails.Any())
|
|
|
provinceDetails = VisaFeeStandardDetails.SortByProvinces(provinceDetails, specifiedOrder);
|
|
|
item.VisaFees = provinceDetails;
|