Commit 90c30ab7 authored by liudong1993's avatar liudong1993

订单列表 调整

parent 62988872
...@@ -9,6 +9,9 @@ namespace Edu.Model.ViewModel.Course ...@@ -9,6 +9,9 @@ namespace Edu.Model.ViewModel.Course
[Serializable] [Serializable]
public class RB_Order_Remark_ViewModel : Model.Entity.Course.RB_Order_Remark public class RB_Order_Remark_ViewModel : Model.Entity.Course.RB_Order_Remark
{ {
/// <summary>
/// 姓名
/// </summary>
public string CreateByName { get; set; }
} }
} }
\ No newline at end of file
...@@ -25,18 +25,20 @@ namespace Edu.Repository.Course ...@@ -25,18 +25,20 @@ namespace Edu.Repository.Course
if (demodel.OrderId > 0) if (demodel.OrderId > 0)
{ {
where += $@" and {nameof(RB_Order_Remark.OrderId)} ={demodel.OrderId}"; where += $@" and r.{nameof(RB_Order_Remark.OrderId)} ={demodel.OrderId}";
} }
if (!string.IsNullOrEmpty(orderIds)) if (!string.IsNullOrEmpty(orderIds))
{ {
where += $@" and {nameof(RB_Order_Remark.OrderId)} in({orderIds})"; where += $@" and r.{nameof(RB_Order_Remark.OrderId)} in({orderIds})";
} }
if (demodel.Type > 0) if (demodel.Type > 0)
{ {
where += $@" and {nameof(RB_Order_Remark.Type)} ={demodel.Type}"; where += $@" and r.{nameof(RB_Order_Remark.Type)} ={demodel.Type}";
} }
string sql = $@" select * from RB_Order_Remark where {where} order by Id desc"; string sql = $@" select r.*,e.EmName as CreateByName from RB_Order_Remark r
left join rb_employee e on r.CreateBy = e.EmployeeId
where {where} order by r.Id desc";
return Get<RB_Order_Remark_ViewModel>(sql).ToList(); return Get<RB_Order_Remark_ViewModel>(sql).ToList();
} }
......
...@@ -161,28 +161,28 @@ namespace Edu.WebApi.Controllers.Course ...@@ -161,28 +161,28 @@ namespace Edu.WebApi.Controllers.Course
{ {
z.Id, z.Id,
z.Content, z.Content,
CreateBy = UserReidsCache.GetUserLoginInfo(z.CreateBy)?.AccountName ?? "", CreateBy = z.CreateByName,
CreateTime = z.CreateTime.ToString("yyyy-MM-dd HH:mm:ss") CreateTime = z.CreateTime.ToString("yyyy-MM-dd HH:mm:ss")
}), }),
TeacherRemarkList = x.TeacherRemarkList.Select(z => new TeacherRemarkList = x.TeacherRemarkList.Select(z => new
{ {
z.Id, z.Id,
z.Content, z.Content,
CreateBy = UserReidsCache.GetUserLoginInfo(z.CreateBy)?.AccountName ?? "", CreateBy = z.CreateByName,
CreateTime = z.CreateTime.ToString("yyyy-MM-dd HH:mm:ss") CreateTime = z.CreateTime.ToString("yyyy-MM-dd HH:mm:ss")
}), }),
RectorRemarkList = x.RectorRemarkList.Select(z => new RectorRemarkList = x.RectorRemarkList.Select(z => new
{ {
z.Id, z.Id,
z.Content, z.Content,
CreateBy = UserReidsCache.GetUserLoginInfo(z.CreateBy)?.AccountName ?? "", CreateBy = z.CreateByName,
CreateTime = z.CreateTime.ToString("yyyy-MM-dd HH:mm:ss") CreateTime = z.CreateTime.ToString("yyyy-MM-dd HH:mm:ss")
}), }),
DirectorRemarkList = x.DirectorRemarkList.Select(z => new DirectorRemarkList = x.DirectorRemarkList.Select(z => new
{ {
z.Id, z.Id,
z.Content, z.Content,
CreateBy = UserReidsCache.GetUserLoginInfo(z.CreateBy)?.AccountName ?? "", CreateBy = z.CreateByName,
CreateTime = z.CreateTime.ToString("yyyy-MM-dd HH:mm:ss") CreateTime = z.CreateTime.ToString("yyyy-MM-dd HH:mm:ss")
}), }),
GuestList = x.GuestList.Select(z => new GuestList = x.GuestList.Select(z => new
...@@ -863,28 +863,28 @@ namespace Edu.WebApi.Controllers.Course ...@@ -863,28 +863,28 @@ namespace Edu.WebApi.Controllers.Course
{ {
z.Id, z.Id,
z.Content, z.Content,
CreateBy = UserReidsCache.GetUserLoginInfo(z.CreateBy)?.AccountName ?? "", CreateBy = z.CreateByName,
CreateTime = z.CreateTime.ToString("yyyy-MM-dd HH:mm:ss") CreateTime = z.CreateTime.ToString("yyyy-MM-dd HH:mm:ss")
}), }),
TeacherRemarkList = x.TeacherRemarkList.Select(z => new TeacherRemarkList = x.TeacherRemarkList.Select(z => new
{ {
z.Id, z.Id,
z.Content, z.Content,
CreateBy = UserReidsCache.GetUserLoginInfo(z.CreateBy)?.AccountName ?? "", CreateBy = z.CreateByName,
CreateTime = z.CreateTime.ToString("yyyy-MM-dd HH:mm:ss") CreateTime = z.CreateTime.ToString("yyyy-MM-dd HH:mm:ss")
}), }),
RectorRemarkList = x.RectorRemarkList.Select(z => new RectorRemarkList = x.RectorRemarkList.Select(z => new
{ {
z.Id, z.Id,
z.Content, z.Content,
CreateBy = UserReidsCache.GetUserLoginInfo(z.CreateBy)?.AccountName ?? "", CreateBy = z.CreateByName,
CreateTime = z.CreateTime.ToString("yyyy-MM-dd HH:mm:ss") CreateTime = z.CreateTime.ToString("yyyy-MM-dd HH:mm:ss")
}), }),
DirectorRemarkList = x.DirectorRemarkList.Select(z => new DirectorRemarkList = x.DirectorRemarkList.Select(z => new
{ {
z.Id, z.Id,
z.Content, z.Content,
CreateBy = UserReidsCache.GetUserLoginInfo(z.CreateBy)?.AccountName ?? "", CreateBy = z.CreateByName,
CreateTime = z.CreateTime.ToString("yyyy-MM-dd HH:mm:ss") CreateTime = z.CreateTime.ToString("yyyy-MM-dd HH:mm:ss")
}), }),
GuestList = x.GuestList.Select(z => new GuestList = x.GuestList.Select(z => new
......
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