新增获取评估单表单信息接口

master
xiaochanghai 7 months ago
parent a6e309a983
commit 6f1d642f57
  1. 11
      Tiobon.Core.Api/Controllers/Ghrh/Ghrh_ResumeController.cs
  2. 7
      Tiobon.Core.Api/Tiobon.Core.xml
  3. 2
      Tiobon.Core.IServices/Ghrh/IGhrh_ResumeServices.cs
  4. 2
      Tiobon.Core.Model/ViewModels/Extend/ResumeViewTab.cs
  5. 89
      Tiobon.Core.Services/Ghrh/Ghrh_ResumeServices.cs

@ -449,4 +449,15 @@ public class Ghrh_ResumeController : BaseController<IGhrh_ResumeServices, Ghrh_R
return await _service.Download(ids);
}
#endregion
#region 获取安排面试表单信息
/// <summary>
/// 获取安排面试表单信息
/// </summary>
/// <param name="id">简历ID</param>
/// <returns></returns>
[HttpPost, Route("QueryAssessForm/{id}")]
public async Task<ServiceResult<dynamic>> QueryAssessForm(long id) => await _service.QueryAssessForm(id);
#endregion
}

@ -1508,6 +1508,13 @@
<param name="ids">简历ID</param>
<returns></returns>
</member>
<member name="M:Tiobon.Core.Api.Controllers.Ghrh_ResumeController.QueryAssessForm(System.Int64)">
<summary>
获取安排面试表单信息
</summary>
<param name="id">简历ID</param>
<returns></returns>
</member>
<member name="T:Tiobon.Core.Api.Controllers.Ghrh_ResumeEduBGController">
<summary>
教育背景(Controller)

@ -70,4 +70,6 @@ public interface IGhrh_ResumeServices : IBaseServices<Ghrh_Resume, Ghrh_ResumeDt
Task<ServiceResult> OverTimeDeleteResume();
Task<ServiceResult<string>> Download(List<long> ids);
Task<ServiceResult<dynamic>> QueryAssessForm(long id);
}

@ -206,6 +206,8 @@ public class ResumeScheduleInterviewResult
public string LastInterviewContent { get; set; }
}
public class ResumeRecommendFormStaff
{
/// <summary>

@ -42,6 +42,7 @@ public class Ghrh_ResumeServices : BaseServices<Ghrh_Resume, Ghrh_ResumeDto, Ins
/// </summary>
private readonly IGhrh_InterviewLogServices _ghrh_InterviewLogServices;
private readonly IGhrh_HumanRequestServices _ghrh_HumanRequestServices;
private readonly IGhrh_AssessConfigServices _ghrh_AssessConfigServices;
private readonly IWebHostEnvironment Env;
private readonly IConverter _converter;
private readonly IWebHostEnvironment _hostingEnvironment;
@ -57,6 +58,7 @@ public class Ghrh_ResumeServices : BaseServices<Ghrh_Resume, Ghrh_ResumeDto, Ins
IGhrh_InterviewRecordServices ghre_InterviewRecordServices,
IGhrh_InterviewLogServices ghrh_InterviewLogServices,
IGhrh_HumanRequestServices ghrh_HumanRequestServices,
IGhrh_AssessConfigServices ghrh_AssessConfigServices,
IConverter converter,
IWebHostEnvironment hostingEnvironment,
IGhrh_ResumeWorkExpServices ghre_ResumeWorkExpServices, IWebHostEnvironment env)
@ -75,6 +77,7 @@ public class Ghrh_ResumeServices : BaseServices<Ghrh_Resume, Ghrh_ResumeDto, Ins
_ghrh_ResumeWorkExpServices = ghre_ResumeWorkExpServices;
_ghrh_InterviewLogServices = ghrh_InterviewLogServices;
_ghrh_HumanRequestServices = ghrh_HumanRequestServices;
_ghrh_AssessConfigServices = ghrh_AssessConfigServices;
Env = env;
_converter = converter;
_hostingEnvironment = hostingEnvironment;
@ -2551,6 +2554,92 @@ WHERE A.IsEnable = 1 AND C.IsEnable = 1 AND C.Status = A.Status";
}
#endregion
#region 获取评估单表单信息
public async Task<ServiceResult<dynamic>> QueryAssessForm(long id)
{
dynamic result = new ExpandoObject();
var items = await _ghrh_AssessConfigServices.QueryFilterPage(new QueryBody()
{
pageNum = 1,
pageSize = 0
}, null);
#region Header
var header = new JArray();
JObject 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));
header.Add(obj);
}
var entity = await base.QueryById(id);
if (entity == null)
return ServiceResult<dynamic>.OprateFailed("无效的简历ID!");
var order = await _ghrh_InterviewOrderServices.QuerySingle(x => x.ResumeId == id);
if (order == null)
return ServiceResult<dynamic>.OprateFailed("无效的简历ID!");
var records = await _ghrh_InterviewRecordServices.Query(x => x.OrderId == order.Id, "Round ASC");
for (int i = 0; i < records.Count; i++)
{
var x = records[i];
var staff = await Db.Queryable<Ghra_Staff>().Where(o => o.StaffID == x.StaffId).FirstAsync();
obj = new();
obj.Add(new JProperty("title", $"第轮{x.Round}面试\n{staff?.StaffName}\n {x.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));
header.Add(obj);
}
obj = new();
obj.Add(new JProperty("title", "评价"));
obj.Add(new JProperty("field", "EvaluateContent"));
obj.Add(new JProperty("align", "center"));
obj.Add(new JProperty("width", 120));
obj.Add(new JProperty("fixed", null));
header.Add(obj);
result.Header = header;
#endregion
#region Body
var body = new JArray();
items.result.DT_TableDataT1.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];
obj.Add(new JProperty("Score" + (i + 1), null));
obj.Add(new JProperty("CanEdit" + (i + 1), null));
}
obj.Add(new JProperty("EvaluateContent", null));
body.Add(obj);
});
result.Body = body;
#endregion
return ServiceResult<dynamic>.OprateSuccess("查询成功", result);
}
#endregion
#region 通用方法
/// <summary>
/// 记录日志

Loading…
Cancel
Save