curtis
13小時前 62c5adb8641e8626a056abc773b72449152d8ae9
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
[
  {
    "matcher": "procedure TCB_IMGPSScanX.HTTPSClientCertificateValidate(Sender: TObject;",
    "tags": [
      "TransportManager",
      "TransportManager.utilities"
    ],
    "deps": [
      "HTTPSClientCertificateValidate"
    ],
    "lIndex": "5473",
    "rIndex": "5478",
    "description": "HTTPS 用戶端憑證驗證回呼函數,預設直接將 Validate 設為 True,以接受所有伺服器憑證。"
  },
  {
    "matcher": "Procedure TCB_IMGPSScanX.ZipMainFile(SoPath,DePath,ZipName:String);",
    "tags": [
      "TransportManager",
      "TransportManager.payloadArchiver"
    ],
    "deps": [
      "FileExists",
      "LoadFromFile"
    ],
    "lIndex": "8388",
    "rIndex": "8460",
    "description": "將案件的主要圖檔與所有中繼資料檔案打包壓縮為 ZIP。流程如下:1. 遍歷影像清單 (ContextList) 與附件清單 (AttContextList) 加入實體圖檔。2. 自動偵測並加入多種系統紀錄檔,包含索引檔 (Context.dat)、掃瞄清單 (scanlist.dat)、縮放紀錄 (ReSize.dat)、案件分類資訊 (CaseDocNo_Copies.dat) 及跨案引用設定 (UseCase.ini) 等。3. 檢查是否存在特殊壓縮檔 (FirstImg.zip) 並併入。4. 呼叫 ExeCuteZip 執行壓縮作業,確保上傳時案件資料的完整性。"
  },
  {
    "matcher": "Procedure TCB_IMGPSScanX.ZipMaskFile(SoPath,MarkPath,DePath,ZipName:String); //壓縮遮罩影像檔",
    "tags": [
      "TransportManager",
      "TransportManager.payloadArchiver"
    ],
    "deps": [
      "FileExists"
    ],
    "lIndex": "8461",
    "rIndex": "8494",
    "description": "壓縮遮罩影像檔及其相關設定檔。此方法會從指定遮罩路徑 (MarkPath) 收集與影像索引 (ContextList) 對應的遮罩圖檔,同時併入基本的案件資訊檔(如 Context.dat, scanlist.dat, DocNo_Name.dat)以及系統預設的錯誤與授權圖檔(Err.jpg, auth.jpg)。最後將這些檔案統一壓縮至目標路徑,供後續遮罩影像的上傳作業使用。"
  },
  {
    "matcher": "function TCB_IMGPSScanX.LoadFileGetMD5(const filename: string): string;",
    "tags": [
      "TransportManager",
      "TransportManager.utilities"
    ],
    "deps": [
      "LoadFileGetMD5",
      "TIdHashMessageDigest5"
    ],
    "lIndex": "9551",
    "rIndex": "9574",
    "description": "計算指定檔案的 MD5 雜湊值。方法會以唯讀模式開啟檔案串流 (TFileStream),利用 TIdHashMessageDigest5 元件處理串流內容,並返回以十六進位字串表示的 MD5 值。此功能主要用於確認影像檔案在傳輸或處理前後的完整性與一致性,防止資料受損或被重複處理。"
  },
  {
    "matcher": "Function TCB_IMGPSScanX.GetFtpinfo(CaseID,Action:String):Boolean;",
    "tags": [
      "TransportManager",
      "TransportManager.fileTransfer",
      "FTP 相關"
    ],
    "deps": [],
    "lIndex": "10964",
    "rIndex": "11041",
    "description": "向伺服器請求案件上傳所需的 FTP 連線資訊。核心邏輯:1. 發送包含案件編號與動作代碼的 HTTP POST 請求至後台 Servlet。2. 解析伺服器回傳結果,若回傳 'nodata' 則維持 tsNone 模式;若回傳成功,則根據標籤判斷是否啟用 FTP 模式 (tsFtp)。3. 若為 FTP 模式,會進一步解析並呼叫 DecodeFtpInfo 對包含連線協定、IP、Port、帳號及密碼的加密字串進行解密,並存入系統全域變數中。"
  },
  {
    "matcher": "Procedure TCB_IMGPSScanX.SetFtpInfo;     //餵入FTP資訊",
    "tags": [
      "TransportManager",
      "TransportManager.fileTransfer",
      "FTP 相關"
    ],
    "deps": [
      "IIS_Ftp",
      "SetFtpInfo"
    ],
    "lIndex": "11042",
    "rIndex": "11071",
    "description": "將 FTP 連線參數與事件回呼設定至 FTP 傳輸元件 (IIS_Ftp)。此方法會將先前取得並解碼的連線資訊(如 FTP IP、帳號、密碼、路徑、連接埠)指派給 IIS_Ftp 物件,並根據協定類型設定是否開啟 SSL/TLS 以及被動模式 (Passive)。此外,也會關聯各項事件處理器(如 SSLError, CertificateValidate, TextDataLine 等),以監控傳輸過程中的通訊狀態。"
  },
  {
    "matcher": "Function TCB_IMGPSScanX.FtpCaseComplete(SendData:String):Boolean;",
    "tags": [
      "TransportManager",
      "TransportManager.fileTransfer",
      "FTP 相關"
    ],
    "deps": [
      "FtpCaseComplete",
      "ProcessServlet_FormData"
    ],
    "lIndex": "11072",
    "rIndex": "11094",
    "description": "通知後台伺服器 FTP 案件上傳已完成。方法會將包含案件狀態的上傳數據發送至特定的 Servlet 介面。邏輯包含檢查 HTTP 通訊是否成功、解析伺服器回傳的結果代碼,並處理可能的登入過期(Session Timeout)情況。若執行失敗,會將錯誤原因記錄至 HttpErrStr,供後續 UI 顯示錯誤訊息。"
  }
]