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
49cb1511
Commit
49cb1511
authored
May 11, 2022
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
接口修改
parent
7f0bd183
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
512 additions
and
29 deletions
+512
-29
StudentModule.cs
Edu.Module.User/StudentModule.cs
+507
-26
UserCenterController.cs
Edu.WebApi/Controllers/User/UserCenterController.cs
+5
-3
No files found.
Edu.Module.User/StudentModule.cs
View file @
49cb1511
...
@@ -1349,12 +1349,212 @@ namespace Edu.Module.User
...
@@ -1349,12 +1349,212 @@ namespace Edu.Module.User
var
list
=
studentRepository
.
GetStudentPageListRepository
(
pageIndex
,
pageSize
,
out
rowsCount
,
query
);
var
list
=
studentRepository
.
GetStudentPageListRepository
(
pageIndex
,
pageSize
,
out
rowsCount
,
query
);
if
(
list
!=
null
&&
list
.
Count
>
0
)
if
(
list
!=
null
&&
list
.
Count
>
0
)
{
{
//客户阶段列表
var
stageList
=
stageRepository
.
GetStageListRepostory
(
new
Model
.
Entity
.
System
.
RB_Stage
()
{
Group_Id
=
list
[
0
].
Group_Id
});
//学员类型列表
var
stuTypeList
=
student_TypeRepository
.
GetStudentTypeListRepository
(
new
RB_Student_Type_Extend
());
string
stuIds
=
string
.
Join
(
","
,
list
.
Select
(
qitem
=>
qitem
.
StuId
));
//学员跟进
var
followList
=
followRepository
.
GetStudentFollowListRepository
(
new
RB_Student_Follow_Extend
()
{
QStuIds
=
stuIds
});
//学员订单
var
stuOrderList
=
student_OrderGuestRepository
.
GetStrOrderGuestListStaticRepository
(
new
RB_Student_OrderGuest_ViewModel
()
{
QStudentIds
=
stuIds
});
//本周新增
var
stuList
=
studentRepository
.
GetCustomerStuWeekListRepository
(
new
RB_Student_ViewModel
()
{
CustomerId
=
query
.
CustomerId
});
//协助人员列表
var
assistList
=
student_AssistRepository
.
GetStudentAssistListRepository
(
new
RB_Student_Assist_Extend
()
{
QStuIds
=
stuIds
});
//内部介绍人
List
<
int
>
empIdList
=
Common
.
ConvertHelper
.
StringToList
(
string
.
Join
(
","
,
list
.
Where
(
qitem
=>
qitem
.
CreateType
==
StuCreateTypeEnum
.
InternalIntroduction
).
Select
(
qitem
=>
qitem
.
StuSourceId
)));
List
<
int
>
aIds
=
Common
.
ConvertHelper
.
StringToList
(
string
.
Join
(
","
,
assistList
.
Select
(
qitem
=>
qitem
.
AssistId
)));
List
<
RB_Account_ViewModel
>
accountList
=
new
List
<
RB_Account_ViewModel
>();
if
(
aIds
!=
null
&&
aIds
.
Count
>
0
)
{
empIdList
.
AddRange
(
aIds
);
}
if
(
empIdList
!=
null
&&
empIdList
.
Count
>
0
)
{
accountList
=
accountModule
.
GetAccountListExtModule
(
new
RB_Account_ViewModel
()
{
QIds
=
string
.
Join
(
","
,
empIdList
)
});
}
//学员到访统计
var
visitList
=
student_VisitRepository
.
GetStudentVisitStatic_V2Repository
(
new
RB_Student_Visit_Extend
()
{
QStuIds
=
stuIds
,
StartDate
=
query
.
StartTime
,
EndDate
=
query
.
EndTime
,
});
//学员试听统计
var
stuReserveList
=
visitor_ReserveRepository
.
GetStuReserveStaticsListRepository
(
new
Model
.
ViewModel
.
Reserve
.
RB_Visitor_Reserve_Extend
()
{
QVisitor_Ids
=
stuIds
});
//同业录入列表
List
<
RB_Customer_Extend
>
customerList
=
new
List
<
RB_Customer_Extend
>();
List
<
int
>
customerIdList
=
Common
.
ConvertHelper
.
StringToList
(
string
.
Join
(
","
,
list
.
Where
(
qitem
=>
qitem
.
CreateType
==
StuCreateTypeEnum
.
CustomerInput
).
Select
(
qitem
=>
qitem
.
StuSourceId
)));
if
(
customerIdList
!=
null
&&
customerIdList
.
Count
>
0
)
{
customerList
=
customerRepository
.
GetCustomerListRepository
(
new
RB_Customer_Extend
()
{
CustomerIds
=
string
.
Join
(
","
,
customerIdList
)
});
}
List
<
RB_Student_ViewModel
>
transStudentList
=
new
List
<
RB_Student_ViewModel
>();
//转介人列表
List
<
int
>
transIdList
=
Common
.
ConvertHelper
.
StringToList
(
string
.
Join
(
","
,
list
.
Where
(
qitem
=>
qitem
.
CreateType
==
StuCreateTypeEnum
.
TransIntroduction
).
Select
(
qitem
=>
qitem
.
StuSourceId
)));
if
(
transIdList
!=
null
&&
transIdList
.
Count
>
0
)
{
transStudentList
=
studentRepository
.
GetStudentListRepository
(
new
RB_Student_ViewModel
()
{
StuIds
=
string
.
Join
(
","
,
transIdList
)
});
}
//学习目的
string
goalIds
=
string
.
Join
(
","
,
list
.
Select
(
qitem
=>
qitem
.
StuPurpose
));
var
goalList
=
learningGoalsRepository
.
GetLearningGoalsListRepository
(
new
Model
.
ViewModel
.
System
.
RB_LearningGoals_Extend
()
{
QGoalIds
=
goalIds
});
string
channelIds
=
string
.
Join
(
","
,
list
.
Select
(
qitem
=>
qitem
.
StuChannel
));
var
channelList
=
channelRepository
.
GetChannelListRepository
(
new
Model
.
ViewModel
.
System
.
RB_Channel_Extend
()
{
QChannelIds
=
channelIds
});
var
needIds
=
string
.
Join
(
","
,
list
.
Select
(
qitem
=>
qitem
.
StuNeeds
));
var
needList
=
needsRepository
.
GetNeedsListRepository
(
new
Model
.
ViewModel
.
System
.
RB_Needs_Extend
()
{
QNeedsId
=
needIds
});
//课程顾问跟进信息
List
<
RB_Student_Advisor_Extend
>
advisorList
=
student_AdvisorRepository
.
GetStudentAdvisorListRepository
(
new
RB_Student_Advisor_Extend
()
{
QStuIds
=
stuIds
});
foreach
(
var
item
in
list
)
foreach
(
var
item
in
list
)
{
{
var
tempOrderList
=
stuOrderList
?.
Where
(
qitem
=>
qitem
.
Student_Id
==
item
.
StuId
)?.
ToList
();
var
tempFollow
=
followList
?.
Where
(
qitem
=>
qitem
.
StuId
==
item
.
StuId
)?.
OrderByDescending
(
qitem
=>
qitem
.
Id
)?.
FirstOrDefault
();
item
.
followUpTime
=
Common
.
ConvertHelper
.
FormatTime
(
tempFollow
?.
CreateTime
);
item
.
WeekCount
=
stuList
?.
Count
()
??
0
;
item
.
TodayCount
=
stuList
?.
Where
(
qitem
=>
Common
.
ConvertHelper
.
FormatDate
(
qitem
.
CreateTime
)
==
Common
.
ConvertHelper
.
FormatDate
(
DateTime
.
Now
))?.
Count
()
??
0
;
item
.
OrderCount
=
tempOrderList
?.
Count
()
??
0
;
item
.
RenewOrderCount
=
tempOrderList
?.
Where
(
qitem
=>
qitem
.
RenewState
==
2
)?.
Count
()
??
0
;
item
.
StuGuestState
=
tempOrderList
?.
OrderByDescending
(
qitem
=>
qitem
.
OrderId
)?.
LastOrDefault
()?.
StuGuestState
??
0
;
var
tempAssistList
=
assistList
?.
Where
(
qitem
=>
qitem
.
StuId
==
item
.
StuId
)?.
ToList
();
foreach
(
var
sItem
in
tempAssistList
)
{
sItem
.
AssistName
=
accountList
?.
FirstOrDefault
(
qitem
=>
qitem
.
Id
==
sItem
.
AssistId
)?.
AccountName
??
""
;
}
item
.
AssistList
=
tempAssistList
;
item
.
VisitCount
=
visitList
?.
FirstOrDefault
(
qitem
=>
qitem
.
StuId
==
item
.
StuId
)?.
VisitCount
??
0
;
item
.
TrialLessonCount
=
stuReserveList
?.
FirstOrDefault
(
qitem
=>
qitem
.
Visitor_Id
==
item
.
StuId
)?.
TrialLessonCount
??
0
;
if
(
item
.
CreateType
==
StuCreateTypeEnum
.
InternalIntroduction
)
{
item
.
StuSourceIdName
=
accountList
?.
FirstOrDefault
(
qitem
=>
qitem
.
Id
==
item
.
StuSourceId
)?.
AccountName
??
""
;
}
else
if
(
item
.
CreateType
==
StuCreateTypeEnum
.
CustomerInput
)
{
var
tempCustomer
=
customerList
?.
FirstOrDefault
(
qitem
=>
qitem
.
CustomerId
==
item
.
StuSourceId
);
item
.
StuSourceIdName
=
tempCustomer
?.
CustomerName
??
""
;
if
(
tempCustomer
!=
null
)
{
if
(
tempCustomer
.
CustomerType
==
Common
.
Enum
.
Customer
.
CatetoryTypeEnum
.
Other
)
{
item
.
EnterpriseName
=
tempCustomer
?.
EnterpriseName
??
""
;
}
else
{
item
.
EnterpriseName
=
tempCustomer
?.
CategoryName
??
""
;
}
}
else
{
item
.
EnterpriseName
=
""
;
}
}
else
if
(
item
.
CreateType
==
StuCreateTypeEnum
.
TransIntroduction
)
{
item
.
StuSourceIdName
=
transStudentList
?.
FirstOrDefault
(
qitem
=>
qitem
.
StuId
==
item
.
StuSourceId
)?.
StuName
??
""
;
}
item
.
StuStageName
=
stageList
?.
FirstOrDefault
(
qitem
=>
qitem
.
Id
==
item
.
StuStage
)?.
StageName
??
""
;
item
.
StuTypeName
=
stuTypeList
?.
FirstOrDefault
(
qitem
=>
qitem
.
Id
==
item
.
StuType
)?.
Name
??
""
;
item
.
StuChannelName
=
channelList
?.
FirstOrDefault
(
qitem
=>
qitem
.
Id
==
item
.
StuChannel
)?.
Name
??
""
;
item
.
StuPurposeName
=
goalList
?.
FirstOrDefault
(
qitem
=>
qitem
.
Id
==
item
.
StuPurpose
)?.
Name
??
""
;
item
.
StuNeedsName
=
needList
?.
FirstOrDefault
(
qitem
=>
qitem
.
Id
==
item
.
StuNeeds
)?.
Name
??
""
;
item
.
AdvisorList
=
advisorList
?.
Where
(
qitem
=>
qitem
.
StuId
==
item
.
StuId
)?.
ToList
()
??
new
List
<
RB_Student_Advisor_Extend
>();
result
.
Add
(
new
result
.
Add
(
new
{
{
item
.
StuId
,
item
.
StuId
,
item
.
StuName
,
item
.
StuName
,
item
.
StuTel
,
item
.
StuIcon
,
item
.
StuSex
,
StuSexStr
=
item
.
StuSex
==
0
?
"男"
:
"女"
,
StuBirth
=
Common
.
ConvertHelper
.
FormatDate
(
item
.
StuBirth
),
item
.
StuStage
,
item
.
StuStageName
,
CreateTimeStr
=
Common
.
ConvertHelper
.
FormatTime
(
item
.
CreateTime
),
item
.
CreateBy
,
item
.
CreateByName
,
item
.
CreateType
,
CreateTypeStr
=
item
.
CreateType
.
ToName
(),
item
.
StuChannel
,
item
.
StuChannelName
,
item
.
PlatformName
,
item
.
CustomerId
,
item
.
CustomerName
,
AssistList
=
item
.
AssistList
.
Select
(
qitem
=>
new
{
qitem
.
Id
,
qitem
.
StuId
,
qitem
.
AssistId
,
qitem
.
AssistName
,
qitem
.
AssistType
,
AssistTypeName
=
qitem
.
AssistType
.
ToName
()
}),
item
.
JapanBaseInfo
,
JapanBaseInfoName
=
item
.
JapanBaseInfo
.
ToName
(),
item
.
StuProfession
,
item
.
StuEducation
,
StuEducationName
=
item
.
StuEducation
.
ToName
(),
item
.
StuPurpose
,
item
.
StuPurposeName
,
item
.
VisitCount
,
item
.
TrialLessonCount
,
item
.
StuSourceId
,
item
.
StuSourceIdName
,
item
.
QQ
,
item
.
WeChatNo
,
item
.
StuType
,
item
.
StuTypeName
,
item
.
StuNeeds
,
item
.
StuNeedsName
,
item
.
StuRealMobile
,
item
.
OrderCount
,
item
.
RenewOrderCount
,
item
.
EnterpriseName
,
item
.
AdvisorExpectDate
,
item
.
AdvisorStatus
,
item
.
AdvisorStatusName
,
item
.
AdvisorList
,
item
.
AdvisorWinRate
,
});
});
}
}
}
}
...
@@ -1382,12 +1582,254 @@ namespace Edu.Module.User
...
@@ -1382,12 +1582,254 @@ namespace Edu.Module.User
var
list
=
studentRepository
.
GetStudentPageListRepository
(
pageIndex
,
pageSize
,
out
rowsCount
,
query
);
var
list
=
studentRepository
.
GetStudentPageListRepository
(
pageIndex
,
pageSize
,
out
rowsCount
,
query
);
if
(
list
!=
null
&&
list
.
Count
>
0
)
if
(
list
!=
null
&&
list
.
Count
>
0
)
{
{
//客户阶段列表
var
stageList
=
stageRepository
.
GetStageListRepostory
(
new
Model
.
Entity
.
System
.
RB_Stage
()
{
Group_Id
=
list
[
0
].
Group_Id
});
//学员类型列表
var
stuTypeList
=
student_TypeRepository
.
GetStudentTypeListRepository
(
new
RB_Student_Type_Extend
());
string
stuIds
=
string
.
Join
(
","
,
list
.
Select
(
qitem
=>
qitem
.
StuId
));
//学员跟进
var
followList
=
followRepository
.
GetStudentFollowListRepository
(
new
RB_Student_Follow_Extend
()
{
QStuIds
=
stuIds
});
//学员订单
var
stuOrderList
=
student_OrderGuestRepository
.
GetStrOrderGuestListStaticRepository
(
new
RB_Student_OrderGuest_ViewModel
()
{
QStudentIds
=
stuIds
});
//本周新增
var
stuList
=
studentRepository
.
GetCustomerStuWeekListRepository
(
new
RB_Student_ViewModel
()
{
CustomerId
=
query
.
CustomerId
});
//协助人员列表
var
assistList
=
student_AssistRepository
.
GetStudentAssistListRepository
(
new
RB_Student_Assist_Extend
()
{
QStuIds
=
stuIds
});
//内部介绍人
List
<
int
>
empIdList
=
Common
.
ConvertHelper
.
StringToList
(
string
.
Join
(
","
,
list
.
Where
(
qitem
=>
qitem
.
CreateType
==
StuCreateTypeEnum
.
InternalIntroduction
).
Select
(
qitem
=>
qitem
.
StuSourceId
)));
List
<
int
>
aIds
=
Common
.
ConvertHelper
.
StringToList
(
string
.
Join
(
","
,
assistList
.
Select
(
qitem
=>
qitem
.
AssistId
)));
List
<
RB_Account_ViewModel
>
accountList
=
new
List
<
RB_Account_ViewModel
>();
if
(
aIds
!=
null
&&
aIds
.
Count
>
0
)
{
empIdList
.
AddRange
(
aIds
);
}
if
(
empIdList
!=
null
&&
empIdList
.
Count
>
0
)
{
accountList
=
accountModule
.
GetAccountListExtModule
(
new
RB_Account_ViewModel
()
{
QIds
=
string
.
Join
(
","
,
empIdList
)
});
}
//学员到访统计
var
visitList
=
student_VisitRepository
.
GetStudentVisitStatic_V2Repository
(
new
RB_Student_Visit_Extend
()
{
QStuIds
=
stuIds
,
StartDate
=
query
.
StartTime
,
EndDate
=
query
.
EndTime
,
});
//学员试听统计
var
stuReserveList
=
visitor_ReserveRepository
.
GetStuReserveStaticsListRepository
(
new
Model
.
ViewModel
.
Reserve
.
RB_Visitor_Reserve_Extend
()
{
QVisitor_Ids
=
stuIds
});
//同业录入列表
List
<
RB_Customer_Extend
>
customerList
=
new
List
<
RB_Customer_Extend
>();
List
<
int
>
customerIdList
=
Common
.
ConvertHelper
.
StringToList
(
string
.
Join
(
","
,
list
.
Where
(
qitem
=>
qitem
.
CreateType
==
StuCreateTypeEnum
.
CustomerInput
).
Select
(
qitem
=>
qitem
.
StuSourceId
)));
if
(
customerIdList
!=
null
&&
customerIdList
.
Count
>
0
)
{
customerList
=
customerRepository
.
GetCustomerListRepository
(
new
RB_Customer_Extend
()
{
CustomerIds
=
string
.
Join
(
","
,
customerIdList
)
});
}
List
<
RB_Student_ViewModel
>
transStudentList
=
new
List
<
RB_Student_ViewModel
>();
//转介人列表
List
<
int
>
transIdList
=
Common
.
ConvertHelper
.
StringToList
(
string
.
Join
(
","
,
list
.
Where
(
qitem
=>
qitem
.
CreateType
==
StuCreateTypeEnum
.
TransIntroduction
).
Select
(
qitem
=>
qitem
.
StuSourceId
)));
if
(
transIdList
!=
null
&&
transIdList
.
Count
>
0
)
{
transStudentList
=
studentRepository
.
GetStudentListRepository
(
new
RB_Student_ViewModel
()
{
StuIds
=
string
.
Join
(
","
,
transIdList
)
});
}
//学习目的
string
goalIds
=
string
.
Join
(
","
,
list
.
Select
(
qitem
=>
qitem
.
StuPurpose
));
var
goalList
=
learningGoalsRepository
.
GetLearningGoalsListRepository
(
new
Model
.
ViewModel
.
System
.
RB_LearningGoals_Extend
()
{
QGoalIds
=
goalIds
});
string
channelIds
=
string
.
Join
(
","
,
list
.
Select
(
qitem
=>
qitem
.
StuChannel
));
var
channelList
=
channelRepository
.
GetChannelListRepository
(
new
Model
.
ViewModel
.
System
.
RB_Channel_Extend
()
{
QChannelIds
=
channelIds
});
var
needIds
=
string
.
Join
(
","
,
list
.
Select
(
qitem
=>
qitem
.
StuNeeds
));
var
needList
=
needsRepository
.
GetNeedsListRepository
(
new
Model
.
ViewModel
.
System
.
RB_Needs_Extend
()
{
QNeedsId
=
needIds
});
//课程顾问跟进信息
List
<
RB_Student_Advisor_Extend
>
advisorList
=
student_AdvisorRepository
.
GetStudentAdvisorListRepository
(
new
RB_Student_Advisor_Extend
()
{
QStuIds
=
stuIds
});
foreach
(
var
item
in
list
)
foreach
(
var
item
in
list
)
{
{
var
tempOrderList
=
stuOrderList
?.
Where
(
qitem
=>
qitem
.
Student_Id
==
item
.
StuId
)?.
ToList
();
var
tempFollow
=
followList
?.
Where
(
qitem
=>
qitem
.
StuId
==
item
.
StuId
)?.
OrderByDescending
(
qitem
=>
qitem
.
Id
)?.
FirstOrDefault
();
item
.
followUpTime
=
Common
.
ConvertHelper
.
FormatTime
(
tempFollow
?.
CreateTime
);
item
.
WeekCount
=
stuList
?.
Count
()
??
0
;
item
.
TodayCount
=
stuList
?.
Where
(
qitem
=>
Common
.
ConvertHelper
.
FormatDate
(
qitem
.
CreateTime
)
==
Common
.
ConvertHelper
.
FormatDate
(
DateTime
.
Now
))?.
Count
()
??
0
;
item
.
OrderCount
=
tempOrderList
?.
Count
()
??
0
;
item
.
RenewOrderCount
=
tempOrderList
?.
Where
(
qitem
=>
qitem
.
RenewState
==
2
)?.
Count
()
??
0
;
item
.
StuGuestState
=
tempOrderList
?.
OrderByDescending
(
qitem
=>
qitem
.
OrderId
)?.
LastOrDefault
()?.
StuGuestState
??
0
;
var
tempAssistList
=
assistList
?.
Where
(
qitem
=>
qitem
.
StuId
==
item
.
StuId
)?.
ToList
();
foreach
(
var
sItem
in
tempAssistList
)
{
sItem
.
AssistName
=
accountList
?.
FirstOrDefault
(
qitem
=>
qitem
.
Id
==
sItem
.
AssistId
)?.
AccountName
??
""
;
}
item
.
AssistList
=
tempAssistList
;
item
.
VisitCount
=
visitList
?.
FirstOrDefault
(
qitem
=>
qitem
.
StuId
==
item
.
StuId
)?.
VisitCount
??
0
;
item
.
TrialLessonCount
=
stuReserveList
?.
FirstOrDefault
(
qitem
=>
qitem
.
Visitor_Id
==
item
.
StuId
)?.
TrialLessonCount
??
0
;
if
(
item
.
CreateType
==
StuCreateTypeEnum
.
InternalIntroduction
)
{
item
.
StuSourceIdName
=
accountList
?.
FirstOrDefault
(
qitem
=>
qitem
.
Id
==
item
.
StuSourceId
)?.
AccountName
??
""
;
}
else
if
(
item
.
CreateType
==
StuCreateTypeEnum
.
CustomerInput
)
{
var
tempCustomer
=
customerList
?.
FirstOrDefault
(
qitem
=>
qitem
.
CustomerId
==
item
.
StuSourceId
);
item
.
StuSourceIdName
=
tempCustomer
?.
CustomerName
??
""
;
if
(
tempCustomer
!=
null
)
{
if
(
tempCustomer
.
CustomerType
==
Common
.
Enum
.
Customer
.
CatetoryTypeEnum
.
Other
)
{
item
.
EnterpriseName
=
tempCustomer
?.
EnterpriseName
??
""
;
}
else
{
item
.
EnterpriseName
=
tempCustomer
?.
CategoryName
??
""
;
}
}
else
{
item
.
EnterpriseName
=
""
;
}
}
else
if
(
item
.
CreateType
==
StuCreateTypeEnum
.
TransIntroduction
)
{
item
.
StuSourceIdName
=
transStudentList
?.
FirstOrDefault
(
qitem
=>
qitem
.
StuId
==
item
.
StuSourceId
)?.
StuName
??
""
;
}
item
.
StuStageName
=
stageList
?.
FirstOrDefault
(
qitem
=>
qitem
.
Id
==
item
.
StuStage
)?.
StageName
??
""
;
item
.
StuTypeName
=
stuTypeList
?.
FirstOrDefault
(
qitem
=>
qitem
.
Id
==
item
.
StuType
)?.
Name
??
""
;
item
.
StuChannelName
=
channelList
?.
FirstOrDefault
(
qitem
=>
qitem
.
Id
==
item
.
StuChannel
)?.
Name
??
""
;
item
.
StuPurposeName
=
goalList
?.
FirstOrDefault
(
qitem
=>
qitem
.
Id
==
item
.
StuPurpose
)?.
Name
??
""
;
item
.
StuNeedsName
=
needList
?.
FirstOrDefault
(
qitem
=>
qitem
.
Id
==
item
.
StuNeeds
)?.
Name
??
""
;
item
.
AdvisorList
=
advisorList
?.
Where
(
qitem
=>
qitem
.
StuId
==
item
.
StuId
)?.
ToList
()
??
new
List
<
RB_Student_Advisor_Extend
>();
result
.
Add
(
new
result
.
Add
(
new
{
{
item
.
StuId
,
item
.
StuId
,
item
.
StuName
,
item
.
StuName
,
item
.
StuTel
,
item
.
StuIcon
,
item
.
StuSex
,
StuSexStr
=
item
.
StuSex
==
0
?
"男"
:
"女"
,
StuBirth
=
Common
.
ConvertHelper
.
FormatDate
(
item
.
StuBirth
),
item
.
StuStage
,
item
.
StuStageName
,
CreateTimeStr
=
Common
.
ConvertHelper
.
FormatTime
(
item
.
CreateTime
),
item
.
CreateBy
,
item
.
CreateByName
,
item
.
CreateType
,
CreateTypeStr
=
item
.
CreateType
.
ToName
(),
item
.
StuChannel
,
item
.
StuChannelName
,
item
.
PlatformName
,
item
.
CustomerId
,
item
.
CustomerName
,
AssistList
=
item
.
AssistList
.
Select
(
qitem
=>
new
{
qitem
.
Id
,
qitem
.
StuId
,
qitem
.
AssistId
,
qitem
.
AssistName
,
qitem
.
AssistType
,
AssistTypeName
=
qitem
.
AssistType
.
ToName
()
}),
item
.
JapanBaseInfo
,
JapanBaseInfoName
=
item
.
JapanBaseInfo
.
ToName
(),
item
.
StuProfession
,
item
.
StuEducation
,
StuEducationName
=
item
.
StuEducation
.
ToName
(),
item
.
StuPurpose
,
item
.
StuPurposeName
,
item
.
VisitCount
,
item
.
TrialLessonCount
,
item
.
StuSourceId
,
item
.
StuSourceIdName
,
item
.
QQ
,
item
.
WeChatNo
,
item
.
StuType
,
item
.
StuTypeName
,
item
.
StuNeeds
,
item
.
StuNeedsName
,
item
.
StuRealMobile
,
item
.
OrderCount
,
item
.
RenewOrderCount
,
item
.
EnterpriseName
,
item
.
AdvisorExpectDate
,
item
.
AdvisorStatus
,
item
.
AdvisorStatusName
,
item
.
AdvisorList
,
item
.
AdvisorWinRate
,
});
}
}
return
result
;
}
/// <summary>
/// 获取未领取合同的订单
/// </summary>
public
List
<
object
>
GetContractNotModule
(
int
pageIndex
,
int
pageSize
,
out
long
rowsCount
,
int
UserId
)
{
var
query
=
new
RB_Student_OrderGuest_ViewModel
()
{
IsNotContract
=
1
,
CreateBy
=
UserId
,
};
List
<
object
>
result
=
new
List
<
object
>();
rowsCount
=
0
;
var
list
=
student_OrderGuestRepository
.
GetStuOrderGuestPageRepository
(
pageIndex
,
pageSize
,
out
rowsCount
,
query
);
if
(
list
!=
null
&&
list
.
Count
>
0
)
{
foreach
(
var
item
in
list
)
{
result
.
Add
(
new
{
item
.
OrderId
,
item
.
ClassName
,
item
.
CourseName
,
item
.
GuestName
,
item
.
GuestId
,
item
.
StuJoinType
,
StuJoinTypeName
=
item
.
StuJoinType
.
ToName
(),
item
.
StuGuestState
,
StuGuestStateName
=
item
.
StuGuestState
.
ToName
(),
item
.
OrderState
,
OrderStateName
=
item
.
OrderState
.
ToName
(),
item
.
TotalHours
,
item
.
CompleteHours
,
item
.
ClassStatus
,
item
.
RenewState
,
item
.
OrderType
,
OrderTypeName
=
item
.
OrderType
.
ToName
(),
});
});
}
}
}
}
...
@@ -1398,8 +1840,9 @@ namespace Edu.Module.User
...
@@ -1398,8 +1840,9 @@ namespace Edu.Module.User
/// 获取未完成的订单
/// 获取未完成的订单
/// </summary>
/// </summary>
/// <returns></returns>
/// <returns></returns>
public
List
<
RB_Order_ViewModel
>
GetOrderNotModule
(
int
pageIndex
,
int
pageSize
,
out
long
rowsCount
,
int
UserId
)
public
List
<
object
>
GetOrderNotModule
(
int
pageIndex
,
int
pageSize
,
out
long
rowsCount
,
int
UserId
)
{
{
List
<
object
>
result
=
new
List
<
object
>();
var
query
=
new
RB_Order_ViewModel
()
var
query
=
new
RB_Order_ViewModel
()
{
{
Q_OrderState
=
1
,
Q_OrderState
=
1
,
...
@@ -1455,6 +1898,34 @@ namespace Edu.Module.User
...
@@ -1455,6 +1898,34 @@ namespace Edu.Module.User
//获取订单的返佣
//获取订单的返佣
var
rclist
=
returnComissionRepository
.
GetOrderReturnComissionListRepositpry
(
new
RB_Order_ReturnComission_ViewModel
()
{
QOrderIds
=
orderIds
});
var
rclist
=
returnComissionRepository
.
GetOrderReturnComissionListRepositpry
(
new
RB_Order_ReturnComission_ViewModel
()
{
QOrderIds
=
orderIds
});
List
<
int
>
empIds
=
new
List
<
int
>();
// 创建人
List
<
int
>
createByIdList
=
Common
.
ConvertHelper
.
StringToList
(
string
.
Join
(
","
,
orderList
.
Select
(
qitem
=>
qitem
.
CreateBy
)));
if
(
createByIdList
!=
null
&&
createByIdList
.
Count
>
0
)
{
empIds
.
AddRange
(
createByIdList
);
}
//业务员
List
<
int
>
enterIdList
=
Common
.
ConvertHelper
.
StringToList
(
string
.
Join
(
","
,
orderList
.
Select
(
qitem
=>
qitem
.
EnterID
)));
if
(
enterIdList
!=
null
&&
enterIdList
.
Count
>
0
)
{
empIds
.
AddRange
(
enterIdList
);
}
//课程顾问
List
<
int
>
courseConsultantIdList
=
Common
.
ConvertHelper
.
StringToList
(
string
.
Join
(
","
,
orderList
.
Select
(
qitem
=>
qitem
.
CourseConsultantId
)));
if
(
courseConsultantIdList
!=
null
&&
courseConsultantIdList
.
Count
>
0
)
{
empIds
.
AddRange
(
courseConsultantIdList
);
}
string
createIds
=
string
.
Join
(
","
,
empIds
);
var
empList
=
new
List
<
RB_Account_ViewModel
>();
if
(!
string
.
IsNullOrEmpty
(
createIds
))
{
empList
=
accountModule
.
GetAccountListExtModule
(
new
RB_Account_ViewModel
()
{
QIds
=
createIds
});
}
foreach
(
var
item
in
orderList
)
foreach
(
var
item
in
orderList
)
{
{
if
(
item
.
SourceOrderId
>
0
)
if
(
item
.
SourceOrderId
>
0
)
...
@@ -1515,42 +1986,52 @@ namespace Edu.Module.User
...
@@ -1515,42 +1986,52 @@ namespace Edu.Module.User
item
.
CreateType
=
tempStu
?.
CreateType
??
StuCreateTypeEnum
.
EmployeeInput
;
item
.
CreateType
=
tempStu
?.
CreateType
??
StuCreateTypeEnum
.
EmployeeInput
;
item
.
StuSourceIdName
=
tempStu
?.
StuSourceIdName
??
""
;
item
.
StuSourceIdName
=
tempStu
?.
StuSourceIdName
??
""
;
item
.
BrokerageMoney
=
rclist
.
Where
(
x
=>
x
.
OrderId
==
item
.
OrderId
).
Sum
(
x
=>
x
.
CommissionMoeny
);
item
.
BrokerageMoney
=
rclist
.
Where
(
x
=>
x
.
OrderId
==
item
.
OrderId
).
Sum
(
x
=>
x
.
CommissionMoeny
);
}
}
return
orderList
;
}
/// <summary>
/// 获取未领取合同的订单
/// </summary>
public
List
<
object
>
GetContractNotModule
(
int
pageIndex
,
int
pageSize
,
out
long
rowsCount
,
int
UserId
)
{
var
query
=
new
RB_Student_OrderGuest_ViewModel
()
{
IsNotContract
=
1
,
CreateBy
=
UserId
,
};
List
<
object
>
result
=
new
List
<
object
>();
rowsCount
=
0
;
var
list
=
student_OrderGuestRepository
.
GetStuOrderGuestPageRepository
(
pageIndex
,
pageSize
,
out
rowsCount
,
query
);
if
(
list
!=
null
&&
list
.
Count
>
0
)
{
foreach
(
var
item
in
list
)
{
result
.
Add
(
new
result
.
Add
(
new
{
{
item
.
OrderId
,
item
.
TeacherName
,
item
.
ClassName
,
item
.
ClassName
,
item
.
ClassNo
,
item
.
ClassSchoolId
,
item
.
SchoolName
,
item
.
SaleRemarkList
,
item
.
GuestList
,
item
.
ContractList
,
item
.
CourseName
,
item
.
CourseName
,
item
.
GuestName
,
item
.
CourseImg
,
item
.
GuestId
,
item
.
CourseSubject
,
item
.
CourseSubjectName
,
item
.
B2BBackground
,
item
.
B2BIcon
,
item
.
ClassScrollType
,
item
.
StuSourceIdName
,
item
.
CategoryId
,
item
.
OrderId
,
item
.
ClassId
,
item
.
Class_Price
,
item
.
Unit_Price
,
item
.
GuestNum
,
item
.
PreferPrice
,
item
.
Income
,
item
.
Refund
,
item
.
DiscountMoney
,
item
.
PerDiscountMoney
,
item
.
PlatformTax
,
item
.
OrderState
,
OrderStateName
=
item
.
OrderState
.
ToName
(),
item
.
SaleRemark
,
item
.
EnterID
,
EnterIDName
=
empList
?.
FirstOrDefault
(
qitem
=>
qitem
.
Id
==
item
.
EnterID
)?.
AccountName
??
""
,
item
.
CreateBy
,
CreateByName
=
empList
?.
FirstOrDefault
(
qitem
=>
qitem
.
Id
==
item
.
CreateBy
)?.
AccountName
??
""
,
item
.
CourseConsultantId
,
CourseConsultantIdName
=
empList
?.
FirstOrDefault
(
qitem
=>
qitem
.
Id
==
item
.
CourseConsultantId
)?.
AccountName
??
""
,
});
});
}
}
}
}
return
result
;
return
result
;
}
}
/// <summary>
/// <summary>
/// 今日被跟进学员(被跟进的学员所有协助人可见)
/// 今日被跟进学员(被跟进的学员所有协助人可见)
/// </summary>
/// </summary>
...
...
Edu.WebApi/Controllers/User/UserCenterController.cs
View file @
49cb1511
...
@@ -3364,8 +3364,10 @@ namespace Edu.WebApi.Controllers.User
...
@@ -3364,8 +3364,10 @@ namespace Edu.WebApi.Controllers.User
/// <returns></returns>
/// <returns></returns>
public
ApiResult
MyStudent
()
public
ApiResult
MyStudent
()
{
{
var
userId
=
0
;
//userId = base.UserInfo.Id;
var
pageModel
=
Common
.
Plugin
.
JsonHelper
.
DeserializeObject
<
ResultPageModel
>(
RequestParm
.
Msg
.
ToString
());
var
pageModel
=
Common
.
Plugin
.
JsonHelper
.
DeserializeObject
<
ResultPageModel
>(
RequestParm
.
Msg
.
ToString
());
var
list
=
studentModule
.
GetMyStudentModule
(
pageModel
.
PageIndex
,
pageModel
.
PageSize
,
out
long
rowsCount
,
base
.
UserInfo
.
Id
);
var
list
=
studentModule
.
GetMyStudentModule
(
pageModel
.
PageIndex
,
pageModel
.
PageSize
,
out
long
rowsCount
,
user
Id
);
pageModel
.
PageData
=
list
;
pageModel
.
PageData
=
list
;
pageModel
.
Count
=
rowsCount
;
pageModel
.
Count
=
rowsCount
;
return
ApiResult
.
Success
(
data
:
pageModel
);
return
ApiResult
.
Success
(
data
:
pageModel
);
...
@@ -3375,7 +3377,7 @@ namespace Edu.WebApi.Controllers.User
...
@@ -3375,7 +3377,7 @@ namespace Edu.WebApi.Controllers.User
/// 待申领合同(正常订单,没有领取电子合同)
/// 待申领合同(正常订单,没有领取电子合同)
/// </summary>
/// </summary>
/// <returns></returns>
/// <returns></returns>
public
ApiResult
MyContract
()
public
ApiResult
My
OrderNotReceive
Contract
()
{
{
var
pageModel
=
Common
.
Plugin
.
JsonHelper
.
DeserializeObject
<
ResultPageModel
>(
RequestParm
.
Msg
.
ToString
());
var
pageModel
=
Common
.
Plugin
.
JsonHelper
.
DeserializeObject
<
ResultPageModel
>(
RequestParm
.
Msg
.
ToString
());
var
userId
=
0
;
var
userId
=
0
;
...
@@ -3390,7 +3392,7 @@ namespace Edu.WebApi.Controllers.User
...
@@ -3390,7 +3392,7 @@ namespace Edu.WebApi.Controllers.User
/// 待收款提醒(正常订单,收支款未平衡的订单)
/// 待收款提醒(正常订单,收支款未平衡的订单)
/// </summary>
/// </summary>
/// <returns></returns>
/// <returns></returns>
public
ApiResult
My
Pay
()
public
ApiResult
My
OrderNotBalance
()
{
{
var
pageModel
=
Common
.
Plugin
.
JsonHelper
.
DeserializeObject
<
ResultPageModel
>(
RequestParm
.
Msg
.
ToString
());
var
pageModel
=
Common
.
Plugin
.
JsonHelper
.
DeserializeObject
<
ResultPageModel
>(
RequestParm
.
Msg
.
ToString
());
var
userId
=
0
;
var
userId
=
0
;
...
...
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