From 551210901b2ba58be0d94b49437df6c8e7423add Mon Sep 17 00:00:00 2001 From: he <10978375@qq.com> Date: Mon, 28 Nov 2022 17:23:41 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Reading/Dto/ReadingMedicalReviewDto.cs | 18 ++++----- .../ReadingMedicalReviewService.cs | 11 +++--- .../Allocation/TaskMedicalReview.cs | 37 +++++++++++++++++-- .../ReadingMedicalReviewDialog.cs | 23 ++++++++++-- 4 files changed, 67 insertions(+), 22 deletions(-) diff --git a/IRaCIS.Core.Application/Service/Reading/Dto/ReadingMedicalReviewDto.cs b/IRaCIS.Core.Application/Service/Reading/Dto/ReadingMedicalReviewDto.cs index 83aada724..2c540e80b 100644 --- a/IRaCIS.Core.Application/Service/Reading/Dto/ReadingMedicalReviewDto.cs +++ b/IRaCIS.Core.Application/Service/Reading/Dto/ReadingMedicalReviewDto.cs @@ -251,15 +251,14 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto public string CreateUserName { get; set; } - - public List FileNameList { get; set; } - - public List ImagePathList { get; set; } + public List FileList { get; set; } } + + public class GetMedicalReviewDialogInDto { [NotDefault] @@ -413,16 +412,16 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto public string DialogCloseReason { get; set; } = string.Empty; } + + public class SaveMedicalReviewInfoInDto { public bool IsSendDialog { get; set; } public Guid TaskMedicalReviewId { get; set; } - - public List FileNameList { get; set; } - public List ImagePathList { get; set; } + public List FileList { get; set; } = new List(); /// @@ -469,10 +468,7 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto public string Questioning { get; set; } = string.Empty; - public List FileNameList { get; set; } - - - public List ImagePathList { get; set; } + public List FileList { get; set; } /// /// 审核建议 diff --git a/IRaCIS.Core.Application/Service/Reading/MedicalAudit/ReadingMedicalReviewService.cs b/IRaCIS.Core.Application/Service/Reading/MedicalAudit/ReadingMedicalReviewService.cs index b9425e6d3..cad34d621 100644 --- a/IRaCIS.Core.Application/Service/Reading/MedicalAudit/ReadingMedicalReviewService.cs +++ b/IRaCIS.Core.Application/Service/Reading/MedicalAudit/ReadingMedicalReviewService.cs @@ -10,6 +10,7 @@ using IRaCIS.Core.Application.Service.Reading.Dto; using IRaCIS.Core.Domain.Share; using Panda.DynamicWebApi.Attributes; using IRaCIS.Core.Application.Contracts; +using Newtonsoft.Json; namespace IRaCIS.Core.Application.Service { @@ -331,12 +332,12 @@ namespace IRaCIS.Core.Application.Service IsHaveQuestion = inDto.IsHaveQuestion, Questioning = inDto.Questioning, IsSendMessage = inDto.IsSendDialog && inDto.IsHaveQuestion, - ImagePath = string.Join(',',inDto.ImagePathList), - FileName = string.Join(',', inDto.FileNameList), + ImagePath = JsonConvert.SerializeObject(inDto.FileList), + AuditAdviceEnum = inDto.AuditAdviceEnum, SaveConclusionTime = DateTime.Now, - }); ; + }); var medicalReview = await _taskMedicalReviewRepository.Where(x => x.Id == inDto.TaskMedicalReviewId).FirstNotNullAsync(); if (inDto.IsSendDialog&& !medicalReview.IsSendMessage && inDto.IsHaveQuestion) @@ -350,9 +351,9 @@ namespace IRaCIS.Core.Application.Service IsHaveQuestion=inDto.IsHaveQuestion, Questioning=inDto.Questioning, VisitTaskId= medicalReview.VisitTaskId, - FileName = medicalReview.FileName, + UserTypeEnumInt = _userInfo.UserTypeEnumInt, - ImagePath= medicalReview.ImagePath, + ImagePath = JsonConvert.SerializeObject(inDto.FileList), }); } diff --git a/IRaCIS.Core.Domain/Allocation/TaskMedicalReview.cs b/IRaCIS.Core.Domain/Allocation/TaskMedicalReview.cs index 775f19802..7006cd792 100644 --- a/IRaCIS.Core.Domain/Allocation/TaskMedicalReview.cs +++ b/IRaCIS.Core.Domain/Allocation/TaskMedicalReview.cs @@ -9,6 +9,7 @@ using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; using System.Collections.Generic; using System.Linq; +using Newtonsoft.Json; namespace IRaCIS.Core.Domain.Models { @@ -171,11 +172,41 @@ namespace IRaCIS.Core.Domain.Models /// public bool IsInvalid { get; set; } + /// + /// 文件 + /// [NotMapped] - public List FileNameList => this.FileName.Split(',').ToList(); + public List FileList + { + get + { + + + try + { + return JsonConvert.DeserializeObject>(this.ImagePath); + } + catch (Exception) + { + + return new List(); + } + + } + } + - [NotMapped] - public List ImagePathList => this.ImagePath.Split(',').ToList(); } + #region 文件对象 + + public class ImageInfo + { + public string FileName { get; set; } + + public string ImagePath { get; set; } + } + + #endregion + } diff --git a/IRaCIS.Core.Domain/Reading/MedicalAudit/ReadingMedicalReviewDialog.cs b/IRaCIS.Core.Domain/Reading/MedicalAudit/ReadingMedicalReviewDialog.cs index ce23422c1..8d2618ec9 100644 --- a/IRaCIS.Core.Domain/Reading/MedicalAudit/ReadingMedicalReviewDialog.cs +++ b/IRaCIS.Core.Domain/Reading/MedicalAudit/ReadingMedicalReviewDialog.cs @@ -102,11 +102,28 @@ namespace IRaCIS.Core.Domain.Models public TaskMedicalReview TaskMedicalReview { get; set; } + /// + /// 文件 + /// [NotMapped] - public List FileNameList => this.FileName.Split(',').ToList(); + public List FileList + { + get + { - [NotMapped] - public List ImagePathList => this.ImagePath.Split(',').ToList(); + + try + { + return JsonConvert.DeserializeObject>(this.ImagePath); + } + catch (Exception) + { + + return new List(); + } + + } + } }