diff --git a/Src/Dlhis.Basic/Organization/Controllers/GainfosController.cs b/Src/Dlhis.Basic/Organization/Controllers/GainfosController.cs index 33e9307f..39d3405f 100644 --- a/Src/Dlhis.Basic/Organization/Controllers/GainfosController.cs +++ b/Src/Dlhis.Basic/Organization/Controllers/GainfosController.cs @@ -141,7 +141,7 @@ public class GainfosController : ControllerBase /// /// [HttpGet("list")] - public async Task> GetGainfoListTaskAsync([FromQuery]GainfoListRequest request) + public async Task> GetGainfoListTaskAsync([FromQuery] GainfoListRequest request) { return await _gainfoService.GetGainfoListTaskAsync(request); } @@ -155,57 +155,5 @@ public class GainfosController : ControllerBase { return await _gainfoService.GetGainfoDetailTaskAsync(request); } - - /// - /// 获取近七天入职人数及列表 - /// - /// - [HttpGet("weeknumber")] - public async Task>> GetWeekNumberAsync([FromQuery] WeekNumberRequest request) - { - // 从请求头中获取 Token - string token = HttpContext.Request.Headers["Authorization"].ToString().Replace("Bearer ", ""); - - return await _gainfoService.GetWeekNumberAsync(request,token); - } - - /// - /// 获取近七天离职人数及列表 - /// - /// - [HttpGet("weeknumberdimission")] - public async Task>> GetDimissionWeekNumberAsync([FromQuery] WeekNumberRequest request) - { - // 从请求头中获取 Token - string token = HttpContext.Request.Headers["Authorization"].ToString().Replace("Bearer ", ""); - - return await _gainfoService.GetDimissionWeekNumberAsync(request,token); - } - - /// - /// 获取基地在职、离职、考勤数 - /// - /// - [HttpGet("gainfonumbers")] - public async Task GetGainfoNumbersAsync() - { - // 从请求头中获取 Token - string token = HttpContext.Request.Headers["Authorization"].ToString().Replace("Bearer ", ""); - - return await _gainfoService.GetGainfoNumbersAsync(token); - } - - /// - /// 获取本基地管理员列表 - /// - /// - /// - [HttpGet("administrator")] - public async Task> GetAdministratorAsync([FromQuery] WeekNumberRequest request) - { - // 从请求头中获取 Token - string token = HttpContext.Request.Headers["Authorization"].ToString().Replace("Bearer ", ""); - return await _gainfoService.GetAdministratorAsync(request,token); - } } diff --git a/Src/Dlhis.Basic/Organization/Request/GainfoSaveRequest.cs b/Src/Dlhis.Basic/Organization/Request/GainfoSaveRequest.cs index 54f41fe3..838f621c 100644 --- a/Src/Dlhis.Basic/Organization/Request/GainfoSaveRequest.cs +++ b/Src/Dlhis.Basic/Organization/Request/GainfoSaveRequest.cs @@ -110,11 +110,6 @@ public class GainfoSaveRequest : IValidatableObject /// public string Werks { get; set; } - /// - /// 在职状态 - /// - public string Employed { get; set; } - public IEnumerable Validate(ValidationContext validationContext) { if (GainfoStatus.HasValue && GainfoStatus == GainfoStatusEnumType.Leave) diff --git a/Src/Dlhis.Basic/Organization/Response/GainfoDetailResponse.cs b/Src/Dlhis.Basic/Organization/Response/GainfoDetailResponse.cs index a2472cfe..565d53dc 100644 --- a/Src/Dlhis.Basic/Organization/Response/GainfoDetailResponse.cs +++ b/Src/Dlhis.Basic/Organization/Response/GainfoDetailResponse.cs @@ -105,10 +105,5 @@ namespace Dlhis.Basic.Organization.Response /// 民族代码 /// public string NationName { get; set; } - - /// - /// 是否在职 - /// - public bool IsActive { get; set; } } } diff --git a/Src/Dlhis.Basic/Organization/Response/GainfoListResponse.cs b/Src/Dlhis.Basic/Organization/Response/GainfoListResponse.cs index a826eec0..8e7c6789 100644 --- a/Src/Dlhis.Basic/Organization/Response/GainfoListResponse.cs +++ b/Src/Dlhis.Basic/Organization/Response/GainfoListResponse.cs @@ -1,60 +1,51 @@ using Dlhis.Entity.Basic.Enums; -using SqlSugar; -using SqlSugar.DbConvert; -namespace Dlhis.Basic.Organization.Response +namespace Dlhis.Basic.Organization.Response; + +public class GainfoListResponse { - public class GainfoListResponse - { - /// - /// 档案号 - /// - public string No { get; set; } + /// + /// 档案号 + /// + public string No { get; set; } - /// - /// 姓名 - /// - public string Name { get; set; } + /// + /// 姓名 + /// + public string Name { get; set; } - /// - /// 学工号 - /// - public string Code { get; set; } + /// + /// 学工号 + /// + public string Code { get; set; } - /// - /// 身份证号 - /// - public string IdNo { get; set; } + /// + /// 身份证号 + /// + public string IdNo { get; set; } - /// - /// 性别 - /// - public GenderEnumType Gender { get; set; } + /// + /// 性别 + /// + public GenderEnumType Gender { get; set; } - /// - /// 手机号码 - /// - public string Phone { get; set; } + /// + /// 手机号码 + /// + public string Phone { get; set; } - /// - /// 部门编码 - /// - public string DepartmentNo { get; set; } + /// + /// 部门编码 + /// + public string DepartmentNo { get; set; } - /// - /// 部门名称 - /// - public string DepartmentName { get; set; } + /// + /// 部门名称 + /// + public string DepartmentName { get; set; } - /// - /// 身份证地址 - /// - public string Address { get; set; } - - /// - /// 在职状态 - /// - public string Employed { get; set; } - - } + /// + /// 身份证地址 + /// + public string Address { get; set; } } diff --git a/Src/Dlhis.Basic/Organization/Response/GainfoPageResponse.cs b/Src/Dlhis.Basic/Organization/Response/GainfoPageResponse.cs index cb3c563c..4b8faadd 100644 --- a/Src/Dlhis.Basic/Organization/Response/GainfoPageResponse.cs +++ b/Src/Dlhis.Basic/Organization/Response/GainfoPageResponse.cs @@ -112,9 +112,4 @@ public class GainfoPageResponse /// 人事范围 /// public string Werks { get; set; } - - /// - /// 在职状态 - /// - public string Employed { get; set; } } diff --git a/Src/Dlhis.Basic/Organization/Services/IGainfoService.cs b/Src/Dlhis.Basic/Organization/Services/IGainfoService.cs index 7bb8f0fc..7372f48d 100644 --- a/Src/Dlhis.Basic/Organization/Services/IGainfoService.cs +++ b/Src/Dlhis.Basic/Organization/Services/IGainfoService.cs @@ -31,12 +31,4 @@ public interface IGainfoService : IScopeDependency Task> GetGainfoListTaskAsync(GainfoListRequest request); Task GetGainfoDetailTaskAsync(GainfoDetailRequest request); - - Task>> GetWeekNumberAsync(WeekNumberRequest request, string token); - - Task>> GetDimissionWeekNumberAsync([FromQuery] WeekNumberRequest request, string token); - - Task GetGainfoNumbersAsync(string token); - - Task> GetAdministratorAsync(WeekNumberRequest request,string token); } diff --git a/Src/Dlhis.Basic/Organization/Services/Implements/GainfoService.cs b/Src/Dlhis.Basic/Organization/Services/Implements/GainfoService.cs index 78753d46..f21150bd 100644 --- a/Src/Dlhis.Basic/Organization/Services/Implements/GainfoService.cs +++ b/Src/Dlhis.Basic/Organization/Services/Implements/GainfoService.cs @@ -333,10 +333,10 @@ public class GainfoService : IGainfoService DepartmentNo = de.No, DepartmentName = de.Name, Address = ga.Address, - Employed = ga.Employed }).ToPageListAsync(request); return page; } + /// /// 档案详情 /// @@ -373,8 +373,8 @@ public class GainfoService : IGainfoService Marital = ga.Marital, CountryName = type2.Display, NationName = type3.Display, - IsActive = ga.Employed == "Active" ? true : false, }).FirstAsync(); + return info; } @@ -425,11 +425,8 @@ public class GainfoService : IGainfoService Marital = ga.Marital, CountryName = type2.Display, NationName = type3.Display, - IsActive = ga.Employed == "Active" ? true : false, }).ToPageListAsync(request); - //var infos = await _gainfoStore.Queryable(GainfoStatusEnumType.Working) - // .Where(ga => ga.CreateTime.ToString("yyyy-MM-dd") == time) - // .ToPageListAsync(request); + dic[time] = infos; } return dic; @@ -481,7 +478,6 @@ public class GainfoService : IGainfoService Marital = ga.Marital, CountryName = type2.Display, NationName = type3.Display, - IsActive = ga.Employed == "Active" ? true : false, }).ToPageListAsync(request); dic[time] = infos; } @@ -514,44 +510,6 @@ public class GainfoService : IGainfoService return res; } - public async Task> GetAdministratorAsync( WeekNumberRequest request, string token) - { - var werks = GetClaimValueFromToken(token, "tenant"); - var info = await _gainfoStore.Queryable(GainfoStatusEnumType.Working) - .LeftJoin((ga, de) => ga.DepartmentNo == de.No) - .LeftJoin((ga, de, type) => ga.Native == type.Code && type.Type == "native") - .LeftJoin((ga, de, type, posi) => ga.Position == posi.Name) - .LeftJoin((ga, de, type, posi, type2) => ga.CountryNo == type2.Code && type2.Type == "country") - .LeftJoin((ga, de, type, posi, type2, type3) => ga.Nation == type3.Code && type3.Type == "nation") - .Where(ga => ga.Werks == werks && ga.IdentityUserId != 0) - .Select((ga, de, type, posi, type2, type3) => new GainfoDetailResponse - { - No = ga.No, - SapNo = ga.SapNo, - Name = ga.Name, - Code = ga.Code, - DepartmentName = de.Name, - IdClass = ga.IdClass, - IdNo = ga.IdNo, - Gender = ga.Gender, - NativeName = type.Display, - Address = ga.Address, - Birthday = ga.Birthday, - Phone = ga.Phone, - Position = ga.Position, - Grade = posi.Grade, - Degree = ga.Degree, - Werks = ga.Werks, - CostId = ga.CostId, - Marital = ga.Marital, - CountryName = type2.Display, - NationName = type3.Display, - IsActive = ga.Employed == "Active" ? true : false, - }).ToPageListAsync(request); - - return info; - } - //-------------------------------------------help methods ------------------------------------------------ /// diff --git a/Src/Dlhis.Basic/Packs/SqlSugarPack.cs b/Src/Dlhis.Basic/Packs/SqlSugarPack.cs index d4467cae..86dc45aa 100644 --- a/Src/Dlhis.Basic/Packs/SqlSugarPack.cs +++ b/Src/Dlhis.Basic/Packs/SqlSugarPack.cs @@ -1,5 +1,4 @@ -using Dlhis.Entity.Basic.Entity; -using Kurisu.AspNetCore; +using Kurisu.AspNetCore; using Kurisu.AspNetCore.Startup; using Kurisu.SqlSugar.Extensions; using SqlSugar; diff --git a/Src/Dlhis.Entity/Basic/Entity/GainfoEntity.cs b/Src/Dlhis.Entity/Basic/Entity/GainfoEntity.cs index 1ddbe206..66ff9e59 100644 --- a/Src/Dlhis.Entity/Basic/Entity/GainfoEntity.cs +++ b/Src/Dlhis.Entity/Basic/Entity/GainfoEntity.cs @@ -148,12 +148,6 @@ public class GainfoEntity : SugarBaseEntity /// public string CostId { get; set; } - /// - /// 在职状态 - /// - [SugarColumn(ColumnDescription = "在职状态")] - public string Employed { get; set; } - /// /// 身份认证用户Id ///