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
ea044bd0
Commit
ea044bd0
authored
Apr 29, 2022
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
fa51cb3e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
91 additions
and
82 deletions
+91
-82
StudentModule.cs
Edu.Module.User/StudentModule.cs
+75
-75
TeacherAssessmentModule.cs
Edu.Module.User/TeacherAssessmentModule.cs
+16
-7
No files found.
Edu.Module.User/StudentModule.cs
View file @
ea044bd0
...
...
@@ -1124,81 +1124,81 @@ namespace Edu.Module.User
/// <param name="receiveId"></param>
/// <param name="userInfo"></param>
/// <returns></returns>
public
string
SetUserLeaveStudentCareOf
(
int
userId
,
int
receiveId
,
UserInfo
userInfo
)
{
var
eModel
=
accountModule
.
GetEmployeeInfo
(
userId
);
var
reModel
=
accountModule
.
GetEmployeeInfo
(
receiveId
);
if
(
eModel
==
null
||
reModel
==
null
)
{
return
"转交人不存在"
;
}
if
(
reModel
.
IsLeave
!=
1
)
{
return
"转交人非在职状态,无法交接"
;
}
//获取学员负责人 / 服务人员
var
list
=
studentRepository
.
GetUserStudentCareOf
(
userId
,
userInfo
.
Group_Id
);
if
(
list
.
Any
())
{
//查询所有的服务人员
var
alist
=
student_AssistRepository
.
GetUserStudentAssistCareOf
(
userId
,
userInfo
.
Group_Id
);
var
trans
=
studentRepository
.
DbTransaction
;
try
{
foreach
(
var
item
in
list
)
{
bool
flag
=
true
;
if
(
item
.
CreateBy
==
userId
)
{
Dictionary
<
string
,
object
>
keyValues
=
new
Dictionary
<
string
,
object
>()
{
{
nameof
(
RB_Student_ViewModel
.
CreateBy
),
receiveId
}
};
List
<
WhereHelper
>
wheres
=
new
List
<
WhereHelper
>()
{
new
WhereHelper
(){
FiledName
=
nameof
(
RB_Student_ViewModel
.
StuId
),
FiledValue
=
item
.
StuId
,
OperatorEnum
=
OperatorEnum
.
Equal
}
};
flag
=
studentRepository
.
Update
(
keyValues
,
wheres
,
trans
);
}
if
(
flag
)
{
var
clist
=
alist
.
Where
(
x
=>
x
.
StuId
==
item
.
StuId
).
ToList
();
foreach
(
var
qitem
in
clist
)
{
Dictionary
<
string
,
object
>
keyValues
=
new
Dictionary
<
string
,
object
>()
{
{
nameof
(
RB_Student_Assist_Extend
.
AssistId
),
receiveId
},
};
List
<
WhereHelper
>
wheres
=
new
List
<
WhereHelper
>()
{
new
WhereHelper
(){
FiledName
=
nameof
(
RB_Student_Assist_Extend
.
Id
),
FiledValue
=
qitem
.
Id
,
OperatorEnum
=
OperatorEnum
.
Equal
}
};
flag
=
student_AssistRepository
.
Update
(
keyValues
,
wheres
,
trans
);
}
}
if
(
flag
)
{
//插入日志
student_LogRepository
.
Insert
(
new
Model
.
Entity
.
Customer
.
RB_Student_Log
()
{
CreateBy
=
userInfo
.
Id
,
CreateTime
=
DateTime
.
Now
,
CreateType
=
1
,
Group_Id
=
userInfo
.
Group_Id
,
LogContent
=
"离职转交客人负责人与服务人员,由【"
+
eModel
.
EmployeeName
+
"("
+
userId
+
")"
+
"】转交给【"
+
reModel
.
EmployeeName
+
"("
+
receiveId
+
")"
+
"】"
,
LogId
=
0
,
LogTitle
=
"离职转交学员"
,
LogType
=
Common
.
Enum
.
Log
.
StudentLogTypeEnum
.
BasicInfo
,
StuId
=
item
.
StuId
},
trans
);
}
}
studentRepository
.
DBSession
.
Commit
();
}
catch
(
Exception
ex
)
{
LogHelper
.
Write
(
ex
,
"SetUserLeaveStudentCareOf"
);
studentRepository
.
DBSession
.
Rollback
();
return
"学员转交出错了,请联系管理员"
;
}
}
return
""
;
}
//
public string SetUserLeaveStudentCareOf(int userId, int receiveId, UserInfo userInfo)
//
{
//
var eModel = accountModule.GetEmployeeInfo(userId);
//
var reModel = accountModule.GetEmployeeInfo(receiveId);
//
if (eModel == null || reModel == null) { return "转交人不存在"; }
//
if (reModel.IsLeave != 1) { return "转交人非在职状态,无法交接"; }
//
//获取学员负责人 / 服务人员
//
var list = studentRepository.GetUserStudentCareOf(userId, userInfo.Group_Id);
//
if (list.Any())
//
{
//
//查询所有的服务人员
//
var alist = student_AssistRepository.GetUserStudentAssistCareOf(userId, userInfo.Group_Id);
//
var trans = studentRepository.DbTransaction;
//
try
//
{
//
foreach (var item in list)
//
{
//
bool flag = true;
//
if (item.CreateBy == userId) {
//
Dictionary<string, object> keyValues = new Dictionary<string, object>() {
//
{ nameof(RB_Student_ViewModel.CreateBy), receiveId}
//
};
//
List<WhereHelper> wheres = new List<WhereHelper>() {
//
new WhereHelper(){
//
FiledName = nameof(RB_Student_ViewModel.StuId),
//
FiledValue = item.StuId,
//
OperatorEnum =OperatorEnum.Equal
//
}
//
};
//
flag = studentRepository.Update(keyValues, wheres, trans);
//
}
//
if (flag) {
//
var clist = alist.Where(x => x.StuId == item.StuId).ToList();
//
foreach (var qitem in clist) {
//
Dictionary<string, object> keyValues = new Dictionary<string, object>() {
//
{ nameof(RB_Student_Assist_Extend.AssistId),receiveId},
//
};
//
List<WhereHelper> wheres = new List<WhereHelper>() {
//
new WhereHelper(){
//
FiledName = nameof(RB_Student_Assist_Extend.Id),
//
FiledValue = qitem.Id,
//
OperatorEnum =OperatorEnum.Equal
//
}
//
};
//
flag = student_AssistRepository.Update(keyValues, wheres, trans);
//
}
//
}
//
if (flag) {
//
//插入日志
//
student_LogRepository.Insert(new Model.Entity.Customer.RB_Student_Log()
//
{
//
CreateBy = userInfo.Id,
//
CreateTime = DateTime.Now,
//
CreateType = 1,
//
Group_Id = userInfo.Group_Id,
//
LogContent = "离职转交客人负责人与服务人员,由【" + eModel.EmployeeName + "(" + userId + ")" + "】转交给【" + reModel.EmployeeName + "(" + receiveId + ")" + "】",
//
LogId = 0,
//
LogTitle = "离职转交学员",
//
LogType = Common.Enum.Log.StudentLogTypeEnum.BasicInfo,
//
StuId = item.StuId
//
}, trans);
//
}
//
}
//
studentRepository.DBSession.Commit();
//
}
//
catch (Exception ex)
//
{
//
LogHelper.Write(ex, "SetUserLeaveStudentCareOf");
//
studentRepository.DBSession.Rollback();
//
return "学员转交出错了,请联系管理员";
//
}
//
}
//
return "";
//
}
#
endregion
}
...
...
Edu.Module.User/TeacherAssessmentModule.cs
View file @
ea044bd0
...
...
@@ -311,13 +311,19 @@ namespace Edu.Module.User
TeacherAccountId
=
TeacherAccountId
});
}
var
detailsList
=
teacher_Assessment_DetailsRepository
.
GetTeacherAssessmentDetailsListRepository
(
new
RB_Teacher_Assessment_Details_Extend
()
var
detailsList
=
new
List
<
RB_Teacher_Assessment_Details_Extend
>();
if
(
extModel
!=
null
&&
extModel
.
Id
>
0
)
{
TeacherAssessmentId
=
(
extModel
?.
Id
??
0
),
CreateBy
=
userInfo
.
Id
,
CheckType
=
CheckType
});
detailsList
=
teacher_Assessment_DetailsRepository
.
GetTeacherAssessmentDetailsListRepository
(
new
RB_Teacher_Assessment_Details_Extend
()
{
TeacherAssessmentId
=
(
extModel
?.
Id
??
0
),
CreateBy
=
userInfo
.
Id
,
CheckType
=
CheckType
});
}
var
typeList
=
GetAssessmentTypeListModule
(
new
RB_Assessment_Type_Extend
()
{
});
var
maxOptionList
=
new
List
<
SubtypeItem
>();
int
maxLength
=
0
;
...
...
@@ -353,7 +359,10 @@ namespace Edu.Module.User
List
<
object
>
subList
=
new
List
<
object
>();
foreach
(
var
subItem
in
item
.
SubtypeList
)
{
var
tempDetail
=
detailsList
.
Where
(
qitem
=>
qitem
.
AssessmentTypeId
==
item
.
Id
&&
qitem
.
AssessmentSubTypeId
==
subItem
.
Id
&&
qitem
.
CheckType
==
CheckType
)?.
FirstOrDefault
();
var
tempDetail
=
detailsList
.
Where
(
qitem
=>
qitem
.
AssessmentTypeId
==
item
.
Id
&&
qitem
.
AssessmentSubTypeId
==
subItem
.
Id
&&
qitem
.
CheckType
==
CheckType
)?.
FirstOrDefault
();
List
<
object
>
optionList
=
new
List
<
object
>();
foreach
(
var
tItem
in
subItem
.
OptionList
)
{
...
...
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