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
3fcb3c64
Commit
3fcb3c64
authored
Jul 23, 2021
by
吴春
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://gitlab.oytour.com/Kui2/education
parents
ee4be693
6a883d3d
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
72 additions
and
4 deletions
+72
-4
RB_Order.cs
Edu.Model/Entity/Course/RB_Order.cs
+5
-0
OrderChangeModule.cs
Edu.Module.EduTask/OrderChangeModule.cs
+64
-3
ClassController.cs
Edu.WebApi/Controllers/Course/ClassController.cs
+3
-1
No files found.
Edu.Model/Entity/Course/RB_Order.cs
View file @
3fcb3c64
...
...
@@ -298,5 +298,10 @@ namespace Edu.Model.Entity.Course
/// 目标订单编号
/// </summary>
public
int
TargetOrderId
{
get
;
set
;
}
/// <summary>
/// 最开始拆分订单的订单编号【最原始的订单编号】
/// </summary>
public
int
FirstOrderId
{
get
;
set
;
}
}
}
Edu.Module.EduTask/OrderChangeModule.cs
View file @
3fcb3c64
...
...
@@ -868,15 +868,76 @@ namespace Edu.Module.EduTask
/// 回归原班上课
/// </summary>
/// <returns></returns>
public
bool
RegressSourceClassModule
(
int
OrderId
,
int
GuestId
,
int
oldOrderId
)
public
bool
RegressSourceClassModule
(
int
OrderId
,
int
GuestId
,
int
oldOrderId
,
int
oldGuestId
)
{
bool
flag
=
false
;
var
oldOrder
=
orderRepository
.
GetEntity
(
oldOrderId
);
var
order
=
orderRepository
.
GetEntity
(
OrderId
);
var
guest
=
guestRepository
.
GetEntity
(
GuestId
);
var
oldGuest
=
guestRepository
.
GetEntity
(
oldGuestId
);
var
classList
=
classRepository
.
GetClassListRepository
(
new
RB_Class_ViewModel
()
{
Q_ClassIds
=
oldOrder
.
ClassId
+
","
+
order
.
ClassId
});
var
oldClassModel
=
classList
?.
Where
(
qitem
=>
qitem
.
ClassId
==
oldOrder
.
ClassId
)?.
FirstOrDefault
()
??
new
RB_Class_ViewModel
();
var
newClassModel
=
classList
?.
Where
(
qitem
=>
qitem
.
ClassId
==
order
.
ClassId
)?.
FirstOrDefault
()
??
new
RB_Class_ViewModel
();
//原业务员
var
userInfo
=
UserReidsCache
.
GetUserLoginInfo
(
oldOrder
.
EnterID
);
if
(
guest
.
TotalHours
!=
guest
.
CompleteHours
)
{
//生成收支相抵单据
//剩余课时
var
surplus
=
guest
.
TotalHours
-
guest
.
CompleteHours
;
//更新老订单学员课时
Dictionary
<
string
,
object
>
oldGuestFileds
=
new
Dictionary
<
string
,
object
>()
{
{
nameof
(
RB_Order_Guest_Extend
.
TotalHours
),
oldGuest
.
TotalHours
+
surplus
}
};
flag
=
guestRepository
.
Update
(
oldGuestFileds
,
new
WhereHelper
(
nameof
(
RB_Order_Guest_Extend
.
Id
),
GuestId
));
Dictionary
<
string
,
object
>
newGuestFileds
=
new
Dictionary
<
string
,
object
>()
{
{
nameof
(
RB_Order_Guest_Extend
.
TotalHours
),
guest
.
CompleteHours
}
};
//更新新订单学员课时
flag
=
guestRepository
.
Update
(
newGuestFileds
,
new
WhereHelper
(
nameof
(
RB_Order_Guest_Extend
.
Id
),
oldGuestId
));
var
refundMoney
=
Math
.
Round
(
order
.
Unit_Price
*
surplus
,
2
);
var
outlay
=
new
OrderChangeFinace
()
{
ChangeType
=
2
,
ClassId
=
order
.
ClassId
,
GuestId
=
GuestId
,
OrderId
=
order
.
OrderId
,
GuestName
=
guest
.
GuestName
,
InCome
=
refundMoney
,
ClassName
=
newClassModel
.
ClassName
,
Class_School_Id
=
newClassModel
.
School_Id
,
ReFinanceId
=
0
,
SName
=
newClassModel
.
SchoolName
,
UserInfo
=
userInfo
};
//生成支出财务单据
var
RelevanceFrId
=
CreateExpenditure
(
outlay
,
out
string
msg2
);
var
income
=
new
OrderChangeFinace
()
{
ChangeType
=
2
,
ClassId
=
oldOrder
.
ClassId
,
GuestId
=
GuestId
,
OrderId
=
oldOrder
.
OrderId
,
GuestName
=
guest
.
GuestName
,
InCome
=
refundMoney
,
ClassName
=
oldClassModel
.
ClassName
,
Class_School_Id
=
oldClassModel
.
School_Id
,
ReFinanceId
=
RelevanceFrId
,
SName
=
oldClassModel
.
SchoolName
,
UserInfo
=
userInfo
};
//生成收入财务单据
CreateInCome
(
income
,
out
string
msg
);
}
...
...
Edu.WebApi/Controllers/Course/ClassController.cs
View file @
3fcb3c64
...
...
@@ -82,7 +82,9 @@ namespace Edu.WebApi.Controllers.Course
item
.
Status
,
item
.
OtherCourseList
,
item
.
ClassNo
,
item
.
FinishTimeStr
item
.
FinishTimeStr
,
item
.
UsePlanNum
,
item
.
TotalPlanNum
,
});
}
pageModel
.
Count
=
rowsCount
;
...
...
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