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
dab26fa4
Commit
dab26fa4
authored
Jul 14, 2022
by
Kim Jinsung
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Task #47081【@Form】【IO帳票】(敷島製パン様)同期処理の強制化
parent
a8f82182
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
81 additions
and
9 deletions
+81
-9
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/common/activity/ABVActivity.java
+11
-0
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/home/activity/OperationListActivity.java
+57
-9
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/home/helper/OperationListHelper.java
+13
-0
No files found.
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/common/activity/ABVActivity.java
View file @
dab26fa4
...
...
@@ -165,6 +165,17 @@ public abstract class ABVActivity extends Activity {
}
}
/**
* 同期進捗のプログレスバーインジケーターが表示状態かをチェックする
* @return true:表示、false:非表示
*/
public
boolean
progressDialogHorizontalShowing
()
{
if
(!
isFinishing
()
&&
progressDialogHorizontal
!=
null
&&
!
progressDialogHorizontal
.
isShowing
())
{
return
false
;
}
return
true
;
}
public
void
showProgressPopup
()
{
showProgressPopup
(
getResources
().
getString
(
R
.
string
.
progress
));
}
...
...
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/home/activity/OperationListActivity.java
View file @
dab26fa4
...
...
@@ -172,6 +172,7 @@ public class OperationListActivity extends OperationActivity {
private
Uri
mSelectPanoContentUri
;
private
final
static
int
ABOOK_CHECK_OPERATION_PANO_CONTENT_IMAGE
=
201
;
private
final
static
int
DELAY_2SECONDS_OPERATION_MAX_COUNT
=
10
;
private
Dialog
mOperationSelectDialog
;
private
ListView
mOperationSelectListView
;
...
...
@@ -199,6 +200,8 @@ public class OperationListActivity extends OperationActivity {
// 作業種別のサービスオプション値を保持用フラグ
private
boolean
mOperationGroupMasterServiceOperationFlg
;
private
boolean
mAutoBatchSyncFlg
;
// ビューの作成
private
class
ReloadHandler
implements
Runnable
{
@Override
...
...
@@ -262,7 +265,7 @@ public class OperationListActivity extends OperationActivity {
mSelectedFixPuchMessagePosition
=
0
;
mSendType
=
0
;
mAutoBatchSyncFlg
=
false
;
// 一括同期ボタン
mOperationBatchSyncButton
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
@Override
...
...
@@ -449,6 +452,17 @@ public class OperationListActivity extends OperationActivity {
// ビューを作り直す
setOperationListView
();
}
//「I/O 帳票使用」がYESのみ、新着更新処理完了後、一括同期処理を開始する。
if
(
ABVDataCache
.
getInstance
().
serviceOption
.
isUnableIOReport
())
{
if
(
mAutoBatchSyncFlg
)
{
closeProgressPopup
();
List
<
OperationDto
>
needSyncOperationList
=
mListHelper
.
getNeedSyncOperationList
();
if
(
needSyncOperationList
.
size
()
!=
0
)
{
categoryBatchSync
(
needSyncOperationList
);
}
mAutoBatchSyncFlg
=
false
;
}
}
}
}
});
...
...
@@ -483,10 +497,46 @@ public class OperationListActivity extends OperationActivity {
if
(
operationDto
!=
null
&&
operationDto
.
needSyncFlg
)
{
// 同期処理後、直列処理で新着更新を行う。
singleSyncOperation
(
operationId
,
operationDto
.
reportType
);
//「I/O 帳票使用」がYESのみ、カテゴリ一括動機実施
if
(
ABVDataCache
.
getInstance
().
serviceOption
.
isUnableIOReport
())
{
//同期中のインジケーター表示中には新着更新中のインジケーター表示できないので、チェックする。
while
(
progressDialogHorizontalShowing
())
{
try
{
Thread
.
sleep
(
100
);
}
catch
(
InterruptedException
ie
)
{
Logger
.
e
(
TAG
,
"sleep error = "
+
ie
.
getLocalizedMessage
());
}
}
//新着更新後、一括同期処理を行うため、インジケーター表示
handler
.
post
(
new
Runnable
()
{
@Override
public
void
run
()
{
showProgressPopup
(
PatternStringUtil
.
patternToString
(
getApplicationContext
(),
R
.
string
.
updating
,
getUserPref
(
AppDefType
.
UserPrefKey
.
RESOURCE_PATTERN_TYPE
,
0
)));
}
});
mAutoBatchSyncFlg
=
true
;
//表示作業数が10個以上の場合、2秒待機してから新着更新を行う。10個未満は1秒待機
List
<
OperationDto
>
operationList
=
mListHelper
.
getOperationList
();
int
delaySeconds
=
1000
;
if
(
operationList
.
size
()
>=
DELAY_2SECONDS_OPERATION_MAX_COUNT
)
{
delaySeconds
=
2000
;
}
handler
.
postDelayed
(
new
Runnable
()
{
@Override
public
void
run
()
{
dataRefresh
(
true
);
}
},
delaySeconds
);
}
}
else
{
closeProgressPopup
();
dataRefresh
(
true
);
}
dataRefresh
(
true
);
}
});
}
...
...
@@ -2119,7 +2169,8 @@ public class OperationListActivity extends OperationActivity {
public
void
onClick
(
DialogInterface
dialog
,
int
which
)
{
dialog
.
dismiss
();
// 一括同期開始
categoryBatchSync
();
List
<
OperationDto
>
operationDtoList
=
mOperationDao
.
getNeedSyncOperationByGroupMasterId
(
getABVUIDataCache
().
getOperationGroupMasterId
());
categoryBatchSync
(
operationDtoList
);
}
});
dialog
.
setNegativeButton
(
R
.
string
.
cancel
,
new
DialogInterface
.
OnClickListener
()
{
...
...
@@ -2137,21 +2188,18 @@ public class OperationListActivity extends OperationActivity {
/**
* カテゴリの一括同期ボタン
* @param operationDtoList 同期する作業情報配列
*/
public
void
categoryBatchSync
()
{
public
void
categoryBatchSync
(
List
<
OperationDto
>
operationDtoList
)
{
Logger
.
i
(
TAG
,
"---batch sync start"
);
// ネットワーク通信チェック
if
(!
ABVEnvironment
.
getInstance
().
networkAdapter
.
isNetworkConnected
())
{
showSimpleAlertDialog
(
getString
(
R
.
string
.
app_name
),
getString
(
R
.
string
.
request_network_connection
));
return
;
}
// 作業種別に関連する作業リストを取得
List
<
OperationDto
>
operationList
=
mOperationDao
.
getNeedSyncOperationByGroupMasterId
(
getABVUIDataCache
().
getOperationGroupMasterId
());
// 作業リストをスタックにセット
Stack
<
OperationDto
>
operationDtoStack
=
new
Stack
<
OperationDto
>();
operationDtoStack
.
addAll
(
operationList
);
operationDtoStack
.
addAll
(
operation
Dto
List
);
// 一括同期を設定
batchSyncView
=
new
ABVBatchSyncView
(
this
);
...
...
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/home/helper/OperationListHelper.java
View file @
dab26fa4
...
...
@@ -266,6 +266,19 @@ public abstract class OperationListHelper {
}
/**
* 表示中の作業の中に同期が必要な作業のみ返す。
* @return 作業情報配列
*/
public
List
<
OperationDto
>
getNeedSyncOperationList
()
{
List
<
OperationDto
>
needSyncOperationList
=
new
ArrayList
<>();
for
(
OperationDto
operationDto
:
operationDtoList
)
{
if
(
operationDto
.
needSyncFlg
)
{
needSyncOperationList
.
add
(
operationDto
);
}
}
return
needSyncOperationList
;
}
/**
* プロジェクトリスト取得
* @return
*/
...
...
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