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
Expand all
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
This diff is collapsed.
Click to expand it.
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