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
56511aac
Commit
56511aac
authored
Apr 13, 2026
by
Kang Donghun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#73114 作業同期
parent
36fd7757
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
14 deletions
+13
-14
ABVJE_BL/src/jp/agentec/abook/abv/bl/logic/MasterDataLogic.java
+2
-1
ABVJE_BL/src/jp/agentec/abook/abv/bl/logic/OperationLogic.java
+11
-13
No files found.
ABVJE_BL/src/jp/agentec/abook/abv/bl/logic/MasterDataLogic.java
View file @
56511aac
...
@@ -40,7 +40,8 @@ public class MasterDataLogic extends AbstractLogic {
...
@@ -40,7 +40,8 @@ public class MasterDataLogic extends AbstractLogic {
// Map に保存されたデータをJSONに変換する。
// Map に保存されたデータをJSONに変換する。
for
(
Map
.
Entry
<
String
,
String
>
entry
:
masterDataMap
.
entrySet
())
{
for
(
Map
.
Entry
<
String
,
String
>
entry
:
masterDataMap
.
entrySet
())
{
System
.
out
.
println
(
entry
.
getKey
()
+
":"
+
entry
.
getValue
());
// 値は巨大になり得るためキーのみ(デバッグ時は必要に応じてレベル調整)
Logger
.
d
(
TAG
,
"masterData key="
+
entry
.
getKey
());
try
{
try
{
createMasterDataJson
(
entry
.
getKey
(),
entry
.
getValue
());
createMasterDataJson
(
entry
.
getKey
(),
entry
.
getValue
());
}
catch
(
IOException
e
)
{
}
catch
(
IOException
e
)
{
...
...
ABVJE_BL/src/jp/agentec/abook/abv/bl/logic/OperationLogic.java
View file @
56511aac
...
@@ -13,9 +13,11 @@ import java.util.ArrayList;
...
@@ -13,9 +13,11 @@ import java.util.ArrayList;
import
java.util.Calendar
;
import
java.util.Calendar
;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.HashMap
;
import
java.util.HashSet
;
import
java.util.Iterator
;
import
java.util.Iterator
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
import
java.util.Set
;
import
java.util.UUID
;
import
java.util.UUID
;
import
jp.agentec.abook.abv.bl.acms.client.AcmsClient
;
import
jp.agentec.abook.abv.bl.acms.client.AcmsClient
;
...
@@ -108,20 +110,25 @@ public class OperationLogic extends AbstractLogic {
...
@@ -108,20 +110,25 @@ public class OperationLogic extends AbstractLogic {
*/
*/
private
void
retrieveServerOperation
()
throws
AcmsException
,
NetworkDisconnectedException
{
private
void
retrieveServerOperation
()
throws
AcmsException
,
NetworkDisconnectedException
{
List
<
OperationDto
>
localOperations
=
mOperationDao
.
getAllOperation
();
List
<
OperationDto
>
localOperations
=
mOperationDao
.
getAllOperation
();
Map
<
Long
,
OperationDto
>
localByOperationId
=
new
HashMap
<
Long
,
OperationDto
>();
for
(
OperationDto
local
:
localOperations
)
{
localByOperationId
.
put
(
local
.
operationId
,
local
);
}
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
);
List
<
OperationDto
>
serverOperations
=
json
.
operationList
;
List
<
OperationDto
>
serverOperations
=
json
.
operationList
;
Set
<
Long
>
serverOperationIds
=
new
HashSet
<
Long
>();
for
(
OperationDto
serverOperationDto
:
serverOperations
)
{
for
(
OperationDto
serverOperationDto
:
serverOperations
)
{
serverOperationIds
.
add
(
serverOperationDto
.
operationId
);
// 登録フラグ
// 登録フラグ
boolean
insertFlg
=
true
;
boolean
insertFlg
=
true
;
for
(
OperationDto
localProjcetDto
:
localOperations
)
{
OperationDto
localProjcetDto
=
localByOperationId
.
get
(
serverOperationDto
.
operationId
);
if
(
serverOperationDto
.
operationId
.
equals
(
localProjcetDto
.
operationId
)
)
{
if
(
localProjcetDto
!=
null
)
{
//update
//update
serverOperationDto
.
needSyncFlg
=
serverOperationDto
.
equalsLastEdit
(
localProjcetDto
)
?
localProjcetDto
.
needSyncFlg
:
true
;
serverOperationDto
.
needSyncFlg
=
serverOperationDto
.
equalsLastEdit
(
localProjcetDto
)
?
localProjcetDto
.
needSyncFlg
:
true
;
serverOperationDto
.
operationLastSyncDate
=
localProjcetDto
.
operationLastSyncDate
;
serverOperationDto
.
operationLastSyncDate
=
localProjcetDto
.
operationLastSyncDate
;
List
<
Long
>
localOperationContentIds
=
mOperationContentDao
.
getContentIds
(
serverOperationDto
.
operationId
);
List
<
Long
>
localOperationContentIds
=
mOperationContentDao
.
getContentIds
(
serverOperationDto
.
operationId
);
boolean
operationContentFlg
=
false
;
for
(
OperationContentDto
operationContentDto
:
serverOperationDto
.
operationContentDtoList
)
{
for
(
OperationContentDto
operationContentDto
:
serverOperationDto
.
operationContentDtoList
)
{
if
(
localOperationContentIds
==
null
||
localOperationContentIds
.
size
()
==
0
)
{
if
(
localOperationContentIds
==
null
||
localOperationContentIds
.
size
()
==
0
)
{
// insert
// insert
...
@@ -176,8 +183,6 @@ public class OperationLogic extends AbstractLogic {
...
@@ -176,8 +183,6 @@ public class OperationLogic extends AbstractLogic {
mOperationDao
.
update
(
serverOperationDto
);
mOperationDao
.
update
(
serverOperationDto
);
// 更新することで登録フラグをfalseにセット
// 更新することで登録フラグをfalseにセット
insertFlg
=
false
;
insertFlg
=
false
;
break
;
}
}
}
// 更新されたら以下の処理は行わない
// 更新されたら以下の処理は行わない
...
@@ -221,14 +226,7 @@ public class OperationLogic extends AbstractLogic {
...
@@ -221,14 +226,7 @@ public class OperationLogic extends AbstractLogic {
List
<
OperationDto
>
deleteListDtoArray
=
new
ArrayList
<
OperationDto
>();
List
<
OperationDto
>
deleteListDtoArray
=
new
ArrayList
<
OperationDto
>();
for
(
OperationDto
localProjcetDto
:
localOperations
)
{
for
(
OperationDto
localProjcetDto
:
localOperations
)
{
boolean
deleteFlg
=
true
;
if
(!
serverOperationIds
.
contains
(
localProjcetDto
.
operationId
))
{
for
(
OperationDto
serverOperationDto
:
serverOperations
)
{
if
(
localProjcetDto
.
operationId
.
equals
(
serverOperationDto
.
operationId
))
{
deleteFlg
=
false
;
break
;
}
}
if
(
deleteFlg
)
{
deleteListDtoArray
.
add
(
localProjcetDto
);
deleteListDtoArray
.
add
(
localProjcetDto
);
}
}
}
}
...
...
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