培训计划 页面开发

master
xiaochanghai 4 months ago
parent ed7d37224d
commit 1f11a3a41b
  1. 6820
      Model/Tiobon.Web.pdm
  2. 10
      Tiobon.Core.Api/Tiobon.Core.Model.xml
  3. 7
      Tiobon.Core.Model/Base/Ghre/Ghre_Course.Dto.Base.cs
  4. 4
      Tiobon.Core.Model/Base/Ghre/Ghre_Plan.Dto.Base.cs
  5. 7
      Tiobon.Core.Model/Models/Ghre/Ghre_Course.cs
  6. 2
      Tiobon.Core.Model/Models/Ghre/Ghre_Plan.cs
  7. 2
      Tiobon.Core.Model/View/Ghre/Ghre_Plan.Dto.View.cs
  8. 17
      Tiobon.Core.Services/Ghre/Ghre_CourseServices.cs
  9. 38
      Tiobon.Core.Services/Ghre/Ghre_PlanServices.cs
  10. 10
      Tiobon.Core/Tiobon.Core.Model.xml

File diff suppressed because it is too large Load Diff

@ -2900,6 +2900,11 @@
课程分类2
</summary>
</member>
<member name="P:Tiobon.Core.Model.Models.Ghre_CourseBase.ClassId">
<summary>
课程分类
</summary>
</member>
<member name="T:Tiobon.Core.Model.Models.Ghre_CourseClassBase">
<summary>
课程分类 (Dto.Base)
@ -18116,6 +18121,11 @@
课程分类2
</summary>
</member>
<member name="P:Tiobon.Core.Model.Models.Ghre_Course.ClassId">
<summary>
课程分类
</summary>
</member>
<member name="T:Tiobon.Core.Model.Models.Ghre_CourseClass">
<summary>
课程分类 (Model)

@ -6,7 +6,7 @@
*
* Ver
*
*V0.01 2025/2/27 11:34:49 SimonHsiao
*V0.01 2025/2/27 15:45:04 SimonHsiao
*
* Copyright(c) 2025 Tiobon Corporation. All Rights Reserved.
*
@ -269,4 +269,9 @@ public class Ghre_CourseBase
/// </summary>
[Display(Name = "CourseClass2"), Description("课程分类2"), MaxLength(32, ErrorMessage = "课程分类2 不能超过 32 个字符")]
public string CourseClass2 { get; set; }
/// <summary>
/// 课程分类
/// </summary>
public long? ClassId { get; set; }
}

@ -64,7 +64,7 @@ public class Ghre_PlanBase
/// <summary>
/// 计划实施月份
/// </summary>
public int? Month { get; set; }
public string Month { get; set; }
/// <summary>
/// 备注
@ -146,4 +146,6 @@ public class Ghre_PlanBase
/// 预留字段12
/// </summary>
public int? ReverseI2 { get; set; }
public List<int> StaffIdList { get; set; }
}

@ -6,7 +6,7 @@
*
* Ver
*
*V0.01 2025/2/27 11:34:49 SimonHsiao
*V0.01 2025/2/27 15:45:04 SimonHsiao
*
* Copyright(c) 2025 Tiobon Corporation. All Rights Reserved.
*
@ -270,4 +270,9 @@ public class Ghre_Course : BasePoco
/// </summary>
[Display(Name = "CourseClass2"), Description("课程分类2"), MaxLength(32, ErrorMessage = "课程分类2 不能超过 32 个字符")]
public string CourseClass2 { get; set; }
/// <summary>
/// 课程分类
/// </summary>
public long? ClassId { get; set; }
}

@ -65,7 +65,7 @@ public class Ghre_Plan : BasePoco
/// <summary>
/// 计划实施月份
/// </summary>
public int? Month { get; set; }
public string Month { get; set; }
/// <summary>
/// 备注

@ -35,6 +35,6 @@ public class Ghre_PlanDto : Ghre_Plan
public string CourseName { get; set; }
public string DeptName { get; set; }
public string SchoolName { get; set; }
public List<int> StaffIdList { get; set; }
}

@ -524,12 +524,18 @@ public class Ghre_CourseServices : BaseServices<Ghre_Course, Ghre_CourseDto, Ins
public override async Task<long> Add(InsertGhre_CourseInput entity)
{
entity.ExamPaperId = JsonHelper.ObjToJson(entity.ExamPaperIds);
entity.CourseClassId = JsonHelper.ObjToJson(entity.CourseClassIds);
if (entity.CourseClassIds != null)
entity.CourseClassId = JsonHelper.ObjToJson(entity.CourseClassIds);
entity.CourseSceneIds = JsonHelper.ObjToJson(entity.CourseSceneIds1);
entity.Status = DIC_COURSE_STATUS.DRAFT;
entity.DefaultCoverImageName = entity.DefaultCoverImageName ?? "defaultCourseCover1";
entity.UseDefaultCoverImage = entity.UseDefaultCoverImage ?? true;
//entity.IsOpen = entity.IsOPenLabel == true ? "1" : "0";
if (entity.ClassId != null)
{
entity.CourseClassIds = [entity.ClassId.Value];
entity.CourseClassId = JsonHelper.ObjToJson(entity.CourseClassIds);
}
if (entity.InOrOut == "In")
{
@ -556,9 +562,14 @@ public class Ghre_CourseServices : BaseServices<Ghre_Course, Ghre_CourseDto, Ins
{
editModel.ExamPaperId = JsonHelper.ObjToJson(editModel.ExamPaperIds);
editModel.CourseClassId = JsonHelper.ObjToJson(editModel.CourseClassIds);
if (editModel.CourseClassIds != null)
editModel.CourseClassId = JsonHelper.ObjToJson(editModel.CourseClassIds);
editModel.CourseSceneIds = JsonHelper.ObjToJson(editModel.CourseSceneIds1);
if (editModel.ClassId != null)
{
editModel.CourseClassIds = [editModel.ClassId.Value];
editModel.CourseClassId = JsonHelper.ObjToJson(editModel.CourseClassIds);
}
if (!editModel.CourseClassId.IsNull())
{
var CourseClassIds = JsonConvert.DeserializeObject<List<long>>(editModel.CourseClassId);

@ -27,7 +27,7 @@ public class Ghre_PlanServices : BaseServices<Ghre_Plan, Ghre_PlanDto, InsertGhr
if (DT_TableDataT1[i].StaffIds.IsNotEmptyOrNull())
staffIds.AddRange(JsonHelper.JsonToObj<List<int>>(DT_TableDataT1[i].StaffIds));
DT_TableDataT1[i].PlanType = await GetParaLabel("TrainingCategory", DT_TableDataT1[i].PlanType);
DT_TableDataT1[i].PlanType = await GetParaLabel("TrainingCategory", DT_TableDataT1[i].PlanType);
DT_TableDataT1[i].Month = await GetParaLabel("MonthSelect", DT_TableDataT1[i].Month);
}
staffIds = staffIds.Distinct().ToList();
var staffs = await Db.Queryable<Ghra_Staff>().Where(x => staffIds.Contains(x.StaffID)).ToListAsync();
@ -45,10 +45,40 @@ public class Ghre_PlanServices : BaseServices<Ghre_Plan, Ghre_PlanDto, InsertGhr
DT_TableDataT1[i].StaffNames = string.Join("、", staffs.Where(x => staffIds1.Contains(x.StaffID)).Select(x => x.StaffName));
}
DT_TableDataT1[i].CourseName = courses.Where(x => x.Id == DT_TableDataT1[i].CourseId).Select(x => x.CourseName).First();
DT_TableDataT1[i].DeptName = depts.Where(x => x.DeptID == DT_TableDataT1[i].DeptId).Select(x => x.DeptName).First();
DT_TableDataT1[i].SchoolName = courses.Where(x => x.Id == DT_TableDataT1[i].SchoolId).Select(x => x.CourseName).First();
DT_TableDataT1[i].CourseName = courses.Where(x => x.Id == DT_TableDataT1[i].CourseId).Select(x => x.CourseName).FirstOrDefault();
DT_TableDataT1[i].DeptName = depts.Where(x => x.DeptID == DT_TableDataT1[i].DeptId).Select(x => x.DeptName).FirstOrDefault();
DT_TableDataT1[i].SchoolName = schools.Where(x => x.Id == DT_TableDataT1[i].SchoolId).Select(x => x.SchoolName).FirstOrDefault();
}
return result;
}
public override async Task<long> Add(InsertGhre_PlanInput entity)
{
if (entity.StaffIdList != null)
entity.StaffIds = JsonHelper.ObjToJson(entity.StaffIdList);
var result = await base.Add(entity);
return result;
}
public override async Task<bool> Update(long Id, EditGhre_PlanInput editModel)
{
if (editModel.StaffIdList != null)
editModel.StaffIds = JsonHelper.ObjToJson(editModel.StaffIdList);
var result = await base.Update(Id, editModel);
return result;
}
public override async Task<ServiceFormResult<Ghre_PlanDto>> QueryForm(QueryForm body)
{
var result = await base.QueryForm(body);
string StaffIds = result.result.DT_TableDataT1[0].StaffIds;
if (!string.IsNullOrWhiteSpace(StaffIds))
result.result.DT_TableDataT1[0].StaffIdList = JsonConvert.DeserializeObject<List<int>>(StaffIds);
return result;
}
}

@ -2900,6 +2900,11 @@
课程分类2
</summary>
</member>
<member name="P:Tiobon.Core.Model.Models.Ghre_CourseBase.ClassId">
<summary>
课程分类
</summary>
</member>
<member name="T:Tiobon.Core.Model.Models.Ghre_CourseClassBase">
<summary>
课程分类 (Dto.Base)
@ -18116,6 +18121,11 @@
课程分类2
</summary>
</member>
<member name="P:Tiobon.Core.Model.Models.Ghre_Course.ClassId">
<summary>
课程分类
</summary>
</member>
<member name="T:Tiobon.Core.Model.Models.Ghre_CourseClass">
<summary>
课程分类 (Model)

Loading…
Cancel
Save