Browse Source

图片类型

master
wxd 12 months ago
parent
commit
b92009119b
  1. 7
      src/Shentun.Peis.Application.Contracts/RegisterCheckPictures/CreateRegisterCheckPictureDto.cs
  2. 5
      src/Shentun.Peis.Application.Contracts/RegisterCheckPictures/RegisterCheckPictureDto.cs
  3. 9
      src/Shentun.Peis.Application/RegisterCheckPictures/RegisterCheckPictureAppService.cs
  4. 16
      src/Shentun.Peis.Domain/RegisterChecks/RegisterCheckManager.cs

7
src/Shentun.Peis.Application.Contracts/RegisterCheckPictures/CreateRegisterCheckPictureDto.cs

@ -1,5 +1,7 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.ComponentModel.DataAnnotations;
using System.Text; using System.Text;
namespace Shentun.Peis.RegisterCheckPictures namespace Shentun.Peis.RegisterCheckPictures
@ -26,6 +28,11 @@ namespace Shentun.Peis.RegisterCheckPictures
/// </summary> /// </summary>
public char IsPrint { get; set; } = 'N'; public char IsPrint { get; set; } = 'N';
/// <summary>
/// 图片文件类型 0-仪器图片,1-报告文件,默认是0
/// </summary>
public char? PictureFileType { get; set; }
///// <summary> ///// <summary>
///// 显示顺序 无需传值 ///// 显示顺序 无需传值
///// </summary> ///// </summary>

5
src/Shentun.Peis.Application.Contracts/RegisterCheckPictures/RegisterCheckPictureDto.cs

@ -22,6 +22,11 @@ namespace Shentun.Peis.RegisterCheckPictures
/// </summary> /// </summary>
public string LocalPathName { get; set; } public string LocalPathName { get; set; }
/// <summary>
/// 图片文件类型 0-仪器图片,1-报告文件,默认是0
/// </summary>
public char PictureFileType { get; set; }
/// <summary> /// <summary>
/// 是否打印标志 /// 是否打印标志
/// </summary> /// </summary>

9
src/Shentun.Peis.Application/RegisterCheckPictures/RegisterCheckPictureAppService.cs

@ -89,6 +89,7 @@ namespace Shentun.Peis.RegisterCheckPictures
PictureFilename = s.a.PictureFilename, PictureFilename = s.a.PictureFilename,
LocalPathName = s.a.LocalPathName, LocalPathName = s.a.LocalPathName,
LastModifierName = s.LastModifierName, LastModifierName = s.LastModifierName,
PictureFileType = s.a.PictureFileType,
CreatorName = s.CreatorName CreatorName = s.CreatorName
}).OrderBy(o => o.DisplayOrder).ToList(); }).OrderBy(o => o.DisplayOrder).ToList();
@ -124,6 +125,8 @@ namespace Shentun.Peis.RegisterCheckPictures
ent.DisplayOrder = input.IndexOf(item) + 1; ent.DisplayOrder = input.IndexOf(item) + 1;
// ent.PictureFilename = item.PictureFilename; // ent.PictureFilename = item.PictureFilename;
ent.IsPrint = item.IsPrint; ent.IsPrint = item.IsPrint;
if (item.PictureFileType != null)
ent.PictureFileType = item.PictureFileType.Value;
entlist_update.Add(ent); entlist_update.Add(ent);
} }
@ -590,13 +593,13 @@ namespace Shentun.Peis.RegisterCheckPictures
throw new UserFriendlyException("图片资源不正确"); throw new UserFriendlyException("图片资源不正确");
} }
registerCheckPictureEnt.PictureFilename = PictureUrl; registerCheckPictureEnt.PictureFilename = PictureUrl;
if (!string.IsNullOrWhiteSpace(input.LocalPathName)) if (!string.IsNullOrWhiteSpace(input.LocalPathName))
{
{
registerCheckPictureEnt.LocalPathName = input.LocalPathName; registerCheckPictureEnt.LocalPathName = input.LocalPathName;
} }
await _registerCheckPictureRepository.UpdateAsync(registerCheckPictureEnt); await _registerCheckPictureRepository.UpdateAsync(registerCheckPictureEnt);
} }

16
src/Shentun.Peis.Domain/RegisterChecks/RegisterCheckManager.cs

@ -107,7 +107,7 @@ namespace Shentun.Peis.RegisterChecks
registerCheckEnt.CompleteFlag = CompleteFlag; registerCheckEnt.CompleteFlag = CompleteFlag;
if (registerCheckEnt.CompleteFlag == RegisterCheckCompleteFlag.UnChecked) if (registerCheckEnt.CompleteFlag == RegisterCheckCompleteFlag.UnChecked)
{ {
registerCheckEnt.CheckDoctorId = null;
//registerCheckEnt.CheckDoctorId = null; //保留医生 删除结果时
registerCheckEnt.ExecOrganizationUnitId = null; registerCheckEnt.ExecOrganizationUnitId = null;
registerCheckEnt.CheckDate = null; registerCheckEnt.CheckDate = null;
} }
@ -210,13 +210,13 @@ namespace Shentun.Peis.RegisterChecks
} }
entity.CheckDoctorId = checkDoctorId; entity.CheckDoctorId = checkDoctorId;
entity.CompleteFlag = RegisterCheckCompleteFlag.Checked; entity.CompleteFlag = RegisterCheckCompleteFlag.Checked;
if(execOrganizationUnitId != null && execOrganizationUnitId != Guid.Empty)
if (execOrganizationUnitId != null && execOrganizationUnitId != Guid.Empty)
{ {
entity.ExecOrganizationUnitId = execOrganizationUnitId; entity.ExecOrganizationUnitId = execOrganizationUnitId;
} }
else 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; var identityUserOrganizationUnit = _identityUserOrganizationUnitRepository.GetAsync(o => o.UserId == checkDoctorIdGuid).Result;
entity.ExecOrganizationUnitId = identityUserOrganizationUnit.OrganizationUnitId; entity.ExecOrganizationUnitId = identityUserOrganizationUnit.OrganizationUnitId;
@ -488,7 +488,7 @@ namespace Shentun.Peis.RegisterChecks
//获取全局配置 //获取全局配置
check_request_no_rule_prefix = check_request_no_rule_prefix_ent.ParmValue; check_request_no_rule_prefix = check_request_no_rule_prefix_ent.ParmValue;
} }
} }
if (string.IsNullOrWhiteSpace(check_request_no_rule_tail_len)) if (string.IsNullOrWhiteSpace(check_request_no_rule_tail_len))
@ -530,8 +530,8 @@ namespace Shentun.Peis.RegisterChecks
{ {
maxnum = (Convert.ToInt32(primarykeyBuilderEnt.SerialNo) + 1).ToString(); maxnum = (Convert.ToInt32(primarykeyBuilderEnt.SerialNo) + 1).ToString();
} }
primarykeyBuilderEnt.SerialNo = maxnum; //更新新的序列号 primarykeyBuilderEnt.SerialNo = maxnum; //更新新的序列号
CheckRequestNo = check_request_no_rule_prefix + date + maxnum.PadLeft(Convert.ToInt32(check_request_no_rule_tail_len), '0'); 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 SerialNo = maxnum
}; };
await _primarykeyBuilderRepository.InsertAsync(primarykeyBuilderEnt,true);
await _primarykeyBuilderRepository.InsertAsync(primarykeyBuilderEnt, true);
} }
#endregion #endregion
} }
@ -578,7 +578,7 @@ namespace Shentun.Peis.RegisterChecks
SerialNo = maxnum SerialNo = maxnum
}; };
await _primarykeyBuilderRepository.InsertAsync(primarykeyBuilderEnt,true);
await _primarykeyBuilderRepository.InsertAsync(primarykeyBuilderEnt, true);
} }

Loading…
Cancel
Save