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
c0ea08f1
Commit
c0ea08f1
authored
Jul 01, 2021
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
d5344680
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
42 additions
and
19 deletions
+42
-19
ClassModule.cs
Edu.Module.Course/ClassModule.cs
+22
-15
OrderModule.cs
Edu.Module.Course/OrderModule.cs
+1
-1
OrderModule2.cs
Edu.Module.Course/OrderModule2.cs
+1
-1
StudentBillModule.cs
Edu.Module.Course/StudentBillModule.cs
+1
-1
RB_Class_ConfigRepository.cs
Edu.Repository/Course/RB_Class_ConfigRepository.cs
+16
-0
ClassController.cs
Edu.WebApi/Controllers/Course/ClassController.cs
+1
-1
No files found.
Edu.Module.Course/ClassModule.cs
View file @
c0ea08f1
...
...
@@ -457,7 +457,7 @@ namespace Edu.Module.Course
}
}
#
endregion
return
flag
;
}
...
...
@@ -490,7 +490,7 @@ namespace Edu.Module.Course
if
(
FinishMinutes
>
0
)
{
//基础课时分钟数
var
BasicMinutes
=
GetBasicMinutesModule
(
classModel
.
Group_
Id
);
var
BasicMinutes
=
class_ConfigRepository
.
GetClassMinutesRepository
(
class
Id
);
//完成课时数
var
finishHours
=
FinishMinutes
/
BasicMinutes
;
if
(
classModel
.
ClassHours
>
0
)
...
...
@@ -512,11 +512,11 @@ namespace Edu.Module.Course
/// <summary>
/// 获取基础课时分钟数
/// </summary>
/// <param name="
Group_
Id"></param>
/// <param name="
class
Id"></param>
/// <returns></returns>
public
int
Get
BasicMinutesModule
(
int
Group_
Id
)
public
int
Get
ClassMinutesModule
(
int
class
Id
)
{
return
class_ConfigRepository
.
Get
BasicMinutesRepository
(
Group_
Id
);
return
class_ConfigRepository
.
Get
ClassMinutesRepository
(
class
Id
);
}
/// <summary>
...
...
@@ -1266,7 +1266,9 @@ namespace Edu.Module.Course
public
virtual
bool
AddClassCheckModule
(
List
<
RB_Class_Check_ViewModel
>
list
)
{
//基础课时分钟数
var
BasicMinutes
=
class_ConfigRepository
.
GetBasicMinutesRepository
(
list
[
0
].
Group_Id
);
var
BasicMinutes
=
0
;
//BasicMinutes = class_ConfigRepository.GetBasicMinutesRepository(list[0].Group_Id);
BasicMinutes
=
class_ConfigRepository
.
GetClassMinutesRepository
(
list
[
0
].
ClassId
);
var
totalMinutes
=
classCheckRepository
.
CalcPlanMinutesRepository
(
new
RB_Class_Plan_ViewModel
()
{
ClassId
=
list
[
0
].
ClassId
,
...
...
@@ -1302,8 +1304,8 @@ namespace Edu.Module.Course
item
.
ClassCheckId
=
newId
;
flag
=
newId
>
0
;
}
var
oldModel
=
classCheckRepository
.
GetGuestFinishMinutesRepository
(
item
.
OrderGuestId
.
ToString
(),
ClassCheckId
:
item
.
ClassCheckId
)?.
FirstOrDefault
();
if
(
flag
)
var
oldModel
=
classCheckRepository
.
GetGuestFinishMinutesRepository
(
item
.
OrderGuestId
.
ToString
(),
ClassCheckId
:
item
.
ClassCheckId
)?.
FirstOrDefault
();
if
(
flag
)
{
//缺勤
if
(
item
.
CheckStatus
==
1
)
...
...
@@ -1338,7 +1340,7 @@ namespace Edu.Module.Course
List
<
RB_Class_Check_ViewModel
>
list
=
new
List
<
RB_Class_Check_ViewModel
>();
bool
flag
=
false
;
var
checkList
=
classCheckRepository
.
GetGuestFinishMinutesRepository
(
""
);
if
(
checkList
!=
null
&&
checkList
.
Count
>
0
)
{
foreach
(
var
item
in
checkList
)
...
...
@@ -1433,7 +1435,7 @@ namespace Edu.Module.Course
/// <param name="GuestId"></param>
/// <returns></returns>
[
TransactionCallHandler
]
public
virtual
bool
SetMakeUpStatusModule
(
int
Id
,
int
MakeUpStatus
,
int
ClassCheckId
,
int
GuestId
,
UserInfo
userinfo
)
public
virtual
bool
SetMakeUpStatusModule
(
int
Id
,
int
MakeUpStatus
,
int
ClassCheckId
,
int
GuestId
,
UserInfo
userinfo
)
{
bool
flag
=
true
;
if
(
MakeUpStatus
==
2
)
...
...
@@ -1455,13 +1457,13 @@ namespace Edu.Module.Course
//更新签到表状态
flag
=
classCheckRepository
.
Update
(
fileds
,
new
WhereHelper
(
nameof
(
RB_Class_Check_ViewModel
.
ClassCheckId
),
ClassCheckId
));
}
if
(
flag
)
{
//更新学员状态和已补课时
var
guestModel
=
order_GuestRepository
.
GetEntity
(
GuestId
);
var
guestModel
=
order_GuestRepository
.
GetEntity
(
GuestId
);
var
checkModel
=
classCheckRepository
.
GetEntity
(
ClassCheckId
);
var
makeUpHours
=
(
guestModel
?.
MakeUpHours
??
0
)
+
(
checkModel
?.
CurrentDeductionHours
??
0
);
var
makeUpHours
=
(
guestModel
?.
MakeUpHours
??
0
)
+
(
checkModel
?.
CurrentDeductionHours
??
0
);
Dictionary
<
string
,
object
>
guestFileds
=
new
Dictionary
<
string
,
object
>()
{
{
nameof
(
RB_Order_Guest_ViewModel
.
GuestState
),
1
},
...
...
@@ -2040,13 +2042,18 @@ namespace Edu.Module.Course
}
/// <summary>
/// 计算当前班级完成课时
/// </summary>
/// <param name="model"></param>
/// <returns></returns>
public
int
GetNowClassHours
(
RB_Class_Time_Extend
model
)
{
int
classHours
=
0
;
//班级完成的总分钟数
var
FinishMinutes
=
classCheckRepository
.
GetClassFinishMinutesRepository
(
model
.
ClassId
.
ToString
())?.
FirstOrDefault
()?.
FinishMinutes
??
0
;
//基础课时分钟数
var
BasicMinutes
=
class_ConfigRepository
.
Get
BasicMinutesRepository
(
model
.
Group_
Id
);
var
BasicMinutes
=
class_ConfigRepository
.
Get
ClassMinutesRepository
(
model
.
Class
Id
);
var
nowHours
=
model
.
NewEndPlanDateTime
.
Value
.
Subtract
(
model
.
NewPlanDateTime
.
Value
).
TotalSeconds
;
if
(
FinishMinutes
>
0
)
{
...
...
@@ -2526,7 +2533,7 @@ namespace Edu.Module.Course
Type
=
0
,
// 0-班级,1-使用记录,2-异常记录
});
}
}
var
tempReserveList
=
reserveList
.
Where
(
qitem
=>
qitem
.
ClassDate
==
ClassDate
).
OrderBy
(
qitem
=>
qitem
.
ClassTime
);
...
...
Edu.Module.Course/OrderModule.cs
View file @
c0ea08f1
...
...
@@ -238,7 +238,7 @@ namespace Edu.Module.Course
var
planList
=
class_PlanRepository
.
GetClassPlanListExtRepository
(
new
RB_Class_Plan_ViewModel
()
{
ClassId
=
classId
,
EndTime
=
Common
.
ConvertHelper
.
FormatDate
(
DateTime
.
Now
)
});
var
totalMinutes
=
planList
?.
Sum
(
qitem
=>
qitem
.
ClassMinutes
)
??
0
;
//查询基础课时时长
var
BasicMinutes
=
class_ConfigRepository
.
Get
BasicMinutesRepository
(
Group_
Id
);
var
BasicMinutes
=
class_ConfigRepository
.
Get
ClassMinutesRepository
(
class
Id
);
var
finishHours
=
totalMinutes
/
BasicMinutes
;
fileds
.
Add
(
"finishHours"
,
finishHours
);
var
classModel
=
classRepository
.
GetEntity
(
classId
);
...
...
Edu.Module.Course/OrderModule2.cs
View file @
c0ea08f1
...
...
@@ -106,7 +106,7 @@ namespace Edu.Module.Course
}
var
teacherId
=
teacherModel
?.
Id
??
0
;
//基础课时分钟数
var
BasicMinutes
=
class_ConfigRepository
.
Get
BasicMinutesRepository
(
userinfo
.
Group_
Id
);
var
BasicMinutes
=
class_ConfigRepository
.
Get
ClassMinutesRepository
(
orderModel
.
Class
Id
);
var
stuCheckList
=
class_CheckRepository
.
GetGuestFinishMinutesRepository
(
GuestId
.
ToString
());
//总签到上课分钟数
var
totalFinishMinutes
=
stuCheckList
?.
Sum
(
qitem
=>
qitem
.
FinishMinutes
)
??
0
;
...
...
Edu.Module.Course/StudentBillModule.cs
View file @
c0ea08f1
...
...
@@ -121,7 +121,7 @@ namespace Edu.Module.Course
//班级实体类
var
classModel
=
classRepository
.
GetEntity
(
backModel
.
ClassId
);
//基础课时分钟数
var
BasicMinutes
=
class_ConfigRepository
.
Get
BasicMinutesRepository
(
backModel
.
Group_
Id
);
var
BasicMinutes
=
class_ConfigRepository
.
Get
ClassMinutesRepository
(
backModel
.
Class
Id
);
var
stuCheckList
=
class_CheckRepository
.
GetGuestFinishMinutesRepository
(
backModel
.
GuestId
.
ToString
());
//总签到上课分钟数
var
totalFinishMinutes
=
stuCheckList
?.
Sum
(
qitem
=>
qitem
.
FinishMinutes
)
??
0
;
...
...
Edu.Repository/Course/RB_Class_ConfigRepository.cs
View file @
c0ea08f1
...
...
@@ -10,6 +10,11 @@ namespace Edu.Repository.Course
/// </summary>
public
class
RB_Class_ConfigRepository
:
BaseRepository
<
RB_Class_Config
>
{
/// <summary>
/// 班级仓储层对象
/// </summary>
private
readonly
RB_ClassRepository
classRepository
=
new
RB_ClassRepository
();
/// <summary>
/// 获取班级基础配置实体
/// </summary>
...
...
@@ -47,5 +52,16 @@ WHERE 1=1
var
BasicMinutes
=
GetClassConfigRepository
(
new
RB_Class_Config_ViewModel
()
{
Group_Id
=
Group_Id
})?.
BasicMinutes
??
45
;
return
BasicMinutes
;
}
/// <summary>
/// 获取班级基础课时分钟数
/// </summary>
/// <param name="classId"></param>
/// <returns></returns>
public
int
GetClassMinutesRepository
(
int
classId
)
{
var
BasicMinutes
=
classRepository
.
GetEntity
(
classId
)?.
ClassHourMinute
??
45
;
return
BasicMinutes
;
}
}
}
Edu.WebApi/Controllers/Course/ClassController.cs
View file @
c0ea08f1
...
...
@@ -806,7 +806,7 @@ namespace Edu.WebApi.Controllers.Course
data
.
TeacherName
,
data
.
RoomName
,
TotalHour
=
Convert
.
ToDecimal
(
totalMinutes
/
60.0
),
ClassNum
=
Convert
.
ToInt32
(
totalMinutes
/
classModule
.
Get
BasicMinutesModule
(
base
.
UserInfo
.
Group_
Id
)),
ClassNum
=
Convert
.
ToInt32
(
totalMinutes
/
classModule
.
Get
ClassMinutesModule
(
class
Id
)),
DefaultMinutes
=
totalMinutes
,
ClassDate
=
data
.
ClassDate
.
ToString
(
"yyyy-MM-dd"
),
GuestList
=
guestList
...
...
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