Commit 6df481bf authored by liudong1993's avatar liudong1993

解决冲突

parents 7136a547 42a3ec01
......@@ -1109,7 +1109,7 @@ namespace Mall.Module.Product
/// <returns></returns>
public RB_GuideCar_Site_Extend GetGuideCarSiteModel(RB_GuideCar_Site_Extend query)
{
RB_GuideCar_Site_Extend model = SiteRepository.GetLogisticsRulesList(query).FirstOrDefault();
RB_GuideCar_Site_Extend model = SiteRepository.GetGuideCarSiteList(query).FirstOrDefault();
if (model != null)
{
List<RB_GuideCar_SiteRegion_Extend> listLogisticsRulesRegion = SiteRegionRepository.GetListRepository(new RB_GuideCar_SiteRegion_Extend { TenantId = query.TenantId, SiteType = query.SiteType, MallBaseId = query.MallBaseId, SiteId = model.ID });
......@@ -1129,7 +1129,7 @@ namespace Mall.Module.Product
/// <returns></returns>
public List<RB_GuideCar_Site_Extend> GetGuideCarSiteList(RB_GuideCar_Site_Extend query)
{
return SiteRepository.GetLogisticsRulesList(query);
return SiteRepository.GetGuideCarSiteList(query);
}
/// <summary>
......@@ -1337,11 +1337,21 @@ namespace Mall.Module.Product
/// <returns></returns>
public RB_GuideCar_Guide_Extend GetGuideCarGuideModel(RB_GuideCar_Guide_Extend query)
{
RB_GuideCar_Guide_Extend model = GuideRepository.GetLogisticsRulesList(query).FirstOrDefault();
RB_GuideCar_Guide_Extend model = GuideRepository.GetGuideCarGuideList(query).FirstOrDefault();
return model;
}
/// <summary>
/// 导游配置
/// </summary>
/// <param name="query"></param>
/// <returns></returns>
public List<RB_GuideCar_Guide_Extend> GetGuideCarGuideList(RB_GuideCar_Guide_Extend query)
{
return GuideRepository.GetGuideCarGuideList(query);
}
/// <summary>
/// 新增/修改导游配置
/// </summary>
......@@ -1501,7 +1511,22 @@ namespace Mall.Module.Product
/// <returns></returns>
public List<RB_GuideCar_Car_Extend> GetGuideCarList(RB_GuideCar_Car_Extend query)
{
return GuideCarRepository.GetGuideCarCarList(query);
var list = GuideCarRepository.GetGuideCarCarList(query);
if (list != null && list.Any())
{
List<RB_GuideCar_CarColor_Extend> listCarColor = CarColorRepository.GetCarColorList(new RB_GuideCar_CarColor_Extend { TenantId = query.TenantId, MallBaseId = query.MallBaseId, CardIds = string.Join(",", list.Select(x => x.ID)) });
if (listCarColor != null && listCarColor.Any())
{
listCarColor.Where(x => !string.IsNullOrWhiteSpace(x.CarPic)).ToList().ForEach(x => x.PicList = JsonConvert.DeserializeObject<List<string>>(x.CarPic));
}
foreach (var item in list)
{
item.ColorList = new List<RB_GuideCar_CarColor_Extend>();
item.ColorList = listCarColor.Where(x => x.CarId == item.ID).ToList();
}
}
return list;
}
/// <summary>
......
......@@ -96,7 +96,7 @@ namespace Mall.Repository.GuideCar
/// <param name="rowCount">总条数</param>
/// <param name="query">查询条件</param>
/// <returns></returns>
public List<RB_GuideCar_Guide_Extend> GetLogisticsRulesList(RB_GuideCar_Guide_Extend query)
public List<RB_GuideCar_Guide_Extend> GetGuideCarGuideList(RB_GuideCar_Guide_Extend query)
{
StringBuilder builder = new StringBuilder();
builder.Append($" SELECT a.*,b.SiteName FROM {TableName} as a LEFT JOIN {SiteTableName} as b on a.SiteId=b.ID WHERE a.{nameof(RB_GuideCar_Guide_Extend.Status)}=0");
......
......@@ -58,11 +58,11 @@ LEFT JOIN {DestinationTableName} as c on b.ParentID = c.ID WHERE a.{nameof(RB_
/// <summary>
/// 获取物流地区列表
/// 获取站点地区列表
/// </summary>
/// <param name="query">查询条件</param>
/// <returns></returns>
public List<RB_GuideCar_SiteRegion_Extend> GetListForSingle(RB_GuideCar_SiteRegion_Extend query)
public List<RB_GuideCar_SiteRegion_Extend> GetListSiteRegion(RB_GuideCar_SiteRegion_Extend query)
{
StringBuilder builder = new StringBuilder();
builder.Append(@$" SELECT a.* FROM {TableName} as a WHERE a.{nameof(RB_GuideCar_SiteRegion_Extend.Status)}=0");
......
......@@ -57,7 +57,7 @@ namespace Mall.Repository.GuideCar
/// <param name="rowCount">总条数</param>
/// <param name="query">查询条件</param>
/// <returns></returns>
public List<RB_GuideCar_Site_Extend> GetList(RB_GuideCar_Site_Extend query)
public List<RB_GuideCar_Site_Extend> GetGuideCarSiteList(RB_GuideCar_Site_Extend query)
{
StringBuilder builder = new StringBuilder();
builder.Append($" SELECT * FROM {TableName} WHERE {nameof(RB_GuideCar_Site_Extend.Status)}=0 ");
......
......@@ -933,6 +933,23 @@ namespace Mall.WebApi.Controllers.MallBase
}
/// <summary>
/// 获取全部导游
/// </summary>
/// <returns></returns>
[HttpPost]
public ApiResult GetGuideCarGuideList()
{
var parms = RequestParm;
var query = JsonConvert.DeserializeObject<RB_GuideCar_Guide_Extend>(RequestParm.msg.ToString());
query.TenantId = UserInfo.TenantId;
query.MallBaseId = parms.MallBaseId;
var list = guideCarModule.GetGuideCarGuideList(query);
var result = list.Select(x => new { x.ID, x.Name, x.WorkYears, x.Score });
return ApiResult.Success("", result);
}
/// <summary>
/// 保存司导导游信息
/// </summary>
......@@ -1058,7 +1075,7 @@ namespace Mall.WebApi.Controllers.MallBase
query.TenantId = UserInfo.TenantId;
query.MallBaseId = parms.MallBaseId;
var list = guideCarModule.GetGuideCarList(query);
var result = list.Select(x => new { x.ID, x.Name, x.CarBrand, x.CarClass, x.CarLogo, x.ColorList, x.CarType });
var result = list.Select(x => new { x.ID, x.Name, x.CarBrand, x.CarClass, x.CarLogo, ColorList = x.ColorList.Select(y => new { y.ColorName, y.PicList }), x.CarType });
return ApiResult.Success("", result);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment