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
9c6f6bc2
Commit
9c6f6bc2
authored
Jan 04, 2021
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
209ee752
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
27 additions
and
4 deletions
+27
-4
RB_Class_Plan_ViewModel.cs
Edu.Model/ViewModel/Course/RB_Class_Plan_ViewModel.cs
+7
-0
ClassModule.cs
Edu.Module.Course/ClassModule.cs
+1
-0
RB_Class_PlanRepository.cs
Edu.Repository/Course/RB_Class_PlanRepository.cs
+13
-3
ClassController.cs
Edu.WebApi/Controllers/Course/ClassController.cs
+6
-1
No files found.
Edu.Model/ViewModel/Course/RB_Class_Plan_ViewModel.cs
View file @
9c6f6bc2
...
...
@@ -57,10 +57,12 @@ namespace Edu.Model.ViewModel.Course
/// 班级对应的老师id
/// </summary>
public
int
Teacher_Id
{
get
;
set
;
}
/// <summary>
/// 教师ids
/// </summary>
public
string
Q_TeacherIds
{
get
;
set
;
}
/// <summary>
/// 上课开始时间
/// </summary>
...
...
@@ -69,5 +71,10 @@ namespace Edu.Model.ViewModel.Course
/// 上课结束时间
/// </summary>
public
string
EndTime
{
get
;
set
;
}
/// <summary>
/// 上课日期【查询使用】
/// </summary>
public
string
QClassDateStr
{
get
;
set
;
}
}
}
Edu.Module.Course/ClassModule.cs
View file @
9c6f6bc2
...
...
@@ -1071,6 +1071,7 @@ namespace Edu.Module.Course
{
return
class_PlanRepository
.
GetClassPlanModelRepository
(
query
);
}
/// <summary>
/// 获取每天签到记录
/// </summary>
...
...
Edu.Repository/Course/RB_Class_PlanRepository.cs
View file @
9c6f6bc2
...
...
@@ -233,8 +233,10 @@ LEFT JOIN rb_teacher as c on c.TId=a.TeacherId
{
StringBuilder
builder
=
new
StringBuilder
();
builder
.
AppendFormat
(
@" SELECT a.* from rb_class_plan as a
where a.`Status`=0 and DATE_FORMAT(a.ClassDate,'%Y-%m-%d')=DATE_FORMAT(NOW(),'%Y-%m-%d') "
);
builder
.
AppendFormat
(
@"
SELECT a.*
FROM rb_class_plan as a
WHERE a.`Status`=0 "
);
if
(
query
!=
null
)
{
if
(
query
.
Group_Id
>
0
)
...
...
@@ -253,8 +255,16 @@ LEFT JOIN rb_teacher as c on c.TId=a.TeacherId
{
builder
.
AppendFormat
(
" AND A.{0}={1} "
,
nameof
(
RB_Class_Plan_ViewModel
.
Status
),
(
int
)
query
.
Status
);
}
if
(!
string
.
IsNullOrEmpty
(
query
.
QClassDateStr
))
{
builder
.
AppendFormat
(
@" AND DATE_FORMAT(a.ClassDate,'%Y-%m-%d')=DATE_FORMAT('{0}','%Y-%m-%d') "
,
query
.
QClassDateStr
);
}
else
{
builder
.
AppendFormat
(
@" AND DATE_FORMAT(a.ClassDate,'%Y-%m-%d')=DATE_FORMAT(NOW(),'%Y-%m-%d') "
);
}
}
builder
.
AppendFormat
(
@"
order by ClassDate desc
"
);
builder
.
AppendFormat
(
@"
ORDER BY ClassDate DESC
"
);
return
Get
<
RB_Class_Plan_ViewModel
>(
builder
.
ToString
()).
ToList
();
}
...
...
Edu.WebApi/Controllers/Course/ClassController.cs
View file @
9c6f6bc2
...
...
@@ -601,7 +601,12 @@ namespace Edu.WebApi.Controllers.Course
}
//判断今天有课没有
var
planList
=
classModule
.
GetClassPlanModelRepository
(
new
RB_Class_Plan_ViewModel
{
Group_Id
=
base
.
UserInfo
.
Group_Id
,
ClassId
=
list
.
FirstOrDefault
().
ClassId
});
var
planList
=
classModule
.
GetClassPlanModelRepository
(
new
RB_Class_Plan_ViewModel
{
Group_Id
=
base
.
UserInfo
.
Group_Id
,
ClassId
=
list
.
FirstOrDefault
().
ClassId
,
QClassDateStr
=
Common
.
ConvertHelper
.
FormatDate
(
list
.
FirstOrDefault
().
ClassDate
),
});
if
(
planList
==
null
||
!
planList
.
Any
())
{
return
ApiResult
.
Failed
(
"今日无课程,无须签到"
);
...
...
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