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
7bdc1ffa
Commit
7bdc1ffa
authored
Apr 08, 2022
by
liudong1993
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://gitlab.oytour.com/Kui2/education
parents
6612f71d
db0ace07
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
3 deletions
+24
-3
TeacherStaticModule.cs
Edu.Module.User/TeacherStaticModule.cs
+18
-3
RB_Teacher_StaticRepository.cs
Edu.Repository/User/RB_Teacher_StaticRepository.cs
+4
-0
TeacherStaticController.cs
Edu.WebApi/Controllers/User/TeacherStaticController.cs
+2
-0
No files found.
Edu.Module.User/TeacherStaticModule.cs
View file @
7bdc1ffa
...
...
@@ -474,10 +474,21 @@ namespace Edu.Module.User
/// <returns></returns>
public
List
<
object
>
GetTeacherStaticMonthExtListModule
(
RB_Teacher_Static_Extend
query
)
{
var
teacherList
=
new
List
<
RB_Account_ViewModel
>();
var
queryTeacher
=
new
RB_Account_ViewModel
()
{
AccountType
=
Common
.
Enum
.
User
.
AccountTypeEnum
.
Teacher
,
IsSelectLevelNor
=
1
};
var
teacherList
=
accountRepository
.
GetAccountListExtRepository
(
queryTeacher
)
.
Where
(
qitem
=>
qitem
.
AccountId
!=
5
&&
qitem
.
AccountId
!=
10
&&
qitem
.
AccountId
!=
15
&&
qitem
.
AccountId
!=
20
).
ToList
();
if
(
query
.
DeptId
>
0
)
{
queryTeacher
.
Dept_Id
=
query
.
DeptId
;
teacherList
=
accountRepository
.
GetAccountListExtRepository
(
queryTeacher
);
query
.
QTeacherIds
=
string
.
Join
(
","
,
teacherList
.
Select
(
qitem
=>
qitem
.
AccountId
));
}
else
{
teacherList
=
accountRepository
.
GetAccountListExtRepository
(
queryTeacher
);
query
.
QTeacherIds
=
""
;
}
teacherList
=
teacherList
.
Where
(
qitem
=>
qitem
.
AccountId
!=
5
&&
qitem
.
AccountId
!=
10
&&
qitem
.
AccountId
!=
15
&&
qitem
.
AccountId
!=
20
).
ToList
();
List
<
object
>
dataList
=
new
List
<
object
>();
var
list
=
teacher_StaticRepository
.
GetTeacherStaticMonthExtListRepository
(
query
);
if
(
list
!=
null
&&
list
.
Count
>
0
)
...
...
@@ -503,6 +514,8 @@ namespace Edu.Module.User
dataList
.
Add
(
new
{
item
.
Id
,
item
.
TeacherId
,
Dept_Id
=
teacherModel
?.
Dept_Id
??
0
,
DateStr
,
item
.
StudentCount
,
item
.
AttendClassHour
,
...
...
@@ -549,6 +562,8 @@ namespace Edu.Module.User
dataList
.
Add
(
new
{
Id
=
0
,
TeacherId
=
0
,
Dept_Id
=
0
,
DateStr
=
"月总数"
,
StudentCount
=
tempList
?.
Sum
(
qitem
=>
qitem
.
StudentCount
),
AttendClassHour
=
tempList
?.
Sum
(
qitem
=>
qitem
.
AttendClassHour
),
...
...
Edu.Repository/User/RB_Teacher_StaticRepository.cs
View file @
7bdc1ffa
...
...
@@ -104,6 +104,10 @@ WHERE 1=1 AND A.Date<>'0001-01-01 00:00:00' AND A.TeacherId>0
{
builder
.
AppendFormat
(
" AND A.{0}={1} "
,
nameof
(
RB_Teacher_Static_Extend
.
MonthStr
),
query
.
MonthStr
);
}
if
(!
string
.
IsNullOrEmpty
(
query
.
QTeacherIds
))
{
builder
.
AppendFormat
(
" AND A.{0} IN({1}) "
,
nameof
(
RB_Teacher_Static_Extend
.
TeacherId
),
query
.
QTeacherIds
);
}
}
builder
.
AppendFormat
(
" GROUP BY DATE_FORMAT(A.Date, '%Y-%m'),A.TeacherId "
);
builder
.
AppendFormat
(
" ORDER BY DATE_FORMAT(A.Date, '%Y-%m') ASC "
);
...
...
Edu.WebApi/Controllers/User/TeacherStaticController.cs
View file @
7bdc1ffa
...
...
@@ -156,6 +156,7 @@ namespace Edu.WebApi.Controllers.User
{
YearStr
=
base
.
ParmJObj
.
GetInt
(
"YearStr"
),
MonthStr
=
base
.
ParmJObj
.
GetInt
(
"MonthStr"
),
DeptId
=
base
.
ParmJObj
.
GetInt
(
"DeptId"
),
};
query
.
Group_Id
=
base
.
UserInfo
.
Group_Id
;
var
list
=
teacherStaticModule
.
GetTeacherStaticMonthExtListModule
(
query
);
...
...
@@ -175,6 +176,7 @@ namespace Edu.WebApi.Controllers.User
{
YearStr
=
base
.
ParmJObj
.
GetInt
(
"YearStr"
),
MonthStr
=
base
.
ParmJObj
.
GetInt
(
"MonthStr"
),
DeptId
=
base
.
ParmJObj
.
GetInt
(
"DeptId"
),
};
query
.
Group_Id
=
base
.
UserInfo
.
Group_Id
;
var
list
=
teacherStaticModule
.
GetTeacherStaticMonthExtListModule
(
query
);
...
...
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