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
79021de9
Commit
79021de9
authored
Sep 04, 2024
by
吴春
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://gitlab.oytour.com/Kui2/education
parents
59526f17
dc5356dd
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
41 additions
and
45 deletions
+41
-45
OrderModule.cs
Edu.Module.Course/OrderModule.cs
+38
-45
TeachingRewardsModule.cs
Edu.Module.Course/TeachingRewardsModule.cs
+3
-0
No files found.
Edu.Module.Course/OrderModule.cs
View file @
79021de9
...
@@ -5257,25 +5257,18 @@ namespace Edu.Module.Course
...
@@ -5257,25 +5257,18 @@ namespace Edu.Module.Course
var
omodel
=
orderRepository
.
GetEntity
(
gmodel
.
OrderId
);
var
omodel
=
orderRepository
.
GetEntity
(
gmodel
.
OrderId
);
if
(
omodel
==
null
)
{
return
false
;
}
if
(
omodel
==
null
)
{
return
false
;
}
if
(
omodel
.
OrderType
==
OrderTypeEnum
.
CourseOrder
)
if
(
omodel
.
OrderType
==
OrderTypeEnum
.
CourseOrder
)
{
var
cmodel
=
education_ContractRepository
.
GetList
(
new
RB_Education_Contract_ViewModel
()
{
Group_Id
=
gmodel
.
Group_Id
,
GuestId
=
gmodel
.
Id
,
Status
=
-
1
}).
Where
(
x
=>
x
.
Status
!=
4
).
FirstOrDefault
();
if
(
cmodel
!=
null
)
{
{
//有合同
//有合同
cmodel
.
Income
=
money
>=
0
?
money
:
0
;
omodel
.
Income
=
money
>=
0
?
money
:
0
;
cmodel
.
Unit_Price
=
0
;
omodel
.
Income
-=
(
omodel
.
CoursewareFee
+
omodel
.
TextbookFee
);
if
(
cmodel
.
TotalClassHours
>
0
)
if
(
omodel
.
Income
<
0
)
{
omodel
.
Income
=
0
;
}
{
if
(
cmodel
.
TotalDiscountMoney
>
0
)
omodel
.
Unit_Price
=
0
;
{
if
(
gmodel
.
TotalHours
>
0
)
cmodel
.
Unit_Price
=
Math
.
Round
((
cmodel
.
TotalCourseFee
-
(
cmodel
.
TotalDiscountMoney
/
cmodel
.
TotalSub
)
*
cmodel
.
TotalCourseFee
)
/
cmodel
.
TotalClassHours
,
6
,
MidpointRounding
.
AwayFromZero
);
//根据合同计算
}
else
{
{
cmodel
.
Unit_Price
=
Math
.
Round
(
cmodel
.
TotalCourseFee
/
cmodel
.
TotalClassHours
,
6
,
MidpointRounding
.
AwayFromZero
);
//根据合同计算
omodel
.
Unit_Price
=
Math
.
Round
((
omodel
.
PreferPrice
-
omodel
.
DiscountMoney
-
omodel
.
CoursewareFee
-
omodel
.
TextbookFee
)
/
gmodel
.
TotalHours
,
6
,
MidpointRounding
.
AwayFromZero
);
//根据合同计算
}
}
}
decimal
validClassHours
=
cmodel
.
Unit_Price
>
0
?
Math
.
Round
(
cmodel
.
Income
/
c
model
.
Unit_Price
,
2
,
MidpointRounding
.
AwayFromZero
)
:
0
;
decimal
validClassHours
=
omodel
.
Unit_Price
>
0
?
Math
.
Round
(
omodel
.
Income
/
o
model
.
Unit_Price
,
2
,
MidpointRounding
.
AwayFromZero
)
:
0
;
Dictionary
<
string
,
object
>
keyValues
=
new
Dictionary
<
string
,
object
>()
Dictionary
<
string
,
object
>
keyValues
=
new
Dictionary
<
string
,
object
>()
{
{
...
@@ -5314,7 +5307,7 @@ namespace Edu.Module.Course
...
@@ -5314,7 +5307,7 @@ namespace Edu.Module.Course
};
};
order_GuestRepository
.
Update
(
keyValues
,
wheres
);
order_GuestRepository
.
Update
(
keyValues
,
wheres
);
}
}
}
//培训/留学订单 直接验证 订单的应收 大于等于实收
//培训/留学订单 直接验证 订单的应收 大于等于实收
if
(
omodel
.
PreferPrice
-
omodel
.
DiscountMoney
==
money
&&
money
>
0
)
if
(
omodel
.
PreferPrice
-
omodel
.
DiscountMoney
==
money
&&
money
>
0
)
{
{
...
...
Edu.Module.Course/TeachingRewardsModule.cs
View file @
79021de9
...
@@ -552,6 +552,9 @@ namespace Edu.Module.Course
...
@@ -552,6 +552,9 @@ namespace Edu.Module.Course
string
StartTime
=
dmodel
.
Month
+
"-01"
;
string
StartTime
=
dmodel
.
Month
+
"-01"
;
string
EndTime
=
Convert
.
ToDateTime
(
dmodel
.
Month
+
"-01"
).
AddMonths
(
1
).
AddDays
(-
1
).
ToString
(
"yyyy-MM-dd"
);
string
EndTime
=
Convert
.
ToDateTime
(
dmodel
.
Month
+
"-01"
).
AddMonths
(
1
).
AddDays
(-
1
).
ToString
(
"yyyy-MM-dd"
);
var
plist
=
class_PlanRepository
.
GetClassPlanList_V2
(
new
RB_Class_Plan_ViewModel
()
{
Group_Id
=
userInfo
.
Group_Id
,
Q_TeacherIds
=
dmodel
.
TeacherIds
,
StartTime
=
StartTime
,
EndTime
=
EndTime
});
var
plist
=
class_PlanRepository
.
GetClassPlanList_V2
(
new
RB_Class_Plan_ViewModel
()
{
Group_Id
=
userInfo
.
Group_Id
,
Q_TeacherIds
=
dmodel
.
TeacherIds
,
StartTime
=
StartTime
,
EndTime
=
EndTime
});
#
region
排除
老师是管理员的数据
plist
=
plist
.
Where
(
x
=>
x
.
TeacherId
!=
41
).
ToList
();
//ID 41=管理员
#
endregion
//查询所有课程的上课时间
//查询所有课程的上课时间
List
<
RB_Class_Type_ViewModel
>
typeList
=
new
List
<
RB_Class_Type_ViewModel
>();
List
<
RB_Class_Type_ViewModel
>
typeList
=
new
List
<
RB_Class_Type_ViewModel
>();
List
<
RB_Class_Check_ViewModel
>
checkList
=
new
List
<
RB_Class_Check_ViewModel
>();
List
<
RB_Class_Check_ViewModel
>
checkList
=
new
List
<
RB_Class_Check_ViewModel
>();
...
...
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