싸인 이미지 SMB 직접 읽기 — 공유 매핑 구현(서버측 SMB 개방 대기)
사용자 결정(②SMB 직접 접근)에 따라 구현. 실측 확인:
- 파일서버 = DB 서버와 같은 호스트, 전송 데몬 포트 2002 는 열림
- <b>SMB 445·139 는 닫힘</b>, UNC·관리공유 접근 모두 실패 → 서버측 조치 필요
- 서명 경로는 서버측 절대경로 D:\MsystechHIS\{사이트}\... (설정 루트 E:\msys\ 와 다름)
그래서 공유가 열리는 즉시 동작하도록 매핑을 넣었다:
Images:SignatureShareMap 에 "서버접두=UNC접두" 를 두면 해석 순서가
①레거시 캐시 ②공유(UNC) ③직접 경로가 된다. 접두는 대소문자 무시로
<b>긴 것부터</b> 맞추고(짧은 접두가 정확한 대응을 묻지 않게), '=' 없는
설정 오타는 무시한다(반쪽 경로를 만들면 조용히 틀린다). 자격증명은
설정에 담지 않는다 — 공유 접근은 단말 로그인 계정으로 붙는다.
진단 --db-filecfg 확장: 접속 <b>대상</b>(Type·IP·Port·FileDirectory)과
경로 접두 분포를 찍고(자격증명은 길이만), 공유 매핑별 접근 가능 여부와
파일서버 SMB(445) 개방 여부를 판정해 무엇을 열어야 하는지 알려 준다.
- dotnet test 358/358 (매핑 4건 추가: 치환·긴 접두 우선·오타 무시·해석 순서)
- --edit-smoke 실패 0 · --db-patient ①~㊲ 전건 통과
- --db-render P062 md5 8d683835f5d81e7bb41c79071d6bf954 불변
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Fable 5
parent
a0333791b6
commit
345b2e1da1
@@ -50,6 +50,15 @@ public static class ConfigLoader
|
||||
config.DevUidCod = root["His:DevUidCod"] ?? string.Empty;
|
||||
config.GridSize = ReadInt(root["Designer:GridSize"], 4);
|
||||
config.SnapThreshold = ReadInt(root["Designer:SnapThreshold"], 6);
|
||||
// 싸인 이미지 공유 매핑 — 배열(Images:SignatureShareMap:0…) 또는 세미콜론 한 줄 둘 다 받는다.
|
||||
// 병원 배포는 ini·json 을 손으로 고치는 일이 많아 한 줄 형태가 실수를 줄인다.
|
||||
config.SignatureShareMap = root.GetSection("Images:SignatureShareMap").GetChildren()
|
||||
.Select(c => c.Value ?? string.Empty)
|
||||
.Concat((root["Images:SignatureShareMap"] ?? string.Empty)
|
||||
.Split(';', StringSplitOptions.RemoveEmptyEntries | StringSplitOptions.TrimEntries))
|
||||
.Where(v => v.Contains('=', StringComparison.Ordinal))
|
||||
.Distinct(StringComparer.OrdinalIgnoreCase)
|
||||
.ToArray();
|
||||
return config;
|
||||
}
|
||||
|
||||
|
||||
@@ -214,6 +214,9 @@ public static class PatientIdentity
|
||||
/// <summary>HIS 설치 경로 — 레거시 싸인 캐시 폴더(ServerInfo ini 의 Install\Path)</summary>
|
||||
public static string? InstallPath() => SheetMe.Data.Config.ServerInfoReader.InstallPath();
|
||||
|
||||
/// <summary>파일서버 공유 매핑 — 설정(Images:SignatureShareMap)</summary>
|
||||
public static IReadOnlyList<string> ShareMap() => ConfigService.Current.SignatureShareMap;
|
||||
|
||||
/// <summary>문맥 저장소 공급자 — 입원과·퇴원과의 시점별 진료과 조회용</summary>
|
||||
public static Func<PatientContextStore?> ContextStoreSource()
|
||||
{
|
||||
|
||||
@@ -77,7 +77,8 @@ public static class PatientSession
|
||||
PatientIdentity.PathologyDoctorSource(), PatientIdentity.LabDoctorSource(),
|
||||
PatientIdentity.ExtraStoreSource(), PatientIdentity.ContextStoreSource(),
|
||||
PatientIdentity.BstSourceFor(picked), PatientIdentity.ChartVitalSourceFor(picked),
|
||||
PatientIdentity.SignatureStoreSource(), PatientIdentity.InstallPath())
|
||||
PatientIdentity.SignatureStoreSource(), PatientIdentity.InstallPath(),
|
||||
PatientIdentity.ShareMap())
|
||||
: session;
|
||||
return (tags, new MDataTableRunner(document, Variables()));
|
||||
}
|
||||
|
||||
@@ -234,6 +234,9 @@ public sealed class PatientTagResolver : ITagValueResolver
|
||||
/// <summary>HIS 설치 경로 — 레거시 싸인 캐시 폴더의 뿌리(ServerInfo ini)</summary>
|
||||
private readonly string? installPath;
|
||||
|
||||
/// <summary>파일서버 공유 매핑(서버경로=UNC) — 설정에서 온다</summary>
|
||||
private readonly IReadOnlyList<string>? shareMap;
|
||||
|
||||
/// <summary>환자 부가정보(자기 SQL 7종) 공급자 — 태그가 물을 때 만든다</summary>
|
||||
private readonly Func<PatientExtraStore?>? extraStoreSource;
|
||||
|
||||
@@ -273,7 +276,8 @@ public sealed class PatientTagResolver : ITagValueResolver
|
||||
Func<string, string>? bstSource = null,
|
||||
Func<string, string, string[], string, string>? chartVitalSource = null,
|
||||
Func<SignatureStore?>? signatureStoreSource = null,
|
||||
string? installPath = null)
|
||||
string? installPath = null,
|
||||
IReadOnlyList<string>? shareMap = null)
|
||||
{
|
||||
this.context = context;
|
||||
this.next = next;
|
||||
@@ -296,6 +300,7 @@ public sealed class PatientTagResolver : ITagValueResolver
|
||||
this.chartVitalSource = chartVitalSource;
|
||||
this.signatureStoreSource = signatureStoreSource;
|
||||
this.installPath = installPath;
|
||||
this.shareMap = shareMap;
|
||||
}
|
||||
#endregion
|
||||
|
||||
@@ -1099,7 +1104,7 @@ public sealed class PatientTagResolver : ITagValueResolver
|
||||
}
|
||||
|
||||
// ② 그 경로의 파일을 이 단말에서 찾는다(레거시 캐시 → 경로 자체)
|
||||
var found = SignatureImagePath.Resolve(remote, installPath);
|
||||
var found = SignatureImagePath.Resolve(remote, installPath, null, shareMap);
|
||||
return found.Origin switch
|
||||
{
|
||||
SignatureImageOrigin.None => new TagValue(false,
|
||||
|
||||
Reference in New Issue
Block a user