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
8297ea29
Commit
8297ea29
authored
Jan 24, 2022
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
b1ced265
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
52 additions
and
30 deletions
+52
-30
CustomerStudentModule.cs
Edu.Module.Customer/CustomerStudentModule.cs
+52
-30
No files found.
Edu.Module.Customer/CustomerStudentModule.cs
View file @
8297ea29
...
...
@@ -15,6 +15,7 @@ using Edu.Model.ViewModel.System;
using
Edu.Cache.Customer
;
using
Edu.Repository.StudyAbroad
;
using
Edu.Model.ViewModel.StudyAbroad
;
using
Edu.Common.Enum.System
;
namespace
Edu.Module.Customer
{
...
...
@@ -95,6 +96,11 @@ namespace Edu.Module.Customer
/// </summary>
private
readonly
RB_StudyAbroadRepository
studyAbroadRepository
=
new
RB_StudyAbroadRepository
();
/// <summary>
/// 学员仓储层对象
/// </summary>
private
readonly
RB_StudentRepository
studentRepository
=
new
RB_StudentRepository
();
#
region
学员约访
...
...
@@ -263,6 +269,7 @@ namespace Edu.Module.Customer
bool
flag
=
false
;
string
logContent
=
""
;
string
logTitle
=
""
;
var
assistList
=
student_AssistRepository
.
GetStudentAssistListRepository
(
new
RB_Student_Assist_Extend
()
{
StuId
=
model
.
StuId
});
if
(
model
.
Id
>
0
)
{
var
oldModel
=
GetStudentFollowModule
(
model
.
Id
);
...
...
@@ -280,7 +287,7 @@ namespace Edu.Module.Customer
else
{
#
region
验证用户的类型
var
assistList
=
student_AssistRepository
.
GetStudentAssistListRepository
(
new
RB_Student_Assist_Extend
()
{
StuId
=
model
.
StuId
});
var
assistModel
=
assistList
.
Where
(
x
=>
x
.
AssistId
==
model
.
CreateBy
).
FirstOrDefault
();
model
.
AssistType
=
assistModel
?.
AssistType
??
0
;
#
endregion
...
...
@@ -289,42 +296,57 @@ namespace Edu.Module.Customer
flag
=
newId
>
0
;
logTitle
=
"新增跟进"
;
logContent
=
model
.
Remark
;
if
(
flag
)
}
try
{
//获取学生信息
//var smodel = studentRepository.GetEntity(model.StuId);
//if (smodel != null && smodel.StuStage == Common.Enum.User.StuStageEnum.NewStu)
//{
// Dictionary<string, object> keyValues = new Dictionary<string, object>() {
// { nameof(RB_Student_ViewModel.StuStage), Common.Enum.User.StuStageEnum.PreliminaryCommunication}
// };
// List<WhereHelper> wheres = new List<WhereHelper>() {
// new WhereHelper(){
// FiledName = nameof (RB_Student_ViewModel.StuId),
// FiledValue = model.StuId,
// OperatorEnum =OperatorEnum.Equal
// }
// };
// studentRepository.Update(keyValues, wheres);
// student_LogRepository.Insert(new Model.Entity.Customer.RB_Student_Log()
// {
// LogId = 0,
// CreateBy = model.CreateBy,
// CreateTime = DateTime.Now,
// CreateType = 1,
// Group_Id = model.Group_Id,
// LogContent = "首次跟进,客户阶段由'" + (Common.Enum.User.StuStageEnum.NewStu.ToName()) + "'自动转换为'" + (Common.Enum.User.StuStageEnum.PreliminaryCommunication.ToName()) + "'",
// LogTitle = "客户阶段变更",
// LogType = Common.Enum.Log.StudentLogTypeEnum.BasicInfo,
// StuId = model.StuId
// });
//}
var
smodel
=
studentRepository
.
GetEntity
(
model
.
StuId
);
string
markdownContent
=
$"`学员跟进通知` \n>**概要信息** \n>学员名称:
{
smodel
?.
StuName
??
""
}
\n>跟进内容:
{
model
.
Remark
}
\n>"
;
Common
.
Message
.
PushMessageModel
modelWork
=
new
Common
.
Message
.
PushMessageModel
()
{
CategoryId
=
PushMessageCategoryEnum
.
B2BCustomerStu
,
Content
=
markdownContent
,
CoverImg
=
""
,
CreateByName
=
"系统"
,
JumpUrl
=
""
,
WorkMsgType
=
"markdown"
,
SendTime
=
DateTime
.
Now
,
SendType
=
0
,
Title
=
"新增学员跟进通知"
,
Platform
=
5
,
};
if
(
smodel
!=
null
&&
smodel
.
CreateBy
>
0
)
{
var
queryTargetWorkId
=
accountRepository
.
GetWorkUserIdRepository
(
smodel
.
CreateBy
);
if
(!
string
.
IsNullOrEmpty
(
queryTargetWorkId
))
{
modelWork
.
ReceiveId
=
queryTargetWorkId
;
Common
.
Message
.
MessageHelper
.
SendMessage
(
modelWork
);
}
}
if
(
assistList
!=
null
&&
assistList
.
Count
>
0
)
{
foreach
(
var
item
in
assistList
)
{
var
queryTargetWorkId
=
accountRepository
.
GetWorkUserIdRepository
(
item
.
AssistId
);
if
(!
string
.
IsNullOrEmpty
(
queryTargetWorkId
))
{
modelWork
.
ReceiveId
=
queryTargetWorkId
;
Common
.
Message
.
MessageHelper
.
SendMessage
(
modelWork
);
}
}
}
}
catch
(
Exception
ex
)
{
Common
.
Plugin
.
LogHelper
.
Write
(
ex
,
"SetStudentFollowModule"
);
}
student_LogRepository
.
AddStuLogRepository
(
model
.
StuId
,
Common
.
Enum
.
Log
.
StudentLogTypeEnum
.
Follow
,
logTitle
,
logContent
,
model
.
CreateBy
);
return
flag
;
}
/// <summary>
/// 根据编号获取学员跟进信息
/// </summary>
...
...
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