Commit ede10296 authored by 黄奎's avatar 黄奎

页面修改

parent 0e5ca11f
......@@ -23,7 +23,7 @@
<HintPath>..\lib\Aspose.Cells.dll</HintPath>
</Reference>
<Reference Include="Aspose.Words">
<HintPath>..\..\think_project2\Api\lib\18.7\Aspose.Words.dll</HintPath>
<HintPath>..\lib\18.7\Aspose.Words.dll</HintPath>
</Reference>
</ItemGroup>
......
......@@ -376,5 +376,10 @@ namespace Edu.Model.Entity.Course
/// 外教课时
/// </summary>
public decimal ForeignHours { get; set; }
/// <summary>
/// 上架状态(1-显示,2-隐藏)
/// </summary>
public int SaleState { get; set; }
}
}
\ No newline at end of file
......@@ -238,7 +238,7 @@ namespace Edu.Module.Course
#region 日语培训
/// <summary>
/// 获取日语培训
/// 班课产品
/// </summary>
/// <param name="pageIndex"></param>
/// <param name="pageSize"></param>
......@@ -297,6 +297,8 @@ namespace Edu.Module.Course
return list;
}
/// <summary>
/// 获取班级课程信息
/// </summary>
......
......@@ -306,6 +306,7 @@ WHERE 1=1
{nameof(RB_Course_ViewModel.AddHoursMoney),model.AddHoursMoney },
{nameof(RB_Course_ViewModel.ChineseHours),model.ChineseHours },
{nameof(RB_Course_ViewModel.ForeignHours),model.ForeignHours },
{nameof(RB_Course_ViewModel.SaleState),model.SaleState },
};
flag = base.Update(fileds, new WhereHelper(nameof(RB_Course_ViewModel.CourseId), model.CourseId));
}
......
......@@ -357,7 +357,7 @@ WHERE A.ClassId={0}
}
/// <summary>
/// 获取日语培训分页列表
/// 获取班课产品
/// </summary>
/// <param name="pageIndex"></param>
/// <param name="pageSize"></param>
......@@ -383,6 +383,7 @@ WHERE 1=1
builder.AppendFormat(" AND A.{0}={1} ", nameof(RB_Class_ViewModel.Status), 0);
builder.AppendFormat(" AND A.{0} in(1,2) ", nameof(RB_Class_ViewModel.ClassStatus));
builder.AppendFormat(" AND B.Saleplat<>'' ");
builder.AppendFormat(" AND B.SaleState=1 ");
if (query != null)
{
if (query.Group_Id > 0)
......@@ -495,6 +496,7 @@ WHERE 1=1
return GetPage<RB_Class_ViewModel>(pageIndex, pageSize, out rowsCount, builder.ToString(), parameters).ToList();
}
/// <summary>
/// 班级类型统计
/// </summary>
......
......@@ -427,6 +427,7 @@ namespace Edu.WebApi.Controllers.Course
AddHoursMoney = base.ParmJObj.GetDecimal("AddHoursMoney"),
ChineseHours = base.ParmJObj.GetDecimal("ChineseHours"),
ForeignHours = base.ParmJObj.GetDecimal("ForeignHours"),
SaleState=base.ParmJObj.GetInt("SaleState"),
};
try
{
......
......@@ -62,8 +62,10 @@ namespace Edu.WebApi.Controllers.Course
dmodel.School_Id = base.ParmJObj.GetInt("School_Id");
}
dmodel.Group_Id = userInfo.Group_Id;
var list = orderModule.GetClassPruductListModule(pageModel.PageIndex, pageModel.PageSize, out long count, dmodel);
var list = new List<RB_Class_ViewModel>();
list = orderModule.GetClassPruductListModule(pageModel.PageIndex, pageModel.PageSize, out long count, dmodel);
pageModel.Count = Convert.ToInt32(count);
List<object> result = new List<object>();
foreach (var x in list)
{
......@@ -73,55 +75,68 @@ namespace Edu.WebApi.Controllers.Course
{
IsInsertClass = 1;//可以插班报入
}
int IsCanApply = 0;
if (x.EndOrderTime != null && !string.IsNullOrEmpty(Common.ConvertHelper.FormatDate(x.EndOrderTime)) && !string.IsNullOrEmpty(Common.ConvertHelper.FormatDate(x.OpenTime)))
{
if (x.EndOrderTime >= Convert.ToDateTime(DateTime.Now.ToString("yyyy-MM-dd")) && x.ClassPersion > x.OrderStudentCount)
{
IsCanApply = 1;
}
}
string ClassStyleName = "";
if (x.ClassStyle > 0)
{
ClassStyleName = x.ClassStyle.ToName();
}
var obj = new
{
x.ClassId,
x.ClassName,
x.ClassNo,
ClassId = x?.ClassId ?? 0,
ClassName = x?.ClassName ?? "",
ClassNo = x?.ClassNo ?? "",
x.CourseName,
x.CouseId,
x.CourseFeature,
x.ClassHours,
x.Teacher_Id,
x.TeacherName,
x.TeacherHead,
x.RoomName,
x.ClassStyle,
ClassStyleName = x.ClassStyle.ToName(),
OpenTime = x.OpenTime.ToString("yyyy年MM月dd日"),
CourseFeature = x?.CourseFeature ?? "",
ClassHours = x?.ClassHours ?? 0,
Teacher_Id = x?.Teacher_Id ?? 0,
TeacherName = x?.TeacherName ?? "",
TeacherHead = x?.TeacherHead ?? "",
RoomName = x?.RoomName ?? "",
ClassStyle = x?.ClassStyle ?? 0,
ClassStyleName,
OpenTime = Common.ConvertHelper.FormatDate2(x.OpenTime),
EndOrderTime = Common.ConvertHelper.FormatDate2(x.EndOrderTime),
IsCanApply = x.EndOrderTime >= Convert.ToDateTime(DateTime.Now.ToString("yyyy-MM-dd")) && x.ClassPersion > x.OrderStudentCount ? 1 : 0,
OriginalPrice = x.CourseOriginalPrice,
SellPrice = x.CourseSellPrice,
x.IsStepPrice,
x.ClassPersion,
x.OutRemark,
x.OrderStudentCount,
IsCanApply,
OriginalPrice = x?.CourseOriginalPrice ?? 0,
SellPrice = x?.CourseSellPrice ?? 0,
IsStepPrice = x?.IsStepPrice ?? 0,
ClassPersion = x?.ClassPersion ?? 0,
OutRemark = x?.OutRemark ?? "",
SurplusNum,
ClassStepPriceList = x.ClassStepPriceList.Select(z => new
OrderStudentCount = x?.OrderStudentCount ?? 0,
SchoolName = x?.SchoolName ?? "",
UpdateTime = Common.ConvertHelper.FormatTime(x.UpdateTime),
ClassTimeList = x?.DefaultTimeList,
ClassStepPriceList = x?.ClassStepPriceList?.Select(z => new
{
z.ClassStepPriceId,
z.PersionNum,
z.PersionPrice
}),
ClassTimeList = x.DefaultTimeList,
ClassPlanList = x.ClassPlanList.Select(z => new
ClassPlanList = x?.ClassPlanList?.Select(z => new
{
z.WeekDay,
ClassDate = x.ClassStyle == ClassStyleEnum.FixedDate ? Common.ConvertHelper.FormatDate(z.ClassDate) : ""
}),
x.SchoolName,
UpdateTime = Common.ConvertHelper.FormatTime(x.UpdateTime),
x.OtherCourseList,
OtherCourseList = x?.OtherCourseList ?? new List<RB_Class_Course_Extend>(),
IsChaBan = IsInsertClass,
x.CourseSubject,
x.CourseSubjectName,
x.B2CRatio,
x.B2CReNewRatio,
x.B2BRebateRatio,
x.B2BReNewRatio,
x.SchoolRebateRatio,
x.SchoolReNewRatio
CourseSubject = x?.CourseSubject ?? 0,
CourseSubjectName = x?.CourseSubjectName ?? "",
B2CRatio = x?.B2CRatio ?? 0,
B2CReNewRatio = x?.B2CReNewRatio ?? 0,
B2BRebateRatio = x?.B2BRebateRatio ?? 0,
B2BReNewRatio = x?.B2BReNewRatio ?? 0,
SchoolRebateRatio = x?.SchoolRebateRatio ?? 0,
SchoolReNewRatio = x?.SchoolReNewRatio ?? 0
};
result.Add(obj);
}
......
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