Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
Education
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
黄奎
Education
Commits
a2b6745b
Commit
a2b6745b
authored
Aug 02, 2021
by
罗超
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://gitlab.oytour.com/Kui2/education
# Conflicts: # Edu.WebApi/appsettings.json
parents
8ccd87a2
fb5d4f94
Hide whitespace changes
Inline
Side-by-side
Showing
21 changed files
with
611 additions
and
170 deletions
+611
-170
Config.cs
Edu.Common/Config.cs
+12
-0
RB_Order_Guest.cs
Edu.Model/Entity/Course/RB_Order_Guest.cs
+16
-0
RB_Order_Guest_Extend.cs
Edu.Model/ViewModel/Course/RB_Order_Guest_Extend.cs
+1
-0
RB_Order_Guest_ViewModel.cs
Edu.Model/ViewModel/Course/RB_Order_Guest_ViewModel.cs
+16
-0
ClassModule.cs
Edu.Module.Course/ClassModule.cs
+416
-14
OrderModule.cs
Edu.Module.Course/OrderModule.cs
+3
-1
OrderModule2.cs
Edu.Module.Course/OrderModule2.cs
+5
-4
StudentBillModule.cs
Edu.Module.Course/StudentBillModule.cs
+6
-2
ChangeClassPlanModule.cs
Edu.Module.EduTask/ChangeClassPlanModule.cs
+23
-107
RB_ClassRepository.cs
Edu.Repository/Course/RB_ClassRepository.cs
+4
-4
RB_Class_CheckRepository.cs
Edu.Repository/Course/RB_Class_CheckRepository.cs
+1
-1
RB_Order_GuestRepository.cs
Edu.Repository/Course/RB_Order_GuestRepository.cs
+1
-1
RB_AccountRepository.cs
Edu.Repository/User/RB_AccountRepository.cs
+4
-4
RB_DepartmentRepository.cs
Edu.Repository/User/RB_DepartmentRepository.cs
+1
-1
ClassController.cs
Edu.WebApi/Controllers/Course/ClassController.cs
+6
-2
OrderController.cs
Edu.WebApi/Controllers/Course/OrderController.cs
+32
-2
StuController.cs
Edu.WebApi/Controllers/Course/StuController.cs
+20
-3
ChangePlanController.cs
Edu.WebApi/Controllers/EduTask/ChangePlanController.cs
+23
-23
UserController.cs
Edu.WebApi/Controllers/User/UserController.cs
+14
-1
WebController.cs
Edu.WebApi/Controllers/Web/WebController.cs
+1
-0
appsettings.json
Edu.WebApi/appsettings.json
+6
-0
No files found.
Edu.Common/Config.cs
View file @
a2b6745b
...
...
@@ -726,5 +726,17 @@ namespace Edu.Common
return
ReadConfigKey
(
"EducationContractAdmin"
);
}
}
/// <summary>
/// 是否开启调课验证
/// </summary>
public
static
int
IsOpenChangeClassVerify
{
get
{
int
.
TryParse
(
ReadConfigKey
(
"IsOpenChangeClassVerify"
),
out
int
IsOpenChangeClassVerify
);
return
IsOpenChangeClassVerify
;
}
}
}
}
\ No newline at end of file
Edu.Model/Entity/Course/RB_Order_Guest.cs
View file @
a2b6745b
...
...
@@ -200,9 +200,25 @@ namespace Edu.Model.Entity.Course
/// 学生头像
/// </summary>
public
string
StuIcon
{
get
;
set
;
}
/// <summary>
/// 变更生效时间
/// </summary>
public
DateTime
?
ChangeEffectTime
{
get
;
set
;
}
/// <summary>
/// 合同编号
/// </summary>
public
string
GuestContractNo
{
get
;
set
;
}
/// <summary>
/// 上传类型(1-PDF,2-图片)
/// </summary>
public
int
ContractType
{
get
;
set
;
}
/// <summary>
/// 合同链接
/// </summary>
public
string
ContractUrl
{
get
;
set
;
}
}
}
Edu.Model/ViewModel/Course/RB_Order_Guest_Extend.cs
View file @
a2b6745b
...
...
@@ -19,6 +19,7 @@ namespace Edu.Model.ViewModel.Course
/// 合同id
/// </summary>
public
int
ContractId
{
get
;
set
;
}
/// <summary>
/// 课程id
/// </summary>
...
...
Edu.Model/ViewModel/Course/RB_Order_Guest_ViewModel.cs
View file @
a2b6745b
...
...
@@ -253,5 +253,21 @@ namespace Edu.Model.ViewModel.Course
/// </summary>
public
int
ContractTotalHours
{
get
;
set
;
}
/// <summary>
/// 合同文件列表
/// </summary>
public
List
<
string
>
ContractUrlList
{
get
{
List
<
string
>
list
=
new
List
<
string
>();
if
(!
string
.
IsNullOrEmpty
(
this
.
ContractUrl
))
{
list
=
Common
.
Plugin
.
JsonHelper
.
DeserializeObject
<
List
<
string
>>(
this
.
ContractUrl
);
}
return
list
;
}
}
}
}
\ No newline at end of file
Edu.Module.Course/ClassModule.cs
View file @
a2b6745b
using
Edu.AOP.CustomerAttribute
;
using
Edu.Cache.User
;
using
Edu.Common
;
using
Edu.Common.Enum
;
using
Edu.Common.Enum.Course
;
using
Edu.Common.Plugin
;
using
Edu.Model.CacheModel
;
using
Edu.Model.Entity.Course
;
using
Edu.Model.ViewModel.Course
;
//using Edu.Model.ViewModel.Mall;
using
Edu.Model.ViewModel.Reserve
;
using
Edu.Model.ViewModel.User
;
using
Edu.Repository.Course
;
...
...
@@ -157,6 +160,34 @@ namespace Edu.Module.Course
///// <summary>
///// 小程序对应的商品仓储对象
///// </summary>
//private readonly Repository.Mall.RB_GoodsRepository mallGoodsRepository = new Repository.Mall.RB_GoodsRepository();
///// <summary>
///// 小程序对应的商品分类仓储对象
///// </summary>
//private readonly Repository.Mall.RB_Goods_CategoryRepository MallGoodsCategoryRepository = new Repository.Mall.RB_Goods_CategoryRepository();
///// <summary>
///// 小程序对应的商品优惠仓储对象
///// </summary>
//private readonly Repository.Mall.RB_Goods_PreferentialRepository MallGoodsPreferentialRepository = new Repository.Mall.RB_Goods_PreferentialRepository();
///// <summary>
///// 商品规格
///// </summary>
//private readonly Repository.Mall.RB_Goods_SpecificationRepository goods_SpecificationRepository = new Repository.Mall.RB_Goods_SpecificationRepository();
///// <summary>
///// 商品规格值
///// </summary>
//private readonly Repository.Mall.RB_Goods_SpecificationValueRepository goods_SpecificationValueRepository = new Repository.Mall.RB_Goods_SpecificationValueRepository();
///// <summary>
///// 商品规格价格
///// </summary>
//private readonly Repository.Mall.RB_Goods_SpecificationPriceRepository goods_SpecificationPriceRepository = new Repository.Mall.RB_Goods_SpecificationPriceRepository();
/// <summary>
/// 获取班级列表
/// </summary>
...
...
@@ -550,6 +581,12 @@ namespace Edu.Module.Course
List
<
RB_Class_Plan_ViewModel
>
classPlanList
=
CreateClassPlanList
(
model
,
defaultPlanTimeList
,
BasicMinutes
);
model
.
ClassPlanList
=
classPlanList
;
#
region
同步班级到甲鹤小程序
Add
by
:
W
2021
-
08
-
02
09
:
49
// SetGoodsSpecificationValue(model);
#
endregion
return
flag
;
}
...
...
@@ -558,7 +595,7 @@ namespace Edu.Module.Course
/// </summary>
/// <param name="model"></param>
/// <returns></returns>
public
bool
AddClassPlanModule
(
int
ClassId
,
List
<
RB_Class_Plan_ViewModel
>
planList
,
UserInfo
user
,
out
bool
result
)
public
bool
AddClassPlanModule
(
int
ClassId
,
List
<
RB_Class_Plan_ViewModel
>
planList
,
UserInfo
user
,
out
bool
result
)
{
bool
flag
=
true
;
result
=
false
;
...
...
@@ -607,7 +644,7 @@ namespace Edu.Module.Course
var
classLogModel
=
new
Model
.
Entity
.
Log
.
RB_Class_Log
()
{
LogType
=
Common
.
Enum
.
Course
.
ClassLogTypeEnum
.
CreateClass
,
LogContent
=
string
.
Format
(
"班级管理员{0}创建上课计划成功!但是存在冲突的上课安排,等待管理员处理!"
,
user
.
AccountName
),
LogContent
=
string
.
Format
(
"班级管理员{0}创建上课计划成功!但是存在冲突的上课安排,等待管理员处理!"
,
user
.
AccountName
),
ClassId
=
ClassId
,
Group_Id
=
model
.
Group_Id
,
School_Id
=
model
.
School_Id
,
...
...
@@ -621,7 +658,7 @@ namespace Edu.Module.Course
var
classLogModel
=
new
Model
.
Entity
.
Log
.
RB_Class_Log
()
{
LogType
=
Common
.
Enum
.
Course
.
ClassLogTypeEnum
.
CreateClass
,
LogContent
=
string
.
Format
(
"班级管理员{0},完成班级排课计划冲突"
,
user
.
AccountName
),
LogContent
=
string
.
Format
(
"班级管理员{0},完成班级排课计划冲突"
,
user
.
AccountName
),
ClassId
=
ClassId
,
Group_Id
=
model
.
Group_Id
,
School_Id
=
model
.
School_Id
,
...
...
@@ -866,18 +903,19 @@ namespace Edu.Module.Course
item
.
ClassPlanId
,
item
.
ClassId
,
item
.
ClassName
,
ClassDate
=
Common
.
ConvertHelper
.
FormatDate
(
item
.
ClassDate
),
ClassDate
=
Common
.
ConvertHelper
.
FormatDate
(
item
.
ClassDate
),
item
.
TeacherId
,
item
.
TeacherName
,
item
.
ClassRoomId
,
item
.
RoomName
,
PlanTimeList
=
timeList
.
Where
(
qitem
=>
qitem
.
ClassPlanId
==
item
.
ClassPlanId
).
Select
(
qitem
=>
new
{
qitem
.
ClassTimeId
,
qitem
.
ClassId
,
qitem
.
ClassPlanId
,
qitem
.
StartTime
,
qitem
.
EndTime
,
qitem
.
TimeHour
PlanTimeList
=
timeList
.
Where
(
qitem
=>
qitem
.
ClassPlanId
==
item
.
ClassPlanId
).
Select
(
qitem
=>
new
{
qitem
.
ClassTimeId
,
qitem
.
ClassId
,
qitem
.
ClassPlanId
,
qitem
.
StartTime
,
qitem
.
EndTime
,
qitem
.
TimeHour
}),
PlanRepeatList
};
...
...
@@ -894,7 +932,7 @@ namespace Edu.Module.Course
/// <param name="message"></param>
/// <returns></returns>
[
TransactionCallHandler
]
public
virtual
bool
SetClassStatusModule
(
RB_Class_ViewModel
model
,
out
string
message
,
out
bool
result
)
public
virtual
bool
SetClassStatusModule
(
RB_Class_ViewModel
model
,
out
string
message
,
out
bool
result
)
{
result
=
false
;
bool
flag
=
false
;
...
...
@@ -930,7 +968,7 @@ namespace Edu.Module.Course
}
}
flag
=
classRepository
.
Update
(
fileds
,
new
WhereHelper
(
nameof
(
RB_Class_ViewModel
.
ClassId
),
model
.
ClassId
));
flag
=
classRepository
.
Update
(
fileds
,
new
WhereHelper
(
nameof
(
RB_Class_ViewModel
.
ClassId
),
model
.
ClassId
));
return
flag
;
}
...
...
@@ -1024,10 +1062,214 @@ namespace Edu.Module.Course
});
//已经完成的上课计划
var
finishClassHours
=
oldPlanList
?.
Sum
(
qitem
=>
qitem
.
TimeHour
)
??
0
;
List
<
RB_Class_Plan_ViewModel
>
classPlanList
=
class_PlanRepository
.
CreateClassPlanRepository
(
model
,
defaultPlanTimeList
,
finishClassHours
,
BasicMinutes
);
List
<
RB_Class_Plan_ViewModel
>
classPlanList
=
new
List
<
RB_Class_Plan_ViewModel
>();
if
(
model
.
ClassHours
>
0
&&
defaultPlanTimeList
!=
null
&&
defaultPlanTimeList
.
Count
>
0
)
{
var
srartDate
=
model
.
OpenTime
;
if
(
model
.
OpenTime
<
DateTime
.
Now
)
{
srartDate
=
DateTime
.
Now
;
}
//按周排课和按月排课
if
(
model
.
ClassStyle
==
ClassStyleEnum
.
Week
||
model
.
ClassStyle
==
ClassStyleEnum
.
Month
)
{
int
i
=
0
;
double
totalHours
=
Convert
.
ToDouble
(
finishClassHours
);
while
(
model
.
ClassHours
>
totalHours
)
{
var
newDate
=
srartDate
.
AddDays
(
i
);
foreach
(
var
item
in
model
.
WeekDayList
)
{
var
planModel
=
new
RB_Class_Plan_ViewModel
()
{
ClassId
=
model
.
ClassId
,
ClassPlanId
=
0
,
ClassRoomId
=
model
.
ClassRoomId
,
Group_Id
=
model
.
Group_Id
,
School_Id
=
model
.
School_Id
,
PlanTimeList
=
new
List
<
RB_Class_Time_ViewModel
>(),
TeacherId
=
model
.
Teacher_Id
,
ClassDate
=
newDate
};
if
(
model
.
ClassStyle
==
ClassStyleEnum
.
Week
)
{
switch
(
item
)
{
case
"1"
:
if
(
newDate
.
DayOfWeek
==
DayOfWeek
.
Monday
)
{
var
timeList
=
defaultPlanTimeList
.
Where
(
qitem
=>
qitem
.
DateList
.
Contains
(
item
))?.
FirstOrDefault
()?.
TimeList
;
if
(
timeList
!=
null
&&
timeList
.
Count
>
0
)
{
var
dayHours
=
CalcDayClassHoursModule
(
timeList
,
planModel
.
PlanTimeList
,
model
,
BasicMinutes
);
totalHours
+=
dayHours
;
classPlanList
.
Add
(
planModel
);
}
}
break
;
case
"2"
:
if
(
newDate
.
DayOfWeek
==
DayOfWeek
.
Tuesday
)
{
var
timeList
=
defaultPlanTimeList
.
Where
(
qitem
=>
qitem
.
DateList
.
Contains
(
item
))?.
FirstOrDefault
()?.
TimeList
;
if
(
timeList
!=
null
&&
timeList
.
Count
>
0
)
{
var
dayHours
=
CalcDayClassHoursModule
(
timeList
,
planModel
.
PlanTimeList
,
model
,
BasicMinutes
);
totalHours
+=
dayHours
;
classPlanList
.
Add
(
planModel
);
}
}
break
;
case
"3"
:
if
(
newDate
.
DayOfWeek
==
DayOfWeek
.
Wednesday
)
{
var
timeList
=
defaultPlanTimeList
.
Where
(
qitem
=>
qitem
.
DateList
.
Contains
(
item
))?.
FirstOrDefault
()?.
TimeList
;
if
(
timeList
!=
null
&&
timeList
.
Count
>
0
)
{
var
dayHours
=
CalcDayClassHoursModule
(
timeList
,
planModel
.
PlanTimeList
,
model
,
BasicMinutes
);
totalHours
+=
dayHours
;
classPlanList
.
Add
(
planModel
);
}
}
break
;
case
"4"
:
if
(
newDate
.
DayOfWeek
==
DayOfWeek
.
Thursday
)
{
var
timeList
=
defaultPlanTimeList
.
Where
(
qitem
=>
qitem
.
DateList
.
Contains
(
item
))?.
FirstOrDefault
()?.
TimeList
;
if
(
timeList
!=
null
&&
timeList
.
Count
>
0
)
{
var
dayHours
=
CalcDayClassHoursModule
(
timeList
,
planModel
.
PlanTimeList
,
model
,
BasicMinutes
);
totalHours
+=
dayHours
;
classPlanList
.
Add
(
planModel
);
}
}
break
;
case
"5"
:
if
(
newDate
.
DayOfWeek
==
DayOfWeek
.
Friday
)
{
var
timeList
=
defaultPlanTimeList
.
Where
(
qitem
=>
qitem
.
DateList
.
Contains
(
item
))?.
FirstOrDefault
()?.
TimeList
;
if
(
timeList
!=
null
&&
timeList
.
Count
>
0
)
{
var
dayHours
=
CalcDayClassHoursModule
(
timeList
,
planModel
.
PlanTimeList
,
model
,
BasicMinutes
);
totalHours
+=
dayHours
;
classPlanList
.
Add
(
planModel
);
}
}
break
;
case
"6"
:
if
(
newDate
.
DayOfWeek
==
DayOfWeek
.
Saturday
)
{
var
timeList
=
defaultPlanTimeList
.
Where
(
qitem
=>
qitem
.
DateList
.
Contains
(
item
))?.
FirstOrDefault
()?.
TimeList
;
if
(
timeList
!=
null
&&
timeList
.
Count
>
0
)
{
var
dayHours
=
CalcDayClassHoursModule
(
timeList
,
planModel
.
PlanTimeList
,
model
,
BasicMinutes
);
totalHours
+=
dayHours
;
classPlanList
.
Add
(
planModel
);
}
}
break
;
case
"7"
:
if
(
newDate
.
DayOfWeek
==
DayOfWeek
.
Sunday
)
{
var
timeList
=
defaultPlanTimeList
.
Where
(
qitem
=>
qitem
.
DateList
.
Contains
(
item
))?.
FirstOrDefault
()?.
TimeList
;
if
(
timeList
!=
null
&&
timeList
.
Count
>
0
)
{
var
dayHours
=
CalcDayClassHoursModule
(
timeList
,
planModel
.
PlanTimeList
,
model
,
BasicMinutes
);
totalHours
+=
dayHours
;
classPlanList
.
Add
(
planModel
);
}
}
break
;
}
}
else
if
(
model
.
ClassStyle
==
ClassStyleEnum
.
Month
)
{
if
(
newDate
.
Day
==
Convert
.
ToInt32
(
item
))
{
var
timeList
=
defaultPlanTimeList
.
Where
(
qitem
=>
qitem
.
DateList
.
Contains
(
item
))?.
FirstOrDefault
()?.
TimeList
;
if
(
timeList
!=
null
&&
timeList
.
Count
>
0
)
{
var
dayHours
=
CalcDayClassHoursModule
(
timeList
,
planModel
.
PlanTimeList
,
model
,
BasicMinutes
);
totalHours
+=
dayHours
;
classPlanList
.
Add
(
planModel
);
}
}
}
}
i
++;
}
}
//固定日期
else
if
(
model
.
ClassStyle
==
ClassStyleEnum
.
FixedDate
)
{
foreach
(
var
item
in
model
.
WeekDayList
)
{
var
planModel
=
new
RB_Class_Plan_ViewModel
()
{
ClassId
=
model
.
ClassId
,
ClassPlanId
=
0
,
ClassRoomId
=
model
.
ClassRoomId
,
Group_Id
=
model
.
Group_Id
,
School_Id
=
model
.
School_Id
,
PlanTimeList
=
new
List
<
RB_Class_Time_ViewModel
>(),
TeacherId
=
model
.
Teacher_Id
,
ClassDate
=
Convert
.
ToDateTime
(
item
)
};
var
timeList
=
defaultPlanTimeList
.
Where
(
qitem
=>
qitem
.
DateList
.
Contains
(
item
))?.
FirstOrDefault
()?.
TimeList
;
if
(
timeList
!=
null
&&
timeList
.
Count
>
0
)
{
CalcDayClassHoursModule
(
timeList
,
planModel
.
PlanTimeList
,
model
,
BasicMinutes
);
classPlanList
.
Add
(
planModel
);
}
}
}
//约课
else
{
}
}
return
classPlanList
;
}
/// <summary>
/// 计算每天课时
/// </summary>
/// <param name="timeList"></param>
/// <param name="classTimeList"></param>
/// <param name="model"></param>
/// <returns></returns>
private
double
CalcDayClassHoursModule
(
List
<
TimeItem
>
timeList
,
List
<
RB_Class_Time_ViewModel
>
classTimeList
,
RB_Class_ViewModel
model
,
int
BasicMinutes
)
{
double
dayClassHours
=
0
;
double
dayMinutes
=
0
;
foreach
(
var
sItem
in
timeList
)
{
var
timeModel
=
new
RB_Class_Time_ViewModel
()
{
StartTime
=
sItem
.
StartTime
,
EndTime
=
sItem
.
EndTime
,
TimeHour
=
sItem
.
TimeHour
,
};
classTimeList
.
Add
(
timeModel
);
var
startDate
=
Convert
.
ToDateTime
(
DateTime
.
Now
.
ToString
(
"yyyy-MM-dd"
)
+
" "
+
sItem
.
StartTime
+
":00"
);
var
endDate
=
Convert
.
ToDateTime
(
DateTime
.
Now
.
ToString
(
"yyyy-MM-dd"
)
+
" "
+
sItem
.
EndTime
+
":00"
);
TimeSpan
span
=
endDate
.
Subtract
(
startDate
);
if
(
span
.
TotalMinutes
>
0
)
{
dayMinutes
+=
span
.
TotalMinutes
;
}
}
if
(
model
.
ClassHourMinute
>
0
)
{
dayClassHours
=
dayMinutes
/
model
.
ClassHourMinute
;
}
else
{
dayClassHours
=
dayMinutes
/
BasicMinutes
;
}
return
dayClassHours
;
}
/// <summary>
/// 根据班级编号获取班级详细信息
/// </summary>
...
...
@@ -3616,5 +3858,165 @@ namespace Edu.Module.Course
#
endregion
#
region
甲鹤小程序商品信息
/// <summary>
/// 同步班级到甲鹤小程序
/// </summary>
/// <param name="model"></param>
/// <returns></returns>
//public bool SetGoodsSpecificationValue(RB_Class_ViewModel model)
//{
// bool flag = false;
// var courseModel = courseRepository.GetEntity(model.CouseId).RefMapperTo<RB_Course_ViewModel>();
// if (courseModel != null && courseModel.MallGoodsId > 0)
// {
// if (courseModel.SalePlatList != null && courseModel.SalePlatList.Any(x => x == 4))//课程关联到了小程序
// {
// Model.ViewModel.Mall.RB_Goods_Extend demodel = new Model.ViewModel.Mall.RB_Goods_Extend();
// demodel.MallBaseId = Convert.ToInt32(Config.JHMallBaseId);
// demodel.TenantId = Convert.ToInt32(Config.JHTenantId);
// demodel.SpecificationList = new List<RB_Goods_Specification_Extend>();
// demodel.SpecificationPriceList = new List<RB_Goods_SpecificationPrice_Extend>();
// RB_Goods_Specification_Extend modelSpecification = new RB_Goods_Specification_Extend();
// modelSpecification.Id = 0;//暂定
// modelSpecification.EnabledImage = 2;
// modelSpecification.Name = "开班日期";
// modelSpecification.Sort = 1;
// modelSpecification.SpecificationValueList = new List<RB_Goods_SpecificationValue_Extend>();
// //查询课程对应班级开课时间大于今天的班级
// var classList = classRepository.GetClassAndCourseListRepository(new RB_Class_ViewModel { CouseId = model.CouseId, StartTime = System.DateTime.Now.ToString("yyyy-MM-dd") }).Where(x => x.ClassStatus == Common.Enum.Course.ClassStatusEnum.NonOpenClass && x.OpenTime > System.DateTime.Now).ToList();
// if (classList != null && classList.Any())
// {
// int Sort = 1;
// foreach (var item in classList)
// {
// RB_Goods_SpecificationValue_Extend modelSpecificationValue = new RB_Goods_SpecificationValue_Extend();
// modelSpecificationValue.Id = 0;
// modelSpecificationValue.Image = "";
// modelSpecificationValue.ImagePath = "";
// modelSpecificationValue.Name = item.OpenTime.ToString("MM月dd日");
// modelSpecificationValue.Sort = Sort;///暂定1
// modelSpecificationValue.ClassId = item.ClassId;
// modelSpecification.SpecificationValueList.Add(modelSpecificationValue);
// RB_Goods_SpecificationPrice_Extend pModel = new RB_Goods_SpecificationPrice_Extend()
// {
// Commission = 0,
// CostMoney = 0,
// GoodsNumbers = item.ClassNo,
// GoodsWeight = 0,
// InventoryNum = item.ClassPersion - item.OrderStudentCount,//暂定
// SellingPrice = item.SellPrice,
// SpecificationSort = "1",//暂定
// AttrList = new object()
// };
// demodel.SpecificationPriceList.Add(pModel);
// Sort += 1;
// }
// }
// demodel.SpecificationList.Add(modelSpecification);
// #region 删除规格
// var slist = goods_SpecificationRepository.GetList(new RB_Goods_Specification_Extend() { GoodsId = demodel.Id, TenantId = demodel.TenantId, MallBaseId = demodel.MallBaseId });
// var svlist = goods_SpecificationValueRepository.GetList(new RB_Goods_SpecificationValue_Extend() { GoodsId = demodel.Id, TenantId = demodel.TenantId, MallBaseId = demodel.MallBaseId });
// var splist = goods_SpecificationPriceRepository.GetList(new RB_Goods_SpecificationPrice_Extend() { GoodsId = demodel.Id, TenantId = demodel.TenantId, MallBaseId = demodel.MallBaseId });
// if (slist != null && slist.Any())
// {
// //删除后新增
// goods_SpecificationRepository.DeleteBatch(slist);
// }
// if (svlist != null && svlist.Any())
// {
// goods_SpecificationValueRepository.DeleteBatch(svlist);
// }
// if (splist != null && splist.Any())
// {
// goods_SpecificationPriceRepository.DeleteBatch(splist);
// }
// #endregion
// #region 新增规格
// foreach (var item in demodel.SpecificationList)
// {
// int sid = goods_SpecificationRepository.Insert(new RB_Goods_Specification()
// {
// CreateDate = demodel.CreateDate,
// EnabledImage = item.EnabledImage,
// GoodsId = courseModel.MallGoodsId,
// Id = 0,
// MallBaseId = demodel.MallBaseId,
// Name = item.Name,
// Sort = item.Sort,
// Status = 0,
// TenantId = demodel.TenantId
// });
// if (sid > 0)
// {
// foreach (var qitem in item.SpecificationValueList)
// {
// goods_SpecificationValueRepository.Insert(new RB_Goods_SpecificationValue()
// {
// CreateDate = demodel.CreateDate,
// GoodsId = courseModel.MallGoodsId,
// Id = 0,
// Image = qitem.Image,
// MallBaseId = demodel.MallBaseId,
// Name = qitem.Name,
// Sort = qitem.Sort,
// Status = 0,
// TenantId = demodel.TenantId,
// SpecificationId = sid,
// ClassId = qitem.ClassId
// });
// }
// }
// }
// foreach (var item in demodel.SpecificationPriceList)
// {
// goods_SpecificationPriceRepository.Insert(new RB_Goods_SpecificationPrice()
// {
// CreateDate = demodel.CreateDate,
// GoodsId = courseModel.MallGoodsId,
// Id = 0,
// GoodsNumbers = item.GoodsNumbers,
// GoodsWeight = item.GoodsWeight,
// InventoryNum = item.InventoryNum,
// MallBaseId = demodel.MallBaseId,
// SellingPrice = item.SellingPrice,
// SpecificationSort = item.SpecificationSort,
// Status = 0,
// TenantId = demodel.TenantId,
// UpdateDate = demodel.UpdateDate,
// Commission = item.Commission,
// CostMoney = item.CostMoney
// });
// }
// #endregion
// }
// }
// return flag;
//}
/// <summary>
///
/// </summary>
/// <param name="model"></param>
/// <returns></returns>
//public bool UpdateGoodsSpecificationValue(RB_Class_ViewModel model)
//{
// bool flag = false;
// return flag;
//}
#
endregion
}
}
Edu.Module.Course/OrderModule.cs
View file @
a2b6745b
...
...
@@ -1908,7 +1908,9 @@ namespace Edu.Module.Course
gModel
.
StuIcon
=
dmodel
.
StuIcon
;
gModel
.
TotalHours
=
dmodel
.
TotalHours
;
gModel
.
GuestContractNo
=
dmodel
.
GuestContractNo
;
gModel
.
ContractType
=
dmodel
.
ContractType
;
gModel
.
ContractUrl
=
dmodel
.
ContractUrl
;
gModel
.
UpdateTime
=
dmodel
.
UpdateTime
;
flag
=
order_GuestRepository
.
Update
(
gModel
);
if
(
flag
)
...
...
Edu.Module.Course/OrderModule2.cs
View file @
a2b6745b
...
...
@@ -89,17 +89,18 @@ namespace Edu.Module.Course
{
backNum
=
totalBackCount
.
ToString
();
}
var
stuCheckList
=
class_CheckRepository
.
GetGuestFinishMinutesRepository
(
GuestId
.
ToString
());
//完成课时数
var
FinishHours
=
stuCheckList
?.
Sum
(
qitem
=>
qitem
.
FinishClassHours
)
??
0
;
//课时单价
var
classHourPrice
=
orderModel
.
PreferPrice
/
orderModel
.
GuestNum
/
classModel
.
ClassHours
;
decimal
classHourPrice
=
0
;
//原课时单价
//classHourPrice = orderModel.PreferPrice / orderModel.GuestNum / classModel.ClassHours;
//标准课时单价=课程卖价/课时
classHourPrice
=
classModel
.
SellPrice
/
classModel
.
ClassHours
;
//预计退款金额
decimal
backMoney
=
0
;
//backMoney = (classModel.ClassHours - FinishHours) * classHourPrice;
//违约金
decimal
breakContractPrice
=
(
classModel
.
ClassHours
-
FinishHours
)
*
classHourPrice
*
Convert
.
ToDecimal
(
0.1
);
backMoney
=
(
orderModel
.
Income
+
orderModel
.
PlatformTax
)
-
FinishHours
*
classHourPrice
-
breakContractPrice
;
...
...
Edu.Module.Course/StudentBillModule.cs
View file @
a2b6745b
...
...
@@ -96,8 +96,12 @@ namespace Edu.Module.Course
//完成课时数
var
FinishHours
=
stuCheckList
?.
Sum
(
qitem
=>
qitem
.
FinishClassHours
)
??
0
;
//课时单价
var
classHourPrice
=
orderModel
.
PreferPrice
/
orderModel
.
GuestNum
/
classModel
.
ClassHours
;
decimal
classHourPrice
=
0
;
//原课时单价
//classHourPrice = orderModel.PreferPrice / orderModel.GuestNum / classModel.ClassHours;
//标准课时单价=课程卖价/课时
classHourPrice
=
classModel
.
SellPrice
/
classModel
.
ClassHours
;
//预计退款金额
decimal
backMoney
=
0
;
//违约金
...
...
Edu.Module.EduTask/ChangeClassPlanModule.cs
View file @
a2b6745b
...
...
@@ -68,123 +68,39 @@ namespace Edu.Module.EduTask
public
List
<
object
>
GetRepeatListModule
(
int
ClassId
,
List
<
ChangePlanItem
>
changeList
,
List
<
TimeItem
>
timeList
)
{
List
<
object
>
list
=
new
List
<
object
>();
if
(
timeList
!=
null
&&
timeList
.
Count
>
0
)
var
planList
=
new
List
<
RB_Class_Plan_ViewModel
>();
if
(
changeList
!=
null
&&
changeList
.
Count
>
0
)
{
var
repeatList
=
CheckClassPlanModule
(
ClassId
,
timeList
);
if
(
repeatList
!=
null
&&
repeatList
.
Count
>
0
)
foreach
(
var
item
in
changeList
)
{
List
<
RB_Class_Room_ViewModel
>
roomList
=
new
List
<
RB_Class_Room_ViewModel
>();
List
<
RB_Teacher_ViewModel
>
teacherList
=
new
List
<
RB_Teacher_ViewModel
>();
string
roomIds
=
string
.
Join
(
","
,
changeList
.
Where
(
qitem
=>
qitem
.
ClassRoomId
>
0
).
Select
(
qitem
=>
qitem
.
ClassRoomId
));
string
teacherIds
=
string
.
Join
(
","
,
changeList
.
Where
(
qitem
=>
qitem
.
TeacherId
>
0
).
Select
(
qitem
=>
qitem
.
TeacherId
));
//冲突的上课计划编号
List
<
int
>
ids
=
new
List
<
int
>();
foreach
(
var
item
in
changeList
)
var
planModel
=
new
RB_Class_Plan_ViewModel
()
{
var
tempRepeatList
=
repeatList
?.
Where
(
qitem
=>
qitem
.
ClassDate
==
item
.
ClassDate
)?.
ToList
();
if
(
tempRepeatList
!=
null
&&
tempRepeatList
.
Count
>
0
)
{
if
(
item
.
TeacherId
>
0
)
{
var
tempTeacherList
=
tempRepeatList
?.
Where
(
qitem
=>
qitem
.
TeacherId
==
item
.
TeacherId
)?.
ToList
();
if
(
tempTeacherList
!=
null
&&
tempTeacherList
.
Count
>
0
)
{
var
tempIds
=
Common
.
ConvertHelper
.
StringToList
(
string
.
Join
(
","
,
tempTeacherList
.
GroupBy
(
qitem
=>
qitem
.
ClassPlanId
).
Select
(
qitem
=>
qitem
.
Key
)));
if
(
tempIds
!=
null
&&
tempIds
.
Count
>
0
)
{
ids
.
AddRange
(
tempIds
);
}
}
}
if
(
item
.
ClassRoomId
>
0
)
{
var
classroomList
=
tempRepeatList
?.
Where
(
qitem
=>
qitem
.
ClassRoomId
==
item
.
ClassRoomId
)?.
ToList
();
if
(
classroomList
!=
null
&&
classroomList
.
Count
>
0
)
{
var
tempIds
=
Common
.
ConvertHelper
.
StringToList
(
string
.
Join
(
","
,
classroomList
.
GroupBy
(
qitem
=>
qitem
.
ClassPlanId
).
Select
(
qitem
=>
qitem
.
Key
)));
if
(
tempIds
!=
null
&&
tempIds
.
Count
>
0
)
{
ids
.
AddRange
(
tempIds
);
}
}
}
}
}
var
planList
=
new
List
<
RB_Class_Plan_ViewModel
>();
var
classTimeList
=
new
List
<
RB_Class_Time_ViewModel
>();
if
(
ids
!=
null
&&
ids
.
Count
>
0
)
ClassPlanId
=
0
,
ClassId
=
ClassId
,
ClassDate
=
item
.
ClassDate
,
ClassRoomId
=
item
.
ClassRoomId
,
TeacherId
=
item
.
TeacherId
,
PlanTimeList
=
new
List
<
RB_Class_Time_ViewModel
>
(),
};
if
(
timeList
!=
null
&&
timeList
.
Count
>
0
)
{
if
(!
string
.
IsNullOrEmpty
(
roomIds
))
{
roomList
=
class_RoomRepository
.
GetClassRoomListRepository
(
new
RB_Class_Room_ViewModel
()
{
QRoomIds
=
roomIds
});
}
if
(!
string
.
IsNullOrEmpty
(
teacherIds
))
foreach
(
var
subItem
in
timeList
)
{
teacherList
=
teacherRepository
.
GetTeacherListRepository
(
new
Model
.
ViewModel
.
User
.
RB_Teacher_ViewModel
()
planModel
.
PlanTimeList
.
Add
(
new
RB_Class_Time_ViewModel
{
QTIds
=
teacherIds
StartTime
=
subItem
.
StartTime
,
EndTime
=
subItem
.
EndTime
,
TimeHour
=
subItem
.
TimeHour
,
});
}
planList
=
class_PlanRepository
.
GetClassPlanListRepository
(
new
RB_Class_Plan_ViewModel
()
{
QClassPlanIds
=
string
.
Join
(
","
,
ids
)
});
classTimeList
=
class_TimeRepository
.
GetClassTimeListRepository
(
new
RB_Class_Time_ViewModel
()
{
QClassPlanIds
=
string
.
Join
(
","
,
ids
)
});
foreach
(
var
item
in
changeList
)
{
List
<
object
>
PlanRepeatList
=
new
List
<
object
>();
var
tempRepeatList
=
planList
?.
Where
(
qitem
=>
qitem
.
ClassDate
==
item
.
ClassDate
)?.
ToList
();
if
(
tempRepeatList
!=
null
&&
tempRepeatList
.
Count
>
0
)
{
foreach
(
var
subItem
in
tempRepeatList
)
{
var
tempObj
=
new
{
subItem
.
ClassPlanId
,
subItem
.
ClassId
,
subItem
.
ClassName
,
ClassDate
=
Common
.
ConvertHelper
.
FormatDate
(
subItem
.
ClassDate
),
subItem
.
TeacherId
,
subItem
.
TeacherName
,
subItem
.
ClassRoomId
,
subItem
.
RoomName
,
PlanTimeList
=
classTimeList
.
Where
(
qitem
=>
qitem
.
ClassPlanId
==
subItem
.
ClassPlanId
).
Select
(
qitem
=>
new
{
qitem
.
StartTime
,
qitem
.
EndTime
,
qitem
.
TimeHour
}),
};
PlanRepeatList
.
Add
(
tempObj
);
}
}
var
obj
=
new
{
item
.
ClassPlanId
,
ClassDate
=
Common
.
ConvertHelper
.
FormatDate
(
item
.
ClassDate
),
item
.
TeacherId
,
TeacherName
=
teacherList
?.
Where
(
qitem
=>
qitem
.
TId
==
item
.
TeacherId
)?.
FirstOrDefault
()?.
TeacherName
??
""
,
item
.
ClassRoomId
,
RoomName
=
roomList
?.
Where
(
qitem
=>
qitem
.
RoomId
==
item
.
ClassRoomId
)?.
FirstOrDefault
()?.
RoomName
??
""
,
PlanTimeList
=
item
.
PlanTimeList
.
Select
(
qitem
=>
new
{
qitem
.
StartTime
,
qitem
.
EndTime
,
}),
PlanRepeatList
};
list
.
Add
(
obj
);
}
}
planList
.
Add
(
planModel
);
}
}
if
(
timeList
!=
null
&&
timeList
.
Count
>
0
&&
planList
!=
null
&&
planList
.
Count
>
0
)
{
list
=
GetRepeatDataModule
(
planList
,
2
);
}
return
list
;
}
...
...
@@ -276,7 +192,7 @@ namespace Edu.Module.EduTask
{
item
.
PlanTimeList
=
classTimeList
?.
Where
(
qitem
=>
qitem
.
ClassPlanId
==
item
.
ClassPlanId
)?.
ToList
()
??
new
List
<
RB_Class_Time_ViewModel
>();
}
if
(
item
.
PlanTimeList
!=
null
&&
item
.
PlanTimeList
.
Count
>
0
)
if
(
ChangeType
==
2
&&
item
.
PlanTimeList
!=
null
&&
item
.
PlanTimeList
.
Count
>
0
)
{
foreach
(
var
subItem
in
item
.
PlanTimeList
)
{
...
...
Edu.Repository/Course/RB_ClassRepository.cs
View file @
a2b6745b
...
...
@@ -339,10 +339,10 @@ WHERE 1=1
{
builder
.
AppendFormat
(
" AND A.{0}={1} "
,
nameof
(
RB_Class_ViewModel
.
Group_Id
),
query
.
Group_Id
);
}
//if (query.School_Id > 0
)
//
{
//
builder.AppendFormat(" AND A.{0}={1} ", nameof(RB_Class_ViewModel.School_Id), query.School_Id);
//
}
if
(
query
.
School_Id
>
-
1
)
{
builder
.
AppendFormat
(
" AND A.{0}={1} "
,
nameof
(
RB_Class_ViewModel
.
School_Id
),
query
.
School_Id
);
}
if
(
query
.
ClassId
>
0
)
{
builder
.
AppendFormat
(
" AND A.{0}={1} "
,
nameof
(
RB_Class_ViewModel
.
ClassId
),
query
.
ClassId
);
...
...
Edu.Repository/Course/RB_Class_CheckRepository.cs
View file @
a2b6745b
...
...
@@ -348,7 +348,7 @@ WHERE 1=1 AND A.Status=0 ");
}
if
(
query
.
School_Id
>=
0
)
{
builder
.
AppendFormat
(
" AND
A
.{0}={1} "
,
nameof
(
RB_Class_Check_ViewModel
.
School_Id
),
query
.
School_Id
);
builder
.
AppendFormat
(
" AND
C
.{0}={1} "
,
nameof
(
RB_Class_Check_ViewModel
.
School_Id
),
query
.
School_Id
);
}
if
(
query
.
ClassId
>
0
)
{
...
...
Edu.Repository/Course/RB_Order_GuestRepository.cs
View file @
a2b6745b
...
...
@@ -670,7 +670,7 @@ WHERE 1=1 and A.Status=0 and class.Status=0 and class.ClassStatus <>4 and b.Or
}
if
(
demodel
.
School_Id
>
-
1
)
{
builder
.
AppendFormat
(
$@" AND
A.
{
nameof
(
RB_Order_Guest_Extend
.
School_Id
)}
=
{
demodel
.
School_Id
}
"
);
builder
.
AppendFormat
(
$@" AND
class.
{
nameof
(
RB_Class_ViewModel
.
School_Id
)}
=
{
demodel
.
School_Id
}
"
);
}
if
(
demodel
.
CourseId
>
0
)
{
...
...
Edu.Repository/User/RB_AccountRepository.cs
View file @
a2b6745b
...
...
@@ -41,10 +41,10 @@ WHERE 1=1
{
builder
.
AppendFormat
(
" AND a.{0}={1} "
,
nameof
(
RB_Account_ViewModel
.
AccountType
),
(
int
)
query
.
AccountType
);
}
if
(
query
.
School_Id
>
0
)
{
builder
.
AppendFormat
(
" AND a.{0}={1} "
,
nameof
(
RB_Account_ViewModel
.
School_Id
),
query
.
School_Id
);
}
//
if (query.School_Id > 0)
//
{
//
builder.AppendFormat(" AND a.{0}={1} ", nameof(RB_Account_ViewModel.School_Id), query.School_Id);
//
}
if
(
query
.
Group_Id
>
0
)
{
builder
.
AppendFormat
(
" AND a.{0}={1} "
,
nameof
(
RB_Account_ViewModel
.
Group_Id
),
query
.
Group_Id
);
...
...
Edu.Repository/User/RB_DepartmentRepository.cs
View file @
a2b6745b
...
...
@@ -40,7 +40,7 @@ WHERE 1=1
{
builder
.
Append
(
$" AND A.
{
nameof
(
RB_Department_ViewModel
.
Group_Id
)}
=
{
query
.
Group_Id
}
"
);
}
if
(
query
.
School_Id
>
0
)
if
(
query
.
School_Id
>
-
1
)
{
builder
.
Append
(
$" AND A.
{
nameof
(
RB_Department_ViewModel
.
School_Id
)}
=
{
query
.
School_Id
}
"
);
}
...
...
Edu.WebApi/Controllers/Course/ClassController.cs
View file @
a2b6745b
...
...
@@ -141,9 +141,13 @@ namespace Edu.WebApi.Controllers.Course
Teacher_Id
=
base
.
ParmJObj
.
GetInt
(
"Teacher_Id"
),
IsQuerySurplusPlan
=
base
.
ParmJObj
.
GetInt
(
"IsQuerySurplusPlan"
)
};
query
.
School_Id
=
base
.
ParmJObj
.
GetInt
(
"SchoolId"
,
-
1
);
query
.
School_Id
=
-
1
;
var
schoolId
=
base
.
ParmJObj
.
GetStringValue
(
"SchoolId"
);
if
(!
string
.
IsNullOrEmpty
(
schoolId
))
{
query
.
School_Id
=
base
.
ParmJObj
.
GetInt
(
"SchoolId"
,
-
1
);
}
query
.
Group_Id
=
base
.
UserInfo
.
Group_Id
;
var
list
=
classModule
.
GetClassListModule
(
query
);
List
<
object
>
result
=
new
List
<
object
>();
...
...
Edu.WebApi/Controllers/Course/OrderController.cs
View file @
a2b6745b
...
...
@@ -40,7 +40,6 @@ namespace Edu.WebApi.Controllers.Course
var
pageModel
=
JsonHelper
.
DeserializeObject
<
ResultPageModel
>(
RequestParm
.
Msg
.
ToString
());
var
dmodel
=
new
RB_Class_ViewModel
()
{
School_Id
=
base
.
ParmJObj
.
GetInt
(
"School_Id"
),
ClassName
=
base
.
ParmJObj
.
GetStringValue
(
"ClassName"
),
ClassNo
=
base
.
ParmJObj
.
GetStringValue
(
"ClassNo"
),
StartTime
=
base
.
ParmJObj
.
GetStringValue
(
"StartTime"
),
...
...
@@ -51,6 +50,12 @@ namespace Edu.WebApi.Controllers.Course
JoinStartTime
=
base
.
ParmJObj
.
GetStringValue
(
"JoinStartTime"
),
JoinEndTime
=
base
.
ParmJObj
.
GetStringValue
(
"JoinEndTime"
)
};
dmodel
.
School_Id
=
-
1
;
var
schoolId
=
base
.
ParmJObj
.
GetStringValue
(
"School_Id"
);
if
(!
string
.
IsNullOrEmpty
(
schoolId
))
{
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
);
pageModel
.
Count
=
Convert
.
ToInt32
(
count
);
...
...
@@ -292,6 +297,10 @@ namespace Edu.WebApi.Controllers.Course
z
.
ContractId
,
z
.
ContractStatus
,
z
.
ContractStatusStr
,
z
.
GuestContractNo
,
z
.
ContractType
,
z
.
ContractUrl
,
z
.
ContractUrlList
,
}),
ContractList
=
x
.
ContractList
.
Select
(
z
=>
new
{
...
...
@@ -1075,7 +1084,11 @@ namespace Edu.WebApi.Controllers.Course
x
.
EffectStatus
,
x
.
EffectStatusStr
,
EffectTime
=
Common
.
ConvertHelper
.
FormatDate
(
x
.
EffectTime
),
x
.
UpOrderId
x
.
UpOrderId
,
x
.
GuestContractNo
,
x
.
ContractType
,
x
.
ContractUrl
,
x
.
ContractUrlList
,
});
return
ApiResult
.
Success
(
""
,
pageModel
);
}
...
...
@@ -1115,6 +1128,8 @@ namespace Edu.WebApi.Controllers.Course
BirthDate
=
base
.
ParmJObj
.
GetDateTime
(
"BirthDate"
),
TotalHours
=
base
.
ParmJObj
.
GetInt
(
"TotalHours"
),
StuIcon
=
base
.
ParmJObj
.
GetStringValue
(
"StuIcon"
),
GuestContractNo
=
base
.
ParmJObj
.
GetStringValue
(
"GuestContractNo"
),
ContractType
=
base
.
ParmJObj
.
GetInt
(
"ContractType"
),
};
if
(
dmodel
.
OrderId
<=
0
)
{
...
...
@@ -1128,6 +1143,13 @@ namespace Edu.WebApi.Controllers.Course
{
return
ApiResult
.
ParamIsNull
(
"请输入手机号码"
);
}
List
<
string
>
contractList
=
new
List
<
string
>();
var
contract
=
base
.
ParmJObj
.
GetStringValue
(
"ContractUrl"
);
if
(!
string
.
IsNullOrEmpty
(
contract
))
{
contractList
=
Common
.
Plugin
.
JsonHelper
.
DeserializeObject
<
List
<
string
>>(
contract
);
}
dmodel
.
ContractUrl
=
Common
.
Plugin
.
JsonHelper
.
Serialize
(
contractList
);
dmodel
.
GuestState
=
1
;
dmodel
.
Status
=
0
;
dmodel
.
Group_Id
=
userInfo
.
Group_Id
;
...
...
@@ -1330,6 +1352,10 @@ namespace Edu.WebApi.Controllers.Course
z
.
ContractStatus
,
z
.
ContractStatusStr
,
z
.
GuestStateStr
,
z
.
GuestContractNo
,
z
.
ContractType
,
z
.
ContractUrl
,
z
.
ContractUrlList
,
}),
ContractList
=
x
?.
ContractList
.
Select
(
z
=>
new
{
...
...
@@ -1507,6 +1533,10 @@ namespace Edu.WebApi.Controllers.Course
z
.
ContractStatus
,
z
.
ContractStatusStr
,
z
.
GuestStateStr
,
z
.
GuestContractNo
,
z
.
ContractType
,
z
.
ContractUrl
,
z
.
ContractUrlList
,
}),
ContractList
=
x
?.
ContractList
.
Select
(
z
=>
new
{
...
...
Edu.WebApi/Controllers/Course/StuController.cs
View file @
a2b6745b
...
...
@@ -203,7 +203,21 @@ namespace Edu.WebApi.Controllers.Course
public
ApiResult
GetStudentAttendanceDayStatistics
()
{
var
userInfo
=
base
.
UserInfo
;
RB_Class_Check_ViewModel
demodel
=
JsonHelper
.
DeserializeObject
<
RB_Class_Check_ViewModel
>(
RequestParm
.
Msg
.
ToString
());
RB_Class_Check_ViewModel
demodel
=
new
RB_Class_Check_ViewModel
()
{
CheckStatus
=
base
.
ParmJObj
.
GetInt
(
"CheckStatus"
),
ClassId
=
base
.
ParmJObj
.
GetInt
(
"ClassId"
),
CouseId
=
base
.
ParmJObj
.
GetInt
(
"CouseId"
),
GuestName
=
base
.
ParmJObj
.
GetStringValue
(
"GuestName"
),
OrderGuestId
=
base
.
ParmJObj
.
GetInt
(
"OrderGuestId"
),
StartDate
=
base
.
ParmJObj
.
GetStringValue
(
"StartDate"
),
};
demodel
.
School_Id
=
-
1
;
var
School_Id
=
base
.
ParmJObj
.
GetStringValue
(
"School_Id"
);
if
(!
string
.
IsNullOrEmpty
(
School_Id
))
{
demodel
.
School_Id
=
base
.
ParmJObj
.
GetInt
(
"School_Id"
);
}
demodel
.
Group_Id
=
userInfo
.
Group_Id
;
if
(
string
.
IsNullOrEmpty
(
demodel
.
StartDate
))
{
...
...
@@ -279,10 +293,8 @@ namespace Edu.WebApi.Controllers.Course
public
ApiResult
GetAllStudentPage
()
{
var
pageModel
=
Common
.
Plugin
.
JsonHelper
.
DeserializeObject
<
ResultPageModel
>(
RequestParm
.
Msg
.
ToString
());
var
model
=
new
RB_Order_Guest_Extend
{
// School_Id = base.ParmJObj.GetInt("School_Id", -1),
CourseId
=
base
.
ParmJObj
.
GetInt
(
"CourseId"
,
0
),
ClassId
=
base
.
ParmJObj
.
GetInt
(
"ClassId"
,
0
),
GuestName
=
base
.
ParmJObj
.
GetStringValue
(
"GuestName"
),
...
...
@@ -293,6 +305,11 @@ namespace Edu.WebApi.Controllers.Course
EarlyWarning
=
(
Common
.
Enum
.
Course
.
GuestClassHoursEarlyWarningEnum
)
base
.
ParmJObj
.
GetInt
(
"EarlyWarning"
,
0
),
};
model
.
School_Id
=
-
1
;
var
schoolId
=
base
.
ParmJObj
.
GetStringValue
(
"School_Id"
);
if
(!
string
.
IsNullOrEmpty
(
schoolId
))
{
model
.
School_Id
=
base
.
ParmJObj
.
GetInt
(
"School_Id"
);
}
try
{
string
OrderTime
=
base
.
ParmJObj
.
GetStringValue
(
"OrderTime"
);
...
...
Edu.WebApi/Controllers/EduTask/ChangePlanController.cs
View file @
a2b6745b
...
...
@@ -124,18 +124,18 @@ namespace Edu.WebApi.Controllers.EduTask
{
timeList
.
Add
(
new
TimeItem
{
StartTime
=
Common
.
ConvertHelper
.
FormatDate
(
item
.
ClassDate
)
+
" "
+
subItem
.
StartTime
+
":00"
,
EndTime
=
Common
.
ConvertHelper
.
FormatDate
(
item
.
ClassDate
)
+
" "
+
subItem
.
EndTime
+
":00"
,
StartTime
=
subItem
.
StartTime
,
EndTime
=
subItem
.
EndTime
,
});
}
}
if
(
timeList
!=
null
&&
timeList
.
Count
>
0
)
if
(
Common
.
Config
.
IsOpenChangeClassVerify
==
1
&&
timeList
!=
null
&&
timeList
.
Count
>
0
)
{
//
var objList = changeClassPlanModule.GetRepeatListModule(model.ClassId, model.NewChangePlanItemList, timeList);
//
if (objList != null && objList.Count > 0)
//
{
//
return ApiResult.Failed("存在上课计划冲突的数据!", data: objList);
//
}
var
objList
=
changeClassPlanModule
.
GetRepeatListModule
(
model
.
ClassId
,
model
.
NewChangePlanItemList
,
timeList
);
if
(
objList
!=
null
&&
objList
.
Count
>
0
)
{
return
ApiResult
.
Failed
(
"存在上课计划冲突的数据!"
,
data
:
objList
);
}
}
}
//全局修改
...
...
@@ -225,11 +225,11 @@ namespace Edu.WebApi.Controllers.EduTask
{
return
ApiResult
.
Failed
(
"班级信息不存在"
);
}
//var dateList = changeClassPlanModule.GetAllDateAndTimeRepeatListModule(model.ClassId, model.AllChangePlanModel,
base.UserInfo);
//if (
dateList != null && dateList.Count > 0)
//
{
//
return ApiResult.Failed("存在上课计划冲突的数据!", data: dateList);
//
}
var
dateList
=
changeClassPlanModule
.
GetAllDateAndTimeRepeatListModule
(
model
.
ClassId
,
model
.
AllChangePlanModel
,
base
.
UserInfo
);
if
(
Common
.
Config
.
IsOpenChangeClassVerify
==
1
&&
dateList
!=
null
&&
dateList
.
Count
>
0
)
{
return
ApiResult
.
Failed
(
"存在上课计划冲突的数据!"
,
data
:
dateList
);
}
}
else
if
(
model
.
ChangeType
==
2
)
{
...
...
@@ -237,11 +237,11 @@ namespace Edu.WebApi.Controllers.EduTask
{
return
ApiResult
.
Failed
(
"请选择老师"
);
}
//
var teacherlist = changeClassPlanModule.GetAllRepeatListModule(model.ClassId, Common.ConvertHelper.FormatDate(model.TakeEffectTime), TeacherId: model.AllChangePlanModel.TeacherId);
//if (
teacherlist != null && teacherlist.Count > 0)
//
{
//
return ApiResult.Failed("存在上课计划冲突的数据!", data: teacherlist);
//
}
var
teacherlist
=
changeClassPlanModule
.
GetAllRepeatListModule
(
model
.
ClassId
,
Common
.
ConvertHelper
.
FormatDate
(
model
.
TakeEffectTime
),
TeacherId
:
model
.
AllChangePlanModel
.
TeacherId
);
if
(
Common
.
Config
.
IsOpenChangeClassVerify
==
1
&&
teacherlist
!=
null
&&
teacherlist
.
Count
>
0
)
{
return
ApiResult
.
Failed
(
"存在上课计划冲突的数据!"
,
data
:
teacherlist
);
}
}
else
if
(
model
.
ChangeType
==
3
)
{
...
...
@@ -249,11 +249,11 @@ namespace Edu.WebApi.Controllers.EduTask
{
return
ApiResult
.
Failed
(
"请选择教室"
);
}
//
var classroomlist = changeClassPlanModule.GetAllRepeatListModule(model.ClassId, Common.ConvertHelper.FormatDate(model.TakeEffectTime), ClassRoomId: model.AllChangePlanModel.ClassRoomId);
//if (
classroomlist != null && classroomlist.Count > 0)
//
{
//
return ApiResult.Failed("存在上课计划冲突的数据!", data: classroomlist);
//
}
var
classroomlist
=
changeClassPlanModule
.
GetAllRepeatListModule
(
model
.
ClassId
,
Common
.
ConvertHelper
.
FormatDate
(
model
.
TakeEffectTime
),
ClassRoomId
:
model
.
AllChangePlanModel
.
ClassRoomId
);
if
(
Common
.
Config
.
IsOpenChangeClassVerify
==
1
&&
classroomlist
!=
null
&&
classroomlist
.
Count
>
0
)
{
return
ApiResult
.
Failed
(
"存在上课计划冲突的数据!"
,
data
:
classroomlist
);
}
}
}
if
(
model
.
OldChangePlanItemList
!=
null
&&
model
.
OldChangePlanItemList
.
Any
())
...
...
Edu.WebApi/Controllers/User/UserController.cs
View file @
a2b6745b
...
...
@@ -1199,7 +1199,20 @@ namespace Edu.WebApi.Controllers.User
public
ApiResult
GetDeptPageList
()
{
var
pageModel
=
Common
.
Plugin
.
JsonHelper
.
DeserializeObject
<
ResultPageModel
>(
RequestParm
.
Msg
.
ToString
());
var
query
=
Common
.
Plugin
.
JsonHelper
.
DeserializeObject
<
RB_Department_ViewModel
>(
RequestParm
.
Msg
.
ToString
());
var
query
=
new
RB_Department_ViewModel
()
{
DeptId
=
base
.
ParmJObj
.
GetInt
(
"DeptId"
),
DeptName
=
base
.
ParmJObj
.
GetStringValue
(
"DeptName"
),
DeptTier
=
base
.
ParmJObj
.
GetInt
(
"DeptTier"
),
ParentId
=
base
.
ParmJObj
.
GetInt
(
"ParentId"
),
Status
=(
DateStateEnum
)
base
.
ParmJObj
.
GetInt
(
"Status"
),
};
query
.
School_Id
=
-
1
;
var
School_Id
=
base
.
ParmJObj
.
GetStringValue
(
"School_Id"
);
if
(!
string
.
IsNullOrEmpty
(
School_Id
))
{
query
.
School_Id
=
base
.
ParmJObj
.
GetInt
(
"School_Id"
);
}
query
.
Group_Id
=
base
.
UserInfo
.
Group_Id
;
var
list
=
departmentModule
.
GetDepartmentPageListModule
(
pageModel
.
PageIndex
,
pageModel
.
PageSize
,
out
long
rowsCount
,
query
);
foreach
(
var
item
in
list
)
...
...
Edu.WebApi/Controllers/Web/WebController.cs
View file @
a2b6745b
...
...
@@ -458,6 +458,7 @@ namespace Edu.WebApi.Controllers.Web
Teacher_Id
=
base
.
ParmJObj
.
GetInt
(
"Teacher_Id"
),
Group_Id
=
base
.
ParmJObj
.
GetInt
(
"Group_Id"
),
CateId
=
base
.
ParmJObj
.
GetInt
(
"CateId"
),
School_Id
=
-
1
,
};
if
(
dmodel
.
Group_Id
<=
0
)
{
...
...
Edu.WebApi/appsettings.json
View file @
a2b6745b
...
...
@@ -92,5 +92,11 @@
//订单转班流程编号
"OrderTransClassFlowId"
:
5
,
//订单分拆流程编号
<<<<<<<
HEAD
"OrderSplitClassFlowId"
:
6
=======
"OrderSplitClassFlowId"
:
6
,
//是否开启调课数据验证
"IsOpenChangeClassVerify"
:
1
,
>>>>>>>
fb
5
d
4
f
946
a
291685
b
92721
a
6797705
cd
4780
dffe
}
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment