diff --git a/src/Shentun.Peis.Application.Contracts/RegisterCheckPictures/CreateRegisterCheckPictureDto.cs b/src/Shentun.Peis.Application.Contracts/RegisterCheckPictures/CreateRegisterCheckPictureDto.cs index ea5d51a..044ff53 100644 --- a/src/Shentun.Peis.Application.Contracts/RegisterCheckPictures/CreateRegisterCheckPictureDto.cs +++ b/src/Shentun.Peis.Application.Contracts/RegisterCheckPictures/CreateRegisterCheckPictureDto.cs @@ -1,5 +1,7 @@ using System; using System.Collections.Generic; +using System.ComponentModel.DataAnnotations.Schema; +using System.ComponentModel.DataAnnotations; using System.Text; namespace Shentun.Peis.RegisterCheckPictures @@ -26,6 +28,11 @@ namespace Shentun.Peis.RegisterCheckPictures /// public char IsPrint { get; set; } = 'N'; + /// + /// 图片文件类型 0-仪器图片,1-报告文件,默认是0 + /// + public char? PictureFileType { get; set; } + ///// ///// 显示顺序 无需传值 ///// diff --git a/src/Shentun.Peis.Application.Contracts/RegisterCheckPictures/RegisterCheckPictureDto.cs b/src/Shentun.Peis.Application.Contracts/RegisterCheckPictures/RegisterCheckPictureDto.cs index db03b26..18f6f4c 100644 --- a/src/Shentun.Peis.Application.Contracts/RegisterCheckPictures/RegisterCheckPictureDto.cs +++ b/src/Shentun.Peis.Application.Contracts/RegisterCheckPictures/RegisterCheckPictureDto.cs @@ -22,6 +22,11 @@ namespace Shentun.Peis.RegisterCheckPictures /// public string LocalPathName { get; set; } + /// + /// 图片文件类型 0-仪器图片,1-报告文件,默认是0 + /// + public char PictureFileType { get; set; } + /// /// 是否打印标志 /// diff --git a/src/Shentun.Peis.Application/RegisterCheckPictures/RegisterCheckPictureAppService.cs b/src/Shentun.Peis.Application/RegisterCheckPictures/RegisterCheckPictureAppService.cs index e956a73..7e314c7 100644 --- a/src/Shentun.Peis.Application/RegisterCheckPictures/RegisterCheckPictureAppService.cs +++ b/src/Shentun.Peis.Application/RegisterCheckPictures/RegisterCheckPictureAppService.cs @@ -89,6 +89,7 @@ namespace Shentun.Peis.RegisterCheckPictures PictureFilename = s.a.PictureFilename, LocalPathName = s.a.LocalPathName, LastModifierName = s.LastModifierName, + PictureFileType = s.a.PictureFileType, CreatorName = s.CreatorName }).OrderBy(o => o.DisplayOrder).ToList(); @@ -124,6 +125,8 @@ namespace Shentun.Peis.RegisterCheckPictures ent.DisplayOrder = input.IndexOf(item) + 1; // ent.PictureFilename = item.PictureFilename; ent.IsPrint = item.IsPrint; + if (item.PictureFileType != null) + ent.PictureFileType = item.PictureFileType.Value; entlist_update.Add(ent); } @@ -590,13 +593,13 @@ namespace Shentun.Peis.RegisterCheckPictures throw new UserFriendlyException("图片资源不正确"); } - + registerCheckPictureEnt.PictureFilename = PictureUrl; if (!string.IsNullOrWhiteSpace(input.LocalPathName)) - { + { registerCheckPictureEnt.LocalPathName = input.LocalPathName; } - + await _registerCheckPictureRepository.UpdateAsync(registerCheckPictureEnt); } diff --git a/src/Shentun.Peis.Domain/RegisterChecks/RegisterCheckManager.cs b/src/Shentun.Peis.Domain/RegisterChecks/RegisterCheckManager.cs index c43767b..fc4fa16 100644 --- a/src/Shentun.Peis.Domain/RegisterChecks/RegisterCheckManager.cs +++ b/src/Shentun.Peis.Domain/RegisterChecks/RegisterCheckManager.cs @@ -107,7 +107,7 @@ namespace Shentun.Peis.RegisterChecks registerCheckEnt.CompleteFlag = CompleteFlag; if (registerCheckEnt.CompleteFlag == RegisterCheckCompleteFlag.UnChecked) { - registerCheckEnt.CheckDoctorId = null; + //registerCheckEnt.CheckDoctorId = null; //保留医生 删除结果时 registerCheckEnt.ExecOrganizationUnitId = null; registerCheckEnt.CheckDate = null; } @@ -210,13 +210,13 @@ namespace Shentun.Peis.RegisterChecks } entity.CheckDoctorId = checkDoctorId; entity.CompleteFlag = RegisterCheckCompleteFlag.Checked; - if(execOrganizationUnitId != null && execOrganizationUnitId != Guid.Empty) + if (execOrganizationUnitId != null && execOrganizationUnitId != Guid.Empty) { entity.ExecOrganizationUnitId = execOrganizationUnitId; } else { - if(Guid.TryParse(entity.CheckDoctorId,out var checkDoctorIdGuid)) + if (Guid.TryParse(entity.CheckDoctorId, out var checkDoctorIdGuid)) { var identityUserOrganizationUnit = _identityUserOrganizationUnitRepository.GetAsync(o => o.UserId == checkDoctorIdGuid).Result; entity.ExecOrganizationUnitId = identityUserOrganizationUnit.OrganizationUnitId; @@ -488,7 +488,7 @@ namespace Shentun.Peis.RegisterChecks //获取全局配置 check_request_no_rule_prefix = check_request_no_rule_prefix_ent.ParmValue; } - + } if (string.IsNullOrWhiteSpace(check_request_no_rule_tail_len)) @@ -530,8 +530,8 @@ namespace Shentun.Peis.RegisterChecks { maxnum = (Convert.ToInt32(primarykeyBuilderEnt.SerialNo) + 1).ToString(); } - - + + primarykeyBuilderEnt.SerialNo = maxnum; //更新新的序列号 CheckRequestNo = check_request_no_rule_prefix + date + maxnum.PadLeft(Convert.ToInt32(check_request_no_rule_tail_len), '0'); @@ -551,7 +551,7 @@ namespace Shentun.Peis.RegisterChecks SerialNo = maxnum }; - await _primarykeyBuilderRepository.InsertAsync(primarykeyBuilderEnt,true); + await _primarykeyBuilderRepository.InsertAsync(primarykeyBuilderEnt, true); } #endregion } @@ -578,7 +578,7 @@ namespace Shentun.Peis.RegisterChecks SerialNo = maxnum }; - await _primarykeyBuilderRepository.InsertAsync(primarykeyBuilderEnt,true); + await _primarykeyBuilderRepository.InsertAsync(primarykeyBuilderEnt, true); }