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
4a726f87
Commit
4a726f87
authored
Jul 26, 2021
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
998b4dc0
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
12 deletions
+16
-12
OrderChangeModule.cs
Edu.Module.EduTask/OrderChangeModule.cs
+13
-6
OrderChangeController.cs
Edu.WebApi/Controllers/EduTask/OrderChangeController.cs
+3
-6
No files found.
Edu.Module.EduTask/OrderChangeModule.cs
View file @
4a726f87
...
@@ -311,6 +311,7 @@ namespace Edu.Module.EduTask
...
@@ -311,6 +311,7 @@ namespace Edu.Module.EduTask
{
{
OrderId
=
orderChangeModel
.
SourceOrderId
,
OrderId
=
orderChangeModel
.
SourceOrderId
,
GuestId
=
orderChangeModel
.
OrderGuestId
,
GuestId
=
orderChangeModel
.
OrderGuestId
,
Status
=-
1
,
}).
Where
(
qitem
=>
qitem
.
Status
==
0
||
qitem
.
Status
==
1
||
qitem
.
Status
==
2
)?.
FirstOrDefault
();
}).
Where
(
qitem
=>
qitem
.
Status
==
0
||
qitem
.
Status
==
1
||
qitem
.
Status
==
2
)?.
FirstOrDefault
();
//创建老订单合同
//创建老订单合同
CreateContract
(
oldOrderModel
,
newCourseModel
,
oldContract
,
orderChangeModel
.
OrderGuestId
);
CreateContract
(
oldOrderModel
,
newCourseModel
,
oldContract
,
orderChangeModel
.
OrderGuestId
);
...
@@ -755,6 +756,7 @@ namespace Edu.Module.EduTask
...
@@ -755,6 +756,7 @@ namespace Edu.Module.EduTask
{
{
OrderId
=
orderChangeModel
.
SourceOrderId
,
OrderId
=
orderChangeModel
.
SourceOrderId
,
GuestId
=
orderChangeModel
.
OrderGuestId
,
GuestId
=
orderChangeModel
.
OrderGuestId
,
Status
=-
1
,
}).
Where
(
qitem
=>
qitem
.
Status
==
0
||
qitem
.
Status
==
1
||
qitem
.
Status
==
2
)?.
FirstOrDefault
();
}).
Where
(
qitem
=>
qitem
.
Status
==
0
||
qitem
.
Status
==
1
||
qitem
.
Status
==
2
)?.
FirstOrDefault
();
//生成老订单合同
//生成老订单合同
CreateContract
(
oldOrderModel
,
oldCourseModel
,
oldContract
,
orderChangeModel
.
OrderGuestId
);
CreateContract
(
oldOrderModel
,
oldCourseModel
,
oldContract
,
orderChangeModel
.
OrderGuestId
);
...
@@ -905,13 +907,16 @@ namespace Edu.Module.EduTask
...
@@ -905,13 +907,16 @@ namespace Edu.Module.EduTask
/// 回归原班上课
/// 回归原班上课
/// </summary>
/// </summary>
/// <returns></returns>
/// <returns></returns>
public
bool
RegressSourceClassModule
(
int
OrderId
,
int
GuestId
,
int
oldOrderId
,
int
oldGuestId
)
public
bool
RegressSourceClassModule
(
int
OrderId
)
{
{
bool
flag
=
false
;
bool
flag
=
false
;
var
oldOrder
=
orderRepository
.
GetEntity
(
oldOrderId
);
var
order
=
orderRepository
.
GetEntity
(
OrderId
);
var
order
=
orderRepository
.
GetEntity
(
OrderId
);
var
oldGuest
=
guestRepository
.
GetEntity
(
oldGuestId
);
var
oldOrder
=
orderRepository
.
GetEntity
(
order
.
FirstOrderId
);
var
guest
=
guestRepository
.
GetEntity
(
GuestId
);
var
orderguestList
=
guestRepository
.
GetOrderGuestListRepository
(
new
RB_Order_Guest_ViewModel
()
{
OrderIds
=
OrderId
+
","
+
order
.
FirstOrderId
});
var
oldGuest
=
orderguestList
.
Where
(
qitem
=>
qitem
.
OrderId
==
oldOrder
.
OrderId
)?.
FirstOrDefault
()??
new
RB_Order_Guest_ViewModel
();
var
guest
=
orderguestList
.
Where
(
qitem
=>
qitem
.
OrderId
==
order
.
OrderId
)?.
FirstOrDefault
()
??
new
RB_Order_Guest_ViewModel
();
var
classList
=
classRepository
.
GetClassListRepository
(
new
RB_Class_ViewModel
()
var
classList
=
classRepository
.
GetClassListRepository
(
new
RB_Class_ViewModel
()
{
{
Q_ClassIds
=
oldOrder
.
ClassId
+
","
+
order
.
ClassId
Q_ClassIds
=
oldOrder
.
ClassId
+
","
+
order
.
ClassId
...
@@ -921,12 +926,14 @@ namespace Edu.Module.EduTask
...
@@ -921,12 +926,14 @@ namespace Edu.Module.EduTask
{
{
OrderId
=
oldOrder
.
OrderId
,
OrderId
=
oldOrder
.
OrderId
,
GuestId
=
oldGuest
.
Id
,
GuestId
=
oldGuest
.
Id
,
Status
=-
1
,
}).
Where
(
qitem
=>
qitem
.
Status
==
0
||
qitem
.
Status
==
1
||
qitem
.
Status
==
2
)?.
FirstOrDefault
();
}).
Where
(
qitem
=>
qitem
.
Status
==
0
||
qitem
.
Status
==
1
||
qitem
.
Status
==
2
)?.
FirstOrDefault
();
var
newContract
=
education_ContractRepository
.
GetList
(
new
RB_Education_Contract_ViewModel
()
var
newContract
=
education_ContractRepository
.
GetList
(
new
RB_Education_Contract_ViewModel
()
{
{
OrderId
=
order
.
OrderId
,
OrderId
=
order
.
OrderId
,
GuestId
=
guest
.
Id
,
GuestId
=
guest
.
Id
,
Status
=-
1
,
}).
Where
(
qitem
=>
qitem
.
Status
==
0
||
qitem
.
Status
==
1
||
qitem
.
Status
==
2
)?.
FirstOrDefault
();
}).
Where
(
qitem
=>
qitem
.
Status
==
0
||
qitem
.
Status
==
1
||
qitem
.
Status
==
2
)?.
FirstOrDefault
();
var
oldClassModel
=
classList
?.
Where
(
qitem
=>
qitem
.
ClassId
==
oldOrder
.
ClassId
)?.
FirstOrDefault
()
??
new
RB_Class_ViewModel
();
var
oldClassModel
=
classList
?.
Where
(
qitem
=>
qitem
.
ClassId
==
oldOrder
.
ClassId
)?.
FirstOrDefault
()
??
new
RB_Class_ViewModel
();
...
@@ -998,7 +1005,7 @@ namespace Edu.Module.EduTask
...
@@ -998,7 +1005,7 @@ namespace Edu.Module.EduTask
{
{
ChangeType
=
2
,
ChangeType
=
2
,
ClassId
=
order
.
ClassId
,
ClassId
=
order
.
ClassId
,
GuestId
=
Guest
Id
,
GuestId
=
guest
.
Id
,
OrderId
=
order
.
OrderId
,
OrderId
=
order
.
OrderId
,
GuestName
=
guest
.
GuestName
,
GuestName
=
guest
.
GuestName
,
InCome
=
refundMoney
,
InCome
=
refundMoney
,
...
@@ -1015,7 +1022,7 @@ namespace Edu.Module.EduTask
...
@@ -1015,7 +1022,7 @@ namespace Edu.Module.EduTask
{
{
ChangeType
=
2
,
ChangeType
=
2
,
ClassId
=
oldOrder
.
ClassId
,
ClassId
=
oldOrder
.
ClassId
,
GuestId
=
Guest
Id
,
GuestId
=
guest
.
Id
,
OrderId
=
oldOrder
.
OrderId
,
OrderId
=
oldOrder
.
OrderId
,
GuestName
=
guest
.
GuestName
,
GuestName
=
guest
.
GuestName
,
InCome
=
refundMoney
,
InCome
=
refundMoney
,
...
...
Edu.WebApi/Controllers/EduTask/OrderChangeController.cs
View file @
4a726f87
...
@@ -85,7 +85,7 @@ namespace Edu.WebApi.Controllers.EduTask
...
@@ -85,7 +85,7 @@ namespace Edu.WebApi.Controllers.EduTask
{
{
return
ApiResult
.
ParamIsNull
(
message
:
"原订单号不存在!"
);
return
ApiResult
.
ParamIsNull
(
message
:
"原订单号不存在!"
);
}
}
if
(
oldOrderModel
.
PreferPrice
!=
(
oldOrderModel
.
Income
+
oldOrderModel
.
PlatformTax
-
oldOrderModel
.
Refund
))
if
(
oldOrderModel
.
PreferPrice
!=
(
oldOrderModel
.
Income
+
oldOrderModel
.
DiscountMoney
+
oldOrderModel
.
PlatformTax
-
oldOrderModel
.
Refund
))
{
{
return
ApiResult
.
ParamIsNull
(
message
:
"原订单款未收齐,不能转班!"
);
return
ApiResult
.
ParamIsNull
(
message
:
"原订单款未收齐,不能转班!"
);
}
}
...
@@ -166,7 +166,7 @@ namespace Edu.WebApi.Controllers.EduTask
...
@@ -166,7 +166,7 @@ namespace Edu.WebApi.Controllers.EduTask
{
{
return
ApiResult
.
ParamIsNull
(
message
:
"原订单号不存在!"
);
return
ApiResult
.
ParamIsNull
(
message
:
"原订单号不存在!"
);
}
}
if
(
oldOrderModel
.
PreferPrice
!=
(
oldOrderModel
.
Income
+
oldOrderModel
.
PlatformTax
-
oldOrderModel
.
Refund
))
if
(
oldOrderModel
.
PreferPrice
!=
(
oldOrderModel
.
Income
+
oldOrderModel
.
DiscountMoney
+
oldOrderModel
.
PlatformTax
-
oldOrderModel
.
Refund
))
{
{
return
ApiResult
.
ParamIsNull
(
message
:
"原订单款未收齐,不能转班!"
);
return
ApiResult
.
ParamIsNull
(
message
:
"原订单款未收齐,不能转班!"
);
}
}
...
@@ -203,10 +203,7 @@ namespace Edu.WebApi.Controllers.EduTask
...
@@ -203,10 +203,7 @@ namespace Edu.WebApi.Controllers.EduTask
public
ApiResult
RegressSourceClass
()
public
ApiResult
RegressSourceClass
()
{
{
var
OrderId
=
base
.
ParmJObj
.
GetInt
(
"OrderId"
);
var
OrderId
=
base
.
ParmJObj
.
GetInt
(
"OrderId"
);
var
GuestId
=
base
.
ParmJObj
.
GetInt
(
"GuestId"
);
bool
flag
=
orderChangeModule
.
RegressSourceClassModule
(
OrderId
);
var
oldOrderId
=
base
.
ParmJObj
.
GetInt
(
"oldOrderId"
);
var
oldGuestId
=
base
.
ParmJObj
.
GetInt
(
"oldGuestId"
);
bool
flag
=
orderChangeModule
.
RegressSourceClassModule
(
OrderId
,
GuestId
,
oldOrderId
,
oldGuestId
);
return
flag
?
ApiResult
.
Success
()
:
ApiResult
.
Failed
();
return
flag
?
ApiResult
.
Success
()
:
ApiResult
.
Failed
();
}
}
}
}
...
...
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