新增查询证书设计控件接口

master
xiaochanghai 1 month ago
parent 14c075c235
commit 969c4f1fd3
  1. 6
      Tiobon.Core.Api/Controllers/Ghre/Ghre_CertificateController.cs
  2. 4
      Tiobon.Core.IServices/Ghre/IGhre_CertificateServices.cs
  3. 14
      Tiobon.Core.Model/ViewModels/Extend/Ghre_CertificateControl.cs
  4. 138
      Tiobon.Core.Services/Ghre/Ghre_CertificateServices.cs

@ -11,4 +11,10 @@ public class Ghre_CertificateController : BaseController<IGhre_CertificateServic
public Ghre_CertificateController(IGhre_CertificateServices service) : base(service)
{
}
[Route("QueryControl")]
public ServiceResult<List<Ghre_CertificateControl>> QueryControl()
{
return _service.QueryControl();
}
}

@ -1,5 +1,4 @@
using Tiobon.Core.IServices.BASE;
using Tiobon.Core.Model.Models;
using Tiobon.Core.Model;
namespace Tiobon.Core.IServices;
@ -8,4 +7,5 @@ namespace Tiobon.Core.IServices;
/// </summary>
public interface IGhre_CertificateServices : IBaseServices<Ghre_Certificate, Ghre_CertificateDto, InsertGhre_CertificateInput, EditGhre_CertificateInput>
{
ServiceResult<List<Ghre_CertificateControl>> QueryControl();
}

@ -0,0 +1,14 @@
namespace Tiobon.Core.Model;
public class Ghre_CertificateControl
{
public string groupName { get; set; }
public List<Ghre_CertificateControlItem> groupList { get; set; } = new List<Ghre_CertificateControlItem>();
}
public class Ghre_CertificateControlItem
{
public string label { get; set; }
public string field { get; set; }
public string type { get; set; }
}

@ -240,5 +240,143 @@ public class Ghre_CertificateServices : BaseServices<Ghre_Certificate, Ghre_Cert
}
return ServiceResult<ExcelData>.OprateSuccess("导入成功!", data);
}
public ServiceResult<List<Ghre_CertificateControl>> QueryControl()
{
var list = new List<Ghre_CertificateControl>
{
new Ghre_CertificateControl()
{
groupName="证书信息",
groupList = {
new Ghre_CertificateControlItem()
{
label="证书编号",
field="CertificateNo'",
type= "fieldText"
},
new Ghre_CertificateControlItem()
{
label="发证日期",
field="AwardDate'",
type= "fieldText"
},
new Ghre_CertificateControlItem()
{
label="颁发机构",
field="CertificationBody'",
type= "fieldText"
},
new Ghre_CertificateControlItem()
{
label="有效期至",
field="ValidityPeriod'",
type= "fieldText"
},
new Ghre_CertificateControlItem()
{
label="电子章",
field="ElectronicSealUrl'",
type= "image"
}
}
}
,new Ghre_CertificateControl()
{
groupName="学员信息",
groupList = {
new Ghre_CertificateControlItem()
{
label="员工姓名",
field="StaffName'",
type= "fieldText"
},
new Ghre_CertificateControlItem()
{
label="部门",
field="DeptName'",
type= "fieldText"
},
new Ghre_CertificateControlItem()
{
label="岗位",
field="TitleName'",
type= "fieldText"
},
new Ghre_CertificateControlItem()
{
label="照片",
field="PhotoUrl'",
type= "fieldText"
}
}
}
,new Ghre_CertificateControl()
{
groupName="课程信息",
groupList = {
new Ghre_CertificateControlItem()
{
label="课程名称",
field="CourseName'",
type= "fieldText"
},
new Ghre_CertificateControlItem()
{
label="课程场景",
field="CourseSceneName'",
type= "fieldText"
},
new Ghre_CertificateControlItem()
{
label="学习时间",
field="StudyTime'",
type= "fieldText"
}
}
}
,new Ghre_CertificateControl()
{
groupName="考试信息",
groupList = {
new Ghre_CertificateControlItem()
{
label="考试名称",
field="ExamName'",
type= "fieldText"
},
new Ghre_CertificateControlItem()
{
label="考试编号",
field="ExamNo'",
type= "fieldText"
},
new Ghre_CertificateControlItem()
{
label="考试分数",
field="ExamScore'",
type= "fieldText"
},
new Ghre_CertificateControlItem()
{
label="考试结果",
field="ExamResult'",
type= "fieldText"
},
new Ghre_CertificateControlItem()
{
label="考试评语",
field="ExamComment'",
type= "fieldText"
}
}
}
};
return ServiceResult<List<Ghre_CertificateControl>>.OprateSuccess("查询成功!", list);
}
#endregion
}
Loading…
Cancel
Save