Commit f067c546 authored by 黄奎's avatar 黄奎

页面修改

parent d459e896
...@@ -981,6 +981,13 @@ namespace Mall.Module.Product ...@@ -981,6 +981,13 @@ namespace Mall.Module.Product
{ {
QIds = servicePersions QIds = servicePersions
}); });
List<RB_Reserve_MemberCoupon_Extend> educationCouponList = new List<RB_Reserve_MemberCoupon_Extend>();
//查询订单详情对应的课程卡信息
string educationCouponIds = string.Join(",", dlist.Where(x => x.EducationCouponId > 0).Select(x => x.EducationCouponId).Distinct());
if (!string.IsNullOrWhiteSpace(educationCouponIds))
{
educationCouponList = reserveMemberCouponRepository.GetList(new RB_Reserve_MemberCoupon_Extend { TenantId = tenantId, MallBaseId = mallBaseId, Ids = educationCouponIds });
}
foreach (var item in dlist) foreach (var item in dlist)
{ {
item.CoverImagePath = item.CoverImage; item.CoverImagePath = item.CoverImage;
...@@ -994,6 +1001,7 @@ namespace Mall.Module.Product ...@@ -994,6 +1001,7 @@ namespace Mall.Module.Product
model.PresentFXGrade = 1; model.PresentFXGrade = 1;
} }
item.ServicepersonalName = serviceList?.Where(qitem => qitem.ID == item.ServicepersonalId)?.FirstOrDefault()?.Name ?? ""; item.ServicepersonalName = serviceList?.Where(qitem => qitem.ID == item.ServicepersonalId)?.FirstOrDefault()?.Name ?? "";
item.ReserveCouponList = educationCouponList.Where(x => x.Id == item.EducationCouponId).ToList();// 2020-10-11 订单详情对应的套餐卡
} }
} }
model.DetailList = dlist; model.DetailList = dlist;
...@@ -1045,6 +1053,7 @@ namespace Mall.Module.Product ...@@ -1045,6 +1053,7 @@ namespace Mall.Module.Product
model.PreferPrice, model.PreferPrice,
model.Income, model.Income,
model.CouponMoney, model.CouponMoney,
EducationMoney=(model?.EducationMoney??0),
model.Consignee, model.Consignee,
model.Mobile, model.Mobile,
model.ShoppingAddress, model.ShoppingAddress,
...@@ -1063,6 +1072,12 @@ namespace Mall.Module.Product ...@@ -1063,6 +1072,12 @@ namespace Mall.Module.Product
x.ServiceTime, x.ServiceTime,
x.GoodServiceTime, x.GoodServiceTime,
x.ServicepersonalName, x.ServicepersonalName,
MemberEducationCouponList = x?.ReserveCouponList.Select(z => new
{
z.Name,
z.UseHeXiao,
z.HeXiao
}),
}), }),
model.IsApplyForCancel, model.IsApplyForCancel,
model.RejectRemark, model.RejectRemark,
......
...@@ -11,6 +11,7 @@ using Mall.Model.Entity.Product; ...@@ -11,6 +11,7 @@ using Mall.Model.Entity.Product;
using Mall.Model.Entity.User; using Mall.Model.Entity.User;
using Mall.Model.Extend.BaseSetUp; using Mall.Model.Extend.BaseSetUp;
using Mall.Model.Extend.Product; using Mall.Model.Extend.Product;
using Mall.Model.Extend.Reserve;
using Mall.Model.Extend.User; using Mall.Model.Extend.User;
using Mall.Model.Query; using Mall.Model.Query;
using Mall.Repository; using Mall.Repository;
...@@ -2648,7 +2649,7 @@ namespace Mall.Module.Product ...@@ -2648,7 +2649,7 @@ namespace Mall.Module.Product
/// <param name="MallBaseId"></param> /// <param name="MallBaseId"></param>
/// <param name="storeId">门店编号</param> /// <param name="storeId">门店编号</param>
/// <returns></returns> /// <returns></returns>
public object GetAppletOfflineGoodsInfoModule(int goodsId, int UserId, int SmallShopsId, int TenantId, int MallBaseId, int storeId = 0) public object GetAppletOfflineGoodsInfoModule(int goodsId, int UserId, int SmallShopsId, int TenantId, int MallBaseId, int storeId = 0,int servicePersionId=0)
{ {
var model = goodsRepository.GetEntity(goodsId).RefMapperTo<RB_Goods_Extend>(); var model = goodsRepository.GetEntity(goodsId).RefMapperTo<RB_Goods_Extend>();
if (model == null || model.TenantId != TenantId || model.MallBaseId != MallBaseId) if (model == null || model.TenantId != TenantId || model.MallBaseId != MallBaseId)
...@@ -3538,8 +3539,12 @@ namespace Mall.Module.Product ...@@ -3538,8 +3539,12 @@ namespace Mall.Module.Product
{ {
categoryIds = string.Join(",", model.CategoryList.Select(qitem => qitem.CategoryId)); categoryIds = string.Join(",", model.CategoryList.Select(qitem => qitem.CategoryId));
} }
var servicePersionList = reserve_ServicePersonalRepository.GetServicePersonalListExtRepository(storeId,model.Id, categoryIds)?.ToList() ?? new List<Model.Extend.Reserve.RB_Reserve_ServicePersonal_Extend>(); //服务人员列表
var servicePersionList = new List<RB_Reserve_ServicePersonal_Extend>();
if (model.IsChooseServicePerson == 1)
{
servicePersionList= reserve_ServicePersonalRepository.GetServicePersonalListExtRepository(storeId, model.Id, categoryIds,servicePersionId)?.ToList() ?? new List<Model.Extend.Reserve.RB_Reserve_ServicePersonal_Extend>();
}
var storeModel = storesRepository.GetEntity(storeId); var storeModel = storesRepository.GetEntity(storeId);
List<StoreReserveDate> storeDateList = new List<StoreReserveDate>(); List<StoreReserveDate> storeDateList = new List<StoreReserveDate>();
DateTime currentDay = Convert.ToDateTime(DateTime.Now.ToString("yyyy-MM-dd")); DateTime currentDay = Convert.ToDateTime(DateTime.Now.ToString("yyyy-MM-dd"));
......
...@@ -338,8 +338,9 @@ ORDER BY t.orderNum desc "; ...@@ -338,8 +338,9 @@ ORDER BY t.orderNum desc ";
/// <param name="storeId"></param> /// <param name="storeId"></param>
/// <param name="productId"></param> /// <param name="productId"></param>
/// <param name="categoryIds"></param> /// <param name="categoryIds"></param>
/// <param name="servicePersionId">服务人员Id</param>
/// <returns></returns> /// <returns></returns>
public List<RB_Reserve_ServicePersonal_Extend> GetServicePersonalListExtRepository(int storeId, int productId, string categoryIds) public List<RB_Reserve_ServicePersonal_Extend> GetServicePersonalListExtRepository(int storeId, int productId, string categoryIds,int servicePersionId=0)
{ {
StringBuilder builder = new StringBuilder(); StringBuilder builder = new StringBuilder();
builder.AppendFormat(@" builder.AppendFormat(@"
...@@ -362,6 +363,10 @@ LEFT JOIN ...@@ -362,6 +363,10 @@ LEFT JOIN
) AS orderTab ON A.ID=orderTab.OrderNum ) AS orderTab ON A.ID=orderTab.OrderNum
WHERE A.Status=0 AND A.StoreId={2} WHERE A.Status=0 AND A.StoreId={2}
", productId, categoryIds, storeId); ", productId, categoryIds, storeId);
if (servicePersionId > 0)
{
builder.AppendFormat(" AND A.ID={0} ", servicePersionId);
}
return Get<RB_Reserve_ServicePersonal_Extend>(builder.ToString()).ToList(); return Get<RB_Reserve_ServicePersonal_Extend>(builder.ToString()).ToList();
} }
......
...@@ -423,13 +423,13 @@ namespace Mall.WebApi.Controllers.MallBase ...@@ -423,13 +423,13 @@ namespace Mall.WebApi.Controllers.MallBase
JObject prams = JObject.Parse(req.msg.ToString()); JObject prams = JObject.Parse(req.msg.ToString());
int GoodsId = prams.GetInt("GoodsId", 0); int GoodsId = prams.GetInt("GoodsId", 0);
int StoreId = prams.GetInt("StoreId", 0); int StoreId = prams.GetInt("StoreId", 0);
int servicePersionId = prams.GetInt("servicePersionId", 0);
if (StoreId<=0 || GoodsId<=0) if (StoreId<=0 || GoodsId<=0)
{ {
return ApiResult.ParamIsNull(message:"请选择门店"); return ApiResult.ParamIsNull(message:"请选择门店");
} }
int UserId = req.UserId; int UserId = req.UserId;
object Robj = productModule.GetAppletOfflineGoodsInfoModule(GoodsId, UserId, req.SmallShopsId, req.TenantId, req.MallBaseId, storeId: StoreId); object Robj = productModule.GetAppletOfflineGoodsInfoModule(GoodsId, UserId, req.SmallShopsId, req.TenantId, req.MallBaseId, storeId: StoreId,servicePersionId:servicePersionId);
return ApiResult.Success("", Robj); return ApiResult.Success("", Robj);
} }
......
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