diff --git a/Tiobon.Core.Services/Ghre/Ghre_ExamRecordServices.cs b/Tiobon.Core.Services/Ghre/Ghre_ExamRecordServices.cs index 10bfd3cf..17402cd7 100644 --- a/Tiobon.Core.Services/Ghre/Ghre_ExamRecordServices.cs +++ b/Tiobon.Core.Services/Ghre/Ghre_ExamRecordServices.cs @@ -1317,6 +1317,13 @@ public class Ghre_ExamRecordServices : BaseServices new + { + it.CompleteStatus + }, true) + .ExecuteCommandAsync(); if (record.IsPass == true) await ExamHelper.MarkCompleteStatusAsync(Db, studyRecord); diff --git a/Tiobon.Core.Services/Ghre/Ghre_TitleSkill_BoltoneServices.cs b/Tiobon.Core.Services/Ghre/Ghre_TitleSkill_BoltoneServices.cs index 7375fc26..eef4629b 100644 --- a/Tiobon.Core.Services/Ghre/Ghre_TitleSkill_BoltoneServices.cs +++ b/Tiobon.Core.Services/Ghre/Ghre_TitleSkill_BoltoneServices.cs @@ -1,4 +1,7 @@ -namespace Tiobon.Core.Services; +using SqlSugar.Extensions; +using System.Collections.Generic; + +namespace Tiobon.Core.Services; /// /// 岗位技能_宝连通 (服务) @@ -55,7 +58,7 @@ public class Ghre_TitleSkill_BoltoneServices : BaseServices x.DeptID == dept.ParentDeptID).Select(X => X.DeptName).FirstOrDefault(); + DT_TableDataT1[i].ParentDeptName = await Db.Queryable().Where(x => x.DeptID == dept.ParentDeptID).Select(X => X.DeptName).FirstAsync(); } if (DT_TableDataT1[i].TitleId.IsNotEmptyOrNull()) @@ -114,13 +117,121 @@ public class Ghre_TitleSkill_BoltoneServices : BaseServices(value); + + if (jsonParam.columnValue.IsNotEmptyOrNull()) + TitleId = jsonParam.columnValue.ObjToInt(); + continue; + } + else if (name == "Date") + { + var jsonParam = JsonConvert.DeserializeObject(value); + + if (jsonParam.columnValue.IsNotEmptyOrNull()) + Date = jsonParam.columnValue.ObjToDate(); + continue; + } + else if (name == "StaffId") + { + var jsonParam = JsonConvert.DeserializeObject(value); + + if (jsonParam.columnValue.IsNotEmptyOrNull()) + StaffId = jsonParam.columnValue.ObjToInt(); + continue; + } + else if (name == "ParentDeptName") + { + var jsonParam = JsonConvert.DeserializeObject(value); + + if (jsonParam.columnValue.IsNotEmptyOrNull()) + ParentDeptId = jsonParam.columnValue.ObjToInt(); + continue; + } + else if (name == "DeptName") + { + var jsonParam = JsonConvert.DeserializeObject(value); + + if (jsonParam.columnValue.IsNotEmptyOrNull()) + DeptId = jsonParam.columnValue.ObjToInt(); + continue; + } + else if (name == "CourseId") + { + var jsonParam = JsonConvert.DeserializeObject(value); + + if (jsonParam.columnValue.IsNotEmptyOrNull()) + CourseId = jsonParam.columnValue.ObjToLong(); + continue; + } + } + + if (TitleId != null) + titleSkillsCondition += $" AND TitleId='{TitleId}'"; + + if (CourseId != null) + titleSkillsCondition += $" AND CourseId='{CourseId}'"; + + if (Date != null) + titleSkillsCondition += $" AND EffectiveDate <='{Date}' AND ExpiryDate >='{Date}'"; + + var deptIds1 = new List(); + if (DeptId != null) + deptIds1.Add(DeptId); + + if (ParentDeptId != null) + { + var deptIds = await Db.Queryable() + .Where(x => x.ParentDeptID != null && x.ParentDeptID == ParentDeptId) + .Select(x => x.DeptID).ToListAsync(); + if (deptIds.Any()) + deptIds1.AddRange(deptIds); + else deptIds1 = new List() { 0 }; + } + if (deptIds1.Any()) + { + titleSkillsCondition += " AND ("; + var i = 0; + deptIds1.ForEach(x => + { + if (i == 0) + titleSkillsCondition += $"DeptId={x}"; + else + titleSkillsCondition += $" OR DeptId={x}"; + + i++; + }); + titleSkillsCondition += ")"; + } + + var titleSkillsfilter = new QueryBody() { menuName = "F_TitleSkill_Boltone", pageNum = 1, pageSize = 10000, orderBy = "" - }); + }; + + var src = Db.Queryable(); + + + + var titleSkills = await QueryFilterPage(titleSkillsfilter, titleSkillsCondition); var group1 = titleSkills.result.DT_TableDataT1 .Select(x => new @@ -149,6 +260,24 @@ public class Ghre_TitleSkill_BoltoneServices : BaseServices + { + if (i == 0) + condition += $"DeptId={x}"; + else + condition += $" OR DeptId={x}"; + + i++; + }); + condition += ")"; + } + + if (StaffId != null) + condition += $" AND StaffID={StaffId}"; var result2 = await _staffServices.QueryFilterPage(filter, condition); var DT_TableDataT1 = result2.result.DT_TableDataT1; @@ -162,7 +291,7 @@ public class Ghre_TitleSkill_BoltoneServices : BaseServices(); + //var src = Db.Queryable(); for (int i = 0; i < result2.result.DT_TableDataT1.Count; i++) { var column = result2.result.DT_TableDataT1[i]; @@ -178,6 +307,8 @@ public class Ghre_TitleSkill_BoltoneServices : BaseServices