Commit ea044bd0 authored by 黄奎's avatar 黄奎

页面修改

parent fa51cb3e
...@@ -1124,81 +1124,81 @@ namespace Edu.Module.User ...@@ -1124,81 +1124,81 @@ namespace Edu.Module.User
/// <param name="receiveId"></param> /// <param name="receiveId"></param>
/// <param name="userInfo"></param> /// <param name="userInfo"></param>
/// <returns></returns> /// <returns></returns>
public string SetUserLeaveStudentCareOf(int userId, int receiveId, UserInfo userInfo) //public string SetUserLeaveStudentCareOf(int userId, int receiveId, UserInfo userInfo)
{ //{
var eModel = accountModule.GetEmployeeInfo(userId); // var eModel = accountModule.GetEmployeeInfo(userId);
var reModel = accountModule.GetEmployeeInfo(receiveId); // var reModel = accountModule.GetEmployeeInfo(receiveId);
if (eModel == null || reModel == null) { return "转交人不存在"; } // if (eModel == null || reModel == null) { return "转交人不存在"; }
if (reModel.IsLeave != 1) { return "转交人非在职状态,无法交接"; } // if (reModel.IsLeave != 1) { return "转交人非在职状态,无法交接"; }
//获取学员负责人 / 服务人员 // //获取学员负责人 / 服务人员
var list = studentRepository.GetUserStudentCareOf(userId, userInfo.Group_Id); // var list = studentRepository.GetUserStudentCareOf(userId, userInfo.Group_Id);
if (list.Any()) // if (list.Any())
{ // {
//查询所有的服务人员 // //查询所有的服务人员
var alist = student_AssistRepository.GetUserStudentAssistCareOf(userId, userInfo.Group_Id); // var alist = student_AssistRepository.GetUserStudentAssistCareOf(userId, userInfo.Group_Id);
var trans = studentRepository.DbTransaction; // var trans = studentRepository.DbTransaction;
try // try
{ // {
foreach (var item in list) // foreach (var item in list)
{ // {
bool flag = true; // bool flag = true;
if (item.CreateBy == userId) { // if (item.CreateBy == userId) {
Dictionary<string, object> keyValues = new Dictionary<string, object>() { // Dictionary<string, object> keyValues = new Dictionary<string, object>() {
{ nameof(RB_Student_ViewModel.CreateBy), receiveId} // { nameof(RB_Student_ViewModel.CreateBy), receiveId}
}; // };
List<WhereHelper> wheres = new List<WhereHelper>() { // List<WhereHelper> wheres = new List<WhereHelper>() {
new WhereHelper(){ // new WhereHelper(){
FiledName = nameof(RB_Student_ViewModel.StuId), // FiledName = nameof(RB_Student_ViewModel.StuId),
FiledValue = item.StuId, // FiledValue = item.StuId,
OperatorEnum =OperatorEnum.Equal // OperatorEnum =OperatorEnum.Equal
} // }
}; // };
flag = studentRepository.Update(keyValues, wheres, trans); // flag = studentRepository.Update(keyValues, wheres, trans);
} // }
if (flag) { // if (flag) {
var clist = alist.Where(x => x.StuId == item.StuId).ToList(); // var clist = alist.Where(x => x.StuId == item.StuId).ToList();
foreach (var qitem in clist) { // foreach (var qitem in clist) {
Dictionary<string, object> keyValues = new Dictionary<string, object>() { // Dictionary<string, object> keyValues = new Dictionary<string, object>() {
{ nameof(RB_Student_Assist_Extend.AssistId),receiveId}, // { nameof(RB_Student_Assist_Extend.AssistId),receiveId},
}; // };
List<WhereHelper> wheres = new List<WhereHelper>() { // List<WhereHelper> wheres = new List<WhereHelper>() {
new WhereHelper(){ // new WhereHelper(){
FiledName = nameof(RB_Student_Assist_Extend.Id), // FiledName = nameof(RB_Student_Assist_Extend.Id),
FiledValue = qitem.Id, // FiledValue = qitem.Id,
OperatorEnum =OperatorEnum.Equal // OperatorEnum =OperatorEnum.Equal
} // }
}; // };
flag = student_AssistRepository.Update(keyValues, wheres, trans); // flag = student_AssistRepository.Update(keyValues, wheres, trans);
} // }
} // }
if (flag) { // if (flag) {
//插入日志 // //插入日志
student_LogRepository.Insert(new Model.Entity.Customer.RB_Student_Log() // student_LogRepository.Insert(new Model.Entity.Customer.RB_Student_Log()
{ // {
CreateBy = userInfo.Id, // CreateBy = userInfo.Id,
CreateTime = DateTime.Now, // CreateTime = DateTime.Now,
CreateType = 1, // CreateType = 1,
Group_Id = userInfo.Group_Id, // Group_Id = userInfo.Group_Id,
LogContent = "离职转交客人负责人与服务人员,由【" + eModel.EmployeeName + "(" + userId + ")" + "】转交给【" + reModel.EmployeeName + "(" + receiveId + ")" + "】", // LogContent = "离职转交客人负责人与服务人员,由【" + eModel.EmployeeName + "(" + userId + ")" + "】转交给【" + reModel.EmployeeName + "(" + receiveId + ")" + "】",
LogId = 0, // LogId = 0,
LogTitle = "离职转交学员", // LogTitle = "离职转交学员",
LogType = Common.Enum.Log.StudentLogTypeEnum.BasicInfo, // LogType = Common.Enum.Log.StudentLogTypeEnum.BasicInfo,
StuId = item.StuId // StuId = item.StuId
}, trans); // }, trans);
} // }
} // }
studentRepository.DBSession.Commit(); // studentRepository.DBSession.Commit();
} // }
catch (Exception ex) // catch (Exception ex)
{ // {
LogHelper.Write(ex, "SetUserLeaveStudentCareOf"); // LogHelper.Write(ex, "SetUserLeaveStudentCareOf");
studentRepository.DBSession.Rollback(); // studentRepository.DBSession.Rollback();
return "学员转交出错了,请联系管理员"; // return "学员转交出错了,请联系管理员";
} // }
} // }
return ""; // return "";
} //}
#endregion #endregion
} }
......
...@@ -311,13 +311,19 @@ namespace Edu.Module.User ...@@ -311,13 +311,19 @@ namespace Edu.Module.User
TeacherAccountId = TeacherAccountId 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), detailsList = teacher_Assessment_DetailsRepository.GetTeacherAssessmentDetailsListRepository(new RB_Teacher_Assessment_Details_Extend()
CreateBy = userInfo.Id, {
CheckType = CheckType TeacherAssessmentId = (extModel?.Id ?? 0),
}); CreateBy = userInfo.Id,
CheckType = CheckType
});
}
var typeList = GetAssessmentTypeListModule(new RB_Assessment_Type_Extend() { }); var typeList = GetAssessmentTypeListModule(new RB_Assessment_Type_Extend() { });
var maxOptionList = new List<SubtypeItem>(); var maxOptionList = new List<SubtypeItem>();
int maxLength = 0; int maxLength = 0;
...@@ -353,7 +359,10 @@ namespace Edu.Module.User ...@@ -353,7 +359,10 @@ namespace Edu.Module.User
List<object> subList = new List<object>(); List<object> subList = new List<object>();
foreach (var subItem in item.SubtypeList) 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>(); List<object> optionList = new List<object>();
foreach (var tItem in subItem.OptionList) foreach (var tItem in subItem.OptionList)
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment