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
1d4fc2d1
Commit
1d4fc2d1
authored
Jun 15, 2021
by
黄奎
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://gitlab.oytour.com/Kui2/education
parents
bbcf6796
206e3edb
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
118 additions
and
2 deletions
+118
-2
ClassModule.cs
Edu.Module.Course/ClassModule.cs
+46
-0
RB_Class_PlanRepository.cs
Edu.Repository/Course/RB_Class_PlanRepository.cs
+1
-1
RB_Class_TimeRepository.cs
Edu.Repository/Course/RB_Class_TimeRepository.cs
+1
-1
ClassController.cs
Edu.WebApi/Controllers/Course/ClassController.cs
+20
-0
ClassRoomController.cs
Edu.WebApi/Controllers/Course/ClassRoomController.cs
+2
-0
VideoController.cs
Edu.WebApi/Controllers/Video/VideoController.cs
+48
-0
No files found.
Edu.Module.Course/ClassModule.cs
View file @
1d4fc2d1
...
@@ -813,6 +813,52 @@ namespace Edu.Module.Course
...
@@ -813,6 +813,52 @@ namespace Edu.Module.Course
return
list
;
return
list
;
}
}
/// <summary>
/// 获取班级计划列表
/// </summary>
/// <param name="classId">班级编号</param>
/// <param name="monthStr">月份</param>
/// <returns></returns>
public
object
GetClassPlan_V2
(
RB_Class_Plan_ViewModel
model
)
{
List
<
object
>
list
=
new
List
<
object
>();
var
timeList
=
new
List
<
RB_Class_Time_ViewModel
>();
var
planList
=
class_PlanRepository
.
GetClassPlanListRepository
(
model
)?.
OrderBy
(
qitem
=>
qitem
.
ClassDate
);
if
(
planList
!=
null
&&
planList
.
Count
()
>
0
)
{
string
Ids
=
string
.
Join
(
","
,
planList
.
Select
(
qitem
=>
qitem
.
ClassPlanId
));
if
(!
string
.
IsNullOrEmpty
(
Ids
))
{
timeList
=
class_TimeRepository
.
GetClassTimeListRepository
(
new
RB_Class_Time_ViewModel
()
{
QClassPlanIds
=
Ids
});
}
DateTime
today
=
Convert
.
ToDateTime
(
DateTime
.
Now
.
ToString
(
"yyyy-MM-dd"
));
foreach
(
var
item
in
planList
)
{
item
.
PlanTimeList
=
timeList
?.
Where
(
qitem
=>
qitem
.
ClassPlanId
==
item
.
ClassPlanId
)?.
ToList
();
list
.
Add
(
new
{
IsEndDate
=
item
.
ClassDate
<=
today
,
item
.
ClassPlanId
,
item
.
ClassId
,
item
.
ClassDate
,
ClassDateStr
=
Common
.
ConvertHelper
.
FormatDate
(
item
.
ClassDate
),
item
.
ClassRoomId
,
item
.
RoomName
,
item
.
TeacherId
,
item
.
TeacherName
,
item
.
UserIcon
,
TimeList
=
item
?.
PlanTimeList
?.
Select
(
qitem
=>
new
{
qitem
.
ClassTimeId
,
qitem
.
StartTime
,
qitem
.
EndTime
})?.
OrderBy
(
qitem
=>
qitem
.
StartTime
)
});
}
}
return
list
;
}
/// <summary>
/// <summary>
/// 根据计划编号删除上课计划
/// 根据计划编号删除上课计划
/// </summary>
/// </summary>
...
...
Edu.Repository/Course/RB_Class_PlanRepository.cs
View file @
1d4fc2d1
...
@@ -227,7 +227,7 @@ SELECT a.*,c.Teacher_Id,c.ClassName,c.ClassType,T.TeacherName
...
@@ -227,7 +227,7 @@ SELECT a.*,c.Teacher_Id,c.ClassName,c.ClassType,T.TeacherName
FROM rb_class_plan as a
FROM rb_class_plan as a
LEFT JOIN rb_class c on a.ClassId = c.ClassId
LEFT JOIN rb_class c on a.ClassId = c.ClassId
LEFT JOIN rb_teacher AS T ON a.TeacherId=T.TId
LEFT JOIN rb_teacher AS T ON a.TeacherId=T.TId
where a.`Status`=0 "
);
where a.`Status`=0
and c.ClassStatus=2 and c.`Status`=0
"
);
if
(
query
!=
null
)
if
(
query
!=
null
)
{
{
if
(
query
.
Group_Id
>
0
)
if
(
query
.
Group_Id
>
0
)
...
...
Edu.Repository/Course/RB_Class_TimeRepository.cs
View file @
1d4fc2d1
...
@@ -161,7 +161,7 @@ WHERE 1=1
...
@@ -161,7 +161,7 @@ WHERE 1=1
StringBuilder
builder
=
new
StringBuilder
();
StringBuilder
builder
=
new
StringBuilder
();
builder
.
AppendFormat
(
@" SELECT a.*,c.ClassName,b.ClassRoomId from rb_class_time as a LEFT JOIN rb_class_plan as b on a.ClassPlanId=b.ClassPlanId
builder
.
AppendFormat
(
@" SELECT a.*,c.ClassName,b.ClassRoomId from rb_class_time as a LEFT JOIN rb_class_plan as b on a.ClassPlanId=b.ClassPlanId
LEFT JOIN rb_class as c on a.ClassId=c.ClassId
LEFT JOIN rb_class as c on a.ClassId=c.ClassId
where b.`Status`=0 and DATE_FORMAT(b.ClassDate,'%y/%m/%d')=DATE_FORMAT(NOW(),'%y/%m/%d')
and b.`Status`=0
and c.`Status`=0 and c.ClassStatus=2 "
);
where b.`Status`=0 and DATE_FORMAT(b.ClassDate,'%y/%m/%d')=DATE_FORMAT(NOW(),'%y/%m/%d') and c.`Status`=0 and c.ClassStatus=2 "
);
if
(
query
!=
null
)
if
(
query
!=
null
)
{
{
if
(
query
.
ClassPlanId
>
0
)
if
(
query
.
ClassPlanId
>
0
)
...
...
Edu.WebApi/Controllers/Course/ClassController.cs
View file @
1d4fc2d1
...
@@ -589,6 +589,26 @@ namespace Edu.WebApi.Controllers.Course
...
@@ -589,6 +589,26 @@ namespace Edu.WebApi.Controllers.Course
#
region
上课计划
#
region
上课计划
/// <summary>
/// 获取上课计划
/// </summary>
/// <returns></returns>
public
ApiResult
GetAllClassPlan
()
{
var
query
=
new
RB_Class_Plan_ViewModel
()
{
ClassId
=
base
.
ParmJObj
.
GetInt
(
"ClassId"
),
QMonth
=
base
.
ParmJObj
.
GetStringValue
(
"QMonth"
),
TeacherId
=
base
.
ParmJObj
.
GetInt
(
"TeacherId"
),
Group_Id
=
base
.
UserInfo
.
Group_Id
,
School_Id
=
base
.
ParmJObj
.
GetInt
(
"School_Id"
,-
1
),
};
var
data
=
classModule
.
GetClassPlan_V2
(
query
);
return
ApiResult
.
Success
(
data
:
data
);
}
/// <summary>
/// <summary>
/// 获取上课计划
/// 获取上课计划
/// </summary>
/// </summary>
...
...
Edu.WebApi/Controllers/Course/ClassRoomController.cs
View file @
1d4fc2d1
...
@@ -133,6 +133,8 @@ namespace Edu.WebApi.Controllers.Course
...
@@ -133,6 +133,8 @@ namespace Edu.WebApi.Controllers.Course
{
{
extModel
.
RoomPicList
=
new
List
<
string
>();
extModel
.
RoomPicList
=
new
List
<
string
>();
}
}
extModel
.
EndTime
=
extModel
.
EndTime
??
"09:30"
;
extModel
.
StartTime
=
extModel
.
StartTime
??
"21:30"
;
return
ApiResult
.
Success
(
data
:
extModel
);
return
ApiResult
.
Success
(
data
:
extModel
);
}
}
...
...
Edu.WebApi/Controllers/Video/VideoController.cs
View file @
1d4fc2d1
...
@@ -71,5 +71,53 @@ namespace Edu.WebApi.Controllers.Video
...
@@ -71,5 +71,53 @@ namespace Edu.WebApi.Controllers.Video
return
ApiResult
.
Failed
(
"获取失败"
);
return
ApiResult
.
Failed
(
"获取失败"
);
}
}
}
}
/// <summary>
/// 获取播放地址
/// </summary>
/// <returns></returns>
[
HttpPost
]
[
AllowAnonymous
]
public
ApiResult
GetPlayInfo
()
{
JObject
jobj
=
JObject
.
Parse
(
RequestParm
.
Msg
.
ToString
());
string
VideoId
=
jobj
.
GetStringValue
(
"strVid"
);
try
{
string
regionId
=
"cn-shanghai"
;
IClientProfile
profile
=
DefaultProfile
.
GetProfile
(
regionId
,
"LTAI5tBoku6yPFSkacA3sbAT"
,
"zcjzTpMGyPwchaKAyUFeKNEBcqAxvL"
);
var
acsClient
=
new
Aliyun
.
Acs
.
Core
.
DefaultAcsClient
(
profile
);
if
(
string
.
IsNullOrEmpty
(
VideoId
))
{
return
ApiResult
.
Failed
(
"获取失败"
);
}
GetPlayInfoRequest
request
=
new
GetPlayInfoRequest
();
request
.
VideoId
=
VideoId
;
// 初始化客户端
// DefaultAcsClient client = InitVodClient();
// 发起请求,并得到 response
GetPlayInfoResponse
response
=
acsClient
.
GetAcsResponse
(
request
);
List
<
GetPlayInfoResponse
.
GetPlayInfo_PlayInfo
>
playInfoList
=
response
.
PlayInfoList
;
GetPlayInfoResponse
.
GetPlayInfo_VideoBase
videoBase
=
response
.
VideoBase
;
if
(
playInfoList
.
Count
>
0
)
{
return
ApiResult
.
Success
(
""
,
new
{
URL
=
playInfoList
[
0
].
PlayURL
,
VideoImg
=
videoBase
.
CoverURL
});
}
else
{
return
ApiResult
.
Failed
(
"获取失败"
);
}
}
catch
(
Exception
)
{
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