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
8dd982e2
Commit
8dd982e2
authored
Dec 15, 2021
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
f4579547
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
119 additions
and
125 deletions
+119
-125
StuStageEnum.cs
Edu.Common/Enum/User/StuStageEnum.cs
+0
-46
RB_Student.cs
Edu.Model/Entity/User/RB_Student.cs
+1
-1
RB_Student_ViewModel.cs
Edu.Model/ViewModel/User/RB_Student_ViewModel.cs
+5
-0
OrderModule.cs
Edu.Module.Course/OrderModule.cs
+53
-53
CustomerModule.cs
Edu.Module.Customer/CustomerModule.cs
+14
-4
StudentModule.cs
Edu.Module.User/StudentModule.cs
+14
-0
RB_StudentRepository.cs
Edu.Repository/User/RB_StudentRepository.cs
+10
-2
CustomerStudentController.cs
Edu.WebApi/Controllers/Customer/CustomerStudentController.cs
+16
-1
UserController.cs
Edu.WebApi/Controllers/User/UserController.cs
+6
-18
No files found.
Edu.Common/Enum/User/StuStageEnum.cs
View file @
8dd982e2
...
...
@@ -5,51 +5,5 @@ using System.Text;
namespace
Edu.Common.Enum.User
{
/// <summary>
/// 客户阶段
/// </summary>
public
enum
StuStageEnum
{
/// <summary>
/// 新客户
/// </summary>
[
EnumField
(
"新客户"
)]
NewStu
=
1
,
/// <summary>
/// 初步沟通
/// </summary>
[
EnumField
(
"初步沟通"
)]
PreliminaryCommunication
=
2
,
/// <summary>
/// 试听
/// </summary>
[
EnumField
(
"试听"
)]
Audition
=
3
,
/// <summary>
/// 成交
/// </summary>
[
EnumField
(
"成交"
)]
Clinch
=
4
,
/// <summary>
/// 多次成交
/// </summary>
[
EnumField
(
"多次成交"
)]
MultipleClinch
=
5
,
/// <summary>
/// 已输单
/// </summary>
[
EnumField
(
"已输单"
)]
OutputOrder
=
6
,
/// <summary>
/// 无效
/// </summary>
[
EnumField
(
"无效"
)]
InvalidStu
=
7
,
}
}
Edu.Model/Entity/User/RB_Student.cs
View file @
8dd982e2
...
...
@@ -180,7 +180,7 @@ namespace Edu.Model.Entity.User
/// <summary>
/// 客户阶段(见枚举)
/// </summary>
public
StuStageEnum
StuStage
{
get
;
set
;
}
public
int
StuStage
{
get
;
set
;
}
/// <summary>
/// 收客渠道
...
...
Edu.Model/ViewModel/User/RB_Student_ViewModel.cs
View file @
8dd982e2
...
...
@@ -214,5 +214,10 @@ namespace Edu.Model.ViewModel.User
/// 来源人名称
/// </summary>
public
string
StuSourceIdName
{
get
;
set
;
}
/// <summary>
/// 客户阶段名称
/// </summary>
public
string
StuStageName
{
get
;
set
;
}
}
}
\ No newline at end of file
Edu.Module.Course/OrderModule.cs
View file @
8dd982e2
...
...
@@ -1071,58 +1071,58 @@ namespace Edu.Module.Course
#
region
更新客人阶段
if
(
item
.
IsRenewGuest
==
1
&&
item
.
StuStage
==
Common
.
Enum
.
User
.
StuStageEnum
.
Clinch
)
{
Dictionary
<
string
,
object
>
keyValues
=
new
Dictionary
<
string
,
object
>()
{
{
nameof
(
RB_Student_ViewModel
.
StuStage
),
Common
.
Enum
.
User
.
StuStageEnum
.
MultipleClinch
}
};
List
<
WhereHelper
>
wheres
=
new
List
<
WhereHelper
>()
{
new
WhereHelper
(){
FiledName
=
nameof
(
RB_Student_ViewModel
.
StuId
),
FiledValue
=
item
.
StuId
,
OperatorEnum
=
OperatorEnum
.
Equal
}
};
studentRepository
.
Update
(
keyValues
,
wheres
);
student_LogRepository
.
Insert
(
new
Model
.
Entity
.
Customer
.
RB_Student_Log
()
{
LogId
=
0
,
CreateBy
=
userInfo
.
Id
,
CreateTime
=
DateTime
.
Now
,
CreateType
=
1
,
Group_Id
=
userInfo
.
Group_Id
,
LogContent
=
"首次续课,客户阶段由'"
+
(
Common
.
Enum
.
User
.
StuStageEnum
.
Clinch
.
ToName
())
+
"'自动转换为'"
+
(
Common
.
Enum
.
User
.
StuStageEnum
.
MultipleClinch
.
ToName
())
+
"'"
,
LogTitle
=
"客户阶段变更"
,
LogType
=
Common
.
Enum
.
Log
.
StudentLogTypeEnum
.
BasicInfo
,
StuId
=
item
.
StuId
});
}
else
if
(
item
.
StuStage
<
Common
.
Enum
.
User
.
StuStageEnum
.
Clinch
)
{
Dictionary
<
string
,
object
>
keyValues
=
new
Dictionary
<
string
,
object
>()
{
{
nameof
(
RB_Student_ViewModel
.
StuStage
),
Common
.
Enum
.
User
.
StuStageEnum
.
Clinch
}
};
List
<
WhereHelper
>
wheres
=
new
List
<
WhereHelper
>()
{
new
WhereHelper
(){
FiledName
=
nameof
(
RB_Student_ViewModel
.
StuId
),
FiledValue
=
item
.
StuId
,
OperatorEnum
=
OperatorEnum
.
Equal
}
};
studentRepository
.
Update
(
keyValues
,
wheres
);
student_LogRepository
.
Insert
(
new
Model
.
Entity
.
Customer
.
RB_Student_Log
()
{
LogId
=
0
,
CreateBy
=
userInfo
.
Id
,
CreateTime
=
DateTime
.
Now
,
CreateType
=
1
,
Group_Id
=
userInfo
.
Group_Id
,
LogContent
=
"首次生成订单,客户阶段由'"
+
(
item
.
StuStage
.
ToName
())
+
"'自动转换为'"
+
(
Common
.
Enum
.
User
.
StuStageEnum
.
Clinch
.
ToName
())
+
"'"
,
LogTitle
=
"客户阶段变更"
,
LogType
=
Common
.
Enum
.
Log
.
StudentLogTypeEnum
.
BasicInfo
,
StuId
=
item
.
StuId
});
}
//
if (item.IsRenewGuest == 1 && item.StuStage == Common.Enum.User.StuStageEnum.Clinch)
//
{
//
Dictionary<string, object> keyValues = new Dictionary<string, object>() {
//
{ nameof(RB_Student_ViewModel.StuStage), Common.Enum.User.StuStageEnum.MultipleClinch}
//
};
//
List<WhereHelper> wheres = new List<WhereHelper>() {
//
new WhereHelper(){
//
FiledName = nameof (RB_Student_ViewModel.StuId),
//
FiledValue = item.StuId,
//
OperatorEnum =OperatorEnum.Equal
//
}
//
};
//
studentRepository.Update(keyValues, wheres);
//
student_LogRepository.Insert(new Model.Entity.Customer.RB_Student_Log()
//
{
//
LogId = 0,
//
CreateBy = userInfo.Id,
//
CreateTime = DateTime.Now,
//
CreateType = 1,
//
Group_Id = userInfo.Group_Id,
//
LogContent = "首次续课,客户阶段由'" + (Common.Enum.User.StuStageEnum.Clinch.ToName()) + "'自动转换为'" + (Common.Enum.User.StuStageEnum.MultipleClinch.ToName()) +"'",
//
LogTitle = "客户阶段变更",
//
LogType = Common.Enum.Log.StudentLogTypeEnum.BasicInfo,
//
StuId = item.StuId
//
});
//
}
//
else if (item.StuStage < Common.Enum.User.StuStageEnum.Clinch)
//
{
//
Dictionary<string, object> keyValues = new Dictionary<string, object>() {
//
{ nameof(RB_Student_ViewModel.StuStage), Common.Enum.User.StuStageEnum.Clinch}
//
};
//
List<WhereHelper> wheres = new List<WhereHelper>() {
//
new WhereHelper(){
//
FiledName = nameof (RB_Student_ViewModel.StuId),
//
FiledValue = item.StuId,
//
OperatorEnum =OperatorEnum.Equal
//
}
//
};
//
studentRepository.Update(keyValues, wheres);
//
student_LogRepository.Insert(new Model.Entity.Customer.RB_Student_Log()
//
{
//
LogId = 0,
//
CreateBy = userInfo.Id,
//
CreateTime = DateTime.Now,
//
CreateType = 1,
//
Group_Id = userInfo.Group_Id,
//
LogContent = "首次生成订单,客户阶段由'" + (item.StuStage.ToName()) + "'自动转换为'" + (Common.Enum.User.StuStageEnum.Clinch.ToName()) + "'",
//
LogTitle = "客户阶段变更",
//
LogType = Common.Enum.Log.StudentLogTypeEnum.BasicInfo,
//
StuId = item.StuId
//
});
//
}
#
endregion
}
}
...
...
@@ -2449,7 +2449,7 @@ namespace Edu.Module.Course
UpdateBy
=
dmodel
.
CreateBy
,
UpdateTime
=
DateTime
.
Now
,
CustomerId
=
ordermodel
.
CustomerId
,
StuStage
=
Common
.
Enum
.
User
.
StuStageEnum
.
NewStu
,
StuStage
=
1
,
CreateType
=
Common
.
Enum
.
User
.
StuCreateTypeEnum
.
EmployeeInput
};
studentRepository
.
SetStudentRepository
(
stuModel
);
...
...
Edu.Module.Customer/CustomerModule.cs
View file @
8dd982e2
...
...
@@ -5,6 +5,7 @@ using Edu.Model.CacheModel;
using
Edu.Model.ViewModel.Customer
;
using
Edu.Repository.Customer
;
using
Edu.Repository.Log
;
using
Edu.Repository.System
;
using
Edu.Repository.User
;
using
System
;
using
System.Collections.Generic
;
...
...
@@ -39,6 +40,11 @@ namespace Edu.Module.Customer
/// </summary>
private
readonly
RB_User_ChangeLogRepository
changeLogRepository
=
new
RB_User_ChangeLogRepository
();
/// <summary>
/// 客户阶段仓储层对象
/// </summary>
private
readonly
RB_StageRepository
stageRepository
=
new
RB_StageRepository
();
/// <summary>
/// 获取客户分页列表..
...
...
@@ -330,14 +336,18 @@ namespace Edu.Module.Customer
{
List
<
object
>
RList
=
new
List
<
object
>();
var
list
=
studentRepository
.
GetCustomerStuStageStatistics
(
customerId
,
group_Id
);
var
elist
=
EnumHelper
.
EnumToList
(
typeof
(
Common
.
Enum
.
User
.
StuStageEnum
));
var
elist
=
stageRepository
.
GetStageListRepostory
(
new
Model
.
Entity
.
System
.
RB_Stage
()
{
Group_Id
=
group_Id
});
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
;
foreach
(
var
item
in
elist
)
{
int
Num
=
list
.
Where
(
x
=>
x
.
StuStage
==
item
.
Id
).
FirstOrDefault
()?.
OrderCount
??
0
;
RList
.
Add
(
new
{
StuStage
=
item
.
Id
,
StuStageName
=
item
.
Name
,
StuStageName
=
item
.
Stage
Name
,
StuNum
=
Num
});
}
...
...
Edu.Module.User/StudentModule.cs
View file @
8dd982e2
...
...
@@ -75,6 +75,11 @@ namespace Edu.Module.User
/// </summary>
private
readonly
RB_Visitor_ReserveRepository
visitor_ReserveRepository
=
new
RB_Visitor_ReserveRepository
();
/// <summary>
/// 客户阶段仓储层对象
/// </summary>
private
readonly
RB_StageRepository
stageRepository
=
new
RB_StageRepository
();
/// <summary>
/// 获取学生列表
/// </summary>
...
...
@@ -95,9 +100,15 @@ namespace Edu.Module.User
/// <returns></returns>
public
List
<
RB_Student_ViewModel
>
GetStudentPageListModule
(
int
pageIndex
,
int
pageSize
,
out
long
rowsCount
,
RB_Student_ViewModel
query
)
{
var
list
=
studentRepository
.
GetStudentPageListRepository
(
pageIndex
,
pageSize
,
out
rowsCount
,
query
);
if
(
list
!=
null
&&
list
.
Count
>
0
)
{
//客户阶段列表
var
stageList
=
stageRepository
.
GetStageListRepostory
(
new
Model
.
Entity
.
System
.
RB_Stage
()
{
Group_Id
=
list
[
0
].
Group_Id
});
string
stuIds
=
string
.
Join
(
","
,
list
.
Select
(
qitem
=>
qitem
.
StuId
));
//学员跟进
var
followList
=
followRepository
.
GetStudentFollowListRepository
(
new
Model
.
ViewModel
.
Customer
.
RB_Student_Follow_Extend
()
...
...
@@ -211,6 +222,8 @@ namespace Edu.Module.User
{
item
.
StuSourceIdName
=
customerList
?.
FirstOrDefault
(
qitem
=>
qitem
.
CustomerId
==
item
.
StuSourceId
)?.
CustomerName
??
""
;
}
item
.
StuStageName
=
stageList
?.
FirstOrDefault
(
qitem
=>
qitem
.
Id
==
item
.
StuStage
)?.
StageName
??
""
;
}
}
return
list
;
...
...
@@ -323,6 +336,7 @@ namespace Edu.Module.User
StuId
=
extModel
.
StuId
});
extModel
.
AssistList
=
assistList
;
extModel
.
StuStageName
=
stageRepository
.
GetEntity
(
extModel
.
StuStage
)?.
StageName
??
""
;
}
return
extModel
;
}
...
...
Edu.Repository/User/RB_StudentRepository.cs
View file @
8dd982e2
...
...
@@ -2,6 +2,7 @@
using
Edu.Common.Plugin
;
using
Edu.Model.ViewModel.User
;
using
Edu.Repository.Customer
;
using
Edu.Repository.System
;
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
...
...
@@ -31,6 +32,11 @@ namespace Edu.Repository.User
/// </summary>
private
readonly
RB_Student_AssistRepository
student_AssistRepository
=
new
RB_Student_AssistRepository
();
/// <summary>
/// 客户阶段仓储层对象
/// </summary>
private
readonly
RB_StageRepository
stageRepository
=
new
RB_StageRepository
();
/// <summary>
/// 获取学生列表
/// </summary>
...
...
@@ -296,7 +302,9 @@ WHERE o.OrderState=1 and og.`Status`=0 and sog.`Status`=0 and og.GuestState=1 an
}
if
(
oldModel
.
StuStage
!=
model
.
StuStage
)
{
logContent
+=
string
.
Format
(
"客户阶段:由【{0}】=>【{1}】,"
,
oldModel
.
StuStage
.
ToName
(),
model
.
StuStage
.
ToName
());
var
oldName
=
stageRepository
.
GetEntity
(
oldModel
.
StuStage
)?.
StageName
??
""
;
var
newName
=
stageRepository
.
GetEntity
(
model
.
StuStage
)?.
StageName
??
""
;
logContent
+=
string
.
Format
(
"客户阶段:由【{0}】=>【{1}】,"
,
oldName
,
newName
);
}
if
(
oldModel
.
StuSource
!=
model
.
StuSource
)
{
...
...
@@ -352,7 +360,7 @@ WHERE o.OrderState=1 and og.`Status`=0 and sog.`Status`=0 and og.GuestState=1 an
{
if
(
model
.
StuStage
<=
0
)
{
model
.
StuStage
=
Common
.
Enum
.
User
.
StuStageEnum
.
NewStu
;
model
.
StuStage
=
1
;
}
var
newId
=
base
.
Insert
(
model
);
model
.
StuId
=
newId
;
...
...
Edu.WebApi/Controllers/Customer/CustomerStudentController.cs
View file @
8dd982e2
...
...
@@ -482,7 +482,7 @@ namespace Edu.WebApi.Controllers.Customer
}
/// <summary>
/// 获取客户阶段
/// 获取客户阶段
列表
/// </summary>
/// <returns></returns>
[
HttpPost
]
...
...
@@ -496,6 +496,21 @@ namespace Edu.WebApi.Controllers.Customer
return
ApiResult
.
Success
(
data
:
list
);
}
/// <summary>
/// 获取客户阶段下拉列表
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
GetStageDropdownList
()
{
var
query
=
new
RB_Stage
()
{
Group_Id
=
base
.
UserInfo
.
Group_Id
};
var
list
=
customerStudentModule
.
GetStageListModule
(
query
);
return
ApiResult
.
Success
(
data
:
list
.
Select
(
qitem
=>
new
{
Id
=
qitem
.
Id
,
Name
=
qitem
.
StageName
}));
}
/// <summary>
/// 新增修改客户阶段
/// </summary>
...
...
Edu.WebApi/Controllers/User/UserController.cs
View file @
8dd982e2
...
...
@@ -666,7 +666,7 @@ namespace Edu.WebApi.Controllers.User
CreateBy
=
base
.
ParmJObj
.
GetInt
(
"CreateBy"
),
IsQueryMyStu
=
base
.
ParmJObj
.
GetInt
(
"IsQueryMyStu"
),
CustomerId
=
base
.
ParmJObj
.
GetInt
(
"CustomerId"
),
StuStage
=
(
StuStageEnum
)
base
.
ParmJObj
.
GetInt
(
"StuStage"
),
StuStage
=
base
.
ParmJObj
.
GetInt
(
"StuStage"
),
StartTime
=
base
.
ParmJObj
.
GetStringValue
(
"StartTime"
),
EndTime
=
base
.
ParmJObj
.
GetStringValue
(
"EndTime"
),
};
...
...
@@ -704,7 +704,7 @@ namespace Edu.WebApi.Controllers.User
StuSexStr
=
item
.
StuSex
==
0
?
"男"
:
"女"
,
StuBirth
=
Common
.
ConvertHelper
.
FormatDate
(
item
.
StuBirth
),
item
.
StuStage
,
StuStageName
=
item
.
StuStage
.
ToName
()
,
item
.
StuStageName
,
CreateTimeStr
=
Common
.
ConvertHelper
.
FormatTime
(
item
.
CreateTime
),
item
.
CreateByName
,
item
.
CreateType
,
...
...
@@ -784,7 +784,7 @@ namespace Edu.WebApi.Controllers.User
StuContractMobile
=
base
.
ParmJObj
.
GetStringValue
(
"StuContractMobile"
),
StuIDCard
=
base
.
ParmJObj
.
GetStringValue
(
"StuIDCard"
),
StuIDCardAddress
=
base
.
ParmJObj
.
GetStringValue
(
"StuIDCardAddress"
),
StuStage
=
(
StuStageEnum
)
base
.
ParmJObj
.
GetInt
(
"StuStage"
),
StuStage
=
base
.
ParmJObj
.
GetInt
(
"StuStage"
),
StuChannel
=
(
StuChannelEnum
)
base
.
ParmJObj
.
GetInt
(
"StuChannel"
),
PlatformName
=
base
.
ParmJObj
.
GetStringValue
(
"PlatformName"
),
CreateType
=(
StuCreateTypeEnum
)
base
.
ParmJObj
.
GetInt
(
"CreateType"
),
...
...
@@ -892,12 +892,12 @@ namespace Edu.WebApi.Controllers.User
StuContractMobile
=
base
.
ParmJObj
.
GetStringValue
(
"StuContractMobile"
),
StuIDCard
=
base
.
ParmJObj
.
GetStringValue
(
"StuIDCard"
),
StuIDCardAddress
=
base
.
ParmJObj
.
GetStringValue
(
"StuIDCardAddress"
),
StuStage
=
(
StuStageEnum
)
base
.
ParmJObj
.
GetInt
(
"StuStage"
),
StuStage
=
base
.
ParmJObj
.
GetInt
(
"StuStage"
),
};
extModel
.
CreateType
=
StuCreateTypeEnum
.
CustomerInput
;
if
(
extModel
.
StuId
==
0
)
{
extModel
.
StuStage
=
StuStageEnum
.
NewStu
;
extModel
.
StuStage
=
1
;
}
extModel
.
Status
=
DateStateEnum
.
Normal
;
extModel
.
StuStatus
=
1
;
...
...
@@ -1022,7 +1022,7 @@ namespace Edu.WebApi.Controllers.User
extModel
.
CreateType
,
CreateTypeStr
=
extModel
.
CreateType
.
ToName
(),
extModel
.
StuStage
,
StuStageName
=
extModel
.
StuStage
.
ToName
()
,
extModel
.
StuStageName
,
extModel
.
CreateBy
,
extModel
.
StuChannel
,
StuChannelName
=
extModel
.
StuChannel
.
ToName
(),
...
...
@@ -1062,18 +1062,6 @@ namespace Edu.WebApi.Controllers.User
return
ApiResult
.
Success
(
data
:
list
);
}
/// <summary>
/// 获取客户状态列表
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
GetStuStageList
()
{
var
list
=
Common
.
Plugin
.
EnumHelper
.
EnumToList
(
typeof
(
StuStageEnum
));
return
ApiResult
.
Success
(
data
:
list
);
}
/// <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