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
0cb7a2eb
Commit
0cb7a2eb
authored
Jul 01, 2021
by
黄奎
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://gitlab.oytour.com/Kui2/education
parents
8a90320e
7d6d41ae
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
99 additions
and
63 deletions
+99
-63
RB_Class_Plan_ViewModel.cs
Edu.Model/ViewModel/Course/RB_Class_Plan_ViewModel.cs
+5
-0
TeachingRewardsModule.cs
Edu.Module.Course/TeachingRewardsModule.cs
+6
-2
FinanceModule.cs
Edu.Module.Finance/FinanceModule.cs
+87
-60
RB_Class_PlanRepository.cs
Edu.Repository/Course/RB_Class_PlanRepository.cs
+1
-1
No files found.
Edu.Model/ViewModel/Course/RB_Class_Plan_ViewModel.cs
View file @
0cb7a2eb
...
@@ -53,6 +53,11 @@ namespace Edu.Model.ViewModel.Course
...
@@ -53,6 +53,11 @@ namespace Edu.Model.ViewModel.Course
/// </summary>
/// </summary>
public
int
ClassType
{
get
;
set
;
}
public
int
ClassType
{
get
;
set
;
}
/// <summary>
/// 班级课时分钟数
/// </summary>
public
int
ClassHourMinute
{
get
;
set
;
}
/// <summary>
/// <summary>
/// 老师头像
/// 老师头像
/// </summary>
/// </summary>
...
...
Edu.Module.Course/TeachingRewardsModule.cs
View file @
0cb7a2eb
...
@@ -536,7 +536,9 @@ namespace Edu.Module.Course
...
@@ -536,7 +536,9 @@ namespace Edu.Module.Course
var
ts
=
Convert
.
ToDateTime
(
nowTime
+
" "
+
qitem
.
EndTime
)
-
Convert
.
ToDateTime
(
nowTime
+
" "
+
qitem
.
StartTime
);
var
ts
=
Convert
.
ToDateTime
(
nowTime
+
" "
+
qitem
.
EndTime
)
-
Convert
.
ToDateTime
(
nowTime
+
" "
+
qitem
.
StartTime
);
minute
+=
(
int
)
ts
.
TotalMinutes
;
minute
+=
(
int
)
ts
.
TotalMinutes
;
}
}
int
ksNum
=
minute
/
configModel
.
BasicMinutes
;
// 未达到一课时时间 算不算一课时
int
ClassHourMinute
=
configModel
.
BasicMinutes
;
//课时分钟数
if
(
item
.
ClassHourMinute
>
0
)
{
ClassHourMinute
=
item
.
ClassHourMinute
;
}
int
ksNum
=
minute
/
ClassHourMinute
;
// 未达到一课时时间 算不算一课时
//查询课单价
//查询课单价
var
typeModel
=
typeList
.
Where
(
x
=>
x
.
CTypeId
==
item
.
ClassType
).
FirstOrDefault
();
var
typeModel
=
typeList
.
Where
(
x
=>
x
.
CTypeId
==
item
.
ClassType
).
FirstOrDefault
();
var
teacherModel
=
teacherList
.
Where
(
x
=>
x
.
TId
==
item
.
TeacherId
).
FirstOrDefault
();
var
teacherModel
=
teacherList
.
Where
(
x
=>
x
.
TId
==
item
.
TeacherId
).
FirstOrDefault
();
...
@@ -1215,7 +1217,9 @@ namespace Edu.Module.Course
...
@@ -1215,7 +1217,9 @@ namespace Edu.Module.Course
//班级课时总分钟数
//班级课时总分钟数
int
TotalClassMin
=
class_PlanRepository
.
GetClassTotalMinute
(
classId
,
classModel
.
Group_Id
);
int
TotalClassMin
=
class_PlanRepository
.
GetClassTotalMinute
(
classId
,
classModel
.
Group_Id
);
//总课时
//总课时
int
ksNum
=
TotalClassMin
/
configModel
.
BasicMinutes
;
// 未达到一课时时间 不算一课时
int
ClassHourMinute
=
configModel
.
BasicMinutes
;
//课时分钟数
if
(
classModel
.
ClassHourMinute
>
0
)
{
ClassHourMinute
=
classModel
.
ClassHourMinute
;
}
int
ksNum
=
TotalClassMin
/
ClassHourMinute
;
// 未达到一课时时间 不算一课时
//满班率
//满班率
decimal
FullClassRate
=
0
;
decimal
FullClassRate
=
0
;
...
...
Edu.Module.Finance/FinanceModule.cs
View file @
0cb7a2eb
...
@@ -2760,15 +2760,21 @@ namespace Edu.Module.Finance
...
@@ -2760,15 +2760,21 @@ namespace Edu.Module.Finance
});
});
}
}
//初始化 基础课时
DateTime
STime
=
Convert
.
ToDateTime
(
startMonth
);
while
(
true
)
{
DateTime
ETime
=
STime
.
AddMonths
(
1
).
AddDays
(-
1
);
var
mlist
=
RList
.
Where
(
x
=>
x
.
Date
>=
STime
&&
x
.
Date
<=
ETime
).
ToList
();
#
region
基础课时处理
#
region
基础课时处理
decimal
DeductionMoney
=
0
;
decimal
DeductionMoney
=
0
;
if
(
configModel
.
BasicHours
>
0
)
if
(
configModel
.
BasicHours
>
0
)
{
{
//遍历所有老师
//遍历所有老师
List
<
int
>
TeacherIdList
=
RL
ist
.
Select
(
x
=>
x
.
TeacherId
).
Distinct
().
ToList
();
List
<
int
>
TeacherIdList
=
ml
ist
.
Select
(
x
=>
x
.
TeacherId
).
Distinct
().
ToList
();
foreach
(
var
item
in
TeacherIdList
)
foreach
(
var
item
in
TeacherIdList
)
{
{
var
qblist
=
RList
.
Where
(
x
=>
x
.
TeacherId
==
item
).
OrderBy
(
x
=>
x
.
UnitPrice
).
ThenBy
(
x
=>
x
.
Dat
e
).
ToList
();
var
qblist
=
mlist
.
Where
(
x
=>
x
.
TeacherId
==
item
).
OrderBy
(
x
=>
x
.
Date
).
ThenBy
(
x
=>
x
.
UnitPric
e
).
ToList
();
decimal
BasicHours
=
(
decimal
)
configModel
.
BasicHours
;
decimal
BasicHours
=
(
decimal
)
configModel
.
BasicHours
;
foreach
(
var
qitem
in
qblist
)
foreach
(
var
qitem
in
qblist
)
{
{
...
@@ -2797,6 +2803,13 @@ namespace Edu.Module.Finance
...
@@ -2797,6 +2803,13 @@ namespace Edu.Module.Finance
}
}
}
}
#
endregion
#
endregion
if
(
STime
.
Month
==
Convert
.
ToDateTime
(
endMonth
).
Month
)
{
break
;
}
STime
=
STime
.
AddMonths
(
1
);
}
}
}
return
RList
;
return
RList
;
}
}
...
@@ -2859,15 +2872,22 @@ namespace Edu.Module.Finance
...
@@ -2859,15 +2872,22 @@ namespace Edu.Module.Finance
});
});
}
}
//初始化 基础课时
DateTime
STime
=
Convert
.
ToDateTime
(
startMonth
);
while
(
true
)
{
DateTime
ETime
=
STime
.
AddMonths
(
1
).
AddDays
(-
1
);
var
mlist
=
RList
.
Where
(
x
=>
x
.
Date
>=
STime
&&
x
.
Date
<=
ETime
).
ToList
();
#
region
基础课时处理
#
region
基础课时处理
decimal
DeductionMoney
=
0
;
decimal
DeductionMoney
=
0
;
if
(
configModel
.
BasicHours
>
0
)
if
(
configModel
.
BasicHours
>
0
)
{
{
//遍历所有老师
//遍历所有老师
List
<
int
>
TeacherIdList
=
RL
ist
.
Select
(
x
=>
x
.
TeacherId
).
Distinct
().
ToList
();
List
<
int
>
TeacherIdList
=
ml
ist
.
Select
(
x
=>
x
.
TeacherId
).
Distinct
().
ToList
();
foreach
(
var
item
in
TeacherIdList
)
foreach
(
var
item
in
TeacherIdList
)
{
{
var
qblist
=
RList
.
Where
(
x
=>
x
.
TeacherId
==
item
).
OrderBy
(
x
=>
x
.
UnitPrice
).
ThenBy
(
x
=>
x
.
Dat
e
).
ToList
();
var
qblist
=
mlist
.
Where
(
x
=>
x
.
TeacherId
==
item
).
OrderBy
(
x
=>
x
.
Date
).
ThenBy
(
x
=>
x
.
UnitPric
e
).
ToList
();
decimal
BasicHours
=
(
decimal
)
configModel
.
BasicHours
;
decimal
BasicHours
=
(
decimal
)
configModel
.
BasicHours
;
foreach
(
var
qitem
in
qblist
)
foreach
(
var
qitem
in
qblist
)
{
{
...
@@ -2897,6 +2917,13 @@ namespace Edu.Module.Finance
...
@@ -2897,6 +2917,13 @@ namespace Edu.Module.Finance
}
}
#
endregion
#
endregion
if
(
STime
.
Month
==
Convert
.
ToDateTime
(
endMonth
).
Month
)
{
break
;
}
STime
=
STime
.
AddMonths
(
1
);
}
foreach
(
var
item
in
RList
)
{
foreach
(
var
item
in
RList
)
{
ExcelDataSource
firstRow
=
new
ExcelDataSource
(
30
)
ExcelDataSource
firstRow
=
new
ExcelDataSource
(
30
)
{
{
...
...
Edu.Repository/Course/RB_Class_PlanRepository.cs
View file @
0cb7a2eb
...
@@ -240,7 +240,7 @@ WHERE ClassId={1} AND ClassDate>'{2}'
...
@@ -240,7 +240,7 @@ WHERE ClassId={1} AND ClassDate>'{2}'
{
{
StringBuilder
builder
=
new
StringBuilder
();
StringBuilder
builder
=
new
StringBuilder
();
builder
.
AppendFormat
(
@"
builder
.
AppendFormat
(
@"
SELECT a.*,c.Teacher_Id,c.ClassName,c.ClassType,T.TeacherName ,cou.CourseName
SELECT a.*,c.Teacher_Id,c.ClassName,c.ClassType,
c.ClassHourMinute,
T.TeacherName ,cou.CourseName
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
...
...
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