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
3c086416
Commit
3c086416
authored
Jun 17, 2021
by
吴春
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交代码
parent
a7602454
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
160 additions
and
49 deletions
+160
-49
RB_Class_Config.cs
Edu.Model/Entity/Course/RB_Class_Config.cs
+5
-0
RB_Class_Config_ViewModel.cs
Edu.Model/ViewModel/Course/RB_Class_Config_ViewModel.cs
+4
-1
RB_Question_RoomUseLog_ViewModel.cs
...el/ViewModel/Question/RB_Question_RoomUseLog_ViewModel.cs
+5
-0
ClassConfigModule.cs
Edu.Module.Public/ClassConfigModule.cs
+34
-4
ClassController.cs
Edu.WebApi/Controllers/Course/ClassController.cs
+70
-37
ClassRoomController.cs
Edu.WebApi/Controllers/Course/ClassRoomController.cs
+20
-6
PublicController.cs
Edu.WebApi/Controllers/Public/PublicController.cs
+22
-1
No files found.
Edu.Model/Entity/Course/RB_Class_Config.cs
View file @
3c086416
...
@@ -51,5 +51,10 @@ namespace Edu.Model.Entity.Course
...
@@ -51,5 +51,10 @@ namespace Edu.Model.Entity.Course
/// 基础课时
/// 基础课时
/// </summary>
/// </summary>
public
int
BasicHours
{
get
;
set
;
}
public
int
BasicHours
{
get
;
set
;
}
/// <summary>
/// 管理员ids
/// </summary>
public
string
AdminiIds
{
get
;
set
;
}
}
}
}
}
Edu.Model/ViewModel/Course/RB_Class_Config_ViewModel.cs
View file @
3c086416
...
@@ -10,6 +10,9 @@ namespace Edu.Model.ViewModel.Course
...
@@ -10,6 +10,9 @@ namespace Edu.Model.ViewModel.Course
/// </summary>
/// </summary>
public
class
RB_Class_Config_ViewModel
:
RB_Class_Config
public
class
RB_Class_Config_ViewModel
:
RB_Class_Config
{
{
/// <summary>
/// 关联管理员
/// </summary>
public
List
<
object
>
AdminiIdList
{
get
;
set
;
}
}
}
}
}
Edu.Model/ViewModel/Question/RB_Question_RoomUseLog_ViewModel.cs
View file @
3c086416
...
@@ -40,5 +40,10 @@ namespace Edu.Model.ViewModel.Question
...
@@ -40,5 +40,10 @@ namespace Edu.Model.ViewModel.Question
/// 班级状态
/// 班级状态
/// </summary>
/// </summary>
public
int
ClassStatus
{
get
;
set
;
}
public
int
ClassStatus
{
get
;
set
;
}
/// <summary>
/// 间隔多少个15分钟
/// </summary>
public
int
IntervalNum
{
get
;
set
;
}
}
}
}
}
Edu.Module.Public/ClassConfigModule.cs
View file @
3c086416
...
@@ -29,6 +29,11 @@ namespace Edu.Module.Public
...
@@ -29,6 +29,11 @@ namespace Edu.Module.Public
/// </summary>
/// </summary>
private
readonly
RB_ClassRepository
classRepository
=
new
RB_ClassRepository
();
private
readonly
RB_ClassRepository
classRepository
=
new
RB_ClassRepository
();
/// <summary>
/// 账号
/// </summary>
private
readonly
Repository
.
User
.
RB_AccountRepository
accountRepository
=
new
Repository
.
User
.
RB_AccountRepository
();
#
region
班级基础设置
#
region
班级基础设置
/// <summary>
/// <summary>
/// 获取班级配置实体类
/// 获取班级配置实体类
...
@@ -37,7 +42,31 @@ namespace Edu.Module.Public
...
@@ -37,7 +42,31 @@ namespace Edu.Module.Public
/// <returns></returns>
/// <returns></returns>
public
RB_Class_Config_ViewModel
GetClassConfigModule
(
RB_Class_Config_ViewModel
query
)
public
RB_Class_Config_ViewModel
GetClassConfigModule
(
RB_Class_Config_ViewModel
query
)
{
{
return
class_ConfigRepository
.
GetClassConfigRepository
(
query
);
var
model
=
class_ConfigRepository
.
GetClassConfigRepository
(
query
);
if
(!
string
.
IsNullOrWhiteSpace
(
model
.
AdminiIds
))
//查询管理员
{
var
empList
=
accountRepository
.
GetEmployeeListRepository
(
new
Edu
.
Model
.
ViewModel
.
User
.
Employee_ViewModel
()
{
Group_Id
=
query
.
Group_Id
,
QIds
=
model
.
AdminiIds
});
if
(
empList
!=
null
&&
empList
.
Any
())
{
model
.
AdminiIdList
=
new
List
<
object
>();
foreach
(
var
item
in
empList
)
{
model
.
AdminiIdList
.
Add
(
new
{
item
.
Id
,
item
.
EmployeeName
,
item
.
UserIcon
});
}
}
}
return
model
;
}
}
/// <summary>
/// <summary>
...
@@ -59,6 +88,7 @@ namespace Edu.Module.Public
...
@@ -59,6 +88,7 @@ namespace Edu.Module.Public
{
nameof
(
RB_Class_Config_ViewModel
.
UpdateBy
),
extModel
.
UpdateBy
},
{
nameof
(
RB_Class_Config_ViewModel
.
UpdateBy
),
extModel
.
UpdateBy
},
{
nameof
(
RB_Class_Config_ViewModel
.
UpdateTime
),
extModel
.
UpdateTime
},
{
nameof
(
RB_Class_Config_ViewModel
.
UpdateTime
),
extModel
.
UpdateTime
},
{
nameof
(
RB_Class_Config_ViewModel
.
BasicHours
),
extModel
.
BasicHours
},
{
nameof
(
RB_Class_Config_ViewModel
.
BasicHours
),
extModel
.
BasicHours
},
{
nameof
(
RB_Class_Config_ViewModel
.
AdminiIds
),
extModel
.
AdminiIds
},
};
};
flag
=
class_ConfigRepository
.
Update
(
fileds
,
new
WhereHelper
(
nameof
(
RB_Class_Config_ViewModel
.
ConfigId
),
oldModel
.
ConfigId
));
flag
=
class_ConfigRepository
.
Update
(
fileds
,
new
WhereHelper
(
nameof
(
RB_Class_Config_ViewModel
.
ConfigId
),
oldModel
.
ConfigId
));
}
}
...
@@ -85,14 +115,14 @@ namespace Edu.Module.Public
...
@@ -85,14 +115,14 @@ namespace Edu.Module.Public
/// <returns></returns>
/// <returns></returns>
public
List
<
RB_Class_Type_ViewModel
>
GetClassTypePageListModule
(
int
pageIndex
,
int
pageSize
,
out
long
rowsCount
,
RB_Class_Type_ViewModel
query
)
public
List
<
RB_Class_Type_ViewModel
>
GetClassTypePageListModule
(
int
pageIndex
,
int
pageSize
,
out
long
rowsCount
,
RB_Class_Type_ViewModel
query
)
{
{
var
list
=
class_TypeRepository
.
GetClassTypePageListRepository
(
pageIndex
,
pageSize
,
out
rowsCount
,
query
);
var
list
=
class_TypeRepository
.
GetClassTypePageListRepository
(
pageIndex
,
pageSize
,
out
rowsCount
,
query
);
if
(
list
!=
null
&&
list
.
Count
>
0
)
if
(
list
!=
null
&&
list
.
Count
>
0
)
{
{
List
<
ClassTypeStatic_ViewModel
>
staticList
=
new
List
<
ClassTypeStatic_ViewModel
>();
List
<
ClassTypeStatic_ViewModel
>
staticList
=
new
List
<
ClassTypeStatic_ViewModel
>();
var
ids
=
string
.
Join
(
","
,
list
.
Select
(
qitem
=>
qitem
.
CTypeId
));
var
ids
=
string
.
Join
(
","
,
list
.
Select
(
qitem
=>
qitem
.
CTypeId
));
if
(!
string
.
IsNullOrEmpty
(
ids
))
if
(!
string
.
IsNullOrEmpty
(
ids
))
{
{
staticList
=
classRepository
.
GetClassTypeStaticListRepository
(
ids
);
staticList
=
classRepository
.
GetClassTypeStaticListRepository
(
ids
);
}
}
foreach
(
var
item
in
list
)
foreach
(
var
item
in
list
)
{
{
...
@@ -132,7 +162,7 @@ namespace Edu.Module.Public
...
@@ -132,7 +162,7 @@ namespace Edu.Module.Public
{
nameof
(
RB_Class_Type_ViewModel
.
UpdateBy
),
extModel
.
UpdateBy
},
{
nameof
(
RB_Class_Type_ViewModel
.
UpdateBy
),
extModel
.
UpdateBy
},
{
nameof
(
RB_Class_Type_ViewModel
.
UpdateTime
),
extModel
.
UpdateTime
},
{
nameof
(
RB_Class_Type_ViewModel
.
UpdateTime
),
extModel
.
UpdateTime
},
};
};
flag
=
class_TypeRepository
.
Update
(
fileds
,
new
WhereHelper
(
nameof
(
RB_Class_Type_ViewModel
.
CTypeId
),
extModel
.
CTypeId
));
flag
=
class_TypeRepository
.
Update
(
fileds
,
new
WhereHelper
(
nameof
(
RB_Class_Type_ViewModel
.
CTypeId
),
extModel
.
CTypeId
));
}
}
else
else
{
{
...
...
Edu.WebApi/Controllers/Course/ClassController.cs
View file @
3c086416
...
@@ -1372,8 +1372,8 @@ namespace Edu.WebApi.Controllers.Course
...
@@ -1372,8 +1372,8 @@ namespace Edu.WebApi.Controllers.Course
{
{
model
.
LessonPlanList
=
new
List
<
RB_Class_LessonPlan_ViewModel
>
model
.
LessonPlanList
=
new
List
<
RB_Class_LessonPlan_ViewModel
>
{
{
new
RB_Class_LessonPlan_ViewModel
{
CourseName
=
"活動
編
"
,
LessonPlanDetailsList
=
new
List
<
RB_Class_LessonPlanDetails_ViewModel
>(),
LessonPlanProjectsList
=
new
List
<
RB_Class_LessonPlanProjects_ViewModel
>()
},
new
RB_Class_LessonPlan_ViewModel
{
CourseName
=
"活動
篇
"
,
LessonPlanDetailsList
=
new
List
<
RB_Class_LessonPlanDetails_ViewModel
>(),
LessonPlanProjectsList
=
new
List
<
RB_Class_LessonPlanProjects_ViewModel
>()
},
new
RB_Class_LessonPlan_ViewModel
{
CourseName
=
"理解
編
"
,
LessonPlanDetailsList
=
new
List
<
RB_Class_LessonPlanDetails_ViewModel
>(),
LessonPlanProjectsList
=
new
List
<
RB_Class_LessonPlanProjects_ViewModel
>()
}
new
RB_Class_LessonPlan_ViewModel
{
CourseName
=
"理解
篇
"
,
LessonPlanDetailsList
=
new
List
<
RB_Class_LessonPlanDetails_ViewModel
>(),
LessonPlanProjectsList
=
new
List
<
RB_Class_LessonPlanProjects_ViewModel
>()
}
};
};
}
}
return
ApiResult
.
Success
(
""
,
model
);
return
ApiResult
.
Success
(
""
,
model
);
...
@@ -1469,11 +1469,16 @@ namespace Edu.WebApi.Controllers.Course
...
@@ -1469,11 +1469,16 @@ namespace Edu.WebApi.Controllers.Course
{
{
int
IsLessonStatus
=
0
;
//0-未备课,1-部分,2-全部
int
IsLessonStatus
=
0
;
//0-未备课,1-部分,2-全部
List
<
object
>
planList
=
new
List
<
object
>();
List
<
object
>
planList
=
new
List
<
object
>();
List
<
object
>
planListResult
=
new
List
<
object
>();
var
plan
=
data
.
Where
(
x
=>
x
.
ClassDate
.
ToString
(
"yyyy-MM-dd"
)
==
startTime
.
AddDays
(
i
).
ToString
(
"yyyy-MM-dd"
));
var
plan
=
data
.
Where
(
x
=>
x
.
ClassDate
.
ToString
(
"yyyy-MM-dd"
)
==
startTime
.
AddDays
(
i
).
ToString
(
"yyyy-MM-dd"
));
string
DayTime
=
string
.
Empty
;
string
DayTime
=
string
.
Empty
;
foreach
(
var
item
in
plan
)
foreach
(
var
itemGroup
in
plan
.
GroupBy
(
x
=>
new
{
x
.
TeacherId
}))
{
{
List
<
object
>
planListTeacher
=
new
List
<
object
>();
foreach
(
var
item
in
plan
.
Where
(
x
=>
x
.
TeacherId
==
itemGroup
.
Key
.
TeacherId
))
{
if
(
plan
.
Where
(
x
=>
x
.
LessonPlanNum
>
0
).
Count
()
<
plan
.
Count
()
&&
plan
.
Where
(
x
=>
x
.
LessonPlanNum
>
0
).
Count
()
>
0
)
if
(
plan
.
Where
(
x
=>
x
.
LessonPlanNum
>
0
).
Count
()
<
plan
.
Count
()
&&
plan
.
Where
(
x
=>
x
.
LessonPlanNum
>
0
).
Count
()
>
0
)
{
{
IsLessonStatus
=
1
;
IsLessonStatus
=
1
;
...
@@ -1486,49 +1491,77 @@ namespace Edu.WebApi.Controllers.Course
...
@@ -1486,49 +1491,77 @@ namespace Edu.WebApi.Controllers.Course
{
{
IsLessonStatus
=
0
;
IsLessonStatus
=
0
;
}
}
foreach
(
var
itemTime
in
item
.
PlanTimeList
)
foreach
(
var
itemTime
in
item
.
PlanTimeList
)
{
int
IsPlanLessonStatus
=
0
;
//0-未备课,1-部分,2-全部
if
(
plan
.
Where
(
x
=>
x
.
LessonPlanNum
>
0
&&
x
.
ClassPlanId
==
itemTime
.
ClassPlanId
).
Count
()
<
plan
.
Where
(
x
=>
x
.
ClassPlanId
==
itemTime
.
ClassPlanId
).
Count
()
&&
plan
.
Where
(
x
=>
x
.
LessonPlanNum
>
0
&&
x
.
ClassPlanId
==
itemTime
.
ClassPlanId
).
Count
()
>
0
)
{
IsPlanLessonStatus
=
1
;
}
else
if
(
plan
.
Where
(
x
=>
x
.
LessonPlanNum
>
0
&&
x
.
ClassPlanId
==
itemTime
.
ClassPlanId
).
Count
()
==
plan
.
Where
(
x
=>
x
.
ClassPlanId
==
itemTime
.
ClassPlanId
).
Count
())
{
{
IsPlanLessonStatus
=
2
;
int
IsPlanLessonStatus
=
0
;
//0-未备课,1-部分,2-全部
if
(
plan
.
Where
(
x
=>
x
.
LessonPlanNum
>
0
&&
x
.
ClassPlanId
==
itemTime
.
ClassPlanId
).
Count
()
<
plan
.
Where
(
x
=>
x
.
ClassPlanId
==
itemTime
.
ClassPlanId
).
Count
()
&&
plan
.
Where
(
x
=>
x
.
LessonPlanNum
>
0
&&
x
.
ClassPlanId
==
itemTime
.
ClassPlanId
).
Count
()
>
0
)
{
IsPlanLessonStatus
=
1
;
}
else
if
(
plan
.
Where
(
x
=>
x
.
LessonPlanNum
>
0
&&
x
.
ClassPlanId
==
itemTime
.
ClassPlanId
).
Count
()
==
plan
.
Where
(
x
=>
x
.
ClassPlanId
==
itemTime
.
ClassPlanId
).
Count
())
{
IsPlanLessonStatus
=
2
;
}
else
{
IsPlanLessonStatus
=
0
;
}
planList
.
Add
(
new
{
IsPlanLessonStatus
,
item
.
ClassPlanId
,
item
.
ClassId
,
item
.
TeacherId
,
item
.
LessonPlanNum
,
item
.
School_Id
,
item
.
ClassName
,
itemTime
.
StartTime
,
itemTime
.
EndTime
,
item
.
TeacherName
,
item
.
UserIcon
,
GuestStr
=
(
item
.
GuestList
!=
null
&&
item
.
GuestList
.
Any
())
?
string
.
Join
(
","
,
item
.
GuestList
.
Select
(
x
=>
x
.
GuestName
))
:
""
});
planListTeacher
.
Add
(
new
{
IsPlanLessonStatus
,
item
.
ClassPlanId
,
item
.
ClassId
,
item
.
TeacherId
,
item
.
LessonPlanNum
,
item
.
School_Id
,
item
.
ClassName
,
itemTime
.
StartTime
,
itemTime
.
EndTime
,
item
.
TeacherName
,
item
.
UserIcon
,
GuestStr
=
(
item
.
GuestList
!=
null
&&
item
.
GuestList
.
Any
())
?
string
.
Join
(
","
,
item
.
GuestList
.
Select
(
x
=>
x
.
GuestName
))
:
""
});
}
}
else
if
(
item
.
PlanTimeList
!=
null
&&
item
.
PlanTimeList
.
Any
())
{
{
IsPlanLessonStatus
=
0
;
item
.
PlanTimeList
.
ForEach
(
x
=>
x
.
NewPlanDateTime
=
item
.
ClassDate
.
ToString
(
"yyyy-MM-dd"
)
+
" "
+
x
.
StartTime
);
DayTime
=
item
.
PlanTimeList
.
Min
(
x
=>
Convert
.
ToDateTime
(
x
.
NewPlanDateTime
)).
ToString
(
"HH:ss"
);
item
.
PlanTimeList
.
ForEach
(
x
=>
x
.
NewPlanDateTime
=
item
.
ClassDate
.
ToString
(
"yyyy-MM-dd"
)
+
" "
+
x
.
EndTime
);
DayTime
=
DayTime
+
"~"
+
item
.
PlanTimeList
.
Max
(
x
=>
Convert
.
ToDateTime
(
x
.
NewPlanDateTime
)).
ToString
(
"HH:ss"
);
}
}
planList
.
Add
(
new
{
IsPlanLessonStatus
,
item
.
ClassPlanId
,
item
.
ClassId
,
item
.
TeacherId
,
item
.
LessonPlanNum
,
item
.
School_Id
,
item
.
ClassName
,
itemTime
.
StartTime
,
itemTime
.
EndTime
,
item
.
TeacherName
,
item
.
UserIcon
,
GuestStr
=
(
item
.
GuestList
!=
null
&&
item
.
GuestList
.
Any
())
?
string
.
Join
(
","
,
item
.
GuestList
.
Select
(
x
=>
x
.
GuestName
))
:
""
});
}
}
if
(
item
.
PlanTimeList
!=
null
&&
item
.
PlanTimeList
.
Any
())
planListResult
.
Add
(
new
{
{
item
.
PlanTimeList
.
ForEach
(
x
=>
x
.
NewPlanDateTime
=
item
.
ClassDate
.
ToString
(
"yyyy-MM-dd"
)
+
" "
+
x
.
StartTime
);
itemGroup
.
Key
.
TeacherId
,
DayTime
=
item
.
PlanTimeList
.
Min
(
x
=>
Convert
.
ToDateTime
(
x
.
NewPlanDateTime
)).
ToString
(
"HH:ss"
);
TeacherName
=
plan
.
Where
(
x
=>
x
.
TeacherId
==
itemGroup
.
Key
.
TeacherId
).
FirstOrDefault
()?.
TeacherName
??
""
,
item
.
PlanTimeList
.
ForEach
(
x
=>
x
.
NewPlanDateTime
=
item
.
ClassDate
.
ToString
(
"yyyy-MM-dd"
)
+
" "
+
x
.
EndTime
);
planListTeacher
DayTime
=
DayTime
+
"~"
+
item
.
PlanTimeList
.
Max
(
x
=>
Convert
.
ToDateTime
(
x
.
NewPlanDateTime
)).
ToString
(
"HH:ss"
);
});
}
}
}
result
.
Add
(
new
result
.
Add
(
new
{
{
planListResult
,
IsLessonStatus
=
(
planList
!=
null
&&
planList
.
Any
())
?
IsLessonStatus
:
-
1
,
IsLessonStatus
=
(
planList
!=
null
&&
planList
.
Any
())
?
IsLessonStatus
:
-
1
,
DayTime
,
DayTime
,
DateYear
=
startTime
.
AddDays
(
i
).
ToString
(
"yyyy"
),
DateYear
=
startTime
.
AddDays
(
i
).
ToString
(
"yyyy"
),
...
...
Edu.WebApi/Controllers/Course/ClassRoomController.cs
View file @
3c086416
...
@@ -187,7 +187,7 @@ namespace Edu.WebApi.Controllers.Course
...
@@ -187,7 +187,7 @@ namespace Edu.WebApi.Controllers.Course
foreach
(
var
item
in
list
.
GroupBy
(
x
=>
x
.
School_Id
))
foreach
(
var
item
in
list
.
GroupBy
(
x
=>
x
.
School_Id
))
{
{
List
<
object
>
roomList
=
new
List
<
object
>();
List
<
object
>
roomList
=
new
List
<
object
>();
var
classRoomList
=
list
.
Where
(
x
=>
x
.
School_Id
==
item
.
Key
).
ToList
();
var
classRoomList
=
list
.
Where
(
x
=>
x
.
School_Id
==
item
.
Key
).
ToList
();
foreach
(
var
roomItem
in
classRoomList
)
foreach
(
var
roomItem
in
classRoomList
)
{
{
...
@@ -213,7 +213,7 @@ namespace Edu.WebApi.Controllers.Course
...
@@ -213,7 +213,7 @@ namespace Edu.WebApi.Controllers.Course
{
{
roomItem
.
RoomId
,
roomItem
.
RoomId
,
roomItem
.
RoomName
,
roomItem
.
RoomName
,
UserRate
=
(
roomItem
.
TotalHour
>
0
)
?
((
TotalMinutes
/
roomItem
.
TotalHour
)
*
100
)
:
0
,
//使用率
UserRate
=
(
(
roomItem
.
TotalHour
>
0
)
?
((
TotalMinutes
/
roomItem
.
TotalHour
)
*
100
)
:
0
).
ToString
(
"f2"
)
,
//使用率
roomItem
.
RoomPic
,
roomItem
.
RoomPic
,
roomItem
.
RoomPicList
,
roomItem
.
RoomPicList
,
UseState
,
UseState
,
...
@@ -257,10 +257,16 @@ namespace Edu.WebApi.Controllers.Course
...
@@ -257,10 +257,16 @@ namespace Edu.WebApi.Controllers.Course
roomUserLogList
=
classRoomModule
.
GetClassRoomUseLogListRepository
(
new
RB_Class_RoomUseLog_ViewModel
{
StartTime
=
StartTime
,
EndTime
=
EndTime
,
QRoomIds
=
roomIds
});
roomUserLogList
=
classRoomModule
.
GetClassRoomUseLogListRepository
(
new
RB_Class_RoomUseLog_ViewModel
{
StartTime
=
StartTime
,
EndTime
=
EndTime
,
QRoomIds
=
roomIds
});
string
pids
=
string
.
Join
(
","
,
roomList
.
Select
(
x
=>
x
.
ClassPlanId
));
string
pids
=
string
.
Join
(
","
,
roomList
.
Select
(
x
=>
x
.
ClassPlanId
));
timeList
=
classModule
.
GetClassTimeListRepository
(
new
RB_Class_Time_ViewModel
()
{
Group_Id
=
base
.
UserInfo
.
Group_Id
,
QClassPlanIds
=
pids
});
timeList
=
classModule
.
GetClassTimeListRepository
(
new
RB_Class_Time_ViewModel
()
{
Group_Id
=
base
.
UserInfo
.
Group_Id
,
QClassPlanIds
=
pids
});
//
timeList.ForEach(x => x.NewPlanDateTime = System.DateTime.Now.ToString("yyyy-MM-dd ") + x.StartTime);
timeList
.
ForEach
(
x
=>
x
.
NewPlanDateTime
=
System
.
DateTime
.
Now
.
ToString
(
"yyyy-MM-dd "
)
+
x
.
StartTime
);
//
timeList.ForEach(x => x.NewEndPlanDateTime = System.DateTime.Now.ToString("yyyy-MM-dd ") + x.EndTime);
timeList
.
ForEach
(
x
=>
x
.
NewEndPlanDateTime
=
System
.
DateTime
.
Now
.
ToString
(
"yyyy-MM-dd "
)
+
x
.
EndTime
);
foreach
(
var
item
in
roomUserLogList
)
foreach
(
var
item
in
roomUserLogList
)
{
{
int
IntervalNum
=
0
;
if
(
item
.
UpdateTime
.
HasValue
)
{
IntervalNum
=
(
int
)
Math
.
Floor
((
item
.
UpdateTime
.
Value
.
Subtract
(
item
.
CreateTime
).
TotalMinutes
)
/
15
);
}
resultList
.
Add
(
new
Model
.
ViewModel
.
Question
.
RB_Question_RoomUseLog_ViewModel
resultList
.
Add
(
new
Model
.
ViewModel
.
Question
.
RB_Question_RoomUseLog_ViewModel
{
{
Id
=
item
.
RoomErrorId
,
Id
=
item
.
RoomErrorId
,
...
@@ -270,11 +276,18 @@ namespace Edu.WebApi.Controllers.Course
...
@@ -270,11 +276,18 @@ namespace Edu.WebApi.Controllers.Course
EndTime
=
item
.
UpdateTime
.
HasValue
?
item
.
UpdateTime
.
Value
.
ToString
(
"HH:mm"
)
:
"未知"
,
EndTime
=
item
.
UpdateTime
.
HasValue
?
item
.
UpdateTime
.
Value
.
ToString
(
"HH:mm"
)
:
"未知"
,
InfoTime
=
item
.
CreateTime
,
InfoTime
=
item
.
CreateTime
,
Type
=
item
.
ErrorType
==
0
?
1
:
2
,
Type
=
item
.
ErrorType
==
0
?
1
:
2
,
ClassStatus
=
-
1
ClassStatus
=
-
1
,
IntervalNum
=
IntervalNum
});
});
}
}
foreach
(
var
item
in
timeList
)
foreach
(
var
item
in
timeList
)
{
{
int
IntervalNum
=
0
;
if
(!
string
.
IsNullOrWhiteSpace
(
item
.
NewPlanDateTime
)
&&
!
string
.
IsNullOrWhiteSpace
(
item
.
NewEndPlanDateTime
))
{
IntervalNum
=
(
int
)
Math
.
Floor
((
Convert
.
ToDateTime
(
item
.
NewEndPlanDateTime
).
Subtract
(
Convert
.
ToDateTime
(
item
.
NewPlanDateTime
)).
TotalMinutes
)
/
15
);
}
var
planModel
=
roomList
.
Where
(
x
=>
x
.
ClassPlanId
==
item
.
ClassPlanId
).
FirstOrDefault
();
var
planModel
=
roomList
.
Where
(
x
=>
x
.
ClassPlanId
==
item
.
ClassPlanId
).
FirstOrDefault
();
if
(
planModel
!=
null
&&
planModel
.
ClassPlanId
>
0
)
if
(
planModel
!=
null
&&
planModel
.
ClassPlanId
>
0
)
{
{
...
@@ -287,7 +300,8 @@ namespace Edu.WebApi.Controllers.Course
...
@@ -287,7 +300,8 @@ namespace Edu.WebApi.Controllers.Course
EndTime
=
item
.
EndTime
,
EndTime
=
item
.
EndTime
,
InfoTime
=
Convert
.
ToDateTime
(
planModel
.
ClassDate
.
ToString
(
"yyyy-MM-dd "
)
+
item
.
StartTime
),
InfoTime
=
Convert
.
ToDateTime
(
planModel
.
ClassDate
.
ToString
(
"yyyy-MM-dd "
)
+
item
.
StartTime
),
Type
=
0
,
Type
=
0
,
ClassStatus
=
item
.
ClassStatus
ClassStatus
=
item
.
ClassStatus
,
IntervalNum
=
IntervalNum
});
});
}
}
}
}
...
...
Edu.WebApi/Controllers/Public/PublicController.cs
View file @
3c086416
...
@@ -458,6 +458,26 @@ namespace Edu.WebApi.Controllers.Public
...
@@ -458,6 +458,26 @@ namespace Edu.WebApi.Controllers.Public
return
ApiResult
.
Success
(
data
:
extModel
);
return
ApiResult
.
Success
(
data
:
extModel
);
}
}
/// <summary>
/// 获取班级基础设置的管理员
/// </summary>
/// <returns></returns>
[
HttpPost
]
[
Microsoft
.
AspNetCore
.
Authorization
.
AllowAnonymous
]
public
ApiResult
GetClassConfigAdmini
()
{
var
query
=
new
RB_Class_Config_ViewModel
()
{
Group_Id
=
base
.
ParmJObj
.
GetInt
(
"Group_Id"
,
100000
),
ConfigId
=
base
.
ParmJObj
.
GetInt
(
"ConfigId"
)
};
var
extModel
=
classConfigModule
.
GetClassConfigModule
(
query
);
return
ApiResult
.
Success
(
data
:
extModel
.
AdminiIdList
);
}
/// <summary>
/// <summary>
/// 新增修改班级基础设置
/// 新增修改班级基础设置
/// </summary>
/// </summary>
...
@@ -472,6 +492,7 @@ namespace Edu.WebApi.Controllers.Public
...
@@ -472,6 +492,7 @@ namespace Edu.WebApi.Controllers.Public
BasicClassNum
=
base
.
ParmJObj
.
GetInt
(
"BasicClassNum"
),
BasicClassNum
=
base
.
ParmJObj
.
GetInt
(
"BasicClassNum"
),
BasicMinutes
=
base
.
ParmJObj
.
GetInt
(
"BasicMinutes"
),
BasicMinutes
=
base
.
ParmJObj
.
GetInt
(
"BasicMinutes"
),
BasicHours
=
base
.
ParmJObj
.
GetInt
(
"BasicHours"
),
BasicHours
=
base
.
ParmJObj
.
GetInt
(
"BasicHours"
),
AdminiIds
=
base
.
ParmJObj
.
GetStringValue
(
"AdminiIds"
)
};
};
extModel
.
Group_Id
=
base
.
UserInfo
.
Group_Id
;
extModel
.
Group_Id
=
base
.
UserInfo
.
Group_Id
;
extModel
.
UpdateBy
=
base
.
UserInfo
.
Id
;
extModel
.
UpdateBy
=
base
.
UserInfo
.
Id
;
...
@@ -563,7 +584,7 @@ namespace Edu.WebApi.Controllers.Public
...
@@ -563,7 +584,7 @@ namespace Edu.WebApi.Controllers.Public
AppId
=
Common
.
Config
.
PushAppId
,
AppId
=
Common
.
Config
.
PushAppId
,
IsRead
=
0
,
IsRead
=
0
,
ReceiveId
=
base
.
UserInfo
.
Id
.
ToString
(),
ReceiveId
=
base
.
UserInfo
.
Id
.
ToString
(),
Platform
=
2
Platform
=
2
};
};
var
list
=
logModule
.
GetMsgLogListModule
(
query
);
var
list
=
logModule
.
GetMsgLogListModule
(
query
);
return
ApiResult
.
Success
(
data
:
list
);
return
ApiResult
.
Success
(
data
:
list
);
...
...
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