From 4696badcf23a53a2e408547e22b50227cecc48d1 Mon Sep 17 00:00:00 2001 From: xiaochanghai Date: Fri, 17 Jan 2025 15:44:46 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9F=B9=E8=AE=AD=E6=8A=A5=E8=A1=A8=20?= =?UTF-8?q?=E6=96=B0=E5=A2=9E=E6=9F=A5=E8=AF=A2=E6=96=B0=E5=85=A5=E8=81=8C?= =?UTF-8?q?=E5=91=98=E5=B7=A5=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Tiobon.Core.Api/Tiobon.Core.Model.xml | 5 +++++ .../View/Ghra/Ghra_Staff.Dto.View.cs | 6 ++++++ .../Ghra/Ghra_StaffServices.cs | 14 +++++++++++++ Tiobon.Core.Services/ReportServices.cs | 5 ++++- Tiobon.Core/Tiobon.Core.Model.xml | 5 +++++ Tiobon.Core/Tiobon.Core.xml | 20 +++++++++++++++++++ 6 files changed, 54 insertions(+), 1 deletion(-) diff --git a/Tiobon.Core.Api/Tiobon.Core.Model.xml b/Tiobon.Core.Api/Tiobon.Core.Model.xml index 6b92ef4a..296cbaea 100644 --- a/Tiobon.Core.Api/Tiobon.Core.Model.xml +++ b/Tiobon.Core.Api/Tiobon.Core.Model.xml @@ -27687,6 +27687,11 @@ 修改信息 + + + 性别 + + Ghra_StaffEduBG(Dto.View1) diff --git a/Tiobon.Core.Model/View/Ghra/Ghra_Staff.Dto.View.cs b/Tiobon.Core.Model/View/Ghra/Ghra_Staff.Dto.View.cs index f5e6729b..e488853e 100644 --- a/Tiobon.Core.Model/View/Ghra/Ghra_Staff.Dto.View.cs +++ b/Tiobon.Core.Model/View/Ghra/Ghra_Staff.Dto.View.cs @@ -34,4 +34,10 @@ public class Ghra_StaffDto : Ghra_Staff public List Licences { get; set; } + + /// + /// 性别 + /// + public string GenderLabel { get; set; } + public string IndateLabel { get; set; } } diff --git a/Tiobon.Core.Services/Ghra/Ghra_StaffServices.cs b/Tiobon.Core.Services/Ghra/Ghra_StaffServices.cs index 241bfda5..49a4ab95 100644 --- a/Tiobon.Core.Services/Ghra/Ghra_StaffServices.cs +++ b/Tiobon.Core.Services/Ghra/Ghra_StaffServices.cs @@ -16,6 +16,20 @@ public class Ghra_StaffServices : BaseServices> QueryFilterPage(QueryBody filter, string condition, bool? IsEnable = true) + { + var result = await base.QueryFilterPage(filter, condition, IsEnable); + + for (int i = 0; i < result.result.DT_TableDataT1.Count; i++) + { + result.result.DT_TableDataT1[i].GenderLabel = await GetParaLabel("Gender", result.result.DT_TableDataT1[i].Gender); + result.result.DT_TableDataT1[i].IndateLabel = DateTimeHelper.ConvertToDayString(result.result.DT_TableDataT1[i].Indate); + + } + return result; + } + public async Task> QuerySimple(int id) { var entity = await Db.Ado.SqlQuerySingleAsync($"SELECT * FROM Ghra_Staff WHERE StaffID='{id}' "); diff --git a/Tiobon.Core.Services/ReportServices.cs b/Tiobon.Core.Services/ReportServices.cs index 46cc0f3e..6b14f85f 100644 --- a/Tiobon.Core.Services/ReportServices.cs +++ b/Tiobon.Core.Services/ReportServices.cs @@ -42,7 +42,10 @@ public partial class ReportServices : BaseServices>, IReport } var dateTime = DateTime.Now.AddMonths(-month); - condition = $"Indate >= '{DateTimeHelper.ConvertToDayString(dateTime)}'"; + if (filter.orderBy.IsNotEmptyOrNull()) + filter.orderBy = "Indate DESC"; + + condition = $"Indate >= '{DateTimeHelper.ConvertToDayString(dateTime)}' AND OutDate IS NULL"; var result = await _staffServices.QueryFilterPage(filter, condition, IsEnable); return result; diff --git a/Tiobon.Core/Tiobon.Core.Model.xml b/Tiobon.Core/Tiobon.Core.Model.xml index 6b92ef4a..296cbaea 100644 --- a/Tiobon.Core/Tiobon.Core.Model.xml +++ b/Tiobon.Core/Tiobon.Core.Model.xml @@ -27687,6 +27687,11 @@ 修改信息 + + + 性别 + + Ghra_StaffEduBG(Dto.View1) diff --git a/Tiobon.Core/Tiobon.Core.xml b/Tiobon.Core/Tiobon.Core.xml index e7c55336..d645663f 100644 --- a/Tiobon.Core/Tiobon.Core.xml +++ b/Tiobon.Core/Tiobon.Core.xml @@ -571,6 +571,26 @@ + + + 公共服务 + + + + + 构造函数 + + + + + + + 获取新入职人员列表 + + + + + 分页获取