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
83d730e9
Commit
83d730e9
authored
May 11, 2022
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
49cb1511
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
165 additions
and
11 deletions
+165
-11
StudentModule.cs
Edu.Module.User/StudentModule.cs
+164
-10
UserCenterController.cs
Edu.WebApi/Controllers/User/UserCenterController.cs
+1
-1
No files found.
Edu.Module.User/StudentModule.cs
View file @
83d730e9
...
@@ -1267,15 +1267,76 @@ namespace Edu.Module.User
...
@@ -1267,15 +1267,76 @@ namespace Edu.Module.User
var
list
=
student_AppointmentRepository
.
GetStudentAppointmentPageRepository
(
pageIndex
,
pageSize
,
out
rowsCount
,
query
);
var
list
=
student_AppointmentRepository
.
GetStudentAppointmentPageRepository
(
pageIndex
,
pageSize
,
out
rowsCount
,
query
);
if
(
list
!=
null
&&
list
.
Count
>
0
)
if
(
list
!=
null
&&
list
.
Count
>
0
)
{
{
string
createByIds
=
string
.
Join
(
","
,
list
.
Select
(
qitem
=>
qitem
.
CreateBy
));
//客户阶段列表
List
<
RB_Account_ViewModel
>
empList
=
new
List
<
RB_Account_ViewModel
>();
var
stageList
=
stageRepository
.
GetStageListRepostory
(
new
Model
.
Entity
.
System
.
RB_Stage
()
if
(!
string
.
IsNullOrEmpty
(
createByIds
))
{
Group_Id
=
list
[
0
].
Group_Id
});
//学员类型列表
var
stuTypeList
=
student_TypeRepository
.
GetStudentTypeListRepository
(
new
RB_Student_Type_Extend
());
//学习目的
var
goalList
=
learningGoalsRepository
.
GetLearningGoalsListRepository
(
new
Model
.
ViewModel
.
System
.
RB_LearningGoals_Extend
());
//渠道列表
var
channelList
=
channelRepository
.
GetChannelListRepository
(
new
Model
.
ViewModel
.
System
.
RB_Channel_Extend
());
//客户需求
var
needList
=
needsRepository
.
GetNeedsListRepository
(
new
Model
.
ViewModel
.
System
.
RB_Needs_Extend
());
string
stuIds
=
string
.
Join
(
","
,
list
.
Select
(
qitem
=>
qitem
.
StuId
));
var
stuList
=
studentRepository
.
GetStudentListRepository
(
new
RB_Student_ViewModel
()
{
StuIds
=
stuIds
},
isQueryCreateType
:
true
,
isQueryAssist
:
false
);
//协助人员列表
var
assistList
=
student_AssistRepository
.
GetStudentAssistListRepository
(
new
RB_Student_Assist_Extend
()
{
QStuIds
=
stuIds
});
List
<
int
>
empIds
=
new
List
<
int
>();
//内部介绍人
List
<
int
>
stuSourceIdList
=
Common
.
ConvertHelper
.
StringToList
(
string
.
Join
(
","
,
stuList
.
Where
(
qitem
=>
qitem
.
CreateType
==
StuCreateTypeEnum
.
InternalIntroduction
).
Select
(
qitem
=>
qitem
.
StuSourceId
)));
if
(
stuSourceIdList
!=
null
&&
stuSourceIdList
.
Count
>
0
)
{
empIds
.
AddRange
(
stuSourceIdList
);
}
//协助人员
List
<
int
>
assistIdList
=
Common
.
ConvertHelper
.
StringToList
(
string
.
Join
(
","
,
assistList
.
Select
(
qitem
=>
qitem
.
AssistId
)));
if
(
assistIdList
!=
null
&&
assistIdList
.
Count
>
0
)
{
empIds
.
AddRange
(
assistIdList
);
}
//跟进人员创建人
List
<
int
>
createByIdList
=
Common
.
ConvertHelper
.
StringToList
(
string
.
Join
(
","
,
list
.
Select
(
qitem
=>
qitem
.
CreateBy
)));
if
(
createByIdList
!=
null
&&
createByIdList
.
Count
>
0
)
{
empIds
.
AddRange
(
createByIdList
);
}
//学员负责人
List
<
int
>
stuCreateByList
=
Common
.
ConvertHelper
.
StringToList
(
string
.
Join
(
","
,
stuList
.
Select
(
qitem
=>
qitem
.
CreateBy
)));
if
(
stuCreateByList
!=
null
&&
stuCreateByList
.
Count
>
0
)
{
empIds
.
AddRange
(
stuCreateByList
);
}
string
createIds
=
string
.
Join
(
","
,
empIds
);
var
empList
=
new
List
<
RB_Account_ViewModel
>();
if
(!
string
.
IsNullOrEmpty
(
createIds
))
{
{
empList
=
accountModule
.
GetAccountListExtModule
(
new
RB_Account_ViewModel
()
{
QIds
=
create
By
Ids
});
empList
=
accountModule
.
GetAccountListExtModule
(
new
RB_Account_ViewModel
()
{
QIds
=
createIds
});
}
}
foreach
(
var
item
in
list
)
foreach
(
var
item
in
list
)
{
{
var
tempEmp
=
empList
?.
FirstOrDefault
(
qitem
=>
qitem
.
Id
==
item
.
CreateBy
);
var
tempEmp
=
empList
?.
FirstOrDefault
(
qitem
=>
qitem
.
Id
==
item
.
CreateBy
);
var
tempStudent
=
stuList
?.
FirstOrDefault
(
qitem
=>
qitem
.
StuId
==
item
.
StuId
);
if
(
tempStudent
!=
null
)
{
var
tempAssistList
=
assistList
?.
Where
(
qitem
=>
qitem
.
StuId
==
item
.
StuId
)?.
ToList
();
if
(
tempAssistList
!=
null
&&
tempAssistList
.
Count
>
0
)
{
foreach
(
var
subItem
in
tempAssistList
)
{
subItem
.
AssistName
=
empList
?.
FirstOrDefault
(
qitem
=>
qitem
.
Id
==
subItem
.
AssistId
)?.
AccountName
??
""
;
}
}
tempStudent
.
AssistList
=
tempAssistList
;
}
result
.
Add
(
new
result
.
Add
(
new
{
{
item
.
Id
,
item
.
Id
,
...
@@ -1285,6 +1346,22 @@ namespace Edu.Module.User
...
@@ -1285,6 +1346,22 @@ namespace Edu.Module.User
EmployeeName
=
tempEmp
?.
AccountName
,
EmployeeName
=
tempEmp
?.
AccountName
,
CreateTime
=
Common
.
ConvertHelper
.
FormatTime
(
item
.
CreateTime
),
CreateTime
=
Common
.
ConvertHelper
.
FormatTime
(
item
.
CreateTime
),
item
.
Feedback
,
item
.
Feedback
,
CreateTypeName
=
tempStudent
?.
CreateType
.
ToName
()
??
""
,
StuSourceId
=
tempStudent
?.
StuSourceId
??
0
,
StuSourceIdName
=
tempStudent
?.
StuSourceIdName
??
""
,
AssistList
=
tempStudent
?.
AssistList
?.
Select
(
qitem
=>
new
{
qitem
.
AssistType
,
AssistTypeName
=
qitem
.
AssistType
.
ToName
(),
qitem
.
AssistId
,
qitem
.
AssistName
,
}),
StuStageName
=
stageList
?.
FirstOrDefault
(
qitem
=>
qitem
.
Id
==
tempStudent
.
StuStage
)?.
StageName
??
""
,
StuTypeName
=
stuTypeList
?.
FirstOrDefault
(
qitem
=>
qitem
.
Id
==
tempStudent
.
StuType
)?.
Name
??
""
,
StuCreateByName
=
empList
?.
FirstOrDefault
(
qitem
=>
qitem
.
Id
==
tempStudent
.
CreateBy
)?.
AccountName
??
""
,
StuChannelName
=
channelList
?.
FirstOrDefault
(
qitem
=>
qitem
.
Id
==
tempStudent
.
StuChannel
)?.
Name
??
""
,
StuPurposeName
=
goalList
?.
FirstOrDefault
(
qitem
=>
qitem
.
Id
==
tempStudent
.
StuPurpose
)?.
Name
??
""
,
StuNeedsName
=
needList
?.
FirstOrDefault
(
qitem
=>
qitem
.
Id
==
tempStudent
.
StuNeeds
)?.
Name
??
""
,
});
});
}
}
}
}
...
@@ -1306,22 +1383,100 @@ namespace Edu.Module.User
...
@@ -1306,22 +1383,100 @@ namespace Edu.Module.User
var
list
=
student_AppointmentRepository
.
GetTodayConnectPageRepository
(
pageIndex
,
pageSize
,
out
rowsCount
,
Common
.
ConvertHelper
.
FormatDate
(
DateTime
.
Now
),
CreateBy
);
var
list
=
student_AppointmentRepository
.
GetTodayConnectPageRepository
(
pageIndex
,
pageSize
,
out
rowsCount
,
Common
.
ConvertHelper
.
FormatDate
(
DateTime
.
Now
),
CreateBy
);
if
(
list
!=
null
&&
list
.
Count
>
0
)
if
(
list
!=
null
&&
list
.
Count
>
0
)
{
{
string
createByIds
=
string
.
Join
(
","
,
list
.
Select
(
qitem
=>
qitem
.
CreateBy
));
//客户阶段列表
List
<
RB_Account_ViewModel
>
empList
=
new
List
<
RB_Account_ViewModel
>();
var
stageList
=
stageRepository
.
GetStageListRepostory
(
new
Model
.
Entity
.
System
.
RB_Stage
()
if
(!
string
.
IsNullOrEmpty
(
createByIds
))
{
{
empList
=
accountModule
.
GetAccountListExtModule
(
new
RB_Account_ViewModel
()
{
QIds
=
createByIds
});
Group_Id
=
list
[
0
].
Group_Id
});
//学员类型列表
var
stuTypeList
=
student_TypeRepository
.
GetStudentTypeListRepository
(
new
RB_Student_Type_Extend
());
//学习目的
var
goalList
=
learningGoalsRepository
.
GetLearningGoalsListRepository
(
new
Model
.
ViewModel
.
System
.
RB_LearningGoals_Extend
());
//渠道列表
var
channelList
=
channelRepository
.
GetChannelListRepository
(
new
Model
.
ViewModel
.
System
.
RB_Channel_Extend
());
//客户需求
var
needList
=
needsRepository
.
GetNeedsListRepository
(
new
Model
.
ViewModel
.
System
.
RB_Needs_Extend
());
string
stuIds
=
string
.
Join
(
","
,
list
.
Select
(
qitem
=>
qitem
.
StuId
));
var
stuList
=
studentRepository
.
GetStudentListRepository
(
new
RB_Student_ViewModel
()
{
StuIds
=
stuIds
},
isQueryCreateType
:
true
,
isQueryAssist
:
false
);
//协助人员列表
var
assistList
=
student_AssistRepository
.
GetStudentAssistListRepository
(
new
RB_Student_Assist_Extend
()
{
QStuIds
=
stuIds
});
List
<
int
>
empIds
=
new
List
<
int
>();
//内部介绍人
List
<
int
>
stuSourceIdList
=
Common
.
ConvertHelper
.
StringToList
(
string
.
Join
(
","
,
stuList
.
Where
(
qitem
=>
qitem
.
CreateType
==
StuCreateTypeEnum
.
InternalIntroduction
).
Select
(
qitem
=>
qitem
.
StuSourceId
)));
if
(
stuSourceIdList
!=
null
&&
stuSourceIdList
.
Count
>
0
)
{
empIds
.
AddRange
(
stuSourceIdList
);
}
//协助人员
List
<
int
>
assistIdList
=
Common
.
ConvertHelper
.
StringToList
(
string
.
Join
(
","
,
assistList
.
Select
(
qitem
=>
qitem
.
AssistId
)));
if
(
assistIdList
!=
null
&&
assistIdList
.
Count
>
0
)
{
empIds
.
AddRange
(
assistIdList
);
}
//跟进人员创建人
List
<
int
>
createByIdList
=
Common
.
ConvertHelper
.
StringToList
(
string
.
Join
(
","
,
list
.
Select
(
qitem
=>
qitem
.
CreateBy
)));
if
(
createByIdList
!=
null
&&
createByIdList
.
Count
>
0
)
{
empIds
.
AddRange
(
createByIdList
);
}
//学员负责人
List
<
int
>
stuCreateByList
=
Common
.
ConvertHelper
.
StringToList
(
string
.
Join
(
","
,
stuList
.
Select
(
qitem
=>
qitem
.
CreateBy
)));
if
(
stuCreateByList
!=
null
&&
stuCreateByList
.
Count
>
0
)
{
empIds
.
AddRange
(
stuCreateByList
);
}
}
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
list
)
foreach
(
var
item
in
list
)
{
{
var
tempEmp
=
empList
?.
FirstOrDefault
(
qitem
=>
qitem
.
Id
==
item
.
CreateBy
);
var
tempEmp
=
empList
?.
FirstOrDefault
(
qitem
=>
qitem
.
Id
==
item
.
CreateBy
);
var
tempStudent
=
stuList
?.
FirstOrDefault
(
qitem
=>
qitem
.
StuId
==
item
.
StuId
);
if
(
tempStudent
!=
null
)
{
var
tempAssistList
=
assistList
?.
Where
(
qitem
=>
qitem
.
StuId
==
item
.
StuId
)?.
ToList
();
if
(
tempAssistList
!=
null
&&
tempAssistList
.
Count
>
0
)
{
foreach
(
var
subItem
in
tempAssistList
)
{
subItem
.
AssistName
=
empList
?.
FirstOrDefault
(
qitem
=>
qitem
.
Id
==
subItem
.
AssistId
)?.
AccountName
??
""
;
}
}
tempStudent
.
AssistList
=
tempAssistList
;
}
result
.
Add
(
new
result
.
Add
(
new
{
{
item
.
StuId
,
item
.
StuId
,
item
.
StuName
,
item
.
StuName
,
item
.
CreateBy
,
item
.
CreateBy
,
Employee
Name
=
tempEmp
?.
AccountName
,
CreateBy
Name
=
tempEmp
?.
AccountName
,
CreateTime
=
Common
.
ConvertHelper
.
FormatTime
(
item
.
CreateTime
),
CreateTime
=
Common
.
ConvertHelper
.
FormatTime
(
item
.
CreateTime
),
CreateTypeName
=
tempStudent
?.
CreateType
.
ToName
()
??
""
,
StuSourceId
=
tempStudent
?.
StuSourceId
??
0
,
StuSourceIdName
=
tempStudent
?.
StuSourceIdName
??
""
,
AssistList
=
tempStudent
?.
AssistList
?.
Select
(
qitem
=>
new
{
qitem
.
AssistType
,
AssistTypeName
=
qitem
.
AssistType
.
ToName
(),
qitem
.
AssistId
,
qitem
.
AssistName
,
}),
StuStageName
=
stageList
?.
FirstOrDefault
(
qitem
=>
qitem
.
Id
==
tempStudent
.
StuStage
)?.
StageName
??
""
,
StuTypeName
=
stuTypeList
?.
FirstOrDefault
(
qitem
=>
qitem
.
Id
==
tempStudent
.
StuType
)?.
Name
??
""
,
StuCreateByName
=
empList
?.
FirstOrDefault
(
qitem
=>
qitem
.
Id
==
tempStudent
.
CreateBy
)?.
AccountName
??
""
,
StuChannelName
=
channelList
?.
FirstOrDefault
(
qitem
=>
qitem
.
Id
==
tempStudent
.
StuChannel
)?.
Name
??
""
,
StuPurposeName
=
goalList
?.
FirstOrDefault
(
qitem
=>
qitem
.
Id
==
tempStudent
.
StuPurpose
)?.
Name
??
""
,
StuNeedsName
=
needList
?.
FirstOrDefault
(
qitem
=>
qitem
.
Id
==
tempStudent
.
StuNeeds
)?.
Name
??
""
,
});
});
}
}
}
}
...
@@ -2050,7 +2205,6 @@ namespace Edu.Module.User
...
@@ -2050,7 +2205,6 @@ namespace Edu.Module.User
var
list
=
followRepository
.
GetStudentFollowPageRepository
(
pageIndex
,
pageSize
,
out
rowsCount
,
query
);
var
list
=
followRepository
.
GetStudentFollowPageRepository
(
pageIndex
,
pageSize
,
out
rowsCount
,
query
);
if
(
list
!=
null
)
if
(
list
!=
null
)
{
{
//客户阶段列表
//客户阶段列表
var
stageList
=
stageRepository
.
GetStageListRepostory
(
new
Model
.
Entity
.
System
.
RB_Stage
()
var
stageList
=
stageRepository
.
GetStageListRepostory
(
new
Model
.
Entity
.
System
.
RB_Stage
()
{
{
...
...
Edu.WebApi/Controllers/User/UserCenterController.cs
View file @
83d730e9
...
@@ -3326,7 +3326,7 @@ namespace Edu.WebApi.Controllers.User
...
@@ -3326,7 +3326,7 @@ namespace Edu.WebApi.Controllers.User
{
{
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
;
userId
=
base
.
UserInfo
.
Id
;
//
userId = base.UserInfo.Id;
var
list
=
studentModule
.
GetStudentAppointmentPageModule
(
pageModel
.
PageIndex
,
pageModel
.
PageSize
,
out
long
rowsCount
,
userId
);
var
list
=
studentModule
.
GetStudentAppointmentPageModule
(
pageModel
.
PageIndex
,
pageModel
.
PageSize
,
out
long
rowsCount
,
userId
);
pageModel
.
PageData
=
list
;
pageModel
.
PageData
=
list
;
pageModel
.
Count
=
rowsCount
;
pageModel
.
Count
=
rowsCount
;
...
...
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