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
9045a879
Commit
9045a879
authored
Dec 10, 2021
by
黄奎
Browse files
Options
Browse Files
Download
Plain Diff
页面修改
parents
09918b48
b0cc020a
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
61 additions
and
1 deletion
+61
-1
CustomerModule.cs
Edu.Module.Customer/CustomerModule.cs
+30
-0
RB_StudentRepository.cs
Edu.Repository/User/RB_StudentRepository.cs
+13
-1
B2BCustomerController.cs
Edu.WebApi/Controllers/Customer/B2BCustomerController.cs
+18
-0
No files found.
Edu.Module.Customer/CustomerModule.cs
View file @
9045a879
using
Edu.Cache.User
;
using
Edu.Common.Enum
;
using
Edu.Common.Plugin
;
using
Edu.Model.CacheModel
;
using
Edu.Model.ViewModel.Customer
;
using
Edu.Repository.Customer
;
using
Edu.Repository.Log
;
using
Edu.Repository.User
;
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
...
...
@@ -29,6 +31,10 @@ namespace Edu.Module.Customer
/// </summary>
private
readonly
RB_Customer_RemitRepository
customer_RemitRepository
=
new
RB_Customer_RemitRepository
();
/// <summary>
/// 学生
/// </summary>
private
readonly
RB_StudentRepository
studentRepository
=
new
RB_StudentRepository
();
/// <summary>
/// 用户信息修改日志仓储层对象
/// </summary>
private
readonly
RB_User_ChangeLogRepository
changeLogRepository
=
new
RB_User_ChangeLogRepository
();
...
...
@@ -313,5 +319,29 @@ namespace Edu.Module.Customer
}
return
""
;
}
/// <summary>
/// 获取同业下所有学生阶段人数统计
/// </summary>
/// <param name="customerId"></param>
/// <param name="group_Id"></param>
/// <returns></returns>
public
object
GetCustomerStuStageStatistics
(
int
customerId
,
int
group_Id
)
{
List
<
object
>
RList
=
new
List
<
object
>();
var
list
=
studentRepository
.
GetCustomerStuStageStatistics
(
customerId
,
group_Id
);
var
elist
=
EnumHelper
.
EnumToList
(
typeof
(
Common
.
Enum
.
User
.
StuStageEnum
));
elist
=
elist
.
OrderBy
(
x
=>
x
.
Id
).
ToList
();
foreach
(
var
item
in
elist
)
{
int
Num
=
list
.
Where
(
x
=>
x
.
StuStage
==
(
Common
.
Enum
.
User
.
StuStageEnum
)
item
.
Id
).
FirstOrDefault
()?.
OrderCount
??
0
;
RList
.
Add
(
new
{
StuStage
=
item
.
Id
,
StuStageName
=
item
.
Name
,
StuNum
=
Num
});
}
return
RList
;
}
}
}
Edu.Repository/User/RB_StudentRepository.cs
View file @
9045a879
...
...
@@ -344,7 +344,8 @@ WHERE o.OrderState=1 and og.`Status`=0 and sog.`Status`=0 and og.GuestState=1 an
};
if
(
oldModel
.
CreateBy
!=
CreateBy
)
{
var
empList
=
accountRepository
.
GetEmployeeListRepository
(
new
Employee_ViewModel
()
{
var
empList
=
accountRepository
.
GetEmployeeListRepository
(
new
Employee_ViewModel
()
{
QIds
=
oldModel
.
CreateBy
+
","
+
CreateBy
});
logContent
=
string
.
Format
(
"复制人:由【{0}】=>【{1}】"
,
...
...
@@ -356,5 +357,16 @@ WHERE o.OrderState=1 and og.`Status`=0 and sog.`Status`=0 and og.GuestState=1 an
student_LogRepository
.
AddStuLogRepository
(
oldModel
.
StuId
,
Common
.
Enum
.
Log
.
StudentLogTypeEnum
.
BasicInfo
,
logTitle
,
logContent
,
OperateId
);
return
flag
;
}
/// 获取同业下学生阶段人数统计
/// </summary>
/// <param name="customerId"></param>
/// <param name="group_Id"></param>
/// <returns></returns>
public
List
<
RB_Student_ViewModel
>
GetCustomerStuStageStatistics
(
int
customerId
,
int
group_Id
)
{
string
sql
=
$@"SELECT StuStage,COUNT(0) as OrderCount FROM rb_student WHERE Group_Id =
{
group_Id
}
and CustomerId =
{
customerId
}
GROUP BY StuStage"
;
return
Get
<
RB_Student_ViewModel
>(
sql
).
ToList
();
}
}
}
\ No newline at end of file
Edu.WebApi/Controllers/Customer/B2BCustomerController.cs
View file @
9045a879
...
...
@@ -526,6 +526,24 @@ namespace Edu.WebApi.Controllers.Customer
}
}
/// <summary>
/// 获取同业下所有学生阶段人数统计
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
GetCustomerStuStageStatistics
()
{
var
userInfo
=
base
.
UserInfo
;
int
CustomerId
=
base
.
ParmJObj
.
GetInt
(
"CustomerId"
,
0
);
//同业ID
if
(
CustomerId
<=
0
)
{
return
ApiResult
.
ParamIsNull
();
}
var
Robj
=
customerModule
.
GetCustomerStuStageStatistics
(
CustomerId
,
userInfo
.
Group_Id
);
return
ApiResult
.
Success
(
""
,
Robj
);
}
#
endregion
}
}
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