Commit 24e4c9e9 authored by 黄奎's avatar 黄奎

页面修改

parent 5e0a8664
......@@ -40,5 +40,15 @@ namespace Edu.Model.ViewModel.DataStatistics
/// 等级得分
/// </summary>
public decimal LevelScore { get; set; }
/// <summary>
/// 编号
/// </summary>
public int LevelId { get; set; }
/// <summary>
/// 是否选中
/// </summary>
public bool IsCheck { get; set; }
}
}
......@@ -225,7 +225,7 @@ namespace Edu.Module.User
List<Employee_ViewModel> empList = new List<Employee_ViewModel>();
if (!string.IsNullOrEmpty(teacherIds))
{
empList= accountRepository.GetEmployeeListRepository(new Employee_ViewModel() { QIds = teacherIds });
empList = accountRepository.GetEmployeeListRepository(new Employee_ViewModel() { QIds = teacherIds });
}
foreach (var item in list)
{
......@@ -241,22 +241,87 @@ namespace Edu.Module.User
/// </summary>
/// <param name="TeacherAccountId"></param>
/// <returns></returns>
public object GetTeacherAssessmentModule(int TeacherAccountId,int YearStr=2022,int MonthStr=4)
public object GetTeacherAssessmentModule(int TeacherAccountId, int YearStr = 2022, int MonthStr = 4)
{
object obj = new object();
var extModel = teacher_AssessmentRepository.GetTeacherAssessmentListRepository(new RB_Teacher_Assessment_Extend()
object result = new object();
var extModel = teacher_AssessmentRepository.GetTeacherAssessmentEntityRepository(new RB_Teacher_Assessment_Extend()
{
YearStr = YearStr,
MonthStr = MonthStr,
TeacherAccountId = TeacherAccountId
}).FirstOrDefault();
});
var detailsList = teacher_Assessment_DetailsRepository.GetTeacherAssessmentDetailsListRepository(new RB_Teacher_Assessment_Details_Extend()
{
TeacherAssessmentId = (extModel?.Id ?? 0)
});
var typeList = GetAssessmentTypeListModule(new RB_Assessment_Type_Extend() { });
obj = new
List<object> list = new List<object>();
foreach (var item in typeList)
{
List<object> subList = new List<object>();
foreach (var subItem in item.SubtypeList)
{
List<object> optionList = new List<object>();
foreach (var tItem in subItem.OptionList)
{
optionList.Add(new
{
tItem.LevelId,
tItem.LevelTitle,
tItem.LevelDesc,
tItem.IsCheck,
tItem.LevelScore,
});
}
var sObj = new
{
CheckId = 0,
CheckScore = 0,
subItem.AssessmentTypeId,
subItem.SubTypeName,
OptionList= optionList,
};
subList.Add(sObj);
}
var obj = new
{
item.TypeName,
SubtypeList = subList
};
list.Add(obj);
}
result = new
{
Id=extModel?.Id??0,
Id = extModel?.Id ?? 0,
YearStr = extModel?.YearStr ?? 0,
MonthStr = extModel?.MonthStr ?? 0,
TeacherAccountId = TeacherAccountId,
TeacherScore = extModel?.TeacherScore ?? 0,
JiaoWuScore = extModel?.JiaoWuScore ?? 0,
TotalScore = extModel?.TotalScore ?? 0,
Behavior = extModel?.Behavior ?? "",
Advantage = extModel?.Advantage ?? "",
ShortComing = extModel?.ShortComing ?? "",
Potential = extModel?.Potential ?? "",
PotentialOther = extModel?.PotentialOther ?? "",
Help = extModel?.Help ?? "",
Suggest = extModel?.Suggest ?? "",
Other = extModel?.Other ?? "",
TeacherSignDate = Common.ConvertHelper.FormatTime(extModel?.TeacherSignDate),
AuditStatus = extModel?.AuditStatus ?? 0,
DetailsList = list
};
return obj;
return result;
}
/// <summary>
/// 保存老师业绩考核
/// </summary>
/// <returns></returns>
public bool SaveTeacherAssessmentModule()
{
bool flag = false;
return flag;
}
#endregion
}
......
......@@ -85,5 +85,37 @@ WHERE 1=1
}
return Get<RB_Teacher_Assessment_Extend>(builder.ToString()).ToList();
}
/// <summary>
/// 获取教师月度考核实体
/// </summary>
/// <param name="query"></param>
/// <returns></returns>
public RB_Teacher_Assessment_Extend GetTeacherAssessmentEntityRepository(RB_Teacher_Assessment_Extend query)
{
StringBuilder builder = new StringBuilder();
builder.AppendFormat(@"
SELECT A.*
FROM RB_Teacher_Assessment AS A
WHERE 1=1
");
if (query != null)
{
if (query.Group_Id > 0)
{
builder.AppendFormat(" AND A.{0}={1} ", nameof(RB_Teacher_Assessment_Extend.Group_Id), query.Group_Id);
}
if (query.YearStr > 0)
{
builder.AppendFormat(" AND A.{0}={1} ", nameof(RB_Teacher_Assessment_Extend.YearStr), query.YearStr);
}
if (query.MonthStr > 0)
{
builder.AppendFormat(" AND A.{0}={1} ", nameof(RB_Teacher_Assessment_Extend.MonthStr), query.MonthStr);
}
}
builder.AppendFormat(" AND A.{0}={1} ", nameof(RB_Teacher_Assessment_Extend.TeacherAccountId), query.TeacherAccountId);
return Get<RB_Teacher_Assessment_Extend>(builder.ToString()).FirstOrDefault();
}
}
}
......@@ -79,15 +79,18 @@ namespace Edu.WebApi.Controllers.DataService
JArray subArray = JArray.Parse(optionListStr);
if (subArray != null && subArray.Count > 0)
{
int LevelId = 1;
foreach (var subItem in subArray)
{
JObject sObj = JObject.Parse(subItem.ToString());
subModel.OptionList.Add(new SubtypeItem()
{
LevelId= LevelId,
LevelTitle = sObj.GetStringValue("LevelTitle"),
LevelDesc = sObj.GetStringValue("LevelDesc"),
LevelScore = sObj.GetDecimal("LevelScore"),
});
LevelId++;
}
}
}
......@@ -200,6 +203,17 @@ namespace Edu.WebApi.Controllers.DataService
return ApiResult.Success(data: obj);
}
/// <summary>
/// 保存教师考核信息
/// </summary>
/// <returns></returns>
[HttpPost]
public ApiResult SaveTeacherAssessmentInfo()
{
var flag = teacherAssessmentModule.SaveTeacherAssessmentModule();
return flag ? ApiResult.Success() : ApiResult.Failed();
}
#endregion
}
......
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