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
30e88f86
Commit
30e88f86
authored
Aug 27, 2022
by
NGUYEN HOANG SON
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
save, load processList, warningReportList json
parent
287788d3
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
45 additions
and
2 deletions
+45
-2
ABVJE_BL/src/jp/agentec/abook/abv/bl/acms/client/json/OperationListJSON.java
+10
-0
ABVJE_BL/src/jp/agentec/abook/abv/bl/common/constant/ABookKeys.java
+3
-0
ABVJE_BL/src/jp/agentec/abook/abv/bl/dto/OperationDto.java
+5
-0
ABVJE_BL/src/jp/agentec/abook/abv/bl/logic/OperationLogic.java
+27
-2
No files found.
ABVJE_BL/src/jp/agentec/abook/abv/bl/acms/client/json/OperationListJSON.java
View file @
30e88f86
...
@@ -65,6 +65,9 @@ public class OperationListJSON extends AcmsCommonJSON {
...
@@ -65,6 +65,9 @@ public class OperationListJSON extends AcmsCommonJSON {
public
static
final
String
PermitCodeRequiredFlg
=
"permitCodeRequiredFlg"
;
public
static
final
String
PermitCodeRequiredFlg
=
"permitCodeRequiredFlg"
;
public
static
final
String
DisplayPermissionFlg
=
"displayPermissionFlg"
;
public
static
final
String
DisplayPermissionFlg
=
"displayPermissionFlg"
;
public
static
final
String
ProcessList
=
"processList"
;
public
static
final
String
WarningReportList
=
"warningReportList"
;
public
List
<
OperationDto
>
operationList
;
public
List
<
OperationDto
>
operationList
;
public
OperationListJSON
(
String
jsonString
)
throws
AcmsException
{
public
OperationListJSON
(
String
jsonString
)
throws
AcmsException
{
...
@@ -180,6 +183,13 @@ public class OperationListJSON extends AcmsCommonJSON {
...
@@ -180,6 +183,13 @@ public class OperationListJSON extends AcmsCommonJSON {
dto
.
operationGroupMasterRelationDtoList
.
add
(
operationGroupMasterRelationDto
);
dto
.
operationGroupMasterRelationDtoList
.
add
(
operationGroupMasterRelationDto
);
}
}
}
}
// check pickup tab
if
(
operationJson
.
has
(
ProcessList
))
{
dto
.
processJsonArray
=
operationJson
.
getJSONArray
(
ProcessList
);
}
if
(
operationJson
.
has
(
WarningReportList
))
{
dto
.
warningReportJsonArray
=
operationJson
.
getJSONArray
(
WarningReportList
);
}
operationList
.
add
(
dto
);
operationList
.
add
(
dto
);
}
}
}
}
...
...
ABVJE_BL/src/jp/agentec/abook/abv/bl/common/constant/ABookKeys.java
View file @
30e88f86
...
@@ -52,6 +52,9 @@ public class ABookKeys {
...
@@ -52,6 +52,9 @@ public class ABookKeys {
public
static
final
String
OPERATION_PUSHMESSAGE
=
"pushMessage"
;
public
static
final
String
OPERATION_PUSHMESSAGE
=
"pushMessage"
;
public
static
final
String
OPERATION_READINGFLG
=
"readingFlg"
;
public
static
final
String
OPERATION_READINGFLG
=
"readingFlg"
;
public
static
final
String
OPERATION_PROCESS_LIST
=
"processList"
;
public
static
final
String
OPERATION_WARNING_REPORT_LIST
=
"warningReportList"
;
// ABOOKCHECK SCHEME
// ABOOKCHECK SCHEME
public
static
final
String
ABOOK_CHECK_API
=
"abookcheck-api"
;
public
static
final
String
ABOOK_CHECK_API
=
"abookcheck-api"
;
public
static
final
String
CMD_MOVE_HOT_SPOT
=
"moveHotspot"
;
public
static
final
String
CMD_MOVE_HOT_SPOT
=
"moveHotspot"
;
...
...
ABVJE_BL/src/jp/agentec/abook/abv/bl/dto/OperationDto.java
View file @
30e88f86
package
jp
.
agentec
.
abook
.
abv
.
bl
.
dto
;
package
jp
.
agentec
.
abook
.
abv
.
bl
.
dto
;
import
org.json.adf.JSONArray
;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.List
;
...
@@ -42,6 +44,9 @@ public class OperationDto extends AbstractDto {
...
@@ -42,6 +44,9 @@ public class OperationDto extends AbstractDto {
// 作業担当グループリスト
// 作業担当グループリスト
public
List
<
TaskWorkerGroupDto
>
taskWorkerGroupDtoList
;
public
List
<
TaskWorkerGroupDto
>
taskWorkerGroupDtoList
;
public
JSONArray
processJsonArray
;
public
JSONArray
warningReportJsonArray
;
public
boolean
equalsLastEdit
(
OperationDto
dto
)
{
public
boolean
equalsLastEdit
(
OperationDto
dto
)
{
if
(
dto
!=
null
)
{
if
(
dto
!=
null
)
{
if
(
operationId
.
equals
(
dto
.
operationId
)
&&
lastEditDate
.
equals
(
dto
.
lastEditDate
))
{
if
(
operationId
.
equals
(
dto
.
operationId
)
&&
lastEditDate
.
equals
(
dto
.
lastEditDate
))
{
...
...
ABVJE_BL/src/jp/agentec/abook/abv/bl/logic/OperationLogic.java
View file @
30e88f86
...
@@ -110,7 +110,7 @@ public class OperationLogic extends AbstractLogic {
...
@@ -110,7 +110,7 @@ public class OperationLogic extends AbstractLogic {
* @throws AcmsException
* @throws AcmsException
* @throws NetworkDisconnectedException
* @throws NetworkDisconnectedException
*/
*/
public
void
initializeOperations
()
throws
AcmsException
,
NetworkDisconnectedException
{
public
void
initializeOperations
()
throws
AcmsException
,
NetworkDisconnectedException
,
IOException
{
// 作業グループリスト取得
// 作業グループリスト取得
setWorkingGroupList
();
setWorkingGroupList
();
// 作業一覧取得し、登録・更新・削除する
// 作業一覧取得し、登録・更新・削除する
...
@@ -131,7 +131,7 @@ public class OperationLogic extends AbstractLogic {
...
@@ -131,7 +131,7 @@ public class OperationLogic extends AbstractLogic {
* @throws AcmsException
* @throws AcmsException
* @throws NetworkDisconnectedException
* @throws NetworkDisconnectedException
*/
*/
private
void
retrieveServerOperation
()
throws
AcmsException
,
NetworkDisconnectedException
{
private
void
retrieveServerOperation
()
throws
AcmsException
,
NetworkDisconnectedException
,
IOException
{
List
<
OperationDto
>
localOperations
=
mOperationDao
.
getAllOperation
();
List
<
OperationDto
>
localOperations
=
mOperationDao
.
getAllOperation
();
AcmsParameters
param
=
new
AcmsParameters
(
cache
.
getMemberInfo
().
sid
);
AcmsParameters
param
=
new
AcmsParameters
(
cache
.
getMemberInfo
().
sid
);
OperationListJSON
json
=
AcmsClient
.
getInstance
(
cache
.
getUrlPath
(),
networkAdapter
).
getOperationList
(
param
);
OperationListJSON
json
=
AcmsClient
.
getInstance
(
cache
.
getUrlPath
(),
networkAdapter
).
getOperationList
(
param
);
...
@@ -256,6 +256,19 @@ public class OperationLogic extends AbstractLogic {
...
@@ -256,6 +256,19 @@ public class OperationLogic extends AbstractLogic {
for
(
PushMessageDto
dto
:
serverOperationDto
.
pushMessageList
)
{
for
(
PushMessageDto
dto
:
serverOperationDto
.
pushMessageList
)
{
mPushMessageDao
.
insert
(
dto
);
mPushMessageDao
.
insert
(
dto
);
}
}
//save processList, warningReport json file
String
processListJsonPath
=
ABVEnvironment
.
getInstance
().
getOperationDirFile
(
serverOperationDto
.
operationId
)
+
"/processList.json"
;
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"
;
FileUtil
.
delete
(
warningReportJsonPath
);
if
(
serverOperationDto
.
warningReportJsonArray
!=
null
&&
serverOperationDto
.
warningReportJsonArray
.
length
()
>
0
)
{
FileUtil
.
createFile
(
warningReportJsonPath
,
serverOperationDto
.
warningReportJsonArray
.
toString
());
}
}
}
List
<
OperationDto
>
deleteListDtoArray
=
new
ArrayList
<
OperationDto
>();
List
<
OperationDto
>
deleteListDtoArray
=
new
ArrayList
<
OperationDto
>();
...
@@ -2294,6 +2307,18 @@ public class OperationLogic extends AbstractLogic {
...
@@ -2294,6 +2307,18 @@ public class OperationLogic extends AbstractLogic {
operationJson
.
put
(
ABookKeys
.
OPERATION_OPEN_DATE
,
DateTimeUtil
.
toString
(
operationList
.
get
(
i
).
operationOpenDate
,
DateTimeFormat
.
yyyyMMddHHmmss_hyphen
));
operationJson
.
put
(
ABookKeys
.
OPERATION_OPEN_DATE
,
DateTimeUtil
.
toString
(
operationList
.
get
(
i
).
operationOpenDate
,
DateTimeFormat
.
yyyyMMddHHmmss_hyphen
));
operationJson
.
put
(
ABookKeys
.
DISPLAY_PERMISSION_FLG
,
operationList
.
get
(
i
).
displayPermissionFlg
);
operationJson
.
put
(
ABookKeys
.
DISPLAY_PERMISSION_FLG
,
operationList
.
get
(
i
).
displayPermissionFlg
);
operationJson
.
put
(
ABookKeys
.
CONTENT_ID
,
operationList
.
get
(
i
).
contentId
);
operationJson
.
put
(
ABookKeys
.
CONTENT_ID
,
operationList
.
get
(
i
).
contentId
);
//load processList and warning json file
String
processListJsonPath
=
ABVEnvironment
.
getInstance
().
getOperationDirFile
(
operationList
.
get
(
i
).
operationId
)
+
"/processList.json"
;
String
processListString
=
FileUtil
.
readTextFile
(
processListJsonPath
);
if
(!
StringUtil
.
isNullOrEmpty
(
processListString
))
{
operationJson
.
put
(
"processList"
,
new
JSONArray
(
processListString
));
}
String
warningReportJsonPath
=
ABVEnvironment
.
getInstance
().
getOperationDirFile
(
operationList
.
get
(
i
).
operationId
)
+
"/warningReportList.json"
;
String
warningReportString
=
FileUtil
.
readTextFile
(
warningReportJsonPath
);
if
(!
StringUtil
.
isNullOrEmpty
(
warningReportString
))
{
operationJson
.
put
(
"warningReportList"
,
new
JSONArray
(
warningReportString
));
}
operationJsonArray
.
put
(
operationJson
);
operationJsonArray
.
put
(
operationJson
);
}
}
operationListJsonObject
.
put
(
ABookKeys
.
OPERATION_LIST
,
operationJsonArray
);
operationListJsonObject
.
put
(
ABookKeys
.
OPERATION_LIST
,
operationJsonArray
);
...
...
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