Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
abook_check
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
abook_android
abook_check
Commits
92ba5522
Commit
92ba5522
authored
Aug 27, 2022
by
NGUYEN HOANG SON
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
improve save, load processList, warningReportList json
parent
30e88f86
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
7 deletions
+14
-7
ABVJE_BL/src/jp/agentec/abook/abv/bl/common/ABVEnvironment.java
+8
-0
ABVJE_BL/src/jp/agentec/abook/abv/bl/logic/OperationLogic.java
+6
-7
No files found.
ABVJE_BL/src/jp/agentec/abook/abv/bl/common/ABVEnvironment.java
View file @
92ba5522
...
...
@@ -893,4 +893,12 @@ public class ABVEnvironment {
public
String
getMasterFilePath
()
{
return
String
.
format
(
ApertureMasterDataDirFormat
,
rootDirectory
);
}
//pickup processList, warningReport
public
String
getPickupProcessListOperationFilePath
(
long
operationId
)
{
return
getOperationDirFile
(
operationId
)
+
"/pickupProcessList.json"
;
}
public
String
getPickupWarningReportListOperationFilePath
(
long
operationId
)
{
return
getOperationDirFile
(
operationId
)
+
"/pickupWarningReportList.json"
;
}
}
ABVJE_BL/src/jp/agentec/abook/abv/bl/logic/OperationLogic.java
View file @
92ba5522
...
...
@@ -258,13 +258,12 @@ public class OperationLogic extends AbstractLogic {
}
//save processList, warningReport json file
String
processListJsonPath
=
ABVEnvironment
.
getInstance
().
get
OperationDirFile
(
serverOperationDto
.
operationId
)
+
"/processList.json"
;
String
processListJsonPath
=
ABVEnvironment
.
getInstance
().
get
PickupProcessListOperationFilePath
(
serverOperationDto
.
operationId
)
;
FileUtil
.
delete
(
processListJsonPath
);
if
(
serverOperationDto
.
processJsonArray
!=
null
&&
serverOperationDto
.
processJsonArray
.
length
()
>
0
)
{
FileUtil
.
createFile
(
processListJsonPath
,
serverOperationDto
.
processJsonArray
.
toString
());
}
String
warningReportJsonPath
=
ABVEnvironment
.
getInstance
().
getOperationDirFile
(
serverOperationDto
.
operationId
)
+
"/warningReportList.json"
;
String
warningReportJsonPath
=
ABVEnvironment
.
getInstance
().
getPickupWarningReportListOperationFilePath
(
serverOperationDto
.
operationId
);
FileUtil
.
delete
(
warningReportJsonPath
);
if
(
serverOperationDto
.
warningReportJsonArray
!=
null
&&
serverOperationDto
.
warningReportJsonArray
.
length
()
>
0
)
{
FileUtil
.
createFile
(
warningReportJsonPath
,
serverOperationDto
.
warningReportJsonArray
.
toString
());
...
...
@@ -2308,15 +2307,15 @@ public class OperationLogic extends AbstractLogic {
operationJson
.
put
(
ABookKeys
.
DISPLAY_PERMISSION_FLG
,
operationList
.
get
(
i
).
displayPermissionFlg
);
operationJson
.
put
(
ABookKeys
.
CONTENT_ID
,
operationList
.
get
(
i
).
contentId
);
//load processList and warning json file
String
processListJsonPath
=
ABVEnvironment
.
getInstance
().
get
OperationDirFile
(
operationList
.
get
(
i
).
operationId
)
+
"/processList.json"
;
String
processListJsonPath
=
ABVEnvironment
.
getInstance
().
get
PickupProcessListOperationFilePath
(
operationList
.
get
(
i
).
operationId
)
;
String
processListString
=
FileUtil
.
readTextFile
(
processListJsonPath
);
if
(!
StringUtil
.
isNullOrEmpty
(
processListString
))
{
operationJson
.
put
(
"processList"
,
new
JSONArray
(
processListString
));
operationJson
.
put
(
ABookKeys
.
OPERATION_PROCESS_LIST
,
new
JSONArray
(
processListString
));
}
String
warningReportJsonPath
=
ABVEnvironment
.
getInstance
().
get
OperationDirFile
(
operationList
.
get
(
i
).
operationId
)
+
"/warningReportList.json"
;
String
warningReportJsonPath
=
ABVEnvironment
.
getInstance
().
get
PickupWarningReportListOperationFilePath
(
operationList
.
get
(
i
).
operationId
)
;
String
warningReportString
=
FileUtil
.
readTextFile
(
warningReportJsonPath
);
if
(!
StringUtil
.
isNullOrEmpty
(
warningReportString
))
{
operationJson
.
put
(
"warningReportList"
,
new
JSONArray
(
warningReportString
));
operationJson
.
put
(
ABookKeys
.
OPERATION_WARNING_REPORT_LIST
,
new
JSONArray
(
warningReportString
));
}
operationJsonArray
.
put
(
operationJson
);
...
...
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