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
5b2ea6f4
Commit
5b2ea6f4
authored
Dec 05, 2024
by
Kim Jinsung
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#62987 アプリ自動同期仕様変更
parent
bae657e9
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
38 additions
and
1 deletions
+38
-1
ABVJE_BL/src/jp/agentec/abook/abv/bl/logic/OperationLogic.java
+17
-0
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/home/activity/OperationListActivity.java
+21
-1
No files found.
ABVJE_BL/src/jp/agentec/abook/abv/bl/logic/OperationLogic.java
View file @
5b2ea6f4
...
@@ -12,6 +12,7 @@ import java.security.NoSuchAlgorithmException;
...
@@ -12,6 +12,7 @@ import java.security.NoSuchAlgorithmException;
import
java.util.ArrayList
;
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.Iterator
;
import
java.util.Iterator
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
...
@@ -1957,4 +1958,20 @@ public class OperationLogic extends AbstractLogic {
...
@@ -1957,4 +1958,20 @@ public class OperationLogic extends AbstractLogic {
}
}
return
needSyncCheckArray
;
return
needSyncCheckArray
;
}
}
/**
* 重複作業情報を配列から除外
* @param operationDtoList
* @return
*/
public
List
<
OperationDto
>
deduplicateOperationDto
(
List
<
OperationDto
>
operationDtoList
)
{
Map
<
String
,
OperationDto
>
map
=
new
HashMap
<>();
for
(
OperationDto
operationDto
:
operationDtoList
)
{
// IDと名前だけをキーにする
String
key
=
operationDto
.
operationId
+
"_"
+
operationDto
.
operationName
;
// 上記のキーで要素を格納
map
.
put
(
key
,
operationDto
);
}
return
new
ArrayList
<>(
map
.
values
());
}
}
}
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/home/activity/OperationListActivity.java
View file @
5b2ea6f4
...
@@ -211,6 +211,8 @@ public class OperationListActivity extends OperationActivity {
...
@@ -211,6 +211,8 @@ public class OperationListActivity extends OperationActivity {
public
Long
mQrCodeOperationId
=
null
;
public
Long
mQrCodeOperationId
=
null
;
private
ListView
mOperationPushMessageListView
;
private
ListView
mOperationPushMessageListView
;
private
Long
mSyncTargetOperationId
=
null
;
// ビューの作成
// ビューの作成
private
class
ReloadHandler
implements
Runnable
{
private
class
ReloadHandler
implements
Runnable
{
@Override
@Override
...
@@ -506,6 +508,20 @@ public class OperationListActivity extends OperationActivity {
...
@@ -506,6 +508,20 @@ public class OperationListActivity extends OperationActivity {
needSyncOperationList
.
addAll
(
mOperationDao
.
getNeedSyncAllOperation
());
needSyncOperationList
.
addAll
(
mOperationDao
.
getNeedSyncAllOperation
());
}
}
List
<
OperationDto
>
needSyncCheckArray
=
mOperationLogic
.
needSyncCheckArray
(
needSyncOperationList
);
List
<
OperationDto
>
needSyncCheckArray
=
mOperationLogic
.
needSyncCheckArray
(
needSyncOperationList
);
if
(
mSyncTargetOperationId
!=
null
&&
mSyncTargetOperationId
!=
-
1
)
{
if
(
ABVDataCache
.
getInstance
().
serviceOption
.
isUnableIOReport
())
{
List
<
OperationDto
>
categorySyncOperationList
=
mListHelper
.
getNeedSyncOperationList
();
needSyncCheckArray
.
addAll
(
categorySyncOperationList
);
}
OperationDto
operationDto
=
mOperationLogic
.
getOperation
(
mSyncTargetOperationId
);
if
(
operationDto
!=
null
&&
operationDto
.
needSyncFlg
)
{
needSyncCheckArray
.
add
(
operationDto
);
}
mSyncTargetOperationId
=
null
;
needSyncCheckArray
=
mOperationLogic
.
deduplicateOperationDto
(
needSyncCheckArray
);
}
Logger
.
i
(
"needSyncCheckArray.size() = "
+
needSyncCheckArray
.
size
()
+
", mSyncTargetOperationId = "
+
mSyncTargetOperationId
);
if
(
needSyncCheckArray
.
size
()
>
0
)
{
if
(
needSyncCheckArray
.
size
()
>
0
)
{
categoryBatchSync
(
needSyncCheckArray
);
categoryBatchSync
(
needSyncCheckArray
);
}
else
{
}
else
{
...
@@ -548,9 +564,12 @@ public class OperationListActivity extends OperationActivity {
...
@@ -548,9 +564,12 @@ public class OperationListActivity extends OperationActivity {
Logger
.
i
(
TAG
,
"onResume:start"
);
Logger
.
i
(
TAG
,
"onResume:start"
);
super
.
onResume
();
super
.
onResume
();
refreshOperationList
();
refreshOperationList
();
final
long
operationId
=
getUserPref
(
AppDefType
.
UserPrefKey
.
SYNC_TARGET_OPERATION_ID
,
-
1L
);
// 作業指示・報告からプロジェクト一覧へ戻った時の同期処理
// 作業指示・報告からプロジェクト一覧へ戻った時の同期処理
if
(
ABVEnvironment
.
getInstance
().
networkAdapter
.
isNetworkConnected
())
{
if
(
ABVEnvironment
.
getInstance
().
networkAdapter
.
isNetworkConnected
())
{
if
(
isAutoSync
())
{
if
(
isAutoSync
())
{
mSyncTargetOperationId
=
operationId
;
// delay for showProgressView
// delay for showProgressView
handler
.
postDelayed
(
new
Runnable
()
{
handler
.
postDelayed
(
new
Runnable
()
{
@Override
@Override
...
@@ -560,7 +579,7 @@ public class OperationListActivity extends OperationActivity {
...
@@ -560,7 +579,7 @@ public class OperationListActivity extends OperationActivity {
},
100
);
},
100
);
}
else
{
}
else
{
final
long
operationId
=
getUserPref
(
AppDefType
.
UserPrefKey
.
SYNC_TARGET_OPERATION_ID
,
-
1L
);
if
(
operationId
!=
-
1
)
{
if
(
operationId
!=
-
1
)
{
final
OperationDto
operationDto
=
mOperationLogic
.
getOperation
(
operationId
);
final
OperationDto
operationDto
=
mOperationLogic
.
getOperation
(
operationId
);
// リソースパターンの適用
// リソースパターンの適用
...
@@ -2431,6 +2450,7 @@ public class OperationListActivity extends OperationActivity {
...
@@ -2431,6 +2450,7 @@ public class OperationListActivity extends OperationActivity {
}
}
}
}
mAutoSyncOpenOperationId
=
null
;
mAutoSyncOpenOperationId
=
null
;
mSyncTargetOperationId
=
null
;
}
}
/**
/**
...
...
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