diff --git a/Tiobon.Core.Api/Tiobon.Core.Model.xml b/Tiobon.Core.Api/Tiobon.Core.Model.xml
index 087b7e39..b157ac9d 100644
--- a/Tiobon.Core.Api/Tiobon.Core.Model.xml
+++ b/Tiobon.Core.Api/Tiobon.Core.Model.xml
@@ -27717,6 +27717,31 @@
性别
+
+
+ 重要度
+
+
+
+
+ 年度人力配置单
+
+
+
+
+ 汇报对象
+
+
+
+
+ 建议到岗时间
+
+
+
+
+ 年龄
+
+
人力需求维护明细(Dto.View1)
diff --git a/Tiobon.Core.Model/View/Ghrh/Ghrh_HumanRequest.Dto.View.cs b/Tiobon.Core.Model/View/Ghrh/Ghrh_HumanRequest.Dto.View.cs
index 71a53059..b0bc5953 100644
--- a/Tiobon.Core.Model/View/Ghrh/Ghrh_HumanRequest.Dto.View.cs
+++ b/Tiobon.Core.Model/View/Ghrh/Ghrh_HumanRequest.Dto.View.cs
@@ -72,4 +72,27 @@ public class Ghrh_HumanRequestDto : Ghrh_HumanRequest
///
public string GenderLabel { get; set; }
+ ///
+ /// 重要度
+ ///
+ public string ImportanceDegreeLabel { get; set; }
+
+ ///
+ /// 年度人力配置单
+ ///
+ public string YearHumanName { get; set; }
+
+ ///
+ /// 汇报对象
+ ///
+ public string ReportName { get; set; }
+
+ ///
+ /// 建议到岗时间
+ ///
+ public string InTime1 { get; set; }
+ ///
+ /// 年龄
+ ///
+ public string AgeLabel { get; set; }
}
diff --git a/Tiobon.Core.Services/Ghrh/Ghrh_HumanRequestServices.cs b/Tiobon.Core.Services/Ghrh/Ghrh_HumanRequestServices.cs
index 2bcb0af1..d401b88e 100644
--- a/Tiobon.Core.Services/Ghrh/Ghrh_HumanRequestServices.cs
+++ b/Tiobon.Core.Services/Ghrh/Ghrh_HumanRequestServices.cs
@@ -1,6 +1,4 @@
-using System.Collections.Generic;
-
-namespace Tiobon.Core.Services;
+namespace Tiobon.Core.Services;
///
/// 人力需求维护 (服务)
@@ -26,6 +24,10 @@ public class Ghrh_HumanRequestServices : BaseServices x.GradeId != null).Select(x => x.GradeId).ToList();
var jobIds = entitys.Where(x => x.JobId != null).Select(x => x.JobId).ToList();
var titleIds = entitys.Where(x => x.TitleId != null).Select(x => x.TitleId).ToList();
+ var reportIds = entitys.Where(x => x.ReportId != null).Select(x => x.ReportId).ToList();
+
+ if (reportIds.Any())
+ {
+ var staffs = await Db.Queryable().Where(x => reportIds.Contains(x.StaffID)).ToListAsync();
+
+ entitys.ForEach(rule =>
+ {
+ rule.ReportName = staffs.FirstOrDefault(o => rule.DeptId == o.DeptID)?.StaffName;
+ });
+ }
+
if (deptIds.Any())
{
var depts = await Db.Queryable().Where(x => deptIds.Contains(x.DeptID)).ToListAsync();
@@ -77,6 +91,17 @@ public class Ghrh_HumanRequestServices : BaseServices rule.JobId == o.JobID)?.JobName;
});
}
+
+ for (int i = 0; i < entitys.Count; i++)
+ {
+ if (entitys[i].YearHumanId.IsNotEmptyOrNull())
+ entitys[i].YearHumanName = await Db.Ado.GetStringAsync(@$"SELECT CAST (A.[Year] AS VARCHAR) + '_' + B.TitleName + '_' + C.JobName label
+FROM Ghrh_YearHumanSettings A
+ LEFT JOIN Ghra_Title B ON A.TitleId = B.TitleID
+ LEFT JOIN Ghra_Job C ON A.JobId = C.JobID
+WHERE A.IsEnable = 1 AND A.Id = {entitys[i].YearHumanId}");
+ }
+
entitys.ForEach(async x =>
{
await SetLabel(x);
diff --git a/Tiobon.Core.Services/Ghrh/Ghrh_YearHumanSettingsServices.cs b/Tiobon.Core.Services/Ghrh/Ghrh_YearHumanSettingsServices.cs
index 2f4b4753..15fa77c6 100644
--- a/Tiobon.Core.Services/Ghrh/Ghrh_YearHumanSettingsServices.cs
+++ b/Tiobon.Core.Services/Ghrh/Ghrh_YearHumanSettingsServices.cs
@@ -20,7 +20,30 @@ public class Ghrh_YearHumanSettingsServices : BaseServices
+ /// 字典映射、全称、单位转换等
+ ///
+ ///
+ private async Task SetLabel(Ghrh_YearHumanSettingsDto data)
+ {
+ if (data != null)
+ {
+ data.M1_F = data.M1 + (data.M1_A ?? 0);
+ data.M2_F = data.M2 + (data.M2_A ?? 0);
+ data.M3_F = data.M3 + (data.M3_A ?? 0);
+ data.M4_F = data.M4 + (data.M4_A ?? 0);
+ data.M5_F = data.M5 + (data.M5_A ?? 0);
+ data.M6_F = data.M6 + (data.M6_A ?? 0);
+ data.M7_F = data.M7 + (data.M7_A ?? 0);
+ data.M8_F = data.M8 + (data.M8_A ?? 0);
+ data.M9_F = data.M9 + (data.M9_A ?? 0);
+ data.M10_F = data.M10 + (data.M10_A ?? 0);
+ data.M11_F = data.M11 + (data.M11_A ?? 0);
+ data.M12_F = data.M12 + (data.M12_A ?? 0);
+ }
+ }
+ #endregion
public override async Task Add(InsertGhrh_YearHumanSettingsInput entity)
{
@@ -100,21 +123,9 @@ public class Ghrh_YearHumanSettingsServices : BaseServices rule.JobId == o.JobID)?.JobName;
});
}
-
- entitys.ForEach(data =>
+ entitys.ForEach(async x =>
{
- data.M1_F = data.M1 + (data.M1_A ?? 0);
- data.M2_F = data.M2 + (data.M2_A ?? 0);
- data.M3_F = data.M3 + (data.M3_A ?? 0);
- data.M4_F = data.M4 + (data.M4_A ?? 0);
- data.M5_F = data.M5 + (data.M5_A ?? 0);
- data.M6_F = data.M6 + (data.M6_A ?? 0);
- data.M7_F = data.M7 + (data.M7_A ?? 0);
- data.M8_F = data.M8 + (data.M8_A ?? 0);
- data.M9_F = data.M9 + (data.M9_A ?? 0);
- data.M10_F = data.M10 + (data.M10_A ?? 0);
- data.M11_F = data.M11 + (data.M11_A ?? 0);
- data.M12_F = data.M12 + (data.M12_A ?? 0);
+ await SetLabel(x);
});
result.result.DT_TableDataT1 = entitys;
@@ -153,23 +164,22 @@ public class Ghrh_YearHumanSettingsServices : BaseServices QueryById(object objId)
+ {
+ var entity = await base.QueryById(objId);
+
+ await SetLabel(entity);
+
+ return entity;
+ }
+
public async Task>> QueryApplyColumn(int curentYear, int langId)
{
int flowId = await Db.Ado.GetIntAsync("Select FlowID from Ghrw_Flow where FlowNo='F_ESS_RecruitYearManpowerApply'");
diff --git a/Tiobon.Core/Tiobon.Core.Model.xml b/Tiobon.Core/Tiobon.Core.Model.xml
index f40879fc..b157ac9d 100644
--- a/Tiobon.Core/Tiobon.Core.Model.xml
+++ b/Tiobon.Core/Tiobon.Core.Model.xml
@@ -20549,7 +20549,7 @@
职等ID
-
+
@@ -27682,6 +27682,11 @@
部门
+
+
+ 职称
+
+
岗位
@@ -27702,6 +27707,41 @@
部门负责人邮箱
+
+
+ 编制内外
+
+
+
+
+ 性别
+
+
+
+
+ 重要度
+
+
+
+
+ 年度人力配置单
+
+
+
+
+ 汇报对象
+
+
+
+
+ 建议到岗时间
+
+
+
+
+ 年龄
+
+
人力需求维护明细(Dto.View1)