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
27d55a8f
Commit
27d55a8f
authored
Dec 10, 2021
by
liudong1993
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://gitlab.oytour.com/Kui2/education
parents
61c26b3c
9045a879
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
125 additions
and
10 deletions
+125
-10
RB_Student_ViewModel.cs
Edu.Model/ViewModel/User/RB_Student_ViewModel.cs
+5
-0
StudentModule.cs
Edu.Module.User/StudentModule.cs
+13
-0
RB_StudentRepository.cs
Edu.Repository/User/RB_StudentRepository.cs
+86
-7
UserController.cs
Edu.WebApi/Controllers/User/UserController.cs
+21
-3
No files found.
Edu.Model/ViewModel/User/RB_Student_ViewModel.cs
View file @
27d55a8f
...
...
@@ -146,5 +146,10 @@ namespace Edu.Model.ViewModel.User
/// 账号表主键编号
/// </summary>
public
int
Account_Id
{
get
;
set
;
}
/// <summary>
/// 是否查询自己的客户(1-是)
/// </summary>
public
int
IsQueryMyStu
{
get
;
set
;
}
}
}
\ No newline at end of file
Edu.Module.User/StudentModule.cs
View file @
27d55a8f
...
...
@@ -187,6 +187,19 @@ namespace Edu.Module.User
return
flag
;
}
/// <summary>
/// 学员转交
/// </summary>
/// <param name="StuId">学员编号</param>
/// <param name="CreateBy">负责人</param>
/// <param name="OperateId">操作人</param>
/// <returns></returns>
public
bool
ForwardStudentModule
(
int
StuId
,
int
CreateBy
,
int
OperateId
)
{
return
studentRepository
.
ForwardStudentRepository
(
StuId
,
CreateBy
,
OperateId
);
}
/// <summary>
/// 根据学生编号获取学生实体类
/// </summary>
...
...
Edu.Repository/User/RB_StudentRepository.cs
View file @
27d55a8f
using
Edu.Common.Enum
;
using
Edu.Common.Plugin
;
using
Edu.Model.ViewModel.User
;
using
Edu.Repository.Customer
;
using
System
;
...
...
@@ -74,7 +75,7 @@ WHERE 1=1
builder
.
AppendFormat
(
" AND t.{0}={1} "
,
nameof
(
RB_Student_ViewModel
.
AreaId
),
query
.
AreaId
);
}
}
return
Get
<
RB_Student_ViewModel
>(
builder
.
ToString
(),
parameters
).
ToList
();
return
Get
<
RB_Student_ViewModel
>(
builder
.
ToString
(),
parameters
).
ToList
();
}
/// <summary>
...
...
@@ -85,7 +86,7 @@ WHERE 1=1
/// <param name="rowsCount"></param>
/// <param name="query"></param>
/// <returns></returns>
public
List
<
RB_Student_ViewModel
>
GetStudentPageListRepository
(
int
pageIndex
,
int
pageSize
,
out
long
rowsCount
,
RB_Student_ViewModel
query
)
public
List
<
RB_Student_ViewModel
>
GetStudentPageListRepository
(
int
pageIndex
,
int
pageSize
,
out
long
rowsCount
,
RB_Student_ViewModel
query
)
{
var
parameters
=
new
DynamicParameters
();
StringBuilder
builder
=
new
StringBuilder
();
...
...
@@ -200,17 +201,66 @@ WHERE o.OrderState=1 and og.`Status`=0 and sog.`Status`=0 and og.GuestState=1 an
return
Get
<
RB_Student_ViewModel
>(
builder
.
ToString
(),
parameters
).
ToList
();
}
/// <summary>
/// 新增修改学员资料
/// </summary>
/// <param name="model"></param>
/// <returns></returns>
public
bool
SetStudentRepository
(
RB_Student_ViewModel
model
)
{
bool
flag
;
string
logContent
=
""
;
string
logTitle
=
""
;
int
createBy
=
0
;
if
(
model
.
StuId
>
0
)
{
logTitle
=
"修改客户"
;
var
oldModel
=
base
.
GetEntity
<
RB_Student_ViewModel
>(
model
.
StuId
);
if
(
oldModel
.
StuName
!=
model
.
StuName
)
{
logContent
+=
string
.
Format
(
"昵称:由【{0}】=>【{1}】,"
,
oldModel
.
StuName
,
model
.
StuName
);
}
if
(
oldModel
.
StuTel
!=
model
.
StuTel
)
{
logContent
+=
string
.
Format
(
"电话:由【{0}】=>【{1}】,"
,
oldModel
.
StuTel
,
model
.
StuTel
);
}
if
(
oldModel
.
StuIcon
!=
model
.
StuIcon
)
{
logContent
+=
string
.
Format
(
"头像:由【{0}】=>【{1}】,"
,
oldModel
.
StuIcon
,
model
.
StuIcon
);
}
if
(
oldModel
.
StuSex
!=
model
.
StuSex
)
{
logContent
+=
string
.
Format
(
"性别:由【{0}】=>【{1}】,"
,
oldModel
.
StuSex
==
0
?
"男"
:
"女"
,
model
.
StuSex
==
0
?
"男"
:
"女"
);
}
if
(
oldModel
.
StuBirth
!=
model
.
StuBirth
)
{
logContent
+=
string
.
Format
(
"出生日期:由【{0}】=>【{1}】,"
,
Common
.
ConvertHelper
.
FormatDate
(
oldModel
.
StuBirth
),
Common
.
ConvertHelper
.
FormatDate
(
model
.
StuBirth
));
}
if
(
oldModel
.
JapanBaseInfo
!=
model
.
JapanBaseInfo
)
{
logContent
+=
string
.
Format
(
"日语基础:由【{0}】=>【{1}】,"
,
oldModel
.
JapanBaseInfo
.
ToName
(),
model
.
JapanBaseInfo
.
ToName
());
}
if
(
oldModel
.
StuEducation
!=
model
.
StuEducation
)
{
logContent
+=
string
.
Format
(
"学历:由【{0}】=>【{1}】,"
,
oldModel
.
StuEducation
.
ToName
(),
model
.
StuEducation
.
ToName
());
}
if
(
oldModel
.
StuPurpose
!=
model
.
StuPurpose
)
{
logContent
+=
string
.
Format
(
"学习目的:由【{0}】=>【{1}】,"
,
oldModel
.
StuPurpose
.
ToName
(),
model
.
StuPurpose
.
ToName
());
}
if
(
oldModel
.
StuProfession
!=
model
.
StuProfession
)
{
logContent
+=
string
.
Format
(
"职业:由【{0}】=>【{1}】,"
,
oldModel
.
StuProfession
,
model
.
StuProfession
);
}
if
(
oldModel
.
StuStage
!=
model
.
StuStage
)
{
logContent
+=
string
.
Format
(
"客户阶段:由【{0}】=>【{1}】,"
,
oldModel
.
StuStage
.
ToName
(),
model
.
StuStage
.
ToName
());
}
if
(
oldModel
.
StuSource
!=
model
.
StuSource
)
{
logContent
+=
string
.
Format
(
"来源:由【{0}】=>【{1}】,"
,
oldModel
.
StuSource
.
ToName
(),
model
.
StuSource
.
ToName
());
}
Dictionary
<
string
,
object
>
fileds
=
new
Dictionary
<
string
,
object
>()
{
{
nameof
(
RB_Student_ViewModel
.
StuName
),
model
.
StuName
.
Trim
()
},
...
...
@@ -232,8 +282,6 @@ WHERE o.OrderState=1 and og.`Status`=0 and sog.`Status`=0 and og.GuestState=1 an
{
nameof
(
RB_Student_ViewModel
.
StuContractMobile
),
model
.
StuContractMobile
},
{
nameof
(
RB_Student_ViewModel
.
StuIDCard
),
model
.
StuIDCard
},
{
nameof
(
RB_Student_ViewModel
.
StuIDCardAddress
),
model
.
StuIDCardAddress
},
{
nameof
(
RB_Student_ViewModel
.
CreateType
),
model
.
CreateType
},
{
nameof
(
RB_Student_ViewModel
.
CreateBy
),
model
.
CreateBy
},
{
nameof
(
RB_Student_ViewModel
.
StuStage
),
model
.
StuStage
},
};
flag
=
base
.
Update
(
fileds
,
new
WhereHelper
(
nameof
(
RB_Student_ViewModel
.
StuId
),
model
.
StuId
));
...
...
@@ -273,12 +321,43 @@ WHERE o.OrderState=1 and og.`Status`=0 and sog.`Status`=0 and og.GuestState=1 an
logContent
=
"创建了该客户"
;
logTitle
=
"创建客户"
;
}
student_LogRepository
.
AddStuLogRepository
(
model
.
StuId
,
Common
.
Enum
.
Log
.
StudentLogTypeEnum
.
BasicInfo
,
logTitle
,
logContent
,
createBy
,
CreateType
:
model
.
CreateType
);
return
flag
;
}
/// <summary>
/// 学员转交
/// </summary>
/// <param name="StuId">学员编号</param>
/// <param name="CreateBy">负责人</param>
/// <param name="OperateId">操作人</param>
/// <returns></returns>
public
bool
ForwardStudentRepository
(
int
StuId
,
int
CreateBy
,
int
OperateId
)
{
string
logTitle
=
"客户转交"
;
string
logContent
=
""
;
var
oldModel
=
base
.
GetEntity
(
StuId
);
Dictionary
<
string
,
object
>
fileds
=
new
Dictionary
<
string
,
object
>()
{
{
nameof
(
RB_Student_ViewModel
.
CreateBy
),
CreateBy
},
};
if
(
oldModel
.
CreateBy
!=
CreateBy
)
{
var
empList
=
accountRepository
.
GetEmployeeListRepository
(
new
Employee_ViewModel
()
{
QIds
=
oldModel
.
CreateBy
+
","
+
CreateBy
});
logContent
=
string
.
Format
(
"复制人:由【{0}】=>【{1}】"
,
empList
?.
FirstOrDefault
(
qitem
=>
qitem
.
CreateBy
==
oldModel
.
CreateBy
)?.
EmployeeName
,
empList
?.
FirstOrDefault
(
qitem
=>
qitem
.
CreateBy
==
CreateBy
)?.
EmployeeName
);
}
var
flag
=
base
.
Update
(
fileds
,
new
WhereHelper
(
nameof
(
RB_Student_ViewModel
.
StuId
),
StuId
));
student_LogRepository
.
AddStuLogRepository
(
oldModel
.
StuId
,
Common
.
Enum
.
Log
.
StudentLogTypeEnum
.
BasicInfo
,
logTitle
,
logContent
,
OperateId
);
return
flag
;
}
/// 获取同业下学生阶段人数统计
/// </summary>
/// <param name="customerId"></param>
...
...
Edu.WebApi/Controllers/User/UserController.cs
View file @
27d55a8f
...
...
@@ -653,10 +653,15 @@ namespace Edu.WebApi.Controllers.User
var
pageModel
=
Common
.
Plugin
.
JsonHelper
.
DeserializeObject
<
ResultPageModel
>(
RequestParm
.
Msg
.
ToString
());
var
query
=
new
RB_Student_ViewModel
()
{
StuName
=
base
.
ParmJObj
.
GetStringValue
(
"StuName"
),
StuTel
=
base
.
ParmJObj
.
GetStringValue
(
"StuTel"
),
CreateBy
=
base
.
ParmJObj
.
GetInt
(
"CreateBy"
),
StuName
=
base
.
ParmJObj
.
GetStringValue
(
"StuName"
),
StuTel
=
base
.
ParmJObj
.
GetStringValue
(
"StuTel"
),
CreateBy
=
base
.
ParmJObj
.
GetInt
(
"CreateBy"
),
IsQueryMyStu
=
base
.
ParmJObj
.
GetInt
(
"IsQueryMyStu"
),
};
if
(
query
.
IsQueryMyStu
==
1
)
{
query
.
CreateBy
=
base
.
UserInfo
.
Id
;
}
query
.
Group_Id
=
base
.
UserInfo
.
Group_Id
;
var
data
=
studentModule
.
GetStudentPageListModule
(
pageModel
.
PageIndex
,
pageModel
.
PageSize
,
out
long
rowsCount
,
query
);
List
<
object
>
list
=
new
List
<
object
>();
...
...
@@ -811,6 +816,19 @@ namespace Edu.WebApi.Controllers.User
return
flag
?
ApiResult
.
Success
()
:
ApiResult
.
Failed
();
}
/// <summary>
/// 学员转交
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
ForwardStudent
()
{
var
StuId
=
base
.
ParmJObj
.
GetInt
(
"StuId"
);
var
CreateBy
=
base
.
ParmJObj
.
GetInt
(
"CreateBy"
);
bool
flag
=
studentModule
.
ForwardStudentModule
(
StuId
,
CreateBy
,
base
.
UserInfo
.
Id
);
return
flag
?
ApiResult
.
Success
()
:
ApiResult
.
Failed
();
}
/// <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