chore: initialize migration workspace
This commit is contained in:
36
working/MESCommonBase响应输出与SqlWebCall主流程图.mmd
Normal file
36
working/MESCommonBase响应输出与SqlWebCall主流程图.mmd
Normal file
@@ -0,0 +1,36 @@
|
||||
%% MESCommonBase 响应输出与 SqlWebCall 主流程图
|
||||
flowchart TD
|
||||
A([MESCommonBase.ashx<br/>ProcessRequest])
|
||||
B[解析请求并取得 type<br/>JSON body / jsonobj / Request param]
|
||||
C{switch(type)}
|
||||
|
||||
A --> B --> C
|
||||
|
||||
C -->|2001/2002/2003/2004/16| D[文件下载类分支<br/>生成或读取 bytes/fileName/extension]
|
||||
C -->|15| E[文件上传分支<br/>读取 Request.Files[0]<br/>调用 ExePROCEDURE_Type15]
|
||||
C -->|4000| F[IP 查询分支<br/>读取 ServerVariables / UserHostAddress]
|
||||
C -->|default| G[普通业务分支<br/>DataLink.SqlWebCall(type,jsonData,dataobj)]
|
||||
|
||||
D --> D1{bytes 是否有效?}
|
||||
D1 -->|是| R1[二进制下载响应<br/>Content-Type: application/octet-stream<br/>Content-Disposition: attachment<br/>BinaryWrite + Flush + End/Close]
|
||||
D1 -->|否<br/>主要见 Type=16| R0[直接 return<br/>可能为空响应]
|
||||
|
||||
E --> R2[JSON 文本响应<br/>Response.Write(responseText)<br/>常见 result=1 / result=0]
|
||||
F --> R3[文本 IP 响应<br/>Response.Write(userIP)<br/>Content-Type 仍可能是 application/json]
|
||||
G --> G1[SqlWebCall 返回字符串<br/>数组 JSON / code-message-data / 空字符串]
|
||||
G1 --> R2
|
||||
|
||||
A -.外层 catch(Exception err).-> X[异常兜底<br/>不记录异常<br/>Response.Write(responseText)<br/>初始 responseText = NULL]
|
||||
X --> END([请求结束])
|
||||
R1 --> END
|
||||
R0 --> END
|
||||
R2 --> END
|
||||
R3 --> END
|
||||
|
||||
subgraph WARN[主流程注意点]
|
||||
W1[Response.End 位于 try 内<br/>可能触发 ThreadAbortException]
|
||||
W2[响应格式不统一<br/>二进制 / JSON / 文本 / NULL / 空响应]
|
||||
W3[default 分支执行能力强<br/>依赖 SqlWebCall 内部 Type 二次分发]
|
||||
end
|
||||
|
||||
END --> WARN
|
||||
Reference in New Issue
Block a user