Browse Source

图片id

master
wxd 1 year ago
parent
commit
ea1112dedb
  1. 45
      src/Shentun.Pacs.Application/PacsBusiness/PacsBusinessAppService.cs

45
src/Shentun.Pacs.Application/PacsBusiness/PacsBusinessAppService.cs

@ -4,12 +4,14 @@ using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.Configuration; using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging;
using NPOI.POIFS.Storage; using NPOI.POIFS.Storage;
using NPOI.SS.Formula.Functions;
using NPOI.Util; using NPOI.Util;
using NUglify.Helpers; using NUglify.Helpers;
using Shentun.Pacs.ColumnReferenceCodes; using Shentun.Pacs.ColumnReferenceCodes;
using Shentun.Pacs.CustomerOrgs; using Shentun.Pacs.CustomerOrgs;
using Shentun.Pacs.Devices; using Shentun.Pacs.Devices;
using Shentun.Pacs.Enums; using Shentun.Pacs.Enums;
using Shentun.Pacs.Migrations;
using Shentun.Pacs.Models; using Shentun.Pacs.Models;
using Shentun.Pacs.PatientRegisters; using Shentun.Pacs.PatientRegisters;
using Shentun.Pacs.Patients; using Shentun.Pacs.Patients;
@ -1706,21 +1708,35 @@ namespace Shentun.Pacs.PacsBusiness
string pictureFilename = $"{shareAddress}{item.PictureFilename.Replace(pacsRequestPath, "/").Replace("//", "/").Replace("/", @"\")}"; string pictureFilename = $"{shareAddress}{item.PictureFilename.Replace(pacsRequestPath, "/").Replace("//", "/").Replace("/", @"\")}";
int maxId = await oldDb.Ado.GetIntAsync("select isnull(max(check_picture_id),0) from check_picture");
await oldDb.Ado.ExecuteCommandAsync("insert into check_picture(check_picture_id,patient_register_id,asbitem_id,device_id,picture_filename,print_flag," +
"local_store_flag,display_order,is_new_pacs) VALUES (@check_picture_id,@patient_register_id,@asbitem_id,@device_id,@picture_filename,@print_flag,@local_store_flag,@display_order,@is_new_pacs);",
new List<SugarParameter>() {
new SugarParameter("patient_register_id",registerCheckFirst.registerCheckAsbitem.OldPatientRegisterId),
new SugarParameter("asbitem_id",registerCheckFirst.registerCheckAsbitem.OldAsbitemId),
new SugarParameter("device_id",null),
new SugarParameter("picture_filename",pictureFilename),
new SugarParameter("print_flag",'Y'),
new SugarParameter("local_store_flag",'Y'),
new SugarParameter("display_order",registerCheckPictureList.IndexOf(item)+1),
new SugarParameter("is_new_pacs",'Y'),
new SugarParameter("check_picture_id",maxId+1),
});
string maxIdString = oldDb.Ado.UseStoredProcedure().GetString("proc_getprimarykey", new List<SugarParameter>() {
new SugarParameter("@primarykey_builder_id","check_picture_id"),
new SugarParameter("@serial_no_len",10),
new SugarParameter("@null_date_string",'1')
});
int maxId;
bool isMaxId = int.TryParse(maxIdString, out maxId);
if (isMaxId)
{
await oldDb.Ado.ExecuteCommandAsync("insert into check_picture(check_picture_id,patient_register_id,asbitem_id,device_id,picture_filename,print_flag," +
"local_store_flag,display_order,is_new_pacs) VALUES (@check_picture_id,@patient_register_id,@asbitem_id,@device_id,@picture_filename,@print_flag,@local_store_flag,@display_order,@is_new_pacs);",
new List<SugarParameter>() {
new SugarParameter("patient_register_id",registerCheckFirst.registerCheckAsbitem.OldPatientRegisterId),
new SugarParameter("asbitem_id",registerCheckFirst.registerCheckAsbitem.OldAsbitemId),
new SugarParameter("device_id",null),
new SugarParameter("picture_filename",pictureFilename),
new SugarParameter("print_flag",'Y'),
new SugarParameter("local_store_flag",'Y'),
new SugarParameter("display_order",registerCheckPictureList.IndexOf(item)+1),
new SugarParameter("is_new_pacs",'Y'),
new SugarParameter("check_picture_id",maxId)
});
}
} }
#endregion #endregion
@ -1874,6 +1890,7 @@ namespace Shentun.Pacs.PacsBusiness
#endregion #endregion
/// <summary> /// <summary>
/// 转换老系统性别 /// 转换老系统性别
/// </summary> /// </summary>

Loading…
Cancel
Save