Commit 8314e080 authored by 黄奎's avatar 黄奎

页面修改

parent a0d9e2e9
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Text; using System.Text;
using Edu.Common.Enum.Sale;
using Edu.Model.Entity.Course; using Edu.Model.Entity.Course;
namespace Edu.Model.ViewModel.Course namespace Edu.Model.ViewModel.Course
...@@ -192,5 +193,35 @@ namespace Edu.Model.ViewModel.Course ...@@ -192,5 +193,35 @@ namespace Edu.Model.ViewModel.Course
///上课时间ids ///上课时间ids
/// </summary> /// </summary>
public string ClassTimeIds { get; set; } public string ClassTimeIds { get; set; }
/// <summary>
/// 订单报入类型(1-正常报入,2-插班报入,3-续费订单,4-转班订单,5-分拆订单)
/// </summary>
public OrderJoinTypeEnum JoinType { get; set; }
/// <summary>
/// 原订单报入类型(1-正常报入,2-插班报入,3-续费订单,4-转班订单,5-分拆订单)
/// </summary>
public OrderJoinTypeEnum TargetJoinType { get; set; }
/// <summary>
/// 原订单编号
/// </summary>
public int SourceOrderId { get; set; }
/// <summary>
/// 原订单班级名称
/// </summary>
public string SourceClassName { get; set; }
/// <summary>
/// 目标订单编号
/// </summary>
public int TargetOrderId { get; set; }
/// <summary>
/// 目标订单班级名称
/// </summary>
public string TargetClassName { get; set; }
} }
} }
using Edu.Model.Entity.Course; using Edu.Common.Enum.Sale;
using Edu.Model.Entity.Course;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
...@@ -116,6 +117,38 @@ namespace Edu.Model.ViewModel.Course ...@@ -116,6 +117,38 @@ namespace Edu.Model.ViewModel.Course
public decimal UseCoursewareFee { get; set; } public decimal UseCoursewareFee { get; set; }
#endregion #endregion
#region 订单相关
/// <summary>
/// 订单报入类型(1-正常报入,2-插班报入,3-续费订单,4-转班订单,5-分拆订单)
/// </summary>
public OrderJoinTypeEnum JoinType { get; set; }
/// <summary>
/// 原订单报入类型(1-正常报入,2-插班报入,3-续费订单,4-转班订单,5-分拆订单)
/// </summary>
public OrderJoinTypeEnum TargetJoinType { get; set; }
/// <summary>
/// 原订单编号
/// </summary>
public int SourceOrderId { get; set; }
/// <summary>
/// 原订单班级名称
/// </summary>
public string SourceClassName { get; set; }
/// <summary>
/// 目标订单编号
/// </summary>
public int TargetOrderId { get; set; }
/// <summary>
/// 目标订单班级名称
/// </summary>
public string TargetClassName { get; set; }
#endregion
/// <summary> /// <summary>
/// 是否审核(1-是) /// 是否审核(1-是)
/// </summary> /// </summary>
......
...@@ -2431,8 +2431,36 @@ namespace Edu.Module.Course ...@@ -2431,8 +2431,36 @@ namespace Edu.Module.Course
//用户信息 //用户信息
var userIds = string.Join(",", list.Select(x => x.CreateBy).Distinct()); var userIds = string.Join(",", list.Select(x => x.CreateBy).Distinct());
var alist = accountRepository.GetAccountListExtRepository(new Model.ViewModel.User.RB_Account_ViewModel() { QIds = userIds }); var alist = accountRepository.GetAccountListExtRepository(new Model.ViewModel.User.RB_Account_ViewModel() { QIds = userIds });
List<RB_Order_ViewModel> sourceTargetList = new List<RB_Order_ViewModel>();
List<int> idList = new List<int>();
var sourceOrderIdList = Common.ConvertHelper.StringToList(string.Join(",", list.Select(x => x.SourceOrderId)));
if (sourceOrderIdList != null && sourceOrderIdList.Count > 0)
{
idList.AddRange(sourceOrderIdList);
}
var targetOrderIdList = Common.ConvertHelper.StringToList(string.Join(",", list.Select(x => x.TargetOrderId)));
if (targetOrderIdList != null && targetOrderIdList.Count > 0)
{
idList.AddRange(targetOrderIdList);
}
if (idList != null && idList.Count > 0)
{
string ids = string.Join(",", idList);
sourceTargetList = orderRepository.GetOrderListRepository(new RB_Order_ViewModel { QOrderIds = ids });
}
foreach (var item in list) foreach (var item in list)
{ {
if (item.SourceOrderId > 0)
{
item.SourceClassName = sourceTargetList?.Where(qitem => qitem.OrderId == item.SourceOrderId)?.FirstOrDefault()?.ClassName;
}
if (item.TargetOrderId > 0)
{
item.TargetClassName = sourceTargetList?.Where(qitem => qitem.OrderId == item.TargetOrderId)?.FirstOrDefault()?.ClassName;
}
#region 财务单据 #region 财务单据
item.FinanceList = flist.Where(x => x.GuestId == item.GuestId).ToList(); item.FinanceList = flist.Where(x => x.GuestId == item.GuestId).ToList();
item.Income = item.FinanceList.Where(x => x.Type == Common.Enum.Finance.WFTempLateClassEnum.IN && x.Is_Cashier == 1).Sum(x => (x.Money ?? 0) + (x.Fee ?? 0));//出纳审核算有效金额 item.Income = item.FinanceList.Where(x => x.Type == Common.Enum.Finance.WFTempLateClassEnum.IN && x.Is_Cashier == 1).Sum(x => (x.Money ?? 0) + (x.Fee ?? 0));//出纳审核算有效金额
......
...@@ -3695,12 +3695,38 @@ namespace Edu.Module.Finance ...@@ -3695,12 +3695,38 @@ namespace Edu.Module.Finance
//查询关联老师 //查询关联老师
string teacherIds = string.Join(",", list.Where(x => x.EnterID != x.HelpEnterId && x.HelpEnterId > 0).Select(x => x.HelpEnterId).Distinct()); string teacherIds = string.Join(",", list.Where(x => x.EnterID != x.HelpEnterId && x.HelpEnterId > 0).Select(x => x.HelpEnterId).Distinct());
List<Model.ViewModel.User.Employee_ViewModel> teacherList = new List<Model.ViewModel.User.Employee_ViewModel>(); List<Model.ViewModel.User.Employee_ViewModel> teacherList = new List<Model.ViewModel.User.Employee_ViewModel>();
if (!string.IsNullOrEmpty(teacherIds)) { if (!string.IsNullOrEmpty(teacherIds))
{
teacherList = accountRepository.GetEmployeeListRepository(new Model.ViewModel.User.Employee_ViewModel() { Group_Id = groupId, QIds = teacherIds }); teacherList = accountRepository.GetEmployeeListRepository(new Model.ViewModel.User.Employee_ViewModel() { Group_Id = groupId, QIds = teacherIds });
} }
List<RB_Order_ViewModel> sourceTargetList = new List<RB_Order_ViewModel>();
List<int> idList = new List<int>();
var sourceOrderIdList = Common.ConvertHelper.StringToList(string.Join(",", list.Select(x => x.SourceOrderId)));
if (sourceOrderIdList != null && sourceOrderIdList.Count > 0)
{
idList.AddRange(sourceOrderIdList);
}
var targetOrderIdList = Common.ConvertHelper.StringToList(string.Join(",", list.Select(x => x.TargetOrderId)));
if (targetOrderIdList != null && targetOrderIdList.Count > 0)
{
idList.AddRange(targetOrderIdList);
}
if (idList != null && idList.Count > 0)
{
string ids = string.Join(",", idList);
sourceTargetList = orderRepository.GetOrderListRepository(new RB_Order_ViewModel { QOrderIds = ids });
}
foreach (var item in list) foreach (var item in list)
{ {
if (item.SourceOrderId > 0)
{
item.SourceClassName = sourceTargetList?.Where(qitem => qitem.OrderId == item.SourceOrderId)?.FirstOrDefault()?.ClassName;
}
if (item.TargetOrderId > 0)
{
item.TargetClassName = sourceTargetList?.Where(qitem => qitem.OrderId == item.TargetOrderId)?.FirstOrDefault()?.ClassName;
}
string SaleName = ulist.Where(x => x.Id == item.EnterID).FirstOrDefault()?.EmployeeName ?? ""; string SaleName = ulist.Where(x => x.Id == item.EnterID).FirstOrDefault()?.EmployeeName ?? "";
string HelpEnterName = ""; string HelpEnterName = "";
if (item.EnterID != item.HelpEnterId && item.HelpEnterId > 0) { if (item.EnterID != item.HelpEnterId && item.HelpEnterId > 0) {
...@@ -3726,7 +3752,13 @@ namespace Edu.Module.Finance ...@@ -3726,7 +3752,13 @@ namespace Edu.Module.Finance
UnitPrice, UnitPrice,
XHMoney = Math.Round(item.UnitPrice * item.CurrentDeductionHours, 6, MidpointRounding.AwayFromZero), XHMoney = Math.Round(item.UnitPrice * item.CurrentDeductionHours, 6, MidpointRounding.AwayFromZero),
SaleName, SaleName,
HelpEnterName HelpEnterName,
item.JoinType,
item.TargetJoinType,
item.SourceOrderId,
item.TargetOrderId,
item.SourceClassName,
item.TargetClassName,
}); });
} }
} }
......
...@@ -577,6 +577,7 @@ SELECT p.OrderGuestId,p.CurrentDeductionHours,t2.GuestName,p.TeacherId,t3.Teache ...@@ -577,6 +577,7 @@ SELECT p.OrderGuestId,p.CurrentDeductionHours,t2.GuestName,p.TeacherId,t3.Teache
+ec.FirstBookFee + ec.SecondBookFee + ec.ThirdBookFee +ec.FirstBookFee + ec.SecondBookFee + ec.ThirdBookFee
+ec.FirstClassFee + ec.SecondClassFee + ec.ThirdClassFee as TotalSub +ec.FirstClassFee + ec.SecondClassFee + ec.ThirdClassFee as TotalSub
,ec.FirstClassHours + ec.SecondClassHours + ec.ThirdClassHours as ClassHours ,ec.FirstClassHours + ec.SecondClassHours + ec.ThirdClassHours as ClassHours
,o.JoinType,o.TargetJoinType,o.SourceOrderId,o.TargetOrderId
FROM rb_class_check p FROM rb_class_check p
INNER JOIN rb_class_time t on p.ClassTimeId = t.ClassTimeId INNER JOIN rb_class_time t on p.ClassTimeId = t.ClassTimeId
LEFT JOIN rb_order_guest t2 on p.OrderGuestId = t2.Id LEFT JOIN rb_order_guest t2 on p.OrderGuestId = t2.Id
......
...@@ -237,7 +237,9 @@ namespace Edu.Repository.Course ...@@ -237,7 +237,9 @@ namespace Edu.Repository.Course
where += $@" AND o.CreateTime <='{demodel.EndTime} 23:59:59'"; where += $@" AND o.CreateTime <='{demodel.EndTime} 23:59:59'";
} }
string sql = $@" SELECT c.*,c1.ClassName,c1.ClassNo,ca.AdjustPrice FROM RB_Education_Contract c string sql = $@"
SELECT c.*,c1.ClassName,c1.ClassNo,ca.AdjustPrice,o.JoinType,o.TargetJoinType,o.SourceOrderId,o.TargetOrderId
FROM RB_Education_Contract c
left join RB_Education_ContractAdjust ca on c.Id = ca.ContractId left join RB_Education_ContractAdjust ca on c.Id = ca.ContractId
left join rb_order o on c.OrderId = o.OrderId left join rb_order o on c.OrderId = o.OrderId
left join rb_class c1 on o.ClassId = c1.ClassId left join rb_class c1 on o.ClassId = c1.ClassId
......
...@@ -1048,6 +1048,12 @@ namespace Edu.WebApi.Controllers.Finance ...@@ -1048,6 +1048,12 @@ namespace Edu.WebApi.Controllers.Finance
x.TotalDiscountMoney, x.TotalDiscountMoney,
x.TotalMoney, x.TotalMoney,
x.Status, x.Status,
x.JoinType,
x.TargetJoinType,
x.SourceOrderId,
x.SourceClassName,
x.TargetOrderId,
x.TargetClassName,
IncomeList = x.FinanceList.Where(t => t.Type == WFTempLateClassEnum.IN).Select(z => new IncomeList = x.FinanceList.Where(t => t.Type == WFTempLateClassEnum.IN).Select(z => new
{ {
z.FrID, z.FrID,
......
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