Commit f25789cf authored by 黄奎's avatar 黄奎

页面修改

parent 4a726f87
......@@ -303,5 +303,10 @@ namespace Edu.Model.Entity.Course
/// 最开始拆分订单的订单编号【最原始的订单编号】
/// </summary>
public int FirstOrderId { get; set; }
/// <summary>
/// 是否已回归原班(1-是)
/// </summary>
public int IsBackClass { get; set; }
}
}
......@@ -32,7 +32,7 @@ namespace Edu.Model.Entity.Course
public string GuestName { get; set; }
/// <summary>
/// 状态 1正常 2退学 3-申请中,4-驳回申请,5-停课,6-停课申请中,7-完结的订单,8-转班申请中
/// 状态 1正常 2退学 3-申请中,4-驳回申请,5-停课,6-停课申请中,7-完结的订单,8-转班申请中,9-分拆申请
/// </summary>
public int GuestState { get; set; }
......
......@@ -86,6 +86,7 @@ namespace Edu.Model.ViewModel.Course
case 6: str = "停课申请中"; break;
case 7: str = "完结"; break;
case 8: str = "转班申请中"; break;
case 9: str = "分拆申请中"; break;
}
return str;
}
......
......@@ -907,11 +907,27 @@ namespace Edu.Module.EduTask
/// 回归原班上课
/// </summary>
/// <returns></returns>
public bool RegressSourceClassModule(int OrderId)
public bool RegressSourceClassModule(int OrderId,out string message)
{
bool flag = false;
message = "";
var order = orderRepository.GetEntity(OrderId);
if (order == null)
{
message = "未找到此订单";
return false;
}
if (order.FirstOrderId <= 0)
{
message = "当前订单不是转班/分拆订单不能回归原班!";
return false;
}
var oldOrder = orderRepository.GetEntity(order.FirstOrderId);
if (oldOrder == null)
{
message = "原订单不是转班/分拆订单不能回归原班!";
return false;
}
var orderguestList = guestRepository.GetOrderGuestListRepository(new RB_Order_Guest_ViewModel() {
OrderIds = OrderId + "," + order.FirstOrderId
});
......@@ -974,7 +990,8 @@ namespace Edu.Module.EduTask
Dictionary<string, object> newOrderFileds = new Dictionary<string, object>()
{
{nameof(RB_Order.PreferPrice),order.PreferPrice-refundMoney}
{nameof(RB_Order.PreferPrice),order.PreferPrice-refundMoney},
{nameof(RB_Order.IsBackClass),1}
};
//更新新订单应收
flag = orderRepository.Update(newOrderFileds, new WhereHelper(nameof(RB_Order.OrderId), order.OrderId));
......
......@@ -1263,6 +1263,8 @@ namespace Edu.WebApi.Controllers.Course
OpenTime = Common.ConvertHelper.FormatDate(x.OpenTime),
x.VisitorReserveId,
x.RenewOrderId,
x.FirstOrderId,
x.IsBackClass,
SaleRemarkList = x?.SaleRemarkList.Select(z => new
{
z.Id,
......
......@@ -203,8 +203,8 @@ namespace Edu.WebApi.Controllers.EduTask
public ApiResult RegressSourceClass()
{
var OrderId = base.ParmJObj.GetInt("OrderId");
bool flag = orderChangeModule.RegressSourceClassModule(OrderId);
return flag ? ApiResult.Success() : ApiResult.Failed();
bool flag = orderChangeModule.RegressSourceClassModule(OrderId,out string message);
return flag ? ApiResult.Success() : ApiResult.Failed(message: message);
}
}
}
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