master
xiaochanghai 7 months ago
parent 5a2067be14
commit 29e9f410dc
  1. 7
      Tiobon.Core.Api/Controllers/Ghrh/Ghrh_ResumeController.cs
  2. 10
      Tiobon.Core.Api/Tiobon.Core.Model.xml
  3. 3
      Tiobon.Core.Api/Tiobon.Core.xml
  4. 2
      Tiobon.Core.IServices/Ghrh/IGhrh_ResumeServices.cs
  5. 7
      Tiobon.Core.Model/Base/Ghrh/Ghrh_InterviewAssessDetail.Dto.Base.cs
  6. 7
      Tiobon.Core.Model/Models/Ghrh/Ghrh_InterviewAssessDetail.cs
  7. 152
      Tiobon.Core.Services/Ghrh/Ghrh_ResumeServices.cs

@ -311,11 +311,12 @@ public class Ghrh_ResumeController : BaseController<IGhrh_ResumeServices, Ghrh_R
/// </summary> /// </summary>
/// <param name="id">简历Id</param> /// <param name="id">简历Id</param>
/// <param name="input">input</param> /// <param name="input">input</param>
/// <param name="status">状态,0:暂存;1:提交</param>
/// <returns></returns> /// <returns></returns>
[HttpPost, Route("AssessInterview/{id}")] [HttpPost, Route("AssessInterview/{id}/{status}")]
public async Task<ServiceResult> AssessInterview(long id, [FromBody] List<Dictionary<string, object>> input) public async Task<ServiceResult> AssessInterview(long id, int status, [FromBody] List<Dictionary<string, object>> input)
{ {
return await _service.AssessInterview(id, input); return await _service.AssessInterview(id, status, input);
} }
#endregion #endregion

@ -6950,6 +6950,11 @@
预留字段12 预留字段12
</summary> </summary>
</member> </member>
<member name="P:Tiobon.Core.Model.Models.Ghrh_InterviewAssessDetailBase.Status">
<summary>
状态,0:暂存;1:提交
</summary>
</member>
<member name="T:Tiobon.Core.Model.Models.Ghrh_InterviewLogBase"> <member name="T:Tiobon.Core.Model.Models.Ghrh_InterviewLogBase">
<summary> <summary>
面试工单日志 (Dto.Base) 面试工单日志 (Dto.Base)
@ -19441,6 +19446,11 @@
预留字段12 预留字段12
</summary> </summary>
</member> </member>
<member name="P:Tiobon.Core.Model.Models.Ghrh_InterviewAssessDetail.Status">
<summary>
状态,0:暂存;1:提交
</summary>
</member>
<member name="T:Tiobon.Core.Model.Models.Ghrh_InterviewLog"> <member name="T:Tiobon.Core.Model.Models.Ghrh_InterviewLog">
<summary> <summary>
面试工单日志 (Model) 面试工单日志 (Model)

@ -1469,12 +1469,13 @@
<param name="input">input</param> <param name="input">input</param>
<returns></returns> <returns></returns>
</member> </member>
<member name="M:Tiobon.Core.Api.Controllers.Ghrh_ResumeController.AssessInterview(System.Int64,System.Collections.Generic.List{System.Collections.Generic.Dictionary{System.String,System.Object}})"> <member name="M:Tiobon.Core.Api.Controllers.Ghrh_ResumeController.AssessInterview(System.Int64,System.Int32,System.Collections.Generic.List{System.Collections.Generic.Dictionary{System.String,System.Object}})">
<summary> <summary>
面试评估(主管填写) 面试评估(主管填写)
</summary> </summary>
<param name="id">简历Id</param> <param name="id">简历Id</param>
<param name="input">input</param> <param name="input">input</param>
<param name="status">状态,0:暂存;1:提交</param>
<returns></returns> <returns></returns>
</member> </member>
<member name="M:Tiobon.Core.Api.Controllers.Ghrh_ResumeController.ModifyInterviewer(System.Int64,System.Collections.Generic.List{Tiobon.Core.Model.ViewModels.Extend.ResumeRecommendFormStaff})"> <member name="M:Tiobon.Core.Api.Controllers.Ghrh_ResumeController.ModifyInterviewer(System.Int64,System.Collections.Generic.List{Tiobon.Core.Model.ViewModels.Extend.ResumeRecommendFormStaff})">

@ -48,7 +48,7 @@ public interface IGhrh_ResumeServices : IBaseServices<Ghrh_Resume, Ghrh_ResumeDt
Task<ServiceResult> RescheduleInterview(long id, ResumeRescheduleInterviewForm input, string type); Task<ServiceResult> RescheduleInterview(long id, ResumeRescheduleInterviewForm input, string type);
Task<ServiceResult> AssessInterview(long id, List<Dictionary<string, object>> input); Task<ServiceResult> AssessInterview(long id, int status, List<Dictionary<string, object>> input);
Task<ServiceResult> ModifyInterviewer(long id, List<ResumeRecommendFormStaff> InterviewStaffs); Task<ServiceResult> ModifyInterviewer(long id, List<ResumeRecommendFormStaff> InterviewStaffs);

@ -6,7 +6,7 @@
* *
* Ver * Ver
* *
*V0.01 2024/12/3 16:29:48 SimonHsiao *V0.01 2024/12/6 21:07:07 SimonHsiao
* *
* Copyright(c) 2024 Tiobon Corporation. All Rights Reserved. * Copyright(c) 2024 Tiobon Corporation. All Rights Reserved.
* *
@ -130,4 +130,9 @@ public class Ghrh_InterviewAssessDetailBase
/// 预留字段12 /// 预留字段12
/// </summary> /// </summary>
public int? ReverseI2 { get; set; } public int? ReverseI2 { get; set; }
/// <summary>
/// 状态,0:暂存;1:提交
/// </summary>
public int? Status { get; set; }
} }

@ -6,7 +6,7 @@
* *
* Ver * Ver
* *
*V0.01 2024/12/3 16:29:48 SimonHsiao *V0.01 2024/12/6 21:07:07 SimonHsiao
* *
* Copyright(c) 2024 Tiobon Corporation. All Rights Reserved. * Copyright(c) 2024 Tiobon Corporation. All Rights Reserved.
* *
@ -131,4 +131,9 @@ public class Ghrh_InterviewAssessDetail : BasePoco
/// 预留字段12 /// 预留字段12
/// </summary> /// </summary>
public int? ReverseI2 { get; set; } public int? ReverseI2 { get; set; }
/// <summary>
/// 状态,0:暂存;1:提交
/// </summary>
public int? Status { get; set; }
} }

@ -2921,14 +2921,159 @@ WHERE A.IsEnable = 1 AND C.IsEnable = 1 AND C.Status = A.Status";
result.Body = body; result.Body = body;
#endregion #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); return ServiceResult<dynamic>.OprateSuccess("查询成功", result);
} }
#endregion #endregion
#region 面试评估 #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); var entity = await base.QueryById(id);
if (entity == null) if (entity == null)
return ServiceResult.OprateFailed("无效的简历ID!"); return ServiceResult.OprateFailed("无效的简历ID!");
@ -2992,7 +3137,8 @@ WHERE A.IsEnable = 1 AND C.IsEnable = 1 AND C.Status = A.Status";
StaffId = staffId, StaffId = staffId,
InterviewRecordId = records[j].Id, InterviewRecordId = records[j].Id,
AssessConfigId = assessConfigId.ObjToString(), AssessConfigId = assessConfigId.ObjToString(),
AssessContent = assessContent AssessContent = assessContent,
Status = status
}); });
} }
} }

Loading…
Cancel
Save