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
29dc6e05
Commit
29dc6e05
authored
Jan 19, 2022
by
黄奎
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://gitlab.oytour.com/Kui2/education
parents
99857ad9
ccbb51fd
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
35 additions
and
1 deletion
+35
-1
OrderModule2.cs
Edu.Module.Course/OrderModule2.cs
+11
-0
RB_Student_OrderGuestRepository.cs
Edu.Repository/User/RB_Student_OrderGuestRepository.cs
+16
-1
OrderController.cs
Edu.WebApi/Controllers/Course/OrderController.cs
+8
-0
No files found.
Edu.Module.Course/OrderModule2.cs
View file @
29dc6e05
...
...
@@ -491,5 +491,16 @@ namespace Edu.Module.Course
}
#
endregion
/// <summary>
/// 验证学生是否已有其他订单
/// </summary>
/// <param name="stuIds"></param>
/// <param name="group_Id"></param>
/// <returns></returns>
public
List
<
RB_Student_OrderGuest_ViewModel
>
ValidataStuOrder
(
string
stuIds
,
int
group_Id
)
{
return
student_OrderGuestRepository
.
ValidataStuOrder
(
stuIds
,
group_Id
);
}
}
}
\ No newline at end of file
Edu.Repository/User/RB_Student_OrderGuestRepository.cs
View file @
29dc6e05
...
...
@@ -235,6 +235,21 @@ INNER JOIN rb_order o on sog.OrderId = o.OrderId
return
Get
<
RB_Student_OrderGuest_ViewModel
>(
sql
).
ToList
();
}
/// <summary>
/// 获取学生是否有未付款有效订单
/// </summary>
/// <param name="stuIds"></param>
/// <param name="group_Id"></param>
/// <returns></returns>
public
List
<
RB_Student_OrderGuest_ViewModel
>
ValidataStuOrder
(
string
stuIds
,
int
group_Id
)
{
string
sql
=
$@"select sog.*,s.StuName as GuestName from RB_Student_OrderGuest sog
INNER JOIN rb_student s on sog.Student_Id =s.StuId
INNER JOIN rb_order o on sog.OrderId =o.OrderId
where sog.Status =0 and o.Group_Id =
{
group_Id
}
and o.OrderState <>3 and IFNULL(o.Income,0) <=0 and sog.Student_Id in(
{
stuIds
}
)"
;
return
Get
<
RB_Student_OrderGuest_ViewModel
>(
sql
).
ToList
();
}
#
region
学员跟进
/// <summary>
...
...
@@ -536,7 +551,7 @@ LEFT JOIN rb_education_contract ec on ec.GuestId = og.GuestId";
}
sql
+=
$" order by s.StuId desc)t"
;
return
Get
<
RB_Student_ViewModel
>(
sql
,
parameters
).
FirstOrDefault
();
}
}
/// <summary>
/// 获取学员咨询分页列表
...
...
Edu.WebApi/Controllers/Course/OrderController.cs
View file @
29dc6e05
...
...
@@ -573,6 +573,14 @@ namespace Edu.WebApi.Controllers.Course
{
return
ApiResult
.
ParamIsNull
(
"请传递选择客户"
);
}
if
(
demodel
.
OrderIdentify
==
2
&&
!
string
.
IsNullOrEmpty
(
demodel
.
StuIds
))
{
//验证学生是否已有其他订单
var
vlist
=
orderModule
.
ValidataStuOrder
(
demodel
.
StuIds
,
userInfo
.
Group_Id
);
if
(
vlist
.
Any
())
{
var
vmodel
=
vlist
.
FirstOrDefault
();
return
ApiResult
.
Tip
(
"学员"
+
vmodel
.
GuestName
+
"存在有效未付款订单"
+
vmodel
.
OrderId
+
",请取消该订单后再试"
,
vmodel
.
OrderId
);
}
}
if
(!
string
.
IsNullOrEmpty
(
demodel
.
StuIds
))
{
int
gNum
=
JsonHelper
.
DeserializeObject
<
List
<
int
>>(
"["
+
demodel
.
StuIds
+
"]"
).
Count
();
if
(
demodel
.
GuestNum
!=
gNum
)
{
...
...
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