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
1563abc7
Commit
1563abc7
authored
Dec 28, 2021
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
eaa9aa9d
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
62 additions
and
29 deletions
+62
-29
VisitorReserveModule.cs
Edu.Module.Duty/VisitorReserveModule.cs
+61
-28
RB_AccountRepository.cs
Edu.Repository/User/RB_AccountRepository.cs
+1
-1
No files found.
Edu.Module.Duty/VisitorReserveModule.cs
View file @
1563abc7
...
...
@@ -18,6 +18,8 @@ using Edu.Repository.Grade;
using
Edu.Repository.Customer
;
using
Edu.Model.ViewModel.User
;
using
Edu.Common.Plugin
;
using
Edu.Model.ViewModel.Customer
;
using
Edu.Model.Entity.Customer
;
namespace
Edu.Module.Duty
{
...
...
@@ -46,6 +48,21 @@ namespace Edu.Module.Duty
/// </summary>
private
readonly
RB_AccountRepository
accountRepository
=
new
RB_AccountRepository
();
/// <summary>
/// 学员仓储层对象
/// </summary>
private
readonly
RB_StudentRepository
studentRepository
=
new
RB_StudentRepository
();
/// <summary>
/// 学员协助人员
/// </summary>
private
readonly
RB_Student_AssistRepository
student_AssistRepository
=
new
RB_Student_AssistRepository
();
/// <summary>
/// 学员日志仓储层对象
/// </summary>
private
readonly
RB_Student_LogRepository
student_LogRepository
=
new
RB_Student_LogRepository
();
/// <summary>
/// 获取访客约课分页列表
/// </summary>
...
...
@@ -128,35 +145,51 @@ namespace Edu.Module.Duty
var
newId
=
visitor_ReserveRepository
.
Insert
(
model
);
model
.
Id
=
newId
;
flag
=
newId
>
0
;
if
(
flag
)
{
if
(
flag
)
{
//获取学生信息
//var smodel = studentRepository.GetEntity(model.Visitor_Id);
//if (smodel != null && smodel.StuStage <= Common.Enum.User.StuStageEnum.PreliminaryCommunication)
//{
// Dictionary<string, object> keyValues = new Dictionary<string, object>() {
// { nameof(RB_Student_ViewModel.StuStage), Common.Enum.User.StuStageEnum.Audition}
// };
// List<WhereHelper> wheres = new List<WhereHelper>() {
// new WhereHelper(){
// FiledName = nameof (RB_Student_ViewModel.StuId),
// FiledValue = model.Visitor_Id,
// 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 = "首次试听,客户阶段由'" + (smodel.StuStage.ToName()) + "'自动转换为'" + (Common.Enum.User.StuStageEnum.Audition.ToName()) + "'",
// LogTitle = "客户阶段变更",
// LogType = Common.Enum.Log.StudentLogTypeEnum.BasicInfo,
// StuId = model.Visitor_Id
// });
//}
var
smodel
=
studentRepository
.
GetEntity
(
model
.
Visitor_Id
);
if
(
smodel
!=
null
&&
smodel
.
StuId
>
0
)
{
var
assistTeacher
=
student_AssistRepository
.
GetStudentAssistListRepository
(
new
RB_Student_Assist_Extend
()
{
StuId
=
smodel
.
StuId
})?.
FirstOrDefault
(
qitem
=>
qitem
.
AssistType
==
Common
.
Enum
.
User
.
AssistTypeEnum
.
Teacher
);
string
logTitle
=
"新增协同人员"
;
string
logContent
=
""
;
var
empModel
=
accountRepository
.
GetEmployeeListRepository
(
new
Employee_ViewModel
()
{
AccountType
=
Common
.
Enum
.
User
.
AccountTypeEnum
.
Teacher
,
AccountId
=
model
.
TeacherId
})?.
FirstOrDefault
();
if
(
assistTeacher
==
null
)
{
logTitle
=
"新增协同人员"
;
student_AssistRepository
.
Insert
(
new
RB_Student_Assist
()
{
CreateBy
=
model
.
UpdateBy
,
CreateTime
=
DateTime
.
Now
,
Id
=
0
,
Status
=
DateStateEnum
.
Normal
,
StuId
=
smodel
.
StuId
,
AssistId
=
empModel
?.
Id
??
0
,
AssistType
=
Common
.
Enum
.
User
.
AssistTypeEnum
.
Teacher
,
});
logContent
+=
string
.
Format
(
"新增协同人员:"
+
empModel
?.
EmployeeName
);
}
else
{
logTitle
=
"修改协同人员"
;
string
oldName
=
accountRepository
.
GetEmployeeInfo
(
assistTeacher
.
AssistId
)?.
EmployeeName
??
""
;
Dictionary
<
string
,
object
>
fileds
=
new
Dictionary
<
string
,
object
>()
{
{
nameof
(
RB_Student_Assist
.
AssistId
),(
empModel
?.
Id
??
0
)
}
};
student_AssistRepository
.
Update
(
fileds
,
new
WhereHelper
(
nameof
(
RB_Student_Assist
.
Id
),
assistTeacher
.
Id
));
logContent
+=
string
.
Format
(
"修改协同人员:由【{0}】=>【{1}】"
,
oldName
,
empModel
?.
EmployeeName
);
}
student_LogRepository
.
AddStuLogRepository
(
smodel
.
StuId
,
Common
.
Enum
.
Log
.
StudentLogTypeEnum
.
BasicInfo
,
logTitle
,
logContent
,
model
.
UpdateBy
);
}
}
}
return
flag
;
...
...
Edu.Repository/User/RB_AccountRepository.cs
View file @
1563abc7
...
...
@@ -340,7 +340,7 @@ FROM
/// <param name="query"></param>
/// <param name="parameters"></param>
/// <returns></returns>
p
ublic
string
GetEmployeeSqlReposiroty
(
Employee_ViewModel
query
,
DynamicParameters
parameters
)
p
rivate
string
GetEmployeeSqlReposiroty
(
Employee_ViewModel
query
,
DynamicParameters
parameters
)
{
StringBuilder
where
=
new
StringBuilder
();
StringBuilder
where2
=
new
StringBuilder
();
...
...
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