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
6ae4f7b2
Commit
6ae4f7b2
authored
Jul 08, 2021
by
罗超
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改班级查询方法
parent
97f9c853
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
25 additions
and
2 deletions
+25
-2
RB_Class_ViewModel.cs
Edu.Model/ViewModel/Course/RB_Class_ViewModel.cs
+5
-0
RB_ClassRepository.cs
Edu.Repository/Course/RB_ClassRepository.cs
+12
-0
ClassController.cs
Edu.WebApi/Controllers/Course/ClassController.cs
+8
-2
No files found.
Edu.Model/ViewModel/Course/RB_Class_ViewModel.cs
View file @
6ae4f7b2
...
...
@@ -226,6 +226,11 @@ namespace Edu.Model.ViewModel.Course
/// </summary>
public
int
UsePlanNum
{
get
;
set
;
}
/// <summary>
/// 多个课程状态(如:2,3)
/// </summary>
public
string
MoreStatus
{
get
;
set
;
}
}
/// <summary>
...
...
Edu.Repository/Course/RB_ClassRepository.cs
View file @
6ae4f7b2
...
...
@@ -48,6 +48,18 @@ WHERE 1=1
{
builder
.
AppendFormat
(
" AND A.{0} in({1}) "
,
nameof
(
RB_Class_ViewModel
.
ClassId
),
query
.
Q_ClassIds
);
}
if
(
query
.
School_Id
>
-
1
)
{
builder
.
AppendFormat
(
" AND A.{0}={1} "
,
nameof
(
RB_Class_ViewModel
.
School_Id
),
query
.
School_Id
);
}
if
(
query
.
Teacher_Id
>
0
)
{
builder
.
AppendFormat
(
" AND A.{0}={1} "
,
nameof
(
RB_Class_ViewModel
.
Teacher_Id
),
query
.
Teacher_Id
);
}
if
(!
string
.
IsNullOrEmpty
(
query
.
MoreStatus
))
{
builder
.
AppendFormat
(
" AND A.{0} in({1}) "
,
nameof
(
RB_Class_ViewModel
.
ClassStatus
),
query
.
MoreStatus
);
}
//查询未报满的班级
if
(
query
.
IsQuerySurplus
==
1
)
{
...
...
Edu.WebApi/Controllers/Course/ClassController.cs
View file @
6ae4f7b2
...
...
@@ -124,11 +124,17 @@ namespace Edu.WebApi.Controllers.Course
int
IsAddDefault
=
base
.
ParmJObj
.
GetInt
(
"IsAddDefault"
);
var
query
=
new
RB_Class_ViewModel
()
{
CouseId
=
base
.
ParmJObj
.
GetInt
(
"CourseId"
),
CouseId
=
base
.
ParmJObj
.
GetInt
(
"CourseId"
,
0
),
IsQuerySurplus
=
base
.
ParmJObj
.
GetInt
(
"IsQuerySurplus"
),
School_Id
=
base
.
ParmJObj
.
GetInt
(
"SchoolId"
,-
1
),
Teacher_Id
=
base
.
ParmJObj
.
GetInt
(
"TeacherId"
,
0
),
MoreStatus
=
base
.
ParmJObj
.
GetStringValue
(
"MoreStatus"
)
};
query
.
Group_Id
=
base
.
UserInfo
.
Group_Id
;
query
.
School_Id
=
base
.
UserInfo
.
School_Id
;
//if (query.School_Id == -1)
//{
// query.School_Id = base.UserInfo.School_Id;
//}
var
list
=
classModule
.
GetClassListModule
(
query
);
if
(
list
==
null
)
{
...
...
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