Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
esb_agent
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
원종진
esb_agent
Commits
397034df
Commit
397034df
authored
Nov 05, 2019
by
원종진
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
서버에 데이터 조회 실패시 처리 추가
parent
afeacd2a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
40 additions
and
19 deletions
+40
-19
frmResultUnit.pas
+40
-19
No files found.
frmResultUnit.pas
View file @
397034df
...
...
@@ -69,28 +69,48 @@ begin
with
aRecResult
do
begin
code
:=
SuperObj
[
'code'
].
AsString
;
data
:=
AES128DecodeString
(
SuperObj
[
'data'
].
AsString
,
aAESKey
);
name
:=
AES128DecodeString
(
SuperObj
[
'name'
].
AsString
,
aAESKey
);
DetailObj
:=
SO
(
data
);
for
i
:=
0
to
DetailObj
.
AsArray
.
Length
-
1
do
// Request 응답의 code 항목이 FAIL이면 조회 실패 메시지를 준비시키고
// 그 외의 경우는 data, name 값을 AES128Decoding 하여 디스플레이 준비시킨다.
if
(
SuperObj
[
'code'
]
=
nil
)
or
(
UpperCase
(
SuperObj
[
'code'
].
AsString
)
=
'FAIL'
)
then
begin
New
(
pDetailItem
);
with
pDetailItem
^
do
begin
Key
:=
'조회 실패'
;
if
(
SuperObj
[
'msg'
]
<>
nil
)
then
Value
:=
SuperObj
[
'msg'
].
AsString
else
Value
:=
''
;
end
;
fResultList
.
Add
(
pDetailItem
);
ListBox1
.
Items
.
Add
(
''
);
end
else
begin
if
ObjectFindFirst
(
DetailObj
.
AsArray
.
O
[
i
],
JSONArrIter
)
then
repeat
New
(
pDetailItem
);
with
pDetailItem
^
do
begin
Key
:=
JSONArrIter
.
key
;
Value
:=
JSONArrIter
.
val
.
AsString
;
end
;
fResultList
.
Add
(
pDetailItem
);
ListBox1
.
Items
.
Add
(
''
);
until
not
ObjectFindNext
(
JSONArrIter
);
ObjectFindClose
(
JSONArrIter
);
code
:=
SuperObj
[
'code'
].
AsString
;
name
:=
AES128DecodeString
(
SuperObj
[
'name'
].
AsString
,
aAESKey
);
data
:=
AES128DecodeString
(
SuperObj
[
'data'
].
AsString
,
aAESKey
);
DetailObj
:=
SO
(
data
);
for
i
:=
0
to
DetailObj
.
AsArray
.
Length
-
1
do
begin
if
ObjectFindFirst
(
DetailObj
.
AsArray
.
O
[
i
],
JSONArrIter
)
then
repeat
New
(
pDetailItem
);
with
pDetailItem
^
do
begin
Key
:=
JSONArrIter
.
key
;
Value
:=
JSONArrIter
.
val
.
AsString
;
end
;
fResultList
.
Add
(
pDetailItem
);
ListBox1
.
Items
.
Add
(
''
);
until
not
ObjectFindNext
(
JSONArrIter
);
ObjectFindClose
(
JSONArrIter
);
end
;
end
;
Self
.
Caption
:=
name
;
end
;
end
;
...
...
@@ -141,3 +161,4 @@ begin
end
;
end
.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment