|
|
@@ -10602,6 +10602,47 @@ FROM
|
|
|
var _currencyInfos = await GeneralMethod.EnterExitCostInitRate();
|
|
|
|
|
|
var viewPermissionData = await _enterExitCostRep.PermissionViewUsersAsync();
|
|
|
+
|
|
|
+ #region 城市区间 - 城市数据
|
|
|
+ var overseaVehicles = await _sqlSugar.Queryable<Res_OverseaVehicle>().Where(x => x.IsDel == 0).ToListAsync();
|
|
|
+ var overseaVehicleTypes = await _sqlSugar.Queryable<Res_OverseaVehicleTypePrice>().Where(x => x.IsDel == 0).ToListAsync();
|
|
|
+ var sysUers = await _sqlSugar.Queryable<Sys_Users>().Where(x => x.IsDel == 0).ToListAsync();
|
|
|
+
|
|
|
+ var overseaVehicleCityDatas = new List<dynamic>();
|
|
|
+ foreach (var item in overseaVehicleTypes)
|
|
|
+ {
|
|
|
+ var parentInfo = overseaVehicles.FirstOrDefault(x => x.Id == item.OvId);
|
|
|
+ string area = string.Empty,
|
|
|
+ serviceType = "未设置",
|
|
|
+ currencyName = string.Empty;
|
|
|
+ decimal otherPrice = 0.00M;
|
|
|
+ if (parentInfo != null)
|
|
|
+ {
|
|
|
+ if (parentInfo.CountryName == parentInfo.CityName) area = parentInfo.CountryName;
|
|
|
+ else area = $"{parentInfo.CountryName}-{parentInfo.CityName}";
|
|
|
+
|
|
|
+ serviceType = item.ServiceType.GetDescription();
|
|
|
+ currencyName = currencyData.FirstOrDefault(x => x.Id == parentInfo.Currency)?.Name ?? "-";
|
|
|
+ otherPrice = parentInfo.OtherPrice1 + parentInfo.OtherPrice2;
|
|
|
+ }
|
|
|
+
|
|
|
+ overseaVehicleCityDatas.add(new
|
|
|
+ {
|
|
|
+ area,
|
|
|
+ item.CarTypeName,
|
|
|
+ serviceType,
|
|
|
+ item.Price,
|
|
|
+ guidePrice = parentInfo?.GuidePrice ?? 0.00M,
|
|
|
+ otherPrice,
|
|
|
+ currency = parentInfo?.Currency ?? 0,
|
|
|
+ currencyName,
|
|
|
+ LastUpdateUserName = sysUers.FirstOrDefault(x => x.Id == item.LastUpdateUserId)?.CnName ?? "-",
|
|
|
+ item.LastUpdateTime,
|
|
|
+ item.Remark
|
|
|
+ });
|
|
|
+ }
|
|
|
+ #endregion
|
|
|
+
|
|
|
return Ok(JsonView(true, "查询成功!", new
|
|
|
{
|
|
|
GroupNameData = groupNameData,
|
|
|
@@ -10609,7 +10650,8 @@ FROM
|
|
|
WordTypeData = wordTypeData,
|
|
|
ExcelTypeData = excelTypeData,
|
|
|
CurrencyInit = _currencyInfos,
|
|
|
- ViewPermissionData = viewPermissionData
|
|
|
+ ViewPermissionData = viewPermissionData,
|
|
|
+ OverseaVehicleCityData = overseaVehicleCityDatas
|
|
|
}));
|
|
|
}
|
|
|
|