|
|
|
@ -2921,14 +2921,159 @@ WHERE A.IsEnable = 1 AND C.IsEnable = 1 AND C.Status = A.Status"; |
|
|
|
|
result.Body = body; |
|
|
|
|
#endregion |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#region Header |
|
|
|
|
|
|
|
|
|
var printHeader = new JArray(); |
|
|
|
|
obj = new(); |
|
|
|
|
for (int i = 0; i < 2; i++) |
|
|
|
|
{ |
|
|
|
|
obj = new(); |
|
|
|
|
obj.Add(new JProperty("title", "标准")); |
|
|
|
|
obj.Add(new JProperty("field", "Type" + (i + 1) + "Text")); |
|
|
|
|
obj.Add(new JProperty("align", "center")); |
|
|
|
|
obj.Add(new JProperty("width", i == 0 ? 80 : 120)); |
|
|
|
|
obj.Add(new JProperty("fixed", null)); |
|
|
|
|
printHeader.Add(obj); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
for (int i = 0; i < records.Count; i++) |
|
|
|
|
{ |
|
|
|
|
var record = records[i]; |
|
|
|
|
var staff = await Db.Queryable<Ghra_Staff>().Where(o => o.StaffID == record.StaffId).FirstAsync(); |
|
|
|
|
obj = new(); |
|
|
|
|
obj.Add(new JProperty("title", $"第{record.Round}轮面试\n{staff?.StaffName}\n {record.InterviewTime}")); |
|
|
|
|
obj.Add(new JProperty("field", "Score" + (i + 1))); |
|
|
|
|
obj.Add(new JProperty("align", "center")); |
|
|
|
|
obj.Add(new JProperty("width", 120)); |
|
|
|
|
obj.Add(new JProperty("fixed", null)); |
|
|
|
|
|
|
|
|
|
if (assessDetails.Where(o => o.StaffId == record.StaffId && o.InterviewRecordId == record.Id && o.Status == 1).Any()) |
|
|
|
|
printHeader.Add(obj); |
|
|
|
|
} |
|
|
|
|
result.PrintHeader = printHeader; |
|
|
|
|
#endregion |
|
|
|
|
|
|
|
|
|
#region 打印Body |
|
|
|
|
var printBody = new JArray(); |
|
|
|
|
assessConfigs.ForEach(x => |
|
|
|
|
{ |
|
|
|
|
obj = new(); |
|
|
|
|
obj.Add(new JProperty("Type1", x.ItemClass)); |
|
|
|
|
obj.Add(new JProperty("Type1Text", x.ItemClassLabel)); |
|
|
|
|
obj.Add(new JProperty("Type2", x.Id)); |
|
|
|
|
obj.Add(new JProperty("Type2Text", x.ItemName)); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
for (int i = 0; i < records.Count; i++) |
|
|
|
|
{ |
|
|
|
|
var record = records[i]; |
|
|
|
|
var assessDetail = assessDetails.Where(o => o.AssessConfigId == x.Id.ObjToString() && o.StaffId == record.StaffId && o.InterviewRecordId == record.Id).SingleOrDefault(); |
|
|
|
|
if ((assessDetail != null && assessDetail.Status != 1 && assessDetail.InterviewRecordId == record.Id) || assessDetail is null) |
|
|
|
|
continue; |
|
|
|
|
|
|
|
|
|
if (assessDetail != null) |
|
|
|
|
obj.Add(new JProperty("Score" + (i + 1), assessDetail.AssessContent.ObjToInt())); |
|
|
|
|
else |
|
|
|
|
obj.Add(new JProperty("Score" + (i + 1), null)); |
|
|
|
|
if (record.StaffId == staffId && record.Round == order.Round) |
|
|
|
|
obj.Add(new JProperty("CanEdit" + (i + 1), true)); |
|
|
|
|
else |
|
|
|
|
obj.Add(new JProperty("CanEdit" + (i + 1), false)); |
|
|
|
|
} |
|
|
|
|
//obj.Add(new JProperty("EvaluateContent", null)); |
|
|
|
|
printBody.Add(obj); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
obj = new(); |
|
|
|
|
obj.Add(new JProperty("Type1", "TotalScore")); |
|
|
|
|
obj.Add(new JProperty("Type1Text", "总分")); |
|
|
|
|
obj.Add(new JProperty("Type2", null)); |
|
|
|
|
obj.Add(new JProperty("Type2Text", null)); |
|
|
|
|
|
|
|
|
|
for (int i = 0; i < records.Count; i++) |
|
|
|
|
{ |
|
|
|
|
var record = records[i]; |
|
|
|
|
var assessDetail = assessDetails.Where(o => o.AssessConfigId == "TotalScore" && o.StaffId == record.StaffId && o.InterviewRecordId == record.Id).SingleOrDefault(); |
|
|
|
|
|
|
|
|
|
if ((assessDetail != null && assessDetail.Status != 1 && assessDetail.InterviewRecordId == record.Id) || assessDetail is null) |
|
|
|
|
continue; |
|
|
|
|
|
|
|
|
|
if (assessDetail != null) |
|
|
|
|
obj.Add(new JProperty("Score" + (i + 1), assessDetail.AssessContent.ObjToInt())); |
|
|
|
|
else |
|
|
|
|
obj.Add(new JProperty("Score" + (i + 1), null)); |
|
|
|
|
if (record.StaffId == staffId && record.Round == order.Round) |
|
|
|
|
obj.Add(new JProperty("CanEdit" + (i + 1), true)); |
|
|
|
|
else |
|
|
|
|
obj.Add(new JProperty("CanEdit" + (i + 1), false)); |
|
|
|
|
} |
|
|
|
|
printBody.Add(obj); |
|
|
|
|
|
|
|
|
|
obj = new(); |
|
|
|
|
obj.Add(new JProperty("Type1", "EvaluateContent")); |
|
|
|
|
obj.Add(new JProperty("Type1Text", "总体评价")); |
|
|
|
|
obj.Add(new JProperty("Type2", null)); |
|
|
|
|
obj.Add(new JProperty("Type2Text", null)); |
|
|
|
|
|
|
|
|
|
for (int i = 0; i < records.Count; i++) |
|
|
|
|
{ |
|
|
|
|
var record = records[i]; |
|
|
|
|
var assessDetail = assessDetails.Where(o => o.AssessConfigId == "EvaluateContent" && o.StaffId == record.StaffId && o.InterviewRecordId == record.Id).SingleOrDefault(); |
|
|
|
|
if ((assessDetail != null && assessDetail.Status != 1 && assessDetail.InterviewRecordId == record.Id) || assessDetail is null) |
|
|
|
|
continue; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (assessDetail != null) |
|
|
|
|
obj.Add(new JProperty("Score" + (i + 1), assessDetail.AssessContent)); |
|
|
|
|
else |
|
|
|
|
obj.Add(new JProperty("Score" + (i + 1), null)); |
|
|
|
|
if (record.StaffId == staffId && record.Round == order.Round) |
|
|
|
|
obj.Add(new JProperty("CanEdit" + (i + 1), true)); |
|
|
|
|
else |
|
|
|
|
obj.Add(new JProperty("CanEdit" + (i + 1), false)); |
|
|
|
|
} |
|
|
|
|
printBody.Add(obj); |
|
|
|
|
|
|
|
|
|
obj = new(); |
|
|
|
|
obj.Add(new JProperty("Type1", "IsPass")); |
|
|
|
|
obj.Add(new JProperty("Type1Text", "面试结果")); |
|
|
|
|
obj.Add(new JProperty("Type2", null)); |
|
|
|
|
obj.Add(new JProperty("Type2Text", null)); |
|
|
|
|
|
|
|
|
|
for (int i = 0; i < records.Count; i++) |
|
|
|
|
{ |
|
|
|
|
var record = records[i]; |
|
|
|
|
var assessDetail = assessDetails.Where(o => o.AssessConfigId == "IsPass" && o.StaffId == record.StaffId && o.InterviewRecordId == record.Id).SingleOrDefault(); |
|
|
|
|
|
|
|
|
|
if ((assessDetail != null && assessDetail.Status != 1 && assessDetail.InterviewRecordId == record.Id) || assessDetail is null) |
|
|
|
|
continue; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (assessDetail != null) |
|
|
|
|
obj.Add(new JProperty("Score" + (i + 1), assessDetail.AssessContent.ObjToInt())); |
|
|
|
|
else |
|
|
|
|
obj.Add(new JProperty("Score" + (i + 1), null)); |
|
|
|
|
if (record.StaffId == staffId) |
|
|
|
|
obj.Add(new JProperty("CanEdit" + (i + 1), true)); |
|
|
|
|
else |
|
|
|
|
obj.Add(new JProperty("CanEdit" + (i + 1), false)); |
|
|
|
|
} |
|
|
|
|
printBody.Add(obj); |
|
|
|
|
|
|
|
|
|
result.PrintBody = printBody; |
|
|
|
|
#endregion |
|
|
|
|
|
|
|
|
|
return ServiceResult<dynamic>.OprateSuccess("查询成功", result); |
|
|
|
|
} |
|
|
|
|
#endregion |
|
|
|
|
|
|
|
|
|
#region 面试评估 |
|
|
|
|
public async Task<ServiceResult> AssessInterview(long id, List<Dictionary<string, object>> input) |
|
|
|
|
public async Task<ServiceResult> AssessInterview(long id, int status, List<Dictionary<string, object>> input) |
|
|
|
|
{ |
|
|
|
|
|
|
|
|
|
if (status > 1 || status < 0) |
|
|
|
|
status = 0; |
|
|
|
|
var entity = await base.QueryById(id); |
|
|
|
|
if (entity == null) |
|
|
|
|
return ServiceResult.OprateFailed("无效的简历ID!"); |
|
|
|
@ -2992,7 +3137,8 @@ WHERE A.IsEnable = 1 AND C.IsEnable = 1 AND C.Status = A.Status"; |
|
|
|
|
StaffId = staffId, |
|
|
|
|
InterviewRecordId = records[j].Id, |
|
|
|
|
AssessConfigId = assessConfigId.ObjToString(), |
|
|
|
|
AssessContent = assessContent |
|
|
|
|
AssessContent = assessContent, |
|
|
|
|
Status = status |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|