From 6a48a5e1306167485ef75b9e37d9dd6c3bf73182 Mon Sep 17 00:00:00 2001 From: wxd <123@qq.com> Date: Fri, 12 Apr 2024 11:03:45 +0800 Subject: [PATCH] =?UTF-8?q?RegisterCheckItem=E3=80=81RegisterCheck?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../InternalReports/InternalReportAppService.cs | 12 ++++++------ .../PeisApplicationAutoMapperProfile.cs | 8 ++++---- .../PrintReports/PrintReportAppService.cs | 2 +- .../RegisterCheckItemAppService.cs | 2 +- .../RegisterChecks/RegisterCheckAppService.cs | 16 ++++++++-------- .../SumSummaryReportAppService.cs | 2 +- .../RegisterCheckItems/RegisterCheckItem.cs | 2 +- .../RegisterChecks/RegisterCheck.cs | 6 +++--- .../RegisterChecks/RegisterCheckManager.cs | 8 ++++---- 9 files changed, 29 insertions(+), 29 deletions(-) diff --git a/src/Shentun.Peis.Application/InternalReports/InternalReportAppService.cs b/src/Shentun.Peis.Application/InternalReports/InternalReportAppService.cs index 2f5b5e4..74761d1 100644 --- a/src/Shentun.Peis.Application/InternalReports/InternalReportAppService.cs +++ b/src/Shentun.Peis.Application/InternalReports/InternalReportAppService.cs @@ -250,8 +250,8 @@ namespace Shentun.Peis.InternalReports if (!string.IsNullOrEmpty(input.StartDate) && !string.IsNullOrEmpty(input.EndDate)) { - qeruy = qeruy.Where(m => m.CheckDate.Value.ToDateTime(TimeOnly.MinValue) >= Convert.ToDateTime(input.StartDate) && - m.CheckDate.Value.ToDateTime(TimeOnly.MinValue) < Convert.ToDateTime(input.EndDate).AddDays(1)); + qeruy = qeruy.Where(m => m.CheckDate.Value >= Convert.ToDateTime(input.StartDate) && + m.CheckDate.Value < Convert.ToDateTime(input.EndDate).AddDays(1)); } var entlist = qeruy.GroupBy(g => new { g.ItemTypeId, g.AsbitemId }) @@ -314,8 +314,8 @@ namespace Shentun.Peis.InternalReports if (!string.IsNullOrEmpty(input.StartDate) && !string.IsNullOrEmpty(input.EndDate)) { - qeruy = qeruy.Where(m => m.CheckDate.Value.ToDateTime(TimeOnly.MinValue) >= Convert.ToDateTime(input.StartDate) && - m.CheckDate.Value.ToDateTime(TimeOnly.MinValue) < Convert.ToDateTime(input.EndDate).AddDays(1)); + qeruy = qeruy.Where(m => m.CheckDate.Value >= Convert.ToDateTime(input.StartDate) && + m.CheckDate.Value < Convert.ToDateTime(input.EndDate).AddDays(1)); } var entlist = qeruy.GroupBy(g => new { g.CustomerOrgId, g.ItemTypeId, g.AsbitemId, g.CheckDoctorId }) @@ -374,8 +374,8 @@ namespace Shentun.Peis.InternalReports if (!string.IsNullOrEmpty(input.StartDate) && !string.IsNullOrEmpty(input.EndDate)) { - qeruy = qeruy.Where(m => m.CheckDate.Value.ToDateTime(TimeOnly.MinValue) >= Convert.ToDateTime(input.StartDate) && - m.CheckDate.Value.ToDateTime(TimeOnly.MinValue) < Convert.ToDateTime(input.EndDate).AddDays(1)); + qeruy = qeruy.Where(m => m.CheckDate.Value >= Convert.ToDateTime(input.StartDate) && + m.CheckDate.Value < Convert.ToDateTime(input.EndDate).AddDays(1)); } var entlist = qeruy.GroupBy(g => new { g.CustomerOrgId, g.ItemTypeId, g.AsbitemId }) diff --git a/src/Shentun.Peis.Application/PeisApplicationAutoMapperProfile.cs b/src/Shentun.Peis.Application/PeisApplicationAutoMapperProfile.cs index a1371bf..afb697a 100644 --- a/src/Shentun.Peis.Application/PeisApplicationAutoMapperProfile.cs +++ b/src/Shentun.Peis.Application/PeisApplicationAutoMapperProfile.cs @@ -382,14 +382,14 @@ public class PeisApplicationAutoMapperProfile : Profile CreateMap(); CreateMap(); - CreateMap().ForMember(d => d.CheckDate, opt => opt.MapFrom(src => PageHelper.ConvertDate(src.CheckDate))); + CreateMap().ForMember(d => d.CheckDate, opt => opt.MapFrom(src => PageHelper.ConvertDatetimeV(src.CheckDate))); CreateMap(); - CreateMap().ForMember(d => d.CheckDate, opt => opt.MapFrom(src => PageHelper.ConvertDate(src.CheckDate))); + CreateMap().ForMember(d => d.CheckDate, opt => opt.MapFrom(src => PageHelper.ConvertDatetimeV(src.CheckDate))); CreateMap() - .ForMember(d => d.CriticalValueProcessDate, opt => opt.MapFrom(src => PageHelper.ConvertDate(src.CriticalValueProcessDate))) - .ForMember(d => d.CriticalValueCreateDate, opt => opt.MapFrom(src => PageHelper.ConvertDate(src.CriticalValueCreateDate))); + .ForMember(d => d.CriticalValueProcessDate, opt => opt.MapFrom(src => PageHelper.ConvertDatetimeV(src.CriticalValueProcessDate))) + .ForMember(d => d.CriticalValueCreateDate, opt => opt.MapFrom(src => PageHelper.ConvertDatetimeV(src.CriticalValueCreateDate))); CreateMap().ForMember(d => d.AuditTime, opt => opt.MapFrom(src => PageHelper.ConvertDatetimeV(src.AuditTime))); diff --git a/src/Shentun.Peis.Application/PrintReports/PrintReportAppService.cs b/src/Shentun.Peis.Application/PrintReports/PrintReportAppService.cs index 73ff125..afab897 100644 --- a/src/Shentun.Peis.Application/PrintReports/PrintReportAppService.cs +++ b/src/Shentun.Peis.Application/PrintReports/PrintReportAppService.cs @@ -256,7 +256,7 @@ namespace Shentun.Peis.PrintReports { AsbitemName = string.Join(",", s.RegisterCheckAsbitems.Select(rs => rs.Asbitem.DisplayName).ToList()), ItemTypeName = string.Join(",", s.RegisterCheckAsbitems.Select(rs => rs.Asbitem.ItemType.DisplayName).ToList()), - CheckDate = s.CheckDate.ToString(), + CheckDate = DataHelper.ConversionDateToString(s.CheckDate), CheckDoctorName = EntityHelper.GetCheckDoctorName(s.CheckDoctorId, userlist), Items = s.RegisterCheckItems.Select(sa => new DetailedResultsList_Asbitem_Item { diff --git a/src/Shentun.Peis.Application/RegisterCheckItems/RegisterCheckItemAppService.cs b/src/Shentun.Peis.Application/RegisterCheckItems/RegisterCheckItemAppService.cs index c752f3a..51f7745 100644 --- a/src/Shentun.Peis.Application/RegisterCheckItems/RegisterCheckItemAppService.cs +++ b/src/Shentun.Peis.Application/RegisterCheckItems/RegisterCheckItemAppService.cs @@ -113,7 +113,7 @@ namespace Shentun.Peis.RegisterCheckItems var entdto = entlist.Select(s => new RegisterCheckItemOrItemOrItemResultTemplateDto { - CheckDate = s.CheckDate.ToString(), + CheckDate = DataHelper.ConversionDateToString(s.CheckDate), CheckDoctorName = s.CheckDoctorName, CriticalRangeValue = s.CriticalRangeValue, CriticalValue = s.CriticalValue, diff --git a/src/Shentun.Peis.Application/RegisterChecks/RegisterCheckAppService.cs b/src/Shentun.Peis.Application/RegisterChecks/RegisterCheckAppService.cs index 88cbb38..4efe2c9 100644 --- a/src/Shentun.Peis.Application/RegisterChecks/RegisterCheckAppService.cs +++ b/src/Shentun.Peis.Application/RegisterChecks/RegisterCheckAppService.cs @@ -31,7 +31,7 @@ namespace Shentun.Peis.RegisterChecks private readonly IRepository _registerCheckRepository; private readonly IRepository _userRepository; private readonly RegisterCheckManager _registerCheckManager; - + public RegisterCheckAppService(IRepository registerCheckRepository, @@ -41,7 +41,7 @@ namespace Shentun.Peis.RegisterChecks this._registerCheckRepository = registerCheckRepository; this._userRepository = userRepository; this._registerCheckManager = registerCheckManager; - + } /// @@ -60,7 +60,7 @@ namespace Shentun.Peis.RegisterChecks { AuditorUserId = registerCheckEntity.AuditorUserId, AuditTime = registerCheckEntity.AuditTime, - CheckDate = registerCheckEntity.CheckDate.ToString(), + CheckDate = DataHelper.ConversionDateToString(registerCheckEntity.CheckDate), CheckDoctorId = registerCheckEntity.CheckDoctorId, CheckRequestNo = registerCheckEntity.CheckRequestNo, CheckRequestPrintTimes = registerCheckEntity.CheckRequestPrintTimes, @@ -68,10 +68,10 @@ namespace Shentun.Peis.RegisterChecks CreationTime = registerCheckEntity.CreationTime, CreatorId = registerCheckEntity.CreatorId, CriticalValue = registerCheckEntity.CriticalValue, - CriticalValueCreateDate = registerCheckEntity.CriticalValueCreateDate.ToString(), + CriticalValueCreateDate = DataHelper.ConversionDateToString(registerCheckEntity.CriticalValueCreateDate), CriticalValueFlag = registerCheckEntity.CriticalValueFlag, CriticalValueProcessContent = registerCheckEntity.CriticalValueProcessContent, - CriticalValueProcessDate = registerCheckEntity.CriticalValueProcessDate.ToString(), + CriticalValueProcessDate = DataHelper.ConversionDateToString(registerCheckEntity.CriticalValueProcessDate), CriticalValueProcessDoctor = registerCheckEntity.CriticalValueProcessDoctor, CriticalValueProcessFlag = registerCheckEntity.CriticalValueProcessFlag, Id = registerCheckEntity.Id, @@ -108,7 +108,7 @@ namespace Shentun.Peis.RegisterChecks AsbitemName = string.Join(",", s.RegisterCheckAsbitems.Select(rs => rs.Asbitem.DisplayName).ToList()), AuditorUserId = s.AuditorUserId, AuditTime = s.AuditTime, - CheckDate = s.CheckDate.ToString(), + CheckDate = DataHelper.ConversionDateToString(s.CheckDate), CheckDoctorId = s.CheckDoctorId, CheckRequestNo = s.CheckRequestNo, CheckRequestPrintTimes = s.CheckRequestPrintTimes, @@ -116,10 +116,10 @@ namespace Shentun.Peis.RegisterChecks CreationTime = s.CreationTime, CreatorId = s.CreatorId, CriticalValue = s.CriticalValue, - CriticalValueCreateDate = s.CriticalValueCreateDate.ToString(), + CriticalValueCreateDate = DataHelper.ConversionDateToString(s.CriticalValueCreateDate), CriticalValueFlag = s.CriticalValueFlag, CriticalValueProcessContent = s.CriticalValueProcessContent, - CriticalValueProcessDate = s.CriticalValueProcessDate.ToString(), + CriticalValueProcessDate = DataHelper.ConversionDateToString(s.CriticalValueProcessDate), CriticalValueProcessDoctor = s.CriticalValueProcessDoctor, CriticalValueProcessFlag = s.CriticalValueProcessFlag, Id = s.Id, diff --git a/src/Shentun.Peis.Application/SumSummaryReports/SumSummaryReportAppService.cs b/src/Shentun.Peis.Application/SumSummaryReports/SumSummaryReportAppService.cs index 7867349..8724111 100644 --- a/src/Shentun.Peis.Application/SumSummaryReports/SumSummaryReportAppService.cs +++ b/src/Shentun.Peis.Application/SumSummaryReports/SumSummaryReportAppService.cs @@ -74,7 +74,7 @@ namespace Shentun.Peis.SumSummaryReports { AsbitemName = string.Join(",", s.RegisterCheckAsbitems.Select(rs => rs.Asbitem.DisplayName).ToList()), ItemTypeName = string.Join(",", s.RegisterCheckAsbitems.Select(rs => rs.Asbitem.ItemType.DisplayName).ToList()), - CheckDate = s.CheckDate.ToString(), + CheckDate = DataHelper.ConversionDateToString(s.CheckDate), CheckDoctorName = EntityHelper.GetCheckDoctorName(s.CheckDoctorId, userlist), Items = s.RegisterCheckItems.Select(sa => new DetailedResultsList_Asbitem_Item { diff --git a/src/Shentun.Peis.Domain/RegisterCheckItems/RegisterCheckItem.cs b/src/Shentun.Peis.Domain/RegisterCheckItems/RegisterCheckItem.cs index 56f5cb3..208303f 100644 --- a/src/Shentun.Peis.Domain/RegisterCheckItems/RegisterCheckItem.cs +++ b/src/Shentun.Peis.Domain/RegisterCheckItems/RegisterCheckItem.cs @@ -70,7 +70,7 @@ namespace Shentun.Peis.Models /// 检查日期 /// [Column("check_date")] - public DateOnly? CheckDate { get; set; } + public DateTime? CheckDate { get; set; } [Column("concurrency_stamp")] public string ConcurrencyStamp { get; set; } diff --git a/src/Shentun.Peis.Domain/RegisterChecks/RegisterCheck.cs b/src/Shentun.Peis.Domain/RegisterChecks/RegisterCheck.cs index 26ab132..8e92cd3 100644 --- a/src/Shentun.Peis.Domain/RegisterChecks/RegisterCheck.cs +++ b/src/Shentun.Peis.Domain/RegisterChecks/RegisterCheck.cs @@ -106,12 +106,12 @@ namespace Shentun.Peis.Models /// 危急值处理日期 /// [Column("critical_value_process_date")] - public DateOnly? CriticalValueProcessDate { get; set; } + public DateTime? CriticalValueProcessDate { get; set; } /// /// 危急值创建日期 /// [Column("critical_value_create_date")] - public DateOnly? CriticalValueCreateDate { get; set; } + public DateTime? CriticalValueCreateDate { get; set; } /// /// 检查医生(内部传ID,外部医生存名字) /// @@ -122,7 +122,7 @@ namespace Shentun.Peis.Models /// 检查日期 /// [Column("check_date")] - public DateOnly? CheckDate { get; set; } + public DateTime? CheckDate { get; set; } /// /// 是否审核 /// diff --git a/src/Shentun.Peis.Domain/RegisterChecks/RegisterCheckManager.cs b/src/Shentun.Peis.Domain/RegisterChecks/RegisterCheckManager.cs index 5a8d08c..1df9f78 100644 --- a/src/Shentun.Peis.Domain/RegisterChecks/RegisterCheckManager.cs +++ b/src/Shentun.Peis.Domain/RegisterChecks/RegisterCheckManager.cs @@ -71,7 +71,7 @@ namespace Shentun.Peis.RegisterChecks if (registerCheckEnt != null) { registerCheckEnt.CompleteFlag = CompleteFlag; - registerCheckEnt.CheckDate = DateOnly.FromDateTime(DateTime.Now); + registerCheckEnt.CheckDate = DateTime.Now; //记录当前操作者ID registerCheckEnt.CheckDoctorId = _currentUser.Id.ToString(); @@ -129,7 +129,7 @@ namespace Shentun.Peis.RegisterChecks throw new UserFriendlyException("请求参数有误"); } if (entitydto.CheckDate == null) - entity.CheckDate = DateOnly.FromDateTime(DateTime.Now); + entity.CheckDate = DateTime.Now; else entity.CheckDate = entitydto.CheckDate; entity.CheckDoctorId = entitydto.CheckDoctorId; @@ -156,12 +156,12 @@ namespace Shentun.Peis.RegisterChecks entity.CriticalValue = entitydto.CriticalValue; if (entitydto.CriticalValueCreateDate == null) - entity.CriticalValueCreateDate = DateOnly.FromDateTime(DateTime.Now); + entity.CriticalValueCreateDate = DateTime.Now; else entity.CriticalValueCreateDate = entitydto.CriticalValueCreateDate; entity.CriticalValueProcessContent = entitydto.CriticalValueProcessContent; if (entitydto.CriticalValueProcessDate == null) - entity.CriticalValueProcessDate = DateOnly.FromDateTime(DateTime.Now); + entity.CriticalValueProcessDate = DateTime.Now; else entity.CriticalValueProcessDate = entitydto.CriticalValueProcessDate; entity.CriticalValueFlag = entitydto.CriticalValueFlag;