新增ESS端提交问卷信息接口

master
xiaochanghai 3 months ago
parent 33e5089e5a
commit 1f4d6e90ee
  1. 11
      Tiobon.Core.Api/Controllers/Ghre/Ghre_SurveyController.cs
  2. 14
      Tiobon.Core.Api/Controllers/Ghre/Ghre_SurveyRecordController.cs
  3. 14
      Tiobon.Core.Api/Controllers/Ghre/Ghre_SurveyRecordDetailController.cs
  4. 14
      Tiobon.Core.Api/Controllers/Ghre/Ghre_SurveyRecordOptionController.cs
  5. 12755
      Tiobon.Core.Api/Tiobon.Core.Model.xml
  6. 22
      Tiobon.Core.Api/Tiobon.Core.xml
  7. 8
      Tiobon.Core.IServices/Ghre/IGhre_SurveyRecordDetailServices.cs
  8. 8
      Tiobon.Core.IServices/Ghre/IGhre_SurveyRecordOptionServices.cs
  9. 8
      Tiobon.Core.IServices/Ghre/IGhre_SurveyRecordServices.cs
  10. 2
      Tiobon.Core.IServices/Ghre/IGhre_SurveyServices.cs
  11. 163
      Tiobon.Core.Model/Base/Ghre/Ghre_SurveyRecord.Dto.Base.cs
  12. 132
      Tiobon.Core.Model/Base/Ghre/Ghre_SurveyRecordDetail.Dto.Base.cs
  13. 148
      Tiobon.Core.Model/Base/Ghre/Ghre_SurveyRecordOption.Dto.Base.cs
  14. 26
      Tiobon.Core.Model/Edit/Ghre/Ghre_SurveyRecord.Dto.EditInput.cs
  15. 26
      Tiobon.Core.Model/Edit/Ghre/Ghre_SurveyRecordDetail.Dto.EditInput.cs
  16. 26
      Tiobon.Core.Model/Edit/Ghre/Ghre_SurveyRecordOption.Dto.EditInput.cs
  17. 26
      Tiobon.Core.Model/Insert/Ghre/Ghre_SurveyRecord.Dto.InsertInput.cs
  18. 26
      Tiobon.Core.Model/Insert/Ghre/Ghre_SurveyRecordDetail.Dto.InsertInput.cs
  19. 26
      Tiobon.Core.Model/Insert/Ghre/Ghre_SurveyRecordOption.Dto.InsertInput.cs
  20. 164
      Tiobon.Core.Model/Models/Ghre/Ghre_SurveyRecord.cs
  21. 133
      Tiobon.Core.Model/Models/Ghre/Ghre_SurveyRecordDetail.cs
  22. 149
      Tiobon.Core.Model/Models/Ghre/Ghre_SurveyRecordOption.cs
  23. 34
      Tiobon.Core.Model/View/Ghre/Ghre_SurveyRecord.Dto.View.cs
  24. 34
      Tiobon.Core.Model/View/Ghre/Ghre_SurveyRecordDetail.Dto.View.cs
  25. 34
      Tiobon.Core.Model/View/Ghre/Ghre_SurveyRecordOption.Dto.View.cs
  26. 4
      Tiobon.Core.Model/ViewModels/Extend/InsertGhre_SurveyExtend.cs
  27. 15
      Tiobon.Core.Services/Ghre/Ghre_SurveyRecordDetailServices.cs
  28. 15
      Tiobon.Core.Services/Ghre/Ghre_SurveyRecordOptionServices.cs
  29. 15
      Tiobon.Core.Services/Ghre/Ghre_SurveyRecordServices.cs
  30. 29
      Tiobon.Core.Services/Ghre/Ghre_SurveyServices.cs

@ -78,4 +78,15 @@ public class Ghre_SurveyController : BaseController<IGhre_SurveyServices, Ghre_S
public async Task<ServiceResult<Ghre_SurveyExtend>> QueryESSData(long id) => await _service.QueryESSData(id);
#endregion
#region 提交
/// <summary>
/// 提交
/// </summary>
/// <param name="id"></param>
/// <returns></returns>
[HttpPost("SubmitESSData/{id}")]
public async Task<ServiceResult<Ghre_SurveyExtend>> SubmitESSData(long id) => await _service.QueryESSData(id);
#endregion
}

@ -0,0 +1,14 @@
namespace Tiobon.Core.Api.Controllers;
/// <summary>
/// Ghre_SurveyRecord(Controller)
/// </summary>
[Route("api/[controller]")]
[ApiController, GlobalActionFilter]
[Authorize(Permissions.Name), ApiExplorerSettings(GroupName = Grouping.GroupName_Ghre)]
public class Ghre_SurveyRecordController : BaseController<IGhre_SurveyRecordServices, Ghre_SurveyRecord, Ghre_SurveyRecordDto, InsertGhre_SurveyRecordInput, EditGhre_SurveyRecordInput>
{
public Ghre_SurveyRecordController(IGhre_SurveyRecordServices service) : base(service)
{
}
}

@ -0,0 +1,14 @@
namespace Tiobon.Core.Api.Controllers;
/// <summary>
/// Ghre_SurveyRecordDetail(Controller)
/// </summary>
[Route("api/[controller]")]
[ApiController, GlobalActionFilter]
[Authorize(Permissions.Name), ApiExplorerSettings(GroupName = Grouping.GroupName_Ghre)]
public class Ghre_SurveyRecordDetailController : BaseController<IGhre_SurveyRecordDetailServices, Ghre_SurveyRecordDetail, Ghre_SurveyRecordDetailDto, InsertGhre_SurveyRecordDetailInput, EditGhre_SurveyRecordDetailInput>
{
public Ghre_SurveyRecordDetailController(IGhre_SurveyRecordDetailServices service) : base(service)
{
}
}

@ -0,0 +1,14 @@
namespace Tiobon.Core.Api.Controllers;
/// <summary>
/// Ghre_SurveyRecordOption(Controller)
/// </summary>
[Route("api/[controller]")]
[ApiController, GlobalActionFilter]
[Authorize(Permissions.Name), ApiExplorerSettings(GroupName = Grouping.GroupName_Ghre)]
public class Ghre_SurveyRecordOptionController : BaseController<IGhre_SurveyRecordOptionServices, Ghre_SurveyRecordOption, Ghre_SurveyRecordOptionDto, InsertGhre_SurveyRecordOptionInput, EditGhre_SurveyRecordOptionInput>
{
public Ghre_SurveyRecordOptionController(IGhre_SurveyRecordOptionServices service) : base(service)
{
}
}

File diff suppressed because it is too large Load Diff

@ -1409,6 +1409,13 @@
<param name="id"></param>
<returns></returns>
</member>
<member name="M:Tiobon.Core.Api.Controllers.Ghre_SurveyController.SubmitESSData(System.Int64)">
<summary>
提交
</summary>
<param name="id"></param>
<returns></returns>
</member>
<member name="T:Tiobon.Core.Api.Controllers.Ghre_SurveyOptionController">
<summary>
问卷调查选项(Controller)
@ -1419,6 +1426,21 @@
问卷调查题目(Controller)
</summary>
</member>
<member name="T:Tiobon.Core.Api.Controllers.Ghre_SurveyRecordController">
<summary>
Ghre_SurveyRecord(Controller)
</summary>
</member>
<member name="T:Tiobon.Core.Api.Controllers.Ghre_SurveyRecordDetailController">
<summary>
Ghre_SurveyRecordDetail(Controller)
</summary>
</member>
<member name="T:Tiobon.Core.Api.Controllers.Ghre_SurveyRecordOptionController">
<summary>
Ghre_SurveyRecordOption(Controller)
</summary>
</member>
<member name="T:Tiobon.Core.Api.Controllers.Ghre_TeacherAttachmentController">
<summary>
Ghre_TeacherAttachment(Controller)

@ -0,0 +1,8 @@
namespace Tiobon.Core.IServices;
/// <summary>
/// Ghre_SurveyRecordDetail(自定义服务接口)
/// </summary>
public interface IGhre_SurveyRecordDetailServices : IBaseServices<Ghre_SurveyRecordDetail, Ghre_SurveyRecordDetailDto, InsertGhre_SurveyRecordDetailInput, EditGhre_SurveyRecordDetailInput>
{
}

@ -0,0 +1,8 @@
namespace Tiobon.Core.IServices;
/// <summary>
/// Ghre_SurveyRecordOption(自定义服务接口)
/// </summary>
public interface IGhre_SurveyRecordOptionServices : IBaseServices<Ghre_SurveyRecordOption, Ghre_SurveyRecordOptionDto, InsertGhre_SurveyRecordOptionInput, EditGhre_SurveyRecordOptionInput>
{
}

@ -0,0 +1,8 @@
namespace Tiobon.Core.IServices;
/// <summary>
/// Ghre_SurveyRecord(自定义服务接口)
/// </summary>
public interface IGhre_SurveyRecordServices : IBaseServices<Ghre_SurveyRecord, Ghre_SurveyRecordDto, InsertGhre_SurveyRecordInput, EditGhre_SurveyRecordInput>
{
}

@ -17,4 +17,6 @@ public interface IGhre_SurveyServices : IBaseServices<Ghre_Survey, Ghre_SurveyDt
Task<ServiceResult<InsertGhre_SurveyExtend>> QueryData(long id);
Task<ServiceResult<Ghre_SurveyExtend>> QueryESSData(long id);
Task<ServiceResult<Ghre_SurveyExtend>> SubmitESSData(long id);
}

@ -0,0 +1,163 @@
/* ,
* Ghre_SurveyRecord.cs
*
* N / A
* Ghre_SurveyRecord
*
* Ver
*
*V0.01 2025/4/2 10:23:05 SimonHsiao
*
* Copyright(c) 2025 Tiobon Corporation. All Rights Reserved.
*
*  
* SimonHsiao
*
*/
namespace Tiobon.Core.Model.Models;
/// <summary>
/// Ghre_SurveyRecord (Dto.Base)
/// </summary>
public class Ghre_SurveyRecordBase
{
/// <summary>
/// 问卷调查ID
/// </summary>
public long? SurveyId { get; set; }
/// <summary>
/// 员工ID
/// </summary>
public int? StaffId { get; set; }
/// <summary>
/// 得分
/// </summary>
[Display(Name = "Score"), Description("得分"), Column(TypeName = "decimal(20,2)")]
public decimal? Score { get; set; }
/// <summary>
/// 调整得分
/// </summary>
[Display(Name = "AdjustScore"), Description("调整得分"), Column(TypeName = "decimal(20,2)")]
public decimal? AdjustScore { get; set; }
/// <summary>
/// 提交时间
/// </summary>
public DateTime? SubmitDate { get; set; }
/// <summary>
/// 开始时间
/// </summary>
public DateTime? BeginTime { get; set; }
/// <summary>
/// 结束时间
/// </summary>
public DateTime? EndTime { get; set; }
/// <summary>
/// 实际开始时间
/// </summary>
public DateTime? ActualBeginTime { get; set; }
/// <summary>
/// 实际结束时间
/// </summary>
public DateTime? ActualEndTime { get; set; }
/// <summary>
/// 是否查看结果
/// </summary>
public bool? IsView { get; set; }
/// <summary>
/// 查看结果时间
/// </summary>
public DateTime? ViewTime { get; set; }
/// <summary>
/// 备注
/// </summary>
[Display(Name = "RemarkSz"), Description("备注"), MaxLength(2000, ErrorMessage = "备注 不能超过 2000 个字符")]
public string RemarkSz { get; set; }
/// <summary>
/// 默认标志
/// </summary>
public int? IsDefault { get; set; }
/// <summary>
/// 预留字段1
/// </summary>
[Display(Name = "Reverse1"), Description("预留字段1"), MaxLength(1000, ErrorMessage = "预留字段1 不能超过 1000 个字符")]
public string Reverse1 { get; set; }
/// <summary>
/// 预留字段2
/// </summary>
[Display(Name = "Reverse2"), Description("预留字段2"), MaxLength(1000, ErrorMessage = "预留字段2 不能超过 1000 个字符")]
public string Reverse2 { get; set; }
/// <summary>
/// 预留字段3
/// </summary>
[Display(Name = "Reverse3"), Description("预留字段3"), MaxLength(1000, ErrorMessage = "预留字段3 不能超过 1000 个字符")]
public string Reverse3 { get; set; }
/// <summary>
/// 预留字段4
/// </summary>
[Display(Name = "Reverse4"), Description("预留字段4"), MaxLength(1000, ErrorMessage = "预留字段4 不能超过 1000 个字符")]
public string Reverse4 { get; set; }
/// <summary>
/// 预留字段5
/// </summary>
[Display(Name = "Reverse5"), Description("预留字段5"), MaxLength(1000, ErrorMessage = "预留字段5 不能超过 1000 个字符")]
public string Reverse5 { get; set; }
/// <summary>
/// 预留字段6
/// </summary>
[Display(Name = "Reverse6"), Description("预留字段6"), MaxLength(1000, ErrorMessage = "预留字段6 不能超过 1000 个字符")]
public string Reverse6 { get; set; }
/// <summary>
/// 预留字段7
/// </summary>
[Display(Name = "Reverse7"), Description("预留字段7"), MaxLength(1000, ErrorMessage = "预留字段7 不能超过 1000 个字符")]
public string Reverse7 { get; set; }
/// <summary>
/// 预留字段8
/// </summary>
[Display(Name = "Reverse8"), Description("预留字段8"), MaxLength(1000, ErrorMessage = "预留字段8 不能超过 1000 个字符")]
public string Reverse8 { get; set; }
/// <summary>
/// 预留字段9
/// </summary>
[Display(Name = "Reverse9"), Description("预留字段9"), MaxLength(1000, ErrorMessage = "预留字段9 不能超过 1000 个字符")]
public string Reverse9 { get; set; }
/// <summary>
/// 预留字段10
/// </summary>
[Display(Name = "Reverse10"), Description("预留字段10"), MaxLength(1000, ErrorMessage = "预留字段10 不能超过 1000 个字符")]
public string Reverse10 { get; set; }
/// <summary>
/// 预留字段11
/// </summary>
public int? ReverseI1 { get; set; }
/// <summary>
/// 预留字段12
/// </summary>
public int? ReverseI2 { get; set; }
}

@ -0,0 +1,132 @@
/* ,
* Ghre_SurveyRecordDetail.cs
*
* N / A
* Ghre_SurveyRecordDetail
*
* Ver
*
*V0.01 2025/4/2 10:22:48 SimonHsiao
*
* Copyright(c) 2025 Tiobon Corporation. All Rights Reserved.
*
*  
* SimonHsiao
*
*/
namespace Tiobon.Core.Model.Models;
/// <summary>
/// Ghre_SurveyRecordDetail (Dto.Base)
/// </summary>
public class Ghre_SurveyRecordDetailBase
{
/// <summary>
/// 问卷调查ID
/// </summary>
public long? SurveyId { get; set; }
/// <summary>
/// 问卷调查记录ID
/// </summary>
public long? SurveyRecordId { get; set; }
/// <summary>
/// 问卷调查题目ID
/// </summary>
public long? SurveyQuestionId { get; set; }
/// <summary>
/// 员工ID
/// </summary>
public long? StaffId { get; set; }
/// <summary>
/// 得分
/// </summary>
[Display(Name = "Score"), Description("得分"), Column(TypeName = "decimal(20,2)")]
public decimal? Score { get; set; }
/// <summary>
/// 备注
/// </summary>
[Display(Name = "RemarkSz"), Description("备注"), MaxLength(2000, ErrorMessage = "备注 不能超过 2000 个字符")]
public string RemarkSz { get; set; }
/// <summary>
/// 默认标志
/// </summary>
public int? IsDefault { get; set; }
/// <summary>
/// 预留字段1
/// </summary>
[Display(Name = "Reverse1"), Description("预留字段1"), MaxLength(1000, ErrorMessage = "预留字段1 不能超过 1000 个字符")]
public string Reverse1 { get; set; }
/// <summary>
/// 预留字段2
/// </summary>
[Display(Name = "Reverse2"), Description("预留字段2"), MaxLength(1000, ErrorMessage = "预留字段2 不能超过 1000 个字符")]
public string Reverse2 { get; set; }
/// <summary>
/// 预留字段3
/// </summary>
[Display(Name = "Reverse3"), Description("预留字段3"), MaxLength(1000, ErrorMessage = "预留字段3 不能超过 1000 个字符")]
public string Reverse3 { get; set; }
/// <summary>
/// 预留字段4
/// </summary>
[Display(Name = "Reverse4"), Description("预留字段4"), MaxLength(1000, ErrorMessage = "预留字段4 不能超过 1000 个字符")]
public string Reverse4 { get; set; }
/// <summary>
/// 预留字段5
/// </summary>
[Display(Name = "Reverse5"), Description("预留字段5"), MaxLength(1000, ErrorMessage = "预留字段5 不能超过 1000 个字符")]
public string Reverse5 { get; set; }
/// <summary>
/// 预留字段6
/// </summary>
[Display(Name = "Reverse6"), Description("预留字段6"), MaxLength(1000, ErrorMessage = "预留字段6 不能超过 1000 个字符")]
public string Reverse6 { get; set; }
/// <summary>
/// 预留字段7
/// </summary>
[Display(Name = "Reverse7"), Description("预留字段7"), MaxLength(1000, ErrorMessage = "预留字段7 不能超过 1000 个字符")]
public string Reverse7 { get; set; }
/// <summary>
/// 预留字段8
/// </summary>
[Display(Name = "Reverse8"), Description("预留字段8"), MaxLength(1000, ErrorMessage = "预留字段8 不能超过 1000 个字符")]
public string Reverse8 { get; set; }
/// <summary>
/// 预留字段9
/// </summary>
[Display(Name = "Reverse9"), Description("预留字段9"), MaxLength(1000, ErrorMessage = "预留字段9 不能超过 1000 个字符")]
public string Reverse9 { get; set; }
/// <summary>
/// 预留字段10
/// </summary>
[Display(Name = "Reverse10"), Description("预留字段10"), MaxLength(1000, ErrorMessage = "预留字段10 不能超过 1000 个字符")]
public string Reverse10 { get; set; }
/// <summary>
/// 预留字段11
/// </summary>
public int? ReverseI1 { get; set; }
/// <summary>
/// 预留字段12
/// </summary>
public int? ReverseI2 { get; set; }
}

@ -0,0 +1,148 @@
/* ,
* Ghre_SurveyRecordOption.cs
*
* N / A
* Ghre_SurveyRecordOption
*
* Ver
*
*V0.01 2025/4/2 10:22:26 SimonHsiao
*
* Copyright(c) 2025 Tiobon Corporation. All Rights Reserved.
*
*  
* SimonHsiao
*
*/
namespace Tiobon.Core.Model.Models;
/// <summary>
/// Ghre_SurveyRecordOption (Dto.Base)
/// </summary>
public class Ghre_SurveyRecordOptionBase
{
/// <summary>
/// 问卷调查ID
/// </summary>
public long? SurveyId { get; set; }
/// <summary>
/// 问卷调查记录ID
/// </summary>
public long? SurveyRecordId { get; set; }
/// <summary>
/// 问卷调查记录明细ID
/// </summary>
public long? SurveyRecordDetailId { get; set; }
/// <summary>
/// 问卷调查题目ID
/// </summary>
public long? SurveyQuestionId { get; set; }
/// <summary>
/// 题目选项ID
/// </summary>
public long? SurveyQuestionOptionId { get; set; }
/// <summary>
/// 员工ID
/// </summary>
public long? StaffId { get; set; }
/// <summary>
/// 题目选项内容
/// </summary>
[Display(Name = "OptionContent"), Description("题目选项内容"), MaxLength(2000, ErrorMessage = "题目选项内容 不能超过 2000 个字符")]
public string OptionContent { get; set; }
/// <summary>
/// 得分
/// </summary>
[Display(Name = "Score"), Description("得分"), Column(TypeName = "decimal(20,2)")]
public decimal? Score { get; set; }
/// <summary>
/// 备注
/// </summary>
[Display(Name = "RemarkSz"), Description("备注"), MaxLength(2000, ErrorMessage = "备注 不能超过 2000 个字符")]
public string RemarkSz { get; set; }
/// <summary>
/// 默认标志
/// </summary>
public int? IsDefault { get; set; }
/// <summary>
/// 预留字段1
/// </summary>
[Display(Name = "Reverse1"), Description("预留字段1"), MaxLength(1000, ErrorMessage = "预留字段1 不能超过 1000 个字符")]
public string Reverse1 { get; set; }
/// <summary>
/// 预留字段2
/// </summary>
[Display(Name = "Reverse2"), Description("预留字段2"), MaxLength(1000, ErrorMessage = "预留字段2 不能超过 1000 个字符")]
public string Reverse2 { get; set; }
/// <summary>
/// 预留字段3
/// </summary>
[Display(Name = "Reverse3"), Description("预留字段3"), MaxLength(1000, ErrorMessage = "预留字段3 不能超过 1000 个字符")]
public string Reverse3 { get; set; }
/// <summary>
/// 预留字段4
/// </summary>
[Display(Name = "Reverse4"), Description("预留字段4"), MaxLength(1000, ErrorMessage = "预留字段4 不能超过 1000 个字符")]
public string Reverse4 { get; set; }
/// <summary>
/// 预留字段5
/// </summary>
[Display(Name = "Reverse5"), Description("预留字段5"), MaxLength(1000, ErrorMessage = "预留字段5 不能超过 1000 个字符")]
public string Reverse5 { get; set; }
/// <summary>
/// 预留字段6
/// </summary>
[Display(Name = "Reverse6"), Description("预留字段6"), MaxLength(1000, ErrorMessage = "预留字段6 不能超过 1000 个字符")]
public string Reverse6 { get; set; }
/// <summary>
/// 预留字段7
/// </summary>
[Display(Name = "Reverse7"), Description("预留字段7"), MaxLength(1000, ErrorMessage = "预留字段7 不能超过 1000 个字符")]
public string Reverse7 { get; set; }
/// <summary>
/// 预留字段8
/// </summary>
[Display(Name = "Reverse8"), Description("预留字段8"), MaxLength(1000, ErrorMessage = "预留字段8 不能超过 1000 个字符")]
public string Reverse8 { get; set; }
/// <summary>
/// 预留字段9
/// </summary>
[Display(Name = "Reverse9"), Description("预留字段9"), MaxLength(1000, ErrorMessage = "预留字段9 不能超过 1000 个字符")]
public string Reverse9 { get; set; }
/// <summary>
/// 预留字段10
/// </summary>
[Display(Name = "Reverse10"), Description("预留字段10"), MaxLength(1000, ErrorMessage = "预留字段10 不能超过 1000 个字符")]
public string Reverse10 { get; set; }
/// <summary>
/// 预留字段11
/// </summary>
public int? ReverseI1 { get; set; }
/// <summary>
/// 预留字段12
/// </summary>
public int? ReverseI2 { get; set; }
}

@ -0,0 +1,26 @@
/* ,
* Ghre_SurveyRecord.cs
*
* N / A
* Ghre_SurveyRecord
*
* Ver
*
*V0.01 2025/4/2 10:23:05 SimonHsiao
*
* Copyright(c) 2025 Tiobon Corporation. All Rights Reserved.
*
*  
* SimonHsiao
*
*/
namespace Tiobon.Core.Model.Models;
/// <summary>
/// Ghre_SurveyRecord (Dto.EditInput)
/// </summary>
public class EditGhre_SurveyRecordInput : Ghre_SurveyRecordBase
{
}

@ -0,0 +1,26 @@
/* ,
* Ghre_SurveyRecordDetail.cs
*
* N / A
* Ghre_SurveyRecordDetail
*
* Ver
*
*V0.01 2025/4/2 10:22:48 SimonHsiao
*
* Copyright(c) 2025 Tiobon Corporation. All Rights Reserved.
*
*  
* SimonHsiao
*
*/
namespace Tiobon.Core.Model.Models;
/// <summary>
/// Ghre_SurveyRecordDetail (Dto.EditInput)
/// </summary>
public class EditGhre_SurveyRecordDetailInput : Ghre_SurveyRecordDetailBase
{
}

@ -0,0 +1,26 @@
/* ,
* Ghre_SurveyRecordOption.cs
*
* N / A
* Ghre_SurveyRecordOption
*
* Ver
*
*V0.01 2025/4/2 10:22:26 SimonHsiao
*
* Copyright(c) 2025 Tiobon Corporation. All Rights Reserved.
*
*  
* SimonHsiao
*
*/
namespace Tiobon.Core.Model.Models;
/// <summary>
/// Ghre_SurveyRecordOption (Dto.EditInput)
/// </summary>
public class EditGhre_SurveyRecordOptionInput : Ghre_SurveyRecordOptionBase
{
}

@ -0,0 +1,26 @@
/* ,
* Ghre_SurveyRecord.cs
*
* N / A
* Ghre_SurveyRecord
*
* Ver
*
*V0.01 2025/4/2 10:23:05 SimonHsiao
*
* Copyright(c) 2025 Tiobon Corporation. All Rights Reserved.
*
*  
* SimonHsiao
*
*/
namespace Tiobon.Core.Model.Models;
/// <summary>
/// Ghre_SurveyRecord (Dto.InsertInput)
/// </summary>
public class InsertGhre_SurveyRecordInput : Ghre_SurveyRecordBase
{
}

@ -0,0 +1,26 @@
/* ,
* Ghre_SurveyRecordDetail.cs
*
* N / A
* Ghre_SurveyRecordDetail
*
* Ver
*
*V0.01 2025/4/2 10:22:48 SimonHsiao
*
* Copyright(c) 2025 Tiobon Corporation. All Rights Reserved.
*
*  
* SimonHsiao
*
*/
namespace Tiobon.Core.Model.Models;
/// <summary>
/// Ghre_SurveyRecordDetail (Dto.InsertInput)
/// </summary>
public class InsertGhre_SurveyRecordDetailInput : Ghre_SurveyRecordDetailBase
{
}

@ -0,0 +1,26 @@
/* ,
* Ghre_SurveyRecordOption.cs
*
* N / A
* Ghre_SurveyRecordOption
*
* Ver
*
*V0.01 2025/4/2 10:22:26 SimonHsiao
*
* Copyright(c) 2025 Tiobon Corporation. All Rights Reserved.
*
*  
* SimonHsiao
*
*/
namespace Tiobon.Core.Model.Models;
/// <summary>
/// Ghre_SurveyRecordOption (Dto.InsertInput)
/// </summary>
public class InsertGhre_SurveyRecordOptionInput : Ghre_SurveyRecordOptionBase
{
}

@ -0,0 +1,164 @@
/* ,
* Ghre_SurveyRecord.cs
*
* N / A
* Ghre_SurveyRecord
*
* Ver
*
*V0.01 2025/4/2 10:23:05 SimonHsiao
*
* Copyright(c) 2025 Tiobon Corporation. All Rights Reserved.
*
*  
* SimonHsiao
*
*/
namespace Tiobon.Core.Model.Models;
/// <summary>
/// Ghre_SurveyRecord (Model)
/// </summary>
[SugarTable("Ghre_SurveyRecord", "Ghre_SurveyRecord"), Entity(TableCnName = "Ghre_SurveyRecord", TableName = "Ghre_SurveyRecord")]
public class Ghre_SurveyRecord : BasePoco
{
/// <summary>
/// 问卷调查ID
/// </summary>
public long? SurveyId { get; set; }
/// <summary>
/// 员工ID
/// </summary>
public int? StaffId { get; set; }
/// <summary>
/// 得分
/// </summary>
[Display(Name = "Score"), Description("得分"), Column(TypeName = "decimal(20,2)")]
public decimal? Score { get; set; }
/// <summary>
/// 调整得分
/// </summary>
[Display(Name = "AdjustScore"), Description("调整得分"), Column(TypeName = "decimal(20,2)")]
public decimal? AdjustScore { get; set; }
/// <summary>
/// 提交时间
/// </summary>
public DateTime? SubmitDate { get; set; }
/// <summary>
/// 开始时间
/// </summary>
public DateTime? BeginTime { get; set; }
/// <summary>
/// 结束时间
/// </summary>
public DateTime? EndTime { get; set; }
/// <summary>
/// 实际开始时间
/// </summary>
public DateTime? ActualBeginTime { get; set; }
/// <summary>
/// 实际结束时间
/// </summary>
public DateTime? ActualEndTime { get; set; }
/// <summary>
/// 是否查看结果
/// </summary>
public bool? IsView { get; set; }
/// <summary>
/// 查看结果时间
/// </summary>
public DateTime? ViewTime { get; set; }
/// <summary>
/// 备注
/// </summary>
[Display(Name = "RemarkSz"), Description("备注"), MaxLength(2000, ErrorMessage = "备注 不能超过 2000 个字符")]
public string RemarkSz { get; set; }
/// <summary>
/// 默认标志
/// </summary>
public int? IsDefault { get; set; }
/// <summary>
/// 预留字段1
/// </summary>
[Display(Name = "Reverse1"), Description("预留字段1"), MaxLength(1000, ErrorMessage = "预留字段1 不能超过 1000 个字符")]
public string Reverse1 { get; set; }
/// <summary>
/// 预留字段2
/// </summary>
[Display(Name = "Reverse2"), Description("预留字段2"), MaxLength(1000, ErrorMessage = "预留字段2 不能超过 1000 个字符")]
public string Reverse2 { get; set; }
/// <summary>
/// 预留字段3
/// </summary>
[Display(Name = "Reverse3"), Description("预留字段3"), MaxLength(1000, ErrorMessage = "预留字段3 不能超过 1000 个字符")]
public string Reverse3 { get; set; }
/// <summary>
/// 预留字段4
/// </summary>
[Display(Name = "Reverse4"), Description("预留字段4"), MaxLength(1000, ErrorMessage = "预留字段4 不能超过 1000 个字符")]
public string Reverse4 { get; set; }
/// <summary>
/// 预留字段5
/// </summary>
[Display(Name = "Reverse5"), Description("预留字段5"), MaxLength(1000, ErrorMessage = "预留字段5 不能超过 1000 个字符")]
public string Reverse5 { get; set; }
/// <summary>
/// 预留字段6
/// </summary>
[Display(Name = "Reverse6"), Description("预留字段6"), MaxLength(1000, ErrorMessage = "预留字段6 不能超过 1000 个字符")]
public string Reverse6 { get; set; }
/// <summary>
/// 预留字段7
/// </summary>
[Display(Name = "Reverse7"), Description("预留字段7"), MaxLength(1000, ErrorMessage = "预留字段7 不能超过 1000 个字符")]
public string Reverse7 { get; set; }
/// <summary>
/// 预留字段8
/// </summary>
[Display(Name = "Reverse8"), Description("预留字段8"), MaxLength(1000, ErrorMessage = "预留字段8 不能超过 1000 个字符")]
public string Reverse8 { get; set; }
/// <summary>
/// 预留字段9
/// </summary>
[Display(Name = "Reverse9"), Description("预留字段9"), MaxLength(1000, ErrorMessage = "预留字段9 不能超过 1000 个字符")]
public string Reverse9 { get; set; }
/// <summary>
/// 预留字段10
/// </summary>
[Display(Name = "Reverse10"), Description("预留字段10"), MaxLength(1000, ErrorMessage = "预留字段10 不能超过 1000 个字符")]
public string Reverse10 { get; set; }
/// <summary>
/// 预留字段11
/// </summary>
public int? ReverseI1 { get; set; }
/// <summary>
/// 预留字段12
/// </summary>
public int? ReverseI2 { get; set; }
}

@ -0,0 +1,133 @@
/* ,
* Ghre_SurveyRecordDetail.cs
*
* N / A
* Ghre_SurveyRecordDetail
*
* Ver
*
*V0.01 2025/4/2 10:22:48 SimonHsiao
*
* Copyright(c) 2025 Tiobon Corporation. All Rights Reserved.
*
*  
* SimonHsiao
*
*/
namespace Tiobon.Core.Model.Models;
/// <summary>
/// Ghre_SurveyRecordDetail (Model)
/// </summary>
[SugarTable("Ghre_SurveyRecordDetail", "Ghre_SurveyRecordDetail"), Entity(TableCnName = "Ghre_SurveyRecordDetail", TableName = "Ghre_SurveyRecordDetail")]
public class Ghre_SurveyRecordDetail : BasePoco
{
/// <summary>
/// 问卷调查ID
/// </summary>
public long? SurveyId { get; set; }
/// <summary>
/// 问卷调查记录ID
/// </summary>
public long? SurveyRecordId { get; set; }
/// <summary>
/// 问卷调查题目ID
/// </summary>
public long? SurveyQuestionId { get; set; }
/// <summary>
/// 员工ID
/// </summary>
public long? StaffId { get; set; }
/// <summary>
/// 得分
/// </summary>
[Display(Name = "Score"), Description("得分"), Column(TypeName = "decimal(20,2)")]
public decimal? Score { get; set; }
/// <summary>
/// 备注
/// </summary>
[Display(Name = "RemarkSz"), Description("备注"), MaxLength(2000, ErrorMessage = "备注 不能超过 2000 个字符")]
public string RemarkSz { get; set; }
/// <summary>
/// 默认标志
/// </summary>
public int? IsDefault { get; set; }
/// <summary>
/// 预留字段1
/// </summary>
[Display(Name = "Reverse1"), Description("预留字段1"), MaxLength(1000, ErrorMessage = "预留字段1 不能超过 1000 个字符")]
public string Reverse1 { get; set; }
/// <summary>
/// 预留字段2
/// </summary>
[Display(Name = "Reverse2"), Description("预留字段2"), MaxLength(1000, ErrorMessage = "预留字段2 不能超过 1000 个字符")]
public string Reverse2 { get; set; }
/// <summary>
/// 预留字段3
/// </summary>
[Display(Name = "Reverse3"), Description("预留字段3"), MaxLength(1000, ErrorMessage = "预留字段3 不能超过 1000 个字符")]
public string Reverse3 { get; set; }
/// <summary>
/// 预留字段4
/// </summary>
[Display(Name = "Reverse4"), Description("预留字段4"), MaxLength(1000, ErrorMessage = "预留字段4 不能超过 1000 个字符")]
public string Reverse4 { get; set; }
/// <summary>
/// 预留字段5
/// </summary>
[Display(Name = "Reverse5"), Description("预留字段5"), MaxLength(1000, ErrorMessage = "预留字段5 不能超过 1000 个字符")]
public string Reverse5 { get; set; }
/// <summary>
/// 预留字段6
/// </summary>
[Display(Name = "Reverse6"), Description("预留字段6"), MaxLength(1000, ErrorMessage = "预留字段6 不能超过 1000 个字符")]
public string Reverse6 { get; set; }
/// <summary>
/// 预留字段7
/// </summary>
[Display(Name = "Reverse7"), Description("预留字段7"), MaxLength(1000, ErrorMessage = "预留字段7 不能超过 1000 个字符")]
public string Reverse7 { get; set; }
/// <summary>
/// 预留字段8
/// </summary>
[Display(Name = "Reverse8"), Description("预留字段8"), MaxLength(1000, ErrorMessage = "预留字段8 不能超过 1000 个字符")]
public string Reverse8 { get; set; }
/// <summary>
/// 预留字段9
/// </summary>
[Display(Name = "Reverse9"), Description("预留字段9"), MaxLength(1000, ErrorMessage = "预留字段9 不能超过 1000 个字符")]
public string Reverse9 { get; set; }
/// <summary>
/// 预留字段10
/// </summary>
[Display(Name = "Reverse10"), Description("预留字段10"), MaxLength(1000, ErrorMessage = "预留字段10 不能超过 1000 个字符")]
public string Reverse10 { get; set; }
/// <summary>
/// 预留字段11
/// </summary>
public int? ReverseI1 { get; set; }
/// <summary>
/// 预留字段12
/// </summary>
public int? ReverseI2 { get; set; }
}

@ -0,0 +1,149 @@
/* ,
* Ghre_SurveyRecordOption.cs
*
* N / A
* Ghre_SurveyRecordOption
*
* Ver
*
*V0.01 2025/4/2 10:22:26 SimonHsiao
*
* Copyright(c) 2025 Tiobon Corporation. All Rights Reserved.
*
*  
* SimonHsiao
*
*/
namespace Tiobon.Core.Model.Models;
/// <summary>
/// Ghre_SurveyRecordOption (Model)
/// </summary>
[SugarTable("Ghre_SurveyRecordOption", "Ghre_SurveyRecordOption"), Entity(TableCnName = "Ghre_SurveyRecordOption", TableName = "Ghre_SurveyRecordOption")]
public class Ghre_SurveyRecordOption : BasePoco
{
/// <summary>
/// 问卷调查ID
/// </summary>
public long? SurveyId { get; set; }
/// <summary>
/// 问卷调查记录ID
/// </summary>
public long? SurveyRecordId { get; set; }
/// <summary>
/// 问卷调查记录明细ID
/// </summary>
public long? SurveyRecordDetailId { get; set; }
/// <summary>
/// 问卷调查题目ID
/// </summary>
public long? SurveyQuestionId { get; set; }
/// <summary>
/// 题目选项ID
/// </summary>
public long? SurveyQuestionOptionId { get; set; }
/// <summary>
/// 员工ID
/// </summary>
public long? StaffId { get; set; }
/// <summary>
/// 题目选项内容
/// </summary>
[Display(Name = "OptionContent"), Description("题目选项内容"), MaxLength(2000, ErrorMessage = "题目选项内容 不能超过 2000 个字符")]
public string OptionContent { get; set; }
/// <summary>
/// 得分
/// </summary>
[Display(Name = "Score"), Description("得分"), Column(TypeName = "decimal(20,2)")]
public decimal? Score { get; set; }
/// <summary>
/// 备注
/// </summary>
[Display(Name = "RemarkSz"), Description("备注"), MaxLength(2000, ErrorMessage = "备注 不能超过 2000 个字符")]
public string RemarkSz { get; set; }
/// <summary>
/// 默认标志
/// </summary>
public int? IsDefault { get; set; }
/// <summary>
/// 预留字段1
/// </summary>
[Display(Name = "Reverse1"), Description("预留字段1"), MaxLength(1000, ErrorMessage = "预留字段1 不能超过 1000 个字符")]
public string Reverse1 { get; set; }
/// <summary>
/// 预留字段2
/// </summary>
[Display(Name = "Reverse2"), Description("预留字段2"), MaxLength(1000, ErrorMessage = "预留字段2 不能超过 1000 个字符")]
public string Reverse2 { get; set; }
/// <summary>
/// 预留字段3
/// </summary>
[Display(Name = "Reverse3"), Description("预留字段3"), MaxLength(1000, ErrorMessage = "预留字段3 不能超过 1000 个字符")]
public string Reverse3 { get; set; }
/// <summary>
/// 预留字段4
/// </summary>
[Display(Name = "Reverse4"), Description("预留字段4"), MaxLength(1000, ErrorMessage = "预留字段4 不能超过 1000 个字符")]
public string Reverse4 { get; set; }
/// <summary>
/// 预留字段5
/// </summary>
[Display(Name = "Reverse5"), Description("预留字段5"), MaxLength(1000, ErrorMessage = "预留字段5 不能超过 1000 个字符")]
public string Reverse5 { get; set; }
/// <summary>
/// 预留字段6
/// </summary>
[Display(Name = "Reverse6"), Description("预留字段6"), MaxLength(1000, ErrorMessage = "预留字段6 不能超过 1000 个字符")]
public string Reverse6 { get; set; }
/// <summary>
/// 预留字段7
/// </summary>
[Display(Name = "Reverse7"), Description("预留字段7"), MaxLength(1000, ErrorMessage = "预留字段7 不能超过 1000 个字符")]
public string Reverse7 { get; set; }
/// <summary>
/// 预留字段8
/// </summary>
[Display(Name = "Reverse8"), Description("预留字段8"), MaxLength(1000, ErrorMessage = "预留字段8 不能超过 1000 个字符")]
public string Reverse8 { get; set; }
/// <summary>
/// 预留字段9
/// </summary>
[Display(Name = "Reverse9"), Description("预留字段9"), MaxLength(1000, ErrorMessage = "预留字段9 不能超过 1000 个字符")]
public string Reverse9 { get; set; }
/// <summary>
/// 预留字段10
/// </summary>
[Display(Name = "Reverse10"), Description("预留字段10"), MaxLength(1000, ErrorMessage = "预留字段10 不能超过 1000 个字符")]
public string Reverse10 { get; set; }
/// <summary>
/// 预留字段11
/// </summary>
public int? ReverseI1 { get; set; }
/// <summary>
/// 预留字段12
/// </summary>
public int? ReverseI2 { get; set; }
}

@ -0,0 +1,34 @@
/* ,
* Ghre_SurveyRecord.cs
*
* N / A
* Ghre_SurveyRecord
*
* Ver
*
*V0.01 2025/4/2 10:23:05 SimonHsiao
*
* Copyright(c) 2025 Tiobon Corporation. All Rights Reserved.
*
*  
* SimonHsiao
*
*/
namespace Tiobon.Core.Model.Models;
/// <summary>
/// Ghre_SurveyRecord(Dto.View1)
/// </summary>
public class Ghre_SurveyRecordDto : Ghre_SurveyRecord
{
/// <summary>
/// 创建信息
/// </summary>
public string CreateDataInfo { get; set; }
/// <summary>
/// 修改信息
/// </summary>
public string UpdateDataInfo { get; set; }
}

@ -0,0 +1,34 @@
/* ,
* Ghre_SurveyRecordDetail.cs
*
* N / A
* Ghre_SurveyRecordDetail
*
* Ver
*
*V0.01 2025/4/2 10:22:48 SimonHsiao
*
* Copyright(c) 2025 Tiobon Corporation. All Rights Reserved.
*
*  
* SimonHsiao
*
*/
namespace Tiobon.Core.Model.Models;
/// <summary>
/// Ghre_SurveyRecordDetail(Dto.View1)
/// </summary>
public class Ghre_SurveyRecordDetailDto : Ghre_SurveyRecordDetail
{
/// <summary>
/// 创建信息
/// </summary>
public string CreateDataInfo { get; set; }
/// <summary>
/// 修改信息
/// </summary>
public string UpdateDataInfo { get; set; }
}

@ -0,0 +1,34 @@
/* ,
* Ghre_SurveyRecordOption.cs
*
* N / A
* Ghre_SurveyRecordOption
*
* Ver
*
*V0.01 2025/4/2 10:22:26 SimonHsiao
*
* Copyright(c) 2025 Tiobon Corporation. All Rights Reserved.
*
*  
* SimonHsiao
*
*/
namespace Tiobon.Core.Model.Models;
/// <summary>
/// Ghre_SurveyRecordOption(Dto.View1)
/// </summary>
public class Ghre_SurveyRecordOptionDto : Ghre_SurveyRecordOption
{
/// <summary>
/// 创建信息
/// </summary>
public string CreateDataInfo { get; set; }
/// <summary>
/// 修改信息
/// </summary>
public string UpdateDataInfo { get; set; }
}

@ -270,13 +270,15 @@ public class Ghre_SurveyExtend : Ghre_SurveyExtendBase
/// 问卷调查题目
/// </summary>
public List<Ghre_SurveyQuestionExtend> Questions { get; set; }
public bool IsSubmit { get; set; } = false;
}
/// <summary>
/// 问卷调查题目
/// </summary>
public class Ghre_SurveyQuestionExtend : Ghre_SurveyQuestionExtendBase
{
{
/// <summary>
/// 问卷调查选项
/// </summary>

@ -0,0 +1,15 @@
namespace Tiobon.Core.Services;
/// <summary>
/// Ghre_SurveyRecordDetail (服务)
/// </summary>
public class Ghre_SurveyRecordDetailServices : BaseServices<Ghre_SurveyRecordDetail, Ghre_SurveyRecordDetailDto, InsertGhre_SurveyRecordDetailInput, EditGhre_SurveyRecordDetailInput>, IGhre_SurveyRecordDetailServices
{
private readonly IBaseRepository<Ghre_SurveyRecordDetail> _dal;
public Ghre_SurveyRecordDetailServices(ICaching caching, IBaseRepository<Ghre_SurveyRecordDetail> dal)
{
this._dal = dal;
base.BaseDal = dal;
base._caching = caching;
}
}

@ -0,0 +1,15 @@
namespace Tiobon.Core.Services;
/// <summary>
/// Ghre_SurveyRecordOption (服务)
/// </summary>
public class Ghre_SurveyRecordOptionServices : BaseServices<Ghre_SurveyRecordOption, Ghre_SurveyRecordOptionDto, InsertGhre_SurveyRecordOptionInput, EditGhre_SurveyRecordOptionInput>, IGhre_SurveyRecordOptionServices
{
private readonly IBaseRepository<Ghre_SurveyRecordOption> _dal;
public Ghre_SurveyRecordOptionServices(ICaching caching, IBaseRepository<Ghre_SurveyRecordOption> dal)
{
this._dal = dal;
base.BaseDal = dal;
base._caching = caching;
}
}

@ -0,0 +1,15 @@
namespace Tiobon.Core.Services;
/// <summary>
/// Ghre_SurveyRecord (服务)
/// </summary>
public class Ghre_SurveyRecordServices : BaseServices<Ghre_SurveyRecord, Ghre_SurveyRecordDto, InsertGhre_SurveyRecordInput, EditGhre_SurveyRecordInput>, IGhre_SurveyRecordServices
{
private readonly IBaseRepository<Ghre_SurveyRecord> _dal;
public Ghre_SurveyRecordServices(ICaching caching, IBaseRepository<Ghre_SurveyRecord> dal)
{
this._dal = dal;
base.BaseDal = dal;
base._caching = caching;
}
}

@ -203,6 +203,35 @@ public class Ghre_SurveyServices : BaseServices<Ghre_Survey, Ghre_SurveyDto, Ins
var questions = await Db.Queryable<Ghre_SurveyQuestion>().OrderBy(x => x.SortNo).Where(x => x.SurveyId == id).ToListAsync();
var options = await Db.Queryable<Ghre_SurveyOption>().OrderBy(x => x.SortNo).Where(x => x.SurveyId == id).ToListAsync();
data.Questions = Mapper.Map(questions).ToANew<List<Ghre_SurveyQuestionExtend>>();
data.Questions.ForEach(x =>
{
x.Options = Mapper.Map(options.Where(o => o.SurveyQuestionId == x.Id)).ToANew<List<Ghre_SurveyOptionExtend>>();
});
#region 是否存在已提交问卷数据
data.IsSubmit = await Db.Queryable<Ghre_SurveyRecord>().Where(x => x.StaffId == App.User.StaffId && x.SurveyId == id).AnyAsync();
#endregion
return ServiceResult<Ghre_SurveyExtend>.OprateSuccess("成功", data);
}
public async Task<ServiceResult<Ghre_SurveyExtend>> SubmitESSData(long id)
{
var entity = await base.QueryById(id);
var data = Mapper.Map(entity).ToANew<Ghre_SurveyExtend>();
data.BeginEndTime.Add(data.BeginTime);
data.BeginEndTime.Add(data.EndTime);
if (entity.StaffId.IsNotEmptyOrNull())
data.StaffIds = JsonHelper.JsonToObj<List<int>>(entity.StaffId);
if (entity.DeptId.IsNotEmptyOrNull())
data.DeptIds = JsonHelper.JsonToObj<List<int>>(entity.DeptId);
var questions = await Db.Queryable<Ghre_SurveyQuestion>().OrderBy(x => x.SortNo).Where(x => x.SurveyId == id).ToListAsync();
var options = await Db.Queryable<Ghre_SurveyOption>().OrderBy(x => x.SortNo).Where(x => x.SurveyId == id).ToListAsync();
data.Questions = Mapper.Map(questions).ToANew<List<Ghre_SurveyQuestionExtend>>();
data.Questions.ForEach(x =>
{

Loading…
Cancel
Save