入职任务预览,入职任务cope,验证填入的信息
This commit is contained in:
+17
@@ -18,6 +18,23 @@ public class OnboardingContractDocumentController
|
||||
_service = service;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 创建入职任务前,按人事当前填写的参数下载 DOCX 合同预览。
|
||||
/// </summary>
|
||||
[HttpPost("preview-before-create")]
|
||||
[DisplayName("创建入职任务前预览合同")]
|
||||
public async Task<FileContentResult> PreviewBeforeCreate(
|
||||
[FromBody] OnboardingContractPreviewInput input)
|
||||
{
|
||||
var preview = await _service.PreviewBeforeCreate(input);
|
||||
return new FileContentResult(
|
||||
preview.FileBytes,
|
||||
"application/vnd.openxmlformats-officedocument.wordprocessingml.document")
|
||||
{
|
||||
FileDownloadName = preview.FileName
|
||||
};
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 生成入职合同文件
|
||||
/// </summary>
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using System.ComponentModel;
|
||||
|
||||
namespace SimpleAdmin.Web.Core;
|
||||
|
||||
/// <summary>
|
||||
@@ -25,4 +26,14 @@ public class OnboardingTaskController
|
||||
{
|
||||
return await _service.Create(input);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 在原任务之外批量复制独立的新入职任务。
|
||||
/// </summary>
|
||||
[HttpPost("copy")]
|
||||
[DisplayName("复制入职任务")]
|
||||
public async Task<dynamic> Copy([FromBody] OnboardingTaskCopyInput input)
|
||||
{
|
||||
return await _service.Copy(input);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user