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
ede7bec1
Commit
ede7bec1
authored
Sep 18, 2024
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增修改订单调整
parent
d8c7edee
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
15 additions
and
5 deletions
+15
-5
RB_Course.cs
Edu.Model/Entity/Course/RB_Course.cs
+1
-1
OrderModule.cs
Edu.Module.Course/OrderModule.cs
+13
-3
RB_ClassRepository.cs
Edu.Repository/Grade/RB_ClassRepository.cs
+0
-1
RB_TeacherRepository.cs
Edu.Repository/User/RB_TeacherRepository.cs
+1
-0
No files found.
Edu.Model/Entity/Course/RB_Course.cs
View file @
ede7bec1
...
...
@@ -98,7 +98,7 @@ namespace Edu.Model.Entity.Course
public
decimal
SellPrice
{
get
;
set
;
}
/// <summary>
/// 价格类型,1-
基础价格,2-课时价格
2024-08-26 add by:w
/// 价格类型,1-
课程总价,2-课时单价
2024-08-26 add by:w
/// </summary>
public
int
SellPriceType
{
get
;
set
;
}
...
...
Edu.Module.Course/OrderModule.cs
View file @
ede7bec1
...
...
@@ -416,6 +416,7 @@ namespace Edu.Module.Course
{
return
SetClassOrderCommonModule_V2
(
demodel
,
userInfo
,
isEditOrder
,
out
message
,
out
_
);
}
/// <summary>
/// 日语培训下单(批量)
/// </summary>
...
...
@@ -2090,7 +2091,7 @@ namespace Edu.Module.Course
if
(
demodel
.
JoinType
==
OrderJoinTypeEnum
.
InsertClass
)
{
decimal
newPreferPrice
=
0
;
// Math.Round(coursePrice / courseModel.ClassHours * (courseModel.ClassHours - demodel.StartClassHours) * demodel.GuestNum, 2);
decimal
newPreferPrice
=
0
;
foreach
(
var
item
in
courseList
)
{
newPreferPrice
+=
(
item
.
SellPrice
/
item
.
ClassHours
*
(
item
.
ClassHours
-
demodel
.
StartClassHours
)
*
demodel
.
GuestNum
);
...
...
@@ -2108,10 +2109,19 @@ namespace Edu.Module.Course
}
else
{
decimal
newPreferPrice
=
0
;
// Math.Round(coursePrice / courseModel.ClassHours * (courseModel.ClassHours - demodel.StartClassHours) * demodel.GuestNum, 2);
decimal
newPreferPrice
=
0
;
foreach
(
var
item
in
courseList
)
{
newPreferPrice
+=
(
item
.
SellPrice
*
demodel
.
GuestNum
);
//课程总价
if
(
item
.
SellPriceType
==
1
)
{
newPreferPrice
+=
(
item
.
SellPrice
*
demodel
.
GuestNum
)
;
}
//课时单价
else
{
newPreferPrice
+=
(
item
.
SellPrice
*
demodel
.
TotalClassHours
*
demodel
.
GuestNum
);
}
}
if
(
demodel
.
PreferPrice
!=
Math
.
Round
(
newPreferPrice
,
2
))
{
...
...
Edu.Repository/Grade/RB_ClassRepository.cs
View file @
ede7bec1
...
...
@@ -505,7 +505,6 @@ WHERE 1=1
}
}
builder
.
AppendFormat
(
" order by A.{0} asc"
,
nameof
(
RB_Class_ViewModel
.
OpenTime
));
Common
.
Plugin
.
LogHelper
.
WriteInfo
(
"GetClassProductPageList::"
+
builder
.
ToString
());
return
GetPage
<
RB_Class_ViewModel
>(
pageIndex
,
pageSize
,
out
rowsCount
,
builder
.
ToString
(),
parameters
).
ToList
();
}
...
...
Edu.Repository/User/RB_TeacherRepository.cs
View file @
ede7bec1
...
...
@@ -95,6 +95,7 @@ WHERE 1=1
builder
.
AppendFormat
(
" AND t.{0}={1} "
,
nameof
(
RB_Teacher_ViewModel
.
Dept_Id
),
query
.
Dept_Id
);
}
}
builder
.
AppendFormat
(
" ORDER BY t.SortNum ASC "
);
return
Get
<
RB_Teacher_ViewModel
>(
builder
.
ToString
(),
parameters
).
ToList
();
}
...
...
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