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
82fbb887
Commit
82fbb887
authored
Jul 09, 2021
by
liudong1993
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
教育课时费制单
parent
aecd0673
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
96 additions
and
84 deletions
+96
-84
FinanceModule.cs
Edu.Module.Finance/FinanceModule.cs
+89
-82
RB_OrderRepository.cs
Edu.Repository/Course/RB_OrderRepository.cs
+5
-1
OrderController.cs
Edu.WebApi/Controllers/Course/OrderController.cs
+2
-1
No files found.
Edu.Module.Finance/FinanceModule.cs
View file @
82fbb887
...
...
@@ -3888,9 +3888,13 @@ namespace Edu.Module.Finance
string
EndTime
=
DateTime
.
Now
.
ToString
(
"yyyy-MM-dd"
);
#
region
班级下老师的课时费
List
<
RB_Teaching_BonusDetail_ViewModel
>
TeacherHoursList
=
new
List
<
RB_Teaching_BonusDetail_ViewModel
>();
var
TeacherAlist
=
class_CheckRepository
.
GetTeacherConsumptionHoursDetialList
(
""
,
-
1
,
classId
,
StartTime
,
EndTime
,
userInfo
.
Group_Id
);
if
(
TeacherAlist
.
Any
())
{
//上这班的老师
string
teacherIds
=
string
.
Join
(
","
,
TeacherAlist
.
Select
(
x
=>
x
.
TeacherId
).
Distinct
());
//根据学生签到表 查询
var
list
=
class_CheckRepository
.
GetTeacherConsumptionHoursDetialList
(
""
,
-
1
,
classId
,
StartTime
,
EndTime
,
userInfo
.
Group_Id
);
var
list
=
class_CheckRepository
.
GetTeacherConsumptionHoursDetialList
(
teacherIds
,
-
1
,
0
,
StartTime
,
EndTime
,
userInfo
.
Group_Id
);
if
(
list
.
Any
())
{
//班级类型查询
...
...
@@ -3901,10 +3905,13 @@ namespace Edu.Module.Finance
foreach
(
var
item
in
list
)
{
int
Minutes
=
(
int
)(
Convert
.
ToDateTime
(
"2021-06-29 "
+
item
.
EndDate
)
-
Convert
.
ToDateTime
(
"2021-06-29 "
+
item
.
StartDate
)).
TotalMinutes
;
decimal
Hours
=
Math
.
Round
(
Convert
.
ToDecimal
(
Minutes
)
/
60
,
2
,
MidpointRounding
.
AwayFromZero
);
//小时
//上课课时
decimal
KSNum
=
item
.
CurrentDeductionHours
;
//签到课时长度
if
(
item
.
ClassId
==
18
)
{
KSNum
=
0
;
}
// 18班 特殊处理
decimal
ClassHourMinute
=
configModel
.
BasicMinutes
;
//课时分钟数
//if (item.ClassHourMinute > 0) { ClassHourMinute = item.ClassHourMinute; }
decimal
Hours
=
Math
.
Round
(
KSNum
*
ClassHourMinute
/
60
,
2
,
MidpointRounding
.
AwayFromZero
);
//小时
var
typeModel
=
cTypeList
.
Where
(
x
=>
x
.
CTypeId
==
item
.
ClassType
).
FirstOrDefault
();
...
...
@@ -3912,8 +3919,6 @@ namespace Edu.Module.Finance
//课时费 需要每个班级 单独计算 因为 班级有附加费用
decimal
KSMoney
=
KSNum
*
unitPrice
;
decimal
ClassHourMinute
=
configModel
.
BasicMinutes
;
//课时分钟数
if
(
item
.
ClassHourMinute
>
0
)
{
ClassHourMinute
=
item
.
ClassHourMinute
;
}
decimal
HourMoney
=
Math
.
Round
(
unitPrice
/
ClassHourMinute
*
60
,
2
,
MidpointRounding
.
AwayFromZero
);
//每小时课时费
...
...
@@ -3989,6 +3994,8 @@ namespace Edu.Module.Finance
STime
=
STime
.
AddMonths
(
1
);
}
}
TeacherHoursList
=
TeacherHoursList
.
Where
(
x
=>
x
.
ClassId
==
classId
).
ToList
();
}
#
endregion
#
region
班级下学生的课耗
...
...
Edu.Repository/Course/RB_OrderRepository.cs
View file @
82fbb887
...
...
@@ -195,7 +195,7 @@ ORDER BY {orderBy}
}
if
(!
string
.
IsNullOrEmpty
(
demodel
.
ClassNo
))
{
where
+=
$@" and c.
{
nameof
(
RB_Class
.
ClassNo
)}
=
{
demodel
.
ClassNo
}
"
;
where
+=
$@" and c.
{
nameof
(
RB_Class
.
ClassNo
)}
=
'
{
demodel
.
ClassNo
}
'
"
;
}
if
(!
string
.
IsNullOrEmpty
(
demodel
.
GuestName
))
{
...
...
@@ -310,6 +310,10 @@ where {where} order by {orderBy}
{
where
+=
$@" and c.
{
nameof
(
RB_Class
.
ClassName
)}
like '%
{
demodel
.
ClassName
}
%'"
;
}
if
(!
string
.
IsNullOrEmpty
(
demodel
.
ClassNo
))
{
where
+=
$@" and c.
{
nameof
(
RB_Class
.
ClassNo
)}
='
{
demodel
.
ClassNo
}
'"
;
}
if
(!
string
.
IsNullOrEmpty
(
demodel
.
GuestName
))
{
if
(
demodel
.
Group_Id
>
0
)
...
...
Edu.WebApi/Controllers/Course/OrderController.cs
View file @
82fbb887
...
...
@@ -1310,7 +1310,8 @@ namespace Edu.WebApi.Controllers.Course
Q_OrderBy
=
base
.
ParmJObj
.
GetInt
(
"Q_OrderBy"
),
PlatformTax
=
base
.
ParmJObj
.
GetDecimal
(
"PlatformTax"
),
EnterID
=
base
.
ParmJObj
.
GetInt
(
"EnterID"
),
HelpEnterId
=
base
.
ParmJObj
.
GetInt
(
"HelpEnterId"
,
0
)
HelpEnterId
=
base
.
ParmJObj
.
GetInt
(
"HelpEnterId"
,
0
),
ClassNo
=
base
.
ParmJObj
.
GetStringValue
(
"ClassNo"
),
};
demodel
.
Group_Id
=
userInfo
.
Group_Id
;
...
...
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