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
c0f9b830
Commit
c0f9b830
authored
May 12, 2022
by
liudong1993
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
be1472b6
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
39 additions
and
18 deletions
+39
-18
OrderModule.cs
Edu.Module.Course/OrderModule.cs
+25
-6
OrderModule2.cs
Edu.Module.Course/OrderModule2.cs
+12
-10
OrderChangeModule.cs
Edu.Module.EduTask/OrderChangeModule.cs
+2
-2
No files found.
Edu.Module.Course/OrderModule.cs
View file @
c0f9b830
...
...
@@ -383,7 +383,7 @@ namespace Edu.Module.Course
[
TransactionCallHandler
]
public
virtual
bool
SetClassOrderModule
(
RB_Order_ViewModel
demodel
,
UserInfo
userInfo
,
bool
isEditOrder
,
out
string
message
)
{
return
SetClassOrderCommonModule
(
demodel
,
userInfo
,
isEditOrder
,
out
message
);
return
SetClassOrderCommonModule
(
demodel
,
userInfo
,
isEditOrder
,
out
message
,
out
_
);
}
/// <summary>
...
...
@@ -403,11 +403,18 @@ namespace Edu.Module.Course
{
IsFirstBatch
=
false
;
//是续费 有历史订单
}
string
RorderId
=
""
;
foreach
(
var
item
in
deList
)
{
flag
=
SetClassOrderCommonModule
(
item
,
userInfo
,
isEditOrder
,
out
message
,
IsFirstBatch
);
if
(
flag
==
false
)
{
return
flag
;
}
flag
=
SetClassOrderCommonModule
(
item
,
userInfo
,
isEditOrder
,
out
message
,
out
int
orderId
,
IsFirstBatch
);
if
(
flag
)
{
RorderId
+=
orderId
+
"、"
;
}
else
{
message
=
"已创建成功订单:"
+
RorderId
+
",后续创建失败,失败原因:"
+
message
;
return
flag
;
}
}
message
=
"创建成功:"
+
RorderId
;
return
flag
;
}
...
...
@@ -814,10 +821,10 @@ namespace Edu.Module.Course
/// <param name="IsFirstBatch">首次批量制单</param>
/// <returns></returns>
public
bool
SetClassOrderCommonModule
(
RB_Order_ViewModel
demodel
,
UserInfo
userInfo
,
bool
isEditOrder
,
out
string
message
,
bool
IsFirstBatch
=
false
)
public
bool
SetClassOrderCommonModule
(
RB_Order_ViewModel
demodel
,
UserInfo
userInfo
,
bool
isEditOrder
,
out
string
message
,
out
int
ROrderId
,
bool
IsFirstBatch
=
false
)
{
bool
flag
=
false
;
message
=
""
;
bool
flag
=
false
;
ROrderId
=
demodel
.
OrderId
;
message
=
""
;
var
orderModel
=
new
RB_Order
();
if
(
demodel
.
OrderId
>
0
)
{
...
...
@@ -928,6 +935,17 @@ namespace Edu.Module.Course
}
RenewNum
=
glist
.
Select
(
x
=>
x
.
Student_Id
).
Distinct
().
Count
();
//续费订单数量
}
if
(!
StuList
.
Where
(
x
=>
x
.
IsRenewGuest
==
1
).
Any
())
{
//验证 是否从试听课过来
demodel
.
HelpEnterId
=
0
;
// 2022-05-12 第一次报名 并且有试听 带入协助老师 否则 没有协助老师 ;
int
vTeacherId
=
visitor_ReserveRepository
.
GetVisitorReserveTeacherId
(
StuList
.
FirstOrDefault
().
StuId
,
userInfo
.
Group_Id
);
if
(
vTeacherId
>
0
)
{
var
tModel
=
accountRepository
.
GetEmployeeListRepository
(
new
Employee_ViewModel
()
{
Group_Id
=
demodel
.
Group_Id
,
AccountId
=
vTeacherId
,
AccountType
=
AccountTypeEnum
.
Teacher
}).
FirstOrDefault
();
demodel
.
HelpEnterId
=
tModel
?.
Id
??
0
;
}
}
int
NormalNum
=
demodel
.
GuestNum
-
RenewNum
;
//首次报名数量
decimal
dmoney
=
coursePrice
*
(
courseModel
.
B2CRatio
/
100
)
*
NormalNum
+
coursePrice
*
(
courseModel
.
B2CReNewRatio
/
100
)
*
RenewNum
;
if
(
demodel
.
DiscountMoney
!=
dmoney
)
...
...
@@ -1248,6 +1266,7 @@ namespace Edu.Module.Course
}
int
OrderId
=
orderRepository
.
Insert
(
demodel
);
demodel
.
OrderId
=
OrderId
;
ROrderId
=
OrderId
;
flag
=
OrderId
>
0
;
LogContent
=
"新增日语培训订单"
;
//记录订单备注
...
...
Edu.Module.Course/OrderModule2.cs
View file @
c0f9b830
...
...
@@ -333,18 +333,20 @@ namespace Edu.Module.Course
{
item
.
IsRenewGuest
=
1
;
//是续费的
}
if
(
item
.
IsRenewGuest
==
0
)
{
//验证 是否从试听课过来
int
vTeacherId
=
visitor_ReserveRepository
.
GetVisitorReserveTeacherId
(
item
.
StuId
,
userInfo
.
Group_Id
);
if
(
vTeacherId
>
0
)
{
var
tmodel
=
teacherRepository
.
GetEntity
(
vTeacherId
);
item
.
HeadTeacherId
=
vTeacherId
;
item
.
TeacherName
=
tmodel
?.
TeacherName
??
""
;
}
}
}
}
if
(!
StuList
.
Where
(
x
=>
x
.
IsRenewGuest
==
1
).
Any
())
{
var
item
=
StuList
.
FirstOrDefault
();
//验证 是否从试听课过来
int
vTeacherId
=
visitor_ReserveRepository
.
GetVisitorReserveTeacherId
(
item
.
StuId
,
userInfo
.
Group_Id
);
if
(
vTeacherId
>
0
)
{
var
tModel
=
accountRepository
.
GetEmployeeListRepository
(
new
Employee_ViewModel
()
{
Group_Id
=
userInfo
.
Group_Id
,
AccountId
=
vTeacherId
,
AccountType
=
AccountTypeEnum
.
Teacher
}).
FirstOrDefault
();
item
.
HeadTeacherId
=
tModel
?.
Id
??
0
;
item
.
TeacherName
=
tModel
?.
EmployeeName
??
""
;
}
}
int
RenewNum
=
glist
.
Select
(
x
=>
x
.
Student_Id
).
Distinct
().
Count
();
//续费订单数量
//获取该学生的负责人
...
...
Edu.Module.EduTask/OrderChangeModule.cs
View file @
c0f9b830
...
...
@@ -289,7 +289,7 @@ namespace Edu.Module.EduTask
{
orderModel
.
FirstOrderId
=
oldOrderModel
.
FirstOrderId
;
}
flag
=
orderModule
.
SetClassOrderCommonModule
(
orderModel
,
userInfo
,
false
,
out
string
message
);
flag
=
orderModule
.
SetClassOrderCommonModule
(
orderModel
,
userInfo
,
false
,
out
string
message
,
out
_
);
#
endregion
if
(
flag
)
...
...
@@ -742,7 +742,7 @@ namespace Edu.Module.EduTask
{
orderModel
.
FirstOrderId
=
oldOrderModel
.
FirstOrderId
;
}
flag
=
orderModule
.
SetClassOrderCommonModule
(
orderModel
,
userInfo
,
false
,
out
string
message
);
flag
=
orderModule
.
SetClassOrderCommonModule
(
orderModel
,
userInfo
,
false
,
out
string
message
,
out
_
);
#
endregion
if
(
flag
)
...
...
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