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
3496dc0c
Commit
3496dc0c
authored
Dec 09, 2021
by
liudong1993
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://gitlab.oytour.com/Kui2/education
parents
23e15b9b
215aa8aa
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
1193 additions
and
49 deletions
+1193
-49
StudentLogTypeEnum.cs
Edu.Common/Enum/Log/StudentLogTypeEnum.cs
+37
-0
StuStageEnum.cs
Edu.Common/Enum/User/StuStageEnum.cs
+55
-0
RB_Student_Appointment.cs
Edu.Model/Entity/Customer/RB_Student_Appointment.cs
+76
-0
RB_Student_Follow.cs
Edu.Model/Entity/Customer/RB_Student_Follow.cs
+61
-0
RB_Student_Log.cs
Edu.Model/Entity/Customer/RB_Student_Log.cs
+56
-0
RB_Student_Visit.cs
Edu.Model/Entity/Customer/RB_Student_Visit.cs
+86
-0
RB_Student.cs
Edu.Model/Entity/User/RB_Student.cs
+11
-0
RB_Student_Appointment_Extend.cs
...Model/ViewModel/Customer/RB_Student_Appointment_Extend.cs
+14
-0
RB_Student_Follow_Extend.cs
Edu.Model/ViewModel/Customer/RB_Student_Follow_Extend.cs
+15
-0
RB_Student_Log_Extend.cs
Edu.Model/ViewModel/Customer/RB_Student_Log_Extend.cs
+15
-0
RB_Student_Visit_Extend.cs
Edu.Model/ViewModel/Customer/RB_Student_Visit_Extend.cs
+14
-0
RB_Student_ViewModel.cs
Edu.Model/ViewModel/User/RB_Student_ViewModel.cs
+1
-1
CustomerStudentModule.cs
Edu.Module.Customer/CustomerStudentModule.cs
+253
-0
RB_Student_AppointmentRepository.cs
Edu.Repository/Customer/RB_Student_AppointmentRepository.cs
+35
-0
RB_Student_FollowRepository.cs
Edu.Repository/Customer/RB_Student_FollowRepository.cs
+35
-0
RB_Student_LogRepository.cs
Edu.Repository/Customer/RB_Student_LogRepository.cs
+72
-0
RB_Student_VisitRepository.cs
Edu.Repository/Customer/RB_Student_VisitRepository.cs
+38
-0
RB_StudentRepository.cs
Edu.Repository/User/RB_StudentRepository.cs
+1
-0
CustomerStudentController.cs
Edu.WebApi/Controllers/Customer/CustomerStudentController.cs
+252
-0
UserController.cs
Edu.WebApi/Controllers/User/UserController.cs
+66
-48
No files found.
Edu.Common/Enum/Log/StudentLogTypeEnum.cs
0 → 100644
View file @
3496dc0c
using
Edu.Common.Plugin
;
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
namespace
Edu.Common.Enum.Log
{
/// <summary>
/// 学员日志类型
/// </summary>
public
enum
StudentLogTypeEnum
{
/// <summary>
/// 到访
/// </summary>
[
EnumField
(
"到访"
)]
Visit
=
1
,
/// <summary>
/// 约访
/// </summary>
[
EnumField
(
"约访"
)]
Appointment
=
2
,
/// <summary>
/// 跟进
/// </summary>
[
EnumField
(
"跟进"
)]
Follow
=
3
,
/// <summary>
/// 试听
/// </summary>
[
EnumField
(
"试听"
)]
TrialLesson
=
4
,
}
}
Edu.Common/Enum/User/StuStageEnum.cs
0 → 100644
View file @
3496dc0c
using
Edu.Common.Plugin
;
using
System
;
using
System.Collections.Generic
;
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
(
"商机测试"
)]
BusinessTest
=
3
,
/// <summary>
/// 成交
/// </summary>
[
EnumField
(
"成交"
)]
Clinch
=
4
,
/// <summary>
/// 多次成交
/// </summary>
[
EnumField
(
"多次成交"
)]
MultipleClinch
=
5
,
/// <summary>
/// 已输单
/// </summary>
[
EnumField
(
"已输单"
)]
OutputOrder
=
6
,
/// <summary>
/// 无效
/// </summary>
[
EnumField
(
"无效"
)]
InvalidStu
=
7
,
}
}
Edu.Model/Entity/Customer/RB_Student_Appointment.cs
0 → 100644
View file @
3496dc0c
using
Edu.Common.Enum
;
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
using
VT.FW.DB
;
namespace
Edu.Model.Entity.Customer
{
/// <summary>
/// 学员约访表实体类
/// </summary>
[
Serializable
]
[
DB
(
ConnectionName
=
"DefaultConnection"
)]
public
class
RB_Student_Appointment
{
/// <summary>
/// 约访编号
/// </summary>
public
int
Id
{
get
;
set
;
}
/// <summary>
/// 学员编号
/// </summary>
public
int
StuId
{
get
;
set
;
}
/// <summary>
/// 约访地点
/// </summary>
public
string
AppointmentPoint
{
get
;
set
;
}
/// <summary>
/// 约访时间
/// </summary>
public
DateTime
AppointmentTime
{
get
;
set
;
}
/// <summary>
/// 备注
/// </summary>
public
string
Remark
{
get
;
set
;
}
/// <summary>
/// 反馈
/// </summary>
public
string
Feedback
{
get
;
set
;
}
/// <summary>
/// 集团编号
/// </summary>
public
int
Group_Id
{
get
;
set
;
}
/// <summary>
/// 创建人
/// </summary>
public
int
CreateBy
{
get
;
set
;
}
/// <summary>
/// 创建时间
/// </summary>
public
DateTime
CreateTime
{
get
;
set
;
}
/// <summary>
/// 修改人
/// </summary>
public
int
UpdateBy
{
get
;
set
;
}
/// <summary>
/// 更新时间
/// </summary>
public
DateTime
UpdateTime
{
get
;
set
;
}
/// <summary>
/// 删除状态(0-正常,1-禁用)
/// </summary>
public
DateStateEnum
Status
{
get
;
set
;
}
}
}
Edu.Model/Entity/Customer/RB_Student_Follow.cs
0 → 100644
View file @
3496dc0c
using
Edu.Common.Enum
;
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
using
VT.FW.DB
;
namespace
Edu.Model.Entity.Customer
{
/// <summary>
/// 学员跟进实体类
/// </summary>
[
Serializable
]
[
DB
(
ConnectionName
=
"DefaultConnection"
)]
public
class
RB_Student_Follow
{
/// <summary>
/// 跟进编号
/// </summary>
public
int
Id
{
get
;
set
;
}
/// <summary>
/// 学员编号
/// </summary>
public
int
StuId
{
get
;
set
;
}
/// <summary>
/// 跟进内容
/// </summary>
public
string
Remark
{
get
;
set
;
}
/// <summary>
/// 集团编号
/// </summary>
public
int
Group_Id
{
get
;
set
;
}
/// <summary>
/// 创建人
/// </summary>
public
int
CreateBy
{
get
;
set
;
}
/// <summary>
/// 创建时间
/// </summary>
public
DateTime
CreateTime
{
get
;
set
;
}
/// <summary>
/// 修改人
/// </summary>
public
int
UpdateBy
{
get
;
set
;
}
/// <summary>
/// 更新时间
/// </summary>
public
DateTime
UpdateTime
{
get
;
set
;
}
/// <summary>
/// 删除状态(0-正常,1-禁用)
/// </summary>
public
DateStateEnum
Status
{
get
;
set
;
}
}
}
Edu.Model/Entity/Customer/RB_Student_Log.cs
0 → 100644
View file @
3496dc0c
using
Edu.Common.Enum.Log
;
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
using
VT.FW.DB
;
namespace
Edu.Model.Entity.Customer
{
/// <summary>
/// 学员日志实体类
/// </summary>
[
Serializable
]
[
DB
(
ConnectionName
=
"DefaultConnection"
)]
public
class
RB_Student_Log
{
/// <summary>
/// 日志编号
/// </summary>
public
int
LogId
{
get
;
set
;
}
/// <summary>
/// 学员编号
/// </summary>
public
int
StuId
{
get
;
set
;
}
/// <summary>
/// 日志类型(见枚举)
/// </summary>
public
StudentLogTypeEnum
LogType
{
get
;
set
;
}
/// <summary>
/// 日志内容
/// </summary>
public
string
LogContent
{
get
;
set
;
}
/// <summary>
/// 创建人类型(1-系统用户,2-同行用户)
/// </summary>
public
int
CreateType
{
get
;
set
;
}
/// <summary>
/// 创建人
/// </summary>
public
int
CreateBy
{
get
;
set
;
}
/// <summary>
/// 创建时间
/// </summary>
public
DateTime
CreateTime
{
get
;
set
;
}
/// <summary>
/// 集团编号
/// </summary>
public
int
Group_Id
{
get
;
set
;
}
}
}
Edu.Model/Entity/Customer/RB_Student_Visit.cs
0 → 100644
View file @
3496dc0c
using
Edu.Common.Enum
;
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
using
VT.FW.DB
;
namespace
Edu.Model.Entity.Customer
{
/// <summary>
/// 学员到访表实体类
/// </summary>
[
Serializable
]
[
DB
(
ConnectionName
=
"DefaultConnection"
)]
public
class
RB_Student_Visit
{
/// <summary>
/// 到访编号
/// </summary>
public
int
Id
{
get
;
set
;
}
/// <summary>
/// 学员编号
/// </summary>
public
int
StuId
{
get
;
set
;
}
/// <summary>
/// 到访校区
/// </summary>
public
int
School_Id
{
get
;
set
;
}
/// <summary>
/// 日期
/// </summary>
public
DateTime
Date
{
get
;
set
;
}
/// <summary>
/// 到访时间
/// </summary>
public
string
VisitTime
{
get
;
set
;
}
/// <summary>
/// 接待人
/// </summary>
public
int
ReceptionPersion
{
get
;
set
;
}
/// <summary>
/// 备注
/// </summary>
public
string
Remark
{
get
;
set
;
}
/// <summary>
/// 反馈
/// </summary>
public
string
Feedback
{
get
;
set
;
}
/// <summary>
/// 集团编号
/// </summary>
public
int
Group_Id
{
get
;
set
;
}
/// <summary>
/// 创建人
/// </summary>
public
int
CreateBy
{
get
;
set
;
}
/// <summary>
/// 创建时间
/// </summary>
public
DateTime
CreateTime
{
get
;
set
;
}
/// <summary>
/// 修改人
/// </summary>
public
int
UpdateBy
{
get
;
set
;
}
/// <summary>
/// 更新时间
/// </summary>
public
DateTime
UpdateTime
{
get
;
set
;
}
/// <summary>
/// 删除状态(0-正常,1-禁用)
/// </summary>
public
DateStateEnum
Status
{
get
;
set
;
}
}
}
Edu.Model/Entity/User/RB_Student.cs
View file @
3496dc0c
using
Edu.Common.Enum
;
using
Edu.Common.Enum
;
using
Edu.Common.Enum.Course
;
using
Edu.Common.Enum.Course
;
using
Edu.Common.Enum.User
;
using
System
;
using
System
;
using
VT.FW.DB
;
using
VT.FW.DB
;
...
@@ -165,5 +166,15 @@ namespace Edu.Model.Entity.User
...
@@ -165,5 +166,15 @@ namespace Edu.Model.Entity.User
/// 身份证居住地
/// 身份证居住地
/// </summary>
/// </summary>
public
string
StuIDCardAddress
{
get
;
set
;
}
public
string
StuIDCardAddress
{
get
;
set
;
}
/// <summary>
/// 录入方式(1-员工录入,2-同业录入)
/// </summary>
public
int
CreateType
{
get
;
set
;
}
/// <summary>
/// 客户阶段(见枚举)
/// </summary>
public
StuStageEnum
StuStage
{
get
;
set
;
}
}
}
}
}
Edu.Model/ViewModel/Customer/RB_Student_Appointment_Extend.cs
0 → 100644
View file @
3496dc0c
using
Edu.Model.Entity.Customer
;
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
namespace
Edu.Model.ViewModel.Customer
{
/// <summary>
/// 学员约访表扩展实体类
/// </summary>
public
class
RB_Student_Appointment_Extend
:
RB_Student_Appointment
{
}
}
Edu.Model/ViewModel/Customer/RB_Student_Follow_Extend.cs
0 → 100644
View file @
3496dc0c
using
Edu.Model.Entity.Customer
;
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
namespace
Edu.Model.ViewModel.Customer
{
/// <summary>
/// 学员跟进扩展实体类
/// </summary>
public
class
RB_Student_Follow_Extend
:
RB_Student_Follow
{
}
}
Edu.Model/ViewModel/Customer/RB_Student_Log_Extend.cs
0 → 100644
View file @
3496dc0c
using
Edu.Model.Entity.Customer
;
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
namespace
Edu.Model.ViewModel.Customer
{
/// <summary>
/// 学员日志扩展实体类
/// </summary>
public
class
RB_Student_Log_Extend
:
RB_Student_Log
{
}
}
Edu.Model/ViewModel/Customer/RB_Student_Visit_Extend.cs
0 → 100644
View file @
3496dc0c
using
Edu.Model.Entity.Customer
;
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
namespace
Edu.Model.ViewModel.Customer
{
/// <summary>
/// 学员到访表扩展实体类
/// </summary>
public
class
RB_Student_Visit_Extend
:
RB_Student_Visit
{
}
}
Edu.Model/ViewModel/User/RB_Student_ViewModel.cs
View file @
3496dc0c
...
@@ -8,7 +8,7 @@ namespace Edu.Model.ViewModel.User
...
@@ -8,7 +8,7 @@ namespace Edu.Model.ViewModel.User
/// 学生视图实体类
/// 学生视图实体类
/// </summary>
/// </summary>
[
Serializable
]
[
Serializable
]
public
class
RB_Student_ViewModel
:
Model
.
Entity
.
User
.
RB_Student
public
class
RB_Student_ViewModel
:
Entity
.
User
.
RB_Student
{
{
/// <summary>
/// <summary>
/// 创建人姓名
/// 创建人姓名
...
...
Edu.Module.Customer/CustomerStudentModule.cs
0 → 100644
View file @
3496dc0c
using
Edu.Common.Enum
;
using
Edu.Model.ViewModel.Customer
;
using
Edu.Repository.Customer
;
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
using
VT.FW.DB
;
namespace
Edu.Module.Customer
{
/// <summary>
/// 客户学员处理类对象
/// </summary>
public
class
CustomerStudentModule
{
/// <summary>
/// 学员约访表仓储层对象
/// </summary>
private
readonly
RB_Student_AppointmentRepository
student_AppointmentRepository
=
new
RB_Student_AppointmentRepository
();
/// <summary>
/// 学员跟进仓储层对象
/// </summary>
private
readonly
RB_Student_FollowRepository
student_FollowRepository
=
new
RB_Student_FollowRepository
();
/// <summary>
/// 学员到访表仓储层对象
/// </summary>
private
readonly
RB_Student_VisitRepository
student_VisitRepository
=
new
RB_Student_VisitRepository
();
/// <summary>
/// 学员日志仓储层对象
/// </summary>
private
readonly
RB_Student_LogRepository
student_LogRepository
=
new
RB_Student_LogRepository
();
#
region
学员约访
/// <summary>
/// 获取学员约访分页列表
/// </summary>
/// <param name="pageIndex"></param>
/// <param name="pageSize"></param>
/// <param name="rowsCount"></param>
/// <param name="query"></param>
/// <returns></returns>
public
List
<
RB_Student_Appointment_Extend
>
GetStudentAppointmentPageModule
(
int
pageIndex
,
int
pageSize
,
out
long
rowsCount
,
RB_Student_Appointment_Extend
query
)
{
return
student_AppointmentRepository
.
GetStudentAppointmentPageRepository
(
pageIndex
,
pageSize
,
out
rowsCount
,
query
);
}
/// <summary>
/// 新增学员约访
/// </summary>
/// <param name="model"></param>
/// <returns></returns>
public
bool
SetStudentAppointmentModule
(
RB_Student_Appointment_Extend
model
)
{
bool
flag
=
false
;
string
logContent
=
""
;
if
(
model
.
Id
>
0
)
{
Dictionary
<
string
,
object
>
fileds
=
new
Dictionary
<
string
,
object
>()
{
{
nameof
(
RB_Student_Appointment_Extend
.
AppointmentPoint
),
model
.
AppointmentPoint
},
{
nameof
(
RB_Student_Appointment_Extend
.
AppointmentTime
),
model
.
AppointmentTime
},
{
nameof
(
RB_Student_Appointment_Extend
.
Remark
),
model
.
Remark
},
{
nameof
(
RB_Student_Appointment_Extend
.
Feedback
),
model
.
Feedback
},
};
flag
=
student_AppointmentRepository
.
Update
(
fileds
,
new
WhereHelper
(
nameof
(
RB_Student_Appointment_Extend
.
Id
),
model
.
Id
));
}
else
{
var
newId
=
student_AppointmentRepository
.
Insert
(
model
);
model
.
Id
=
newId
;
flag
=
newId
>
0
;
}
student_LogRepository
.
AddStuLogRepository
(
model
.
StuId
,
Common
.
Enum
.
Log
.
StudentLogTypeEnum
.
Appointment
,
logContent
,
model
.
CreateBy
);
return
flag
;
}
/// <summary>
/// 根据编号获取学员约访信息
/// </summary>
/// <param name="Id"></param>
/// <returns></returns>
public
RB_Student_Appointment_Extend
GetStudentAppointmentModule
(
object
Id
)
{
var
extModel
=
student_AppointmentRepository
.
GetEntity
<
RB_Student_Appointment_Extend
>(
Id
);
return
extModel
;
}
/// <summary>
/// 删除学员约访
/// </summary>
/// <param name="Id"></param>
/// <returns></returns>
public
bool
RemoveStudentAppointmentModule
(
object
Id
)
{
bool
flag
=
false
;
Dictionary
<
string
,
object
>
fileds
=
new
Dictionary
<
string
,
object
>()
{
{
nameof
(
RB_Student_Appointment_Extend
.
Status
),(
int
)
DateStateEnum
.
Delete
}
};
flag
=
student_AppointmentRepository
.
Update
(
fileds
,
new
WhereHelper
(
nameof
(
RB_Student_Appointment_Extend
.
Id
),
Id
));
return
flag
;
}
#
endregion
#
region
学员跟进
/// <summary>
/// 获取学员跟进分页列表
/// </summary>
/// <param name="pageIndex"></param>
/// <param name="pageSize"></param>
/// <param name="rowsCount"></param>
/// <param name="query"></param>
/// <returns></returns>
public
List
<
RB_Student_Follow_Extend
>
GetStudentFollowPageModule
(
int
pageIndex
,
int
pageSize
,
out
long
rowsCount
,
RB_Student_Follow_Extend
query
)
{
return
student_FollowRepository
.
GetStudentFollowPageRepository
(
pageIndex
,
pageSize
,
out
rowsCount
,
query
);
}
/// <summary>
/// 新增修改学员跟进
/// </summary>
/// <param name="model"></param>
/// <returns></returns>
public
bool
SetStudentFollowModule
(
RB_Student_Follow_Extend
model
)
{
bool
flag
=
false
;
string
logContent
=
""
;
if
(
model
.
Id
>
0
)
{
Dictionary
<
string
,
object
>
fileds
=
new
Dictionary
<
string
,
object
>()
{
{
nameof
(
RB_Student_Follow_Extend
.
Remark
),
model
.
Remark
}
};
flag
=
student_FollowRepository
.
Update
(
fileds
,
new
WhereHelper
(
nameof
(
RB_Student_Follow_Extend
.
Id
),
model
.
Id
));
}
else
{
var
newId
=
student_FollowRepository
.
Insert
(
model
);
model
.
Id
=
newId
;
flag
=
newId
>
0
;
}
student_LogRepository
.
AddStuLogRepository
(
model
.
StuId
,
Common
.
Enum
.
Log
.
StudentLogTypeEnum
.
Follow
,
logContent
,
model
.
CreateBy
);
return
flag
;
}
/// <summary>
/// 根据编号获取学员跟进信息
/// </summary>
/// <param name="Id"></param>
/// <returns></returns>
public
RB_Student_Follow_Extend
GetStudentFollowModule
(
object
Id
)
{
var
extModel
=
student_FollowRepository
.
GetEntity
<
RB_Student_Follow_Extend
>(
Id
);
return
extModel
;
}
/// <summary>
/// 根据跟进编号删除学员跟进信息
/// </summary>
/// <param name="Id"></param>
/// <returns></returns>
public
bool
RemoveStudentFollowModule
(
object
Id
)
{
Dictionary
<
string
,
object
>
fileds
=
new
Dictionary
<
string
,
object
>()
{
{
nameof
(
RB_Student_Follow_Extend
.
Status
),
(
int
)
DateStateEnum
.
Delete
}
};
return
student_FollowRepository
.
Update
(
fileds
,
new
WhereHelper
(
nameof
(
RB_Student_Follow_Extend
.
Id
),
Id
));
}
#
endregion
#
region
学员到访
/// <summary>
/// 获取学员到访分页列表
/// </summary>
/// <param name="pageIndex"></param>
/// <param name="pageSize"></param>
/// <param name="rowsCount"></param>
/// <param name="query"></param>
/// <returns></returns>
public
List
<
RB_Student_Visit_Extend
>
GetStudentVisitPageModule
(
int
pageIndex
,
int
pageSize
,
out
long
rowsCount
,
RB_Student_Visit_Extend
query
)
{
return
student_VisitRepository
.
GetStudentVisitPageRepository
(
pageIndex
,
pageSize
,
out
rowsCount
,
query
);
}
/// <summary>
/// 新增修改学员到访
/// </summary>
/// <param name="model"></param>
/// <returns></returns>
public
bool
SetStudentVisitModule
(
RB_Student_Visit_Extend
model
)
{
bool
flag
=
false
;
string
logContent
=
""
;
if
(
model
.
Id
>
0
)
{
Dictionary
<
string
,
object
>
fileds
=
new
Dictionary
<
string
,
object
>()
{
{
nameof
(
RB_Student_Visit_Extend
.
School_Id
),
model
.
School_Id
},
{
nameof
(
RB_Student_Visit_Extend
.
Date
),
model
.
Date
},
{
nameof
(
RB_Student_Visit_Extend
.
VisitTime
),
model
.
VisitTime
},
{
nameof
(
RB_Student_Visit_Extend
.
ReceptionPersion
),
model
.
ReceptionPersion
},
{
nameof
(
RB_Student_Visit_Extend
.
Remark
),
model
.
Remark
},
{
nameof
(
RB_Student_Visit_Extend
.
Feedback
),
model
.
Feedback
},
};
flag
=
student_VisitRepository
.
Update
(
fileds
,
new
WhereHelper
(
nameof
(
RB_Student_Visit_Extend
.
Id
),
model
.
Id
));
}
else
{
var
newId
=
student_VisitRepository
.
Insert
(
model
);
model
.
Id
=
newId
;
flag
=
newId
>
0
;
}
student_LogRepository
.
AddStuLogRepository
(
model
.
StuId
,
Common
.
Enum
.
Log
.
StudentLogTypeEnum
.
Visit
,
logContent
,
model
.
CreateBy
);
return
flag
;
}
/// <summary>
/// 根据编号获取学员到访信息
/// </summary>
/// <param name="id"></param>
/// <returns></returns>
public
RB_Student_Visit_Extend
GetStudentVisitModule
(
object
id
)
{
var
extModel
=
student_VisitRepository
.
GetEntity
<
RB_Student_Visit_Extend
>(
id
);
return
extModel
;
}
/// <summary>
/// 根据到访编号删除学员到访信息
/// </summary>
/// <param name="Id"></param>
/// <returns></returns>
public
bool
RemoveStudentVisitModule
(
object
Id
)
{
Dictionary
<
string
,
object
>
fileds
=
new
Dictionary
<
string
,
object
>()
{
{
nameof
(
RB_Student_Visit_Extend
.
Status
),
(
int
)
DateStateEnum
.
Delete
}
};
return
student_VisitRepository
.
Update
(
fileds
,
new
WhereHelper
(
nameof
(
RB_Student_Visit_Extend
.
Id
),
Id
));
}
#
endregion
}
}
Edu.Repository/Customer/RB_Student_AppointmentRepository.cs
0 → 100644
View file @
3496dc0c
using
Edu.Model.Entity.Customer
;
using
Edu.Model.ViewModel.Customer
;
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
namespace
Edu.Repository.Customer
{
/// <summary>
/// 学员约访表仓储层
/// </summary>
public
class
RB_Student_AppointmentRepository
:
BaseRepository
<
RB_Student_Appointment
>
{
/// <summary>
/// 获取学员约访分页列表
/// </summary>
/// <param name="pageIndex"></param>
/// <param name="pageSize"></param>
/// <param name="rowsCount"></param>
/// <param name="query"></param>
/// <returns></returns>
public
List
<
RB_Student_Appointment_Extend
>
GetStudentAppointmentPageRepository
(
int
pageIndex
,
int
pageSize
,
out
long
rowsCount
,
RB_Student_Appointment_Extend
query
)
{
StringBuilder
builder
=
new
StringBuilder
();
builder
.
AppendFormat
(
@"
SELECT A.*
FROM RB_Student_Appointment AS A
WHERE 1=1
"
);
return
GetPage
<
RB_Student_Appointment_Extend
>(
pageIndex
,
pageSize
,
out
rowsCount
,
builder
.
ToString
()).
ToList
();
}
}
}
Edu.Repository/Customer/RB_Student_FollowRepository.cs
0 → 100644
View file @
3496dc0c
using
Edu.Model.Entity.Customer
;
using
Edu.Model.ViewModel.Customer
;
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
namespace
Edu.Repository.Customer
{
/// <summary>
/// 学员跟进仓储层
/// </summary>
public
class
RB_Student_FollowRepository
:
BaseRepository
<
RB_Student_Follow
>
{
/// <summary>
/// 获取学员跟进分页列表
/// </summary>
/// <param name="pageIndex"></param>
/// <param name="pageSize"></param>
/// <param name="rowsCount"></param>
/// <param name="query"></param>
/// <returns></returns>
public
List
<
RB_Student_Follow_Extend
>
GetStudentFollowPageRepository
(
int
pageIndex
,
int
pageSize
,
out
long
rowsCount
,
RB_Student_Follow_Extend
query
)
{
StringBuilder
builder
=
new
StringBuilder
();
builder
.
AppendFormat
(
@"
SELECT A.*
FROM RB_Student_Follow AS A
WHERE 1=1
"
);
return
GetPage
<
RB_Student_Follow_Extend
>(
pageIndex
,
pageSize
,
out
rowsCount
,
builder
.
ToString
()).
ToList
();
}
}
}
Edu.Repository/Customer/RB_Student_LogRepository.cs
0 → 100644
View file @
3496dc0c
using
Edu.Common.Enum.Log
;
using
Edu.Model.Entity.Customer
;
using
Edu.Model.ViewModel.Customer
;
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
namespace
Edu.Repository.Customer
{
/// <summary>
/// 学员日志仓储层
/// </summary>
public
class
RB_Student_LogRepository
:
BaseRepository
<
RB_Student_Log
>
{
/// <summary>
/// 获取学员日志分页列表
/// </summary>
/// <param name="pageIndex"></param>
/// <param name="pageSize"></param>
/// <param name="rowsCount"></param>
/// <param name="query"></param>
/// <returns></returns>
public
List
<
RB_Student_Log_Extend
>
GetStudentLogPageRepository
(
int
pageIndex
,
int
pageSize
,
out
long
rowsCount
,
RB_Student_Log_Extend
query
)
{
StringBuilder
builder
=
new
StringBuilder
();
builder
.
AppendFormat
(
@"
SELECT A.*
FROM RB_Student_Log AS A
WHERE 1=1
"
);
if
(
query
!=
null
)
{
if
(
query
.
StuId
>
0
)
{
builder
.
AppendFormat
(
" AND A.{0}={1} "
,
nameof
(
RB_Student_Log_Extend
.
StuId
),
query
.
StuId
);
}
}
builder
.
AppendFormat
(
" ORDER BY A.{0} DESC "
,
nameof
(
RB_Student_Log_Extend
.
LogId
));
return
GetPage
<
RB_Student_Log_Extend
>(
pageIndex
,
pageSize
,
out
rowsCount
,
builder
.
ToString
()).
ToList
();
}
/// <summary>
/// 新增学员日志
/// </summary>
/// <param name="StuId">学员编号</param>
/// <param name="LogType">日志类型</param>
/// <param name="LogContent">日志内容</param>
/// <param name="CreateBy">创建人</param>
/// <param name="CreateType">创建人类型(1-系统用户,2-同行用户)</param>
/// <param name="Group_Id">集团编号</param>
/// <returns></returns>
public
bool
AddStuLogRepository
(
int
StuId
,
StudentLogTypeEnum
LogType
,
string
LogContent
,
int
CreateBy
,
int
CreateType
=
1
,
int
Group_Id
=
100000
)
{
var
newModel
=
new
RB_Student_Log_Extend
()
{
LogId
=
0
,
StuId
=
StuId
,
LogType
=
LogType
,
CreateTime
=
DateTime
.
Now
,
LogContent
=
LogContent
,
CreateType
=
CreateType
,
CreateBy
=
CreateBy
,
Group_Id
=
Group_Id
};
var
newId
=
base
.
Insert
(
newModel
);
newModel
.
LogId
=
newId
;
return
newId
>
0
;
}
}
}
Edu.Repository/Customer/RB_Student_VisitRepository.cs
0 → 100644
View file @
3496dc0c
using
Edu.Model.Entity.Customer
;
using
Edu.Model.ViewModel.Customer
;
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
namespace
Edu.Repository.Customer
{
/// <summary>
/// 学员到访表仓储层
/// </summary>
public
class
RB_Student_VisitRepository
:
BaseRepository
<
RB_Student_Visit
>
{
/// <summary>
/// 获取学员到访分页列表
/// </summary>
/// <param name="pageIndex"></param>
/// <param name="pageSize"></param>
/// <param name="rowsCount"></param>
/// <param name="query"></param>
/// <returns></returns>
public
List
<
RB_Student_Visit_Extend
>
GetStudentVisitPageRepository
(
int
pageIndex
,
int
pageSize
,
out
long
rowsCount
,
RB_Student_Visit_Extend
query
)
{
StringBuilder
builder
=
new
StringBuilder
();
builder
.
AppendFormat
(
@"
SELECT A.*
FROM RB_Student_Visit AS A
WHERE 1=1
"
);
if
(
query
!=
null
)
{
}
return
GetPage
<
RB_Student_Visit_Extend
>(
pageIndex
,
pageSize
,
out
rowsCount
,
builder
.
ToString
()).
ToList
();
}
}
}
Edu.Repository/User/RB_StudentRepository.cs
View file @
3496dc0c
...
@@ -140,6 +140,7 @@ WHERE 1=1
...
@@ -140,6 +140,7 @@ WHERE 1=1
builder
.
AppendFormat
(
" AND t.{0}={1} "
,
nameof
(
RB_Student_ViewModel
.
AreaId
),
query
.
AreaId
);
builder
.
AppendFormat
(
" AND t.{0}={1} "
,
nameof
(
RB_Student_ViewModel
.
AreaId
),
query
.
AreaId
);
}
}
}
}
builder
.
AppendFormat
(
" ORDER BY t.{0} DESC "
,
nameof
(
RB_Student_ViewModel
.
StuId
));
return
GetPage
<
RB_Student_ViewModel
>(
pageIndex
,
pageSize
,
out
rowsCount
,
builder
.
ToString
(),
parameters
).
ToList
();
return
GetPage
<
RB_Student_ViewModel
>(
pageIndex
,
pageSize
,
out
rowsCount
,
builder
.
ToString
(),
parameters
).
ToList
();
}
}
...
...
Edu.WebApi/Controllers/Customer/CustomerStudentController.cs
0 → 100644
View file @
3496dc0c
using
Edu.Common.API
;
using
Edu.Common.Plugin
;
using
Edu.Model.ViewModel.Customer
;
using
Edu.Module.Customer
;
using
Edu.WebApi.Filter
;
using
Microsoft.AspNetCore.Cors
;
using
Microsoft.AspNetCore.Mvc
;
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Threading.Tasks
;
namespace
Edu.WebApi.Controllers.Customer
{
[
Route
(
"api/[controller]/[action]"
)]
[
ApiExceptionFilter
]
[
ApiController
]
[
EnableCors
(
"AllowCors"
)]
public
class
CustomerStudentController
:
BaseController
{
/// <summary>
/// 客户学员处理类对象
/// </summary>
private
readonly
CustomerStudentModule
customerStudentModule
=
new
CustomerStudentModule
();
/// <summary>
/// 学员约访分页列表
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
GetStudentAppointmentPage
()
{
var
pageModel
=
Common
.
Plugin
.
JsonHelper
.
DeserializeObject
<
ResultPageModel
>(
RequestParm
.
Msg
.
ToString
());
var
query
=
new
RB_Student_Appointment_Extend
()
{
StuId
=
base
.
ParmJObj
.
GetInt
(
"StuId"
),
};
query
.
Group_Id
=
base
.
UserInfo
.
Group_Id
;
var
list
=
customerStudentModule
.
GetStudentAppointmentPageModule
(
pageModel
.
PageIndex
,
pageModel
.
PageSize
,
out
long
rowsCount
,
query
);
foreach
(
var
item
in
list
)
{
if
(
item
.
CreateBy
>
0
)
{
// item.CreateByName = UserReidsCache.GetUserLoginInfo(item.CreateBy)?.AccountName ?? "";
}
}
pageModel
.
Count
=
rowsCount
;
pageModel
.
PageData
=
list
;
return
ApiResult
.
Success
(
data
:
pageModel
);
}
/// <summary>
/// 添加修改约访
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
SetStudentAppointment
()
{
var
extModel
=
new
RB_Student_Appointment_Extend
()
{
Id
=
base
.
ParmJObj
.
GetInt
(
"Id"
),
StuId
=
base
.
ParmJObj
.
GetInt
(
"StuId"
),
AppointmentPoint
=
base
.
ParmJObj
.
GetStringValue
(
"AppointmentPoint"
),
AppointmentTime
=
base
.
ParmJObj
.
GetDateTime
(
"AppointmentTime"
),
Remark
=
base
.
ParmJObj
.
GetStringValue
(
"Remark"
),
Feedback
=
base
.
ParmJObj
.
GetStringValue
(
"Feedback"
)
};
extModel
.
CreateBy
=
base
.
UserInfo
.
Id
;
extModel
.
CreateTime
=
DateTime
.
Now
;
extModel
.
UpdateBy
=
base
.
UserInfo
.
Id
;
extModel
.
UpdateTime
=
DateTime
.
Now
;
extModel
.
Group_Id
=
base
.
UserInfo
.
Group_Id
;
bool
flag
=
customerStudentModule
.
SetStudentAppointmentModule
(
extModel
);
return
flag
?
ApiResult
.
Success
()
:
ApiResult
.
Failed
();
}
/// <summary>
/// 根据编号获取约访
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
GetStudentAppointment
()
{
var
Id
=
base
.
ParmJObj
.
GetInt
(
"Id"
);
var
model
=
customerStudentModule
.
GetStudentAppointmentModule
(
Id
);
return
ApiResult
.
Success
(
data
:
model
);
}
/// <summary>
/// 根据编号删除学员约访
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
RemoveStudentAppointment
()
{
var
Id
=
base
.
ParmJObj
.
GetInt
(
"Id"
);
var
model
=
customerStudentModule
.
RemoveStudentAppointmentModule
(
Id
);
return
ApiResult
.
Success
(
data
:
model
);
}
/// <summary>
/// 学员跟进分页列表
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
GetStudentFollowPage
()
{
var
pageModel
=
Common
.
Plugin
.
JsonHelper
.
DeserializeObject
<
ResultPageModel
>(
RequestParm
.
Msg
.
ToString
());
var
query
=
new
RB_Student_Follow_Extend
()
{
StuId
=
base
.
ParmJObj
.
GetInt
(
"StuId"
),
};
query
.
Group_Id
=
base
.
UserInfo
.
Group_Id
;
var
list
=
customerStudentModule
.
GetStudentFollowPageModule
(
pageModel
.
PageIndex
,
pageModel
.
PageSize
,
out
long
rowsCount
,
query
);
foreach
(
var
item
in
list
)
{
if
(
item
.
CreateBy
>
0
)
{
// item.CreateByName = UserReidsCache.GetUserLoginInfo(item.CreateBy)?.AccountName ?? "";
}
}
pageModel
.
Count
=
rowsCount
;
pageModel
.
PageData
=
list
;
return
ApiResult
.
Success
(
data
:
pageModel
);
}
/// <summary>
/// 新增修改学员跟进
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
SetStudentFollow
()
{
var
extModel
=
new
RB_Student_Follow_Extend
()
{
Id
=
base
.
ParmJObj
.
GetInt
(
"Id"
),
StuId
=
base
.
ParmJObj
.
GetInt
(
"StuId"
),
Remark
=
base
.
ParmJObj
.
GetStringValue
(
"Remark"
),
};
extModel
.
CreateBy
=
base
.
UserInfo
.
Id
;
extModel
.
CreateTime
=
DateTime
.
Now
;
extModel
.
UpdateBy
=
base
.
UserInfo
.
Id
;
extModel
.
UpdateTime
=
DateTime
.
Now
;
extModel
.
Group_Id
=
base
.
UserInfo
.
Group_Id
;
bool
flag
=
customerStudentModule
.
SetStudentFollowModule
(
extModel
);
return
flag
?
ApiResult
.
Success
()
:
ApiResult
.
Failed
();
}
/// <summary>
/// 根据编号获取跟进信息
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
GetStudentFollow
()
{
var
Id
=
base
.
ParmJObj
.
GetInt
(
"Id"
);
var
model
=
customerStudentModule
.
GetStudentFollowModule
(
Id
);
return
ApiResult
.
Success
(
data
:
model
);
}
/// <summary>
/// 根据编号删除学员跟进信息
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
RemoveStudentFollow
()
{
var
Id
=
base
.
ParmJObj
.
GetInt
(
"Id"
);
var
model
=
customerStudentModule
.
RemoveStudentFollowModule
(
Id
);
return
ApiResult
.
Success
(
data
:
model
);
}
/// <summary>
/// 学员到访分页列表
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
GetStudentVisitPage
()
{
var
pageModel
=
Common
.
Plugin
.
JsonHelper
.
DeserializeObject
<
ResultPageModel
>(
RequestParm
.
Msg
.
ToString
());
var
query
=
new
RB_Student_Visit_Extend
()
{
StuId
=
base
.
ParmJObj
.
GetInt
(
"StuId"
),
};
query
.
Group_Id
=
base
.
UserInfo
.
Group_Id
;
var
list
=
customerStudentModule
.
GetStudentVisitPageModule
(
pageModel
.
PageIndex
,
pageModel
.
PageSize
,
out
long
rowsCount
,
query
);
foreach
(
var
item
in
list
)
{
if
(
item
.
CreateBy
>
0
)
{
// item.CreateByName = UserReidsCache.GetUserLoginInfo(item.CreateBy)?.AccountName ?? "";
}
}
pageModel
.
Count
=
rowsCount
;
pageModel
.
PageData
=
list
;
return
ApiResult
.
Success
(
data
:
pageModel
);
}
/// <summary>
/// 新增修改学员到访
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
SetStudentVisit
()
{
var
extModel
=
new
RB_Student_Visit_Extend
()
{
Id
=
base
.
ParmJObj
.
GetInt
(
"Id"
),
StuId
=
base
.
ParmJObj
.
GetInt
(
"StuId"
),
School_Id
=
base
.
ParmJObj
.
GetInt
(
"School_Id"
),
Date
=
base
.
ParmJObj
.
GetDateTime
(
"Date"
),
VisitTime
=
base
.
ParmJObj
.
GetStringValue
(
"VisitTime"
),
ReceptionPersion
=
base
.
ParmJObj
.
GetInt
(
"ReceptionPersion"
),
Remark
=
base
.
ParmJObj
.
GetStringValue
(
"Remark"
),
Feedback
=
base
.
ParmJObj
.
GetStringValue
(
"Feedback"
),
};
extModel
.
Status
=
Common
.
Enum
.
DateStateEnum
.
Normal
;
extModel
.
CreateBy
=
base
.
UserInfo
.
Id
;
extModel
.
CreateTime
=
DateTime
.
Now
;
extModel
.
UpdateBy
=
base
.
UserInfo
.
Id
;
extModel
.
UpdateTime
=
DateTime
.
Now
;
extModel
.
Group_Id
=
base
.
UserInfo
.
Group_Id
;
bool
flag
=
customerStudentModule
.
SetStudentVisitModule
(
extModel
);
return
flag
?
ApiResult
.
Success
()
:
ApiResult
.
Failed
();
}
/// <summary>
/// 根据编号获取到访信息
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
GetStudentVisit
()
{
var
Id
=
base
.
ParmJObj
.
GetInt
(
"Id"
);
var
model
=
customerStudentModule
.
GetStudentVisitModule
(
Id
);
return
ApiResult
.
Success
(
data
:
model
);
}
/// <summary>
/// 跟进编号删除学员到访信息
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
RemoveStudentVisit
()
{
var
Id
=
base
.
ParmJObj
.
GetInt
(
"Id"
);
var
model
=
customerStudentModule
.
RemoveStudentVisitModule
(
Id
);
return
ApiResult
.
Success
(
data
:
model
);
}
}
}
Edu.WebApi/Controllers/User/UserController.cs
View file @
3496dc0c
This diff is collapsed.
Click to expand it.
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