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
f5c78aa8
Commit
f5c78aa8
authored
Aug 27, 2019
by
Lee Jaebin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#34866 一括同期
parent
af2b9d92
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
183 additions
and
7 deletions
+183
-7
ABVJE_BL/src/jp/agentec/abook/abv/bl/data/dao/OperationDao.java
+20
-0
ABVJE_BL/src/jp/agentec/abook/abv/bl/download/ContentDownloader.java
+6
-0
ABVJE_BL/src/jp/agentec/abook/abv/bl/download/ContentRefresher.java
+5
-0
ABVJE_BL/src/jp/agentec/abook/abv/bl/logic/OperationLogic.java
+11
-2
ABVJE_Res_Default_Android/res/drawable-xhdpi/ic_batch_sync.png
+0
-0
ABVJE_Res_Default_Android/res/values-ja/strings.xml
+11
-0
ABVJE_UI_Android/res/layout-large/ac_operation_list.xml
+9
-0
ABVJE_UI_Android/res/layout-normal/ac_operation_list.xml
+12
-2
ABVJE_UI_Android/res/layout/item_dialog_list.xml
+13
-0
ABVJE_UI_Android/res/layout/item_simple_list_single_choice.xml
+11
-0
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/common/activity/ABVActivity.java
+2
-2
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/common/activity/ABVAuthenticatedActivity.java
+21
-1
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/common/view/ABVBatchSyncView.java
+62
-0
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/home/activity/OperationListActivity.java
+0
-0
No files found.
ABVJE_BL/src/jp/agentec/abook/abv/bl/data/dao/OperationDao.java
View file @
f5c78aa8
...
...
@@ -380,4 +380,23 @@ public class OperationDao extends AbstractDao {
updateNeedSyncFlg
(
operationDto
.
operationId
,
true
);
}
}
/**
* 作業グループに紐づく同期可能な作業リストを取得
* @param operationGroupMasterId
* @return
*/
public
List
<
OperationDto
>
getNeedSyncOperationByGroupMasterId
(
Integer
operationGroupMasterId
)
{
StringBuffer
sql
=
new
StringBuffer
();
sql
.
append
(
" SELECT * "
);
sql
.
append
(
" FROM t_operation AS top "
);
sql
.
append
(
" INNER JOIN r_operation_content AS rop "
);
sql
.
append
(
" ON top.operation_id = rop.operation_id "
);
sql
.
append
(
" AND rop.operation_content_flg = 1 "
);
sql
.
append
(
" INNER JOIN r_operation_group_master_relation AS rogm "
);
sql
.
append
(
" ON top.operation_id = rogm.operation_id "
);
sql
.
append
(
" WHERE top.need_sync_flg = 1"
);
sql
.
append
(
" AND rogm.operation_group_master_id = ?"
);
return
rawQueryGetDtoList
(
sql
.
toString
(),
new
String
[]
{
""
+
operationGroupMasterId
},
OperationDto
.
class
);
}
}
\ No newline at end of file
ABVJE_BL/src/jp/agentec/abook/abv/bl/download/ContentDownloader.java
View file @
f5c78aa8
...
...
@@ -121,6 +121,10 @@ public class ContentDownloader {
public
void
addContentDownloadListener
(
ContentDownloadListener
contentDownloadListener
)
{
// ダウンロードリスナーが既にセットされてる場合、何もしない
if
(
contentDownloadListenerSet
.
contains
(
contentDownloadListener
))
{
return
;
}
contentDownloadListenerSet
.
add
(
contentDownloadListener
);
}
...
...
@@ -834,7 +838,9 @@ public class ContentDownloader {
private
void
onDownloadingContentZip
(
HttpDownloadNotification
notification
,
DownloadStatusType
downloadStatus
)
{
ContentZipDownloadNotification
dlNotification
=
new
ContentZipDownloadNotification
(
notification
,
downloadStatus
);
Logger
.
i
(
TAG
,
"--------------- dlNotification"
);
for
(
ContentDownloadListener
listener
:
contentDownloadListenerSet
)
{
Logger
.
i
(
"---------------"
+
listener
.
getClass
().
toString
());
listener
.
onDownloadingContentZip
(
dlNotification
);
}
}
...
...
ABVJE_BL/src/jp/agentec/abook/abv/bl/download/ContentRefresher.java
View file @
f5c78aa8
...
...
@@ -30,6 +30,7 @@ import jp.agentec.abook.abv.bl.logic.ContentReadingLogLogic;
import
jp.agentec.abook.abv.bl.logic.ContractLogic
;
import
jp.agentec.abook.abv.bl.logic.EnqueteLogic
;
import
jp.agentec.abook.abv.bl.logic.GroupLogic
;
import
jp.agentec.abook.abv.bl.logic.OperationGroupMasterLogic
;
import
jp.agentec.abook.abv.bl.logic.OperationLogic
;
import
jp.agentec.adf.util.CollectionUtil
;
import
jp.agentec.adf.util.DateTimeUtil
;
...
...
@@ -67,6 +68,7 @@ public class ContentRefresher {
// masterDataを取得するため登録
private
ApertureMasterDataLogic
apertureMasterDataLogic
=
AbstractLogic
.
getLogic
(
ApertureMasterDataLogic
.
class
);
private
OperationGroupMasterLogic
operationGroupMasterLogic
=
AbstractLogic
.
getLogic
(
OperationGroupMasterLogic
.
class
);
public
static
ContentRefresher
getInstance
()
{
...
...
@@ -167,6 +169,9 @@ public class ContentRefresher {
// CMSでメンテナンスされる絞り検索マスタデータをアプリから取得できるようにJSONファイルを生成する。
apertureMasterDataLogic
.
initializeApertureMasterData
();
// 作業種別情報を取得
operationGroupMasterLogic
.
setOperationGroupMaster
();
if
(
interrupt
)
{
// この時点で停止要求が来た場合先には進まない。(ServiceOption/Group/Categoryの更新は1セットで行う(トランザクションはそれぞれ別))
Logger
.
d
(
TAG
,
"stop refresh worker before content update."
);
setFail
();
...
...
ABVJE_BL/src/jp/agentec/abook/abv/bl/logic/OperationLogic.java
View file @
f5c78aa8
...
...
@@ -96,8 +96,6 @@ public class OperationLogic extends AbstractLogic {
public
void
initializeOperations
()
throws
AcmsException
,
NetworkDisconnectedException
{
// 作業グループリスト取得
setWorkingGroupList
();
// 作業種別・作業種別に紐づいた作業IDを取得
mOperationGroupMasterLogic
.
setOperationGroupMaster
();
// 作業一覧取得し、登録・更新・削除する
retrieveServerOperation
();
}
...
...
@@ -1261,7 +1259,9 @@ public class OperationLogic extends AbstractLogic {
operationDto
.
reportType
,
taskReportSendDto
.
hotspotChangeFlg
);
if
(
progressCallback
!=
null
)
{
progressCallback
.
callback
(
new
Integer
(
progress
));
}
removeTaskReportSendIds
.
add
(
taskReportSendDto
.
taskReportSendId
);
FileUtil
.
delete
(
ABVEnvironment
.
getInstance
().
getOperationTaskReportSendDirFilePath
(
operationId
,
taskReportSendDto
.
taskKey
,
taskReportSendDto
.
taskReportSendId
));
...
...
@@ -1642,4 +1642,13 @@ public class OperationLogic extends AbstractLogic {
mTaskDao
.
insert
(
taskDto
);
}
}
/**
* 作業グループに紐づく同期可能な作業リストを取得
* @param operationGroupMasterId
* @return
*/
public
List
<
OperationDto
>
getNeedSyncOperationByGroupMasterId
(
Integer
operationGroupMasterId
)
{
return
mOperationDao
.
getNeedSyncOperationByGroupMasterId
(
operationGroupMasterId
);
}
}
ABVJE_Res_Default_Android/res/drawable-xhdpi/ic_batch_sync.png
0 → 100644
View file @
f5c78aa8
1.57 KB
ABVJE_Res_Default_Android/res/values-ja/strings.xml
View file @
f5c78aa8
...
...
@@ -523,6 +523,17 @@
<string
name=
"operation_category"
>
カテゴリ
</string>
<string
name=
"type_all"
>
全て
</string>
<!-- 1.2.0 -->
<string
name=
"msg_operation_enable_meeting_room_connected"
>
会議室入室中の為、このボタンは利用できません。\n共通資料画面から資料を選択してください。
</string>
<string
name=
"batch_sync"
>
一括同期
</string>
<string
name=
"batch_syncing"
>
一括同期中...
</string>
<string
name=
"msg_confirm_batch_sync"
>
表示中の全作業を一括同期しますか?
</string>
<string
name=
"msg_batch_sync_disconnect_network"
>
インターネットに接続されていない為、同期処理を中止します。
</string>
<string
name=
"msg_batch_sync_content_download_fail"
>
作業ベース資料のダウンロードに失敗しました。
</string>
<string
name=
"msg_batch_sync_new_content_updating"
>
新着更新処理中の為、一括同期できません。
</string>
<string
name=
"msg_batch_sync_error"
>
「%1$s」の同期に失敗しました。同期処理を中止します。
</string>
<string
name=
"msg_batch_sync_move_operation_view"
>
一括同期中には点検作業報告画面へ遷移できません。
</string>
<!-- 1.0.1 Resource Pattern 1 -->
<!-- 1.9.0.0-->
<string
name=
"meetingroom_setting_1"
>
会議室設定(1)
</string>
...
...
ABVJE_UI_Android/res/layout-large/ac_operation_list.xml
View file @
f5c78aa8
...
...
@@ -77,6 +77,15 @@
android:textStyle=
"bold"
/>
</RadioGroup>
<ImageButton
android:id=
"@+id/btc_batch_sync"
style=
"@style/ToolBarIcon"
android:layout_centerVertical=
"true"
android:layout_marginLeft=
"10dp"
android:layout_toRightOf=
"@+id/segment_group"
android:src=
"@drawable/ic_batch_sync"
android:visibility=
"gone"
/>
<LinearLayout
android:id=
"@+id/search_result"
android:layout_width=
"wrap_content"
...
...
ABVJE_UI_Android/res/layout-normal/ac_operation_list.xml
View file @
f5c78aa8
...
...
@@ -43,7 +43,7 @@
<RadioButton
android:id=
"@+id/operation_location_type_all"
android:layout_width=
"
8
0dp"
android:layout_width=
"
6
0dp"
android:layout_height=
"match_parent"
android:background=
"@drawable/operation_location_segment_background"
android:button=
"@null"
...
...
@@ -52,15 +52,17 @@
android:onClick=
"onClickOperationLocationType"
android:textColor=
"@drawable/operation_location_text_color"
android:text=
"@string/type_all"
android:textSize=
"10sp"
android:textStyle=
"bold"
/>
<RadioButton
android:id=
"@+id/operation_location_type_group"
android:layout_width=
"
8
0dp"
android:layout_width=
"
6
0dp"
android:layout_height=
"match_parent"
android:background=
"@drawable/operation_location_segment_background"
android:button=
"@null"
android:gravity=
"center"
android:textSize=
"10sp"
android:onClick=
"onClickOperationLocationType"
android:textColor=
"@drawable/operation_location_text_color"
android:text=
"@string/operation_category"
...
...
@@ -68,6 +70,14 @@
</RadioGroup>
<ImageButton
android:id=
"@+id/btc_batch_sync"
style=
"@style/ToolBarIcon"
android:layout_centerVertical=
"true"
android:layout_marginLeft=
"10dp"
android:layout_toRightOf=
"@+id/segment_group"
android:src=
"@drawable/ic_batch_sync"
/>
<ImageButton
android:id=
"@+id/btn_common_content"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
...
...
ABVJE_UI_Android/res/layout/item_dialog_list.xml
0 → 100644
View file @
f5c78aa8
<?xml version="1.0" encoding="utf-8"?>
<CheckedTextView
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:id=
"@android:id/text1"
android:layout_width=
"match_parent"
android:layout_height=
"50dp"
android:textAppearance=
"?android:attr/textAppearanceMedium"
android:gravity=
"center_vertical"
android:paddingLeft=
"6dip"
android:paddingRight=
"6dip"
android:textColor=
"@color/text_select"
android:text=
"@string/dummy_str"
/>
\ No newline at end of file
ABVJE_UI_Android/res/layout/item_simple_list_single_choice.xml
0 → 100644
View file @
f5c78aa8
<?xml version="1.0" encoding="utf-8"?>
<CheckedTextView
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:id=
"@android:id/text1"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:textAppearance=
"?android:attr/textAppearanceMedium"
android:gravity=
"center_vertical"
android:checkMark=
"?android:attr/listChoiceIndicatorSingle"
android:padding=
"6dp"
/>
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/common/activity/ABVActivity.java
View file @
f5c78aa8
...
...
@@ -321,8 +321,8 @@ public abstract class ABVActivity extends Activity {
}
}
protected
void
startActivity
(
Intent
inten
d
,
NaviConsts
ABVNavi
)
{
super
.
startActivity
(
inten
d
);
protected
void
startActivity
(
Intent
inten
t
,
NaviConsts
ABVNavi
)
{
super
.
startActivity
(
inten
t
);
ActivityHandlingHelper
.
transitionNavi
(
this
,
ABVNavi
);
}
...
...
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/common/activity/ABVAuthenticatedActivity.java
View file @
f5c78aa8
...
...
@@ -207,7 +207,7 @@ public abstract class ABVAuthenticatedActivity extends ABVActivity implements Co
@Override
protected
void
onPause
()
{
super
.
onPause
();
contentDownloader
.
removeContentDownloadListener
(
this
);
//
contentDownloader.removeContentDownloadListener(this);
}
@Override
...
...
@@ -648,6 +648,26 @@ public abstract class ABVAuthenticatedActivity extends ABVActivity implements Co
return
result
;
}
/**
* 作業用コンテンツダウンロード時、ダウンロードかダウンロード再開か判定して行う。
* @param contentDto
* @return
*/
public
boolean
operationContentDownload
(
final
ContentDto
contentDto
)
{
if
(
contentDto
.
isDownloadPaused
())
{
// ダウンロード途中で通信が切れた場合、一時停止のステータスに変更になるため、再開させる
try
{
contentDownloader
.
resume
(
contentDto
.
contentId
);
contentDownloader
.
addContentDownloadListener
(
this
);
}
catch
(
Exception
e
)
{
Logger
.
e
(
TAG
,
"downloadContent failed. contentId="
+
contentDto
.
contentId
,
e
);
}
}
else
{
return
contentDownload
(
contentDto
.
contentId
,
false
);
}
return
true
;
}
// Wifi非接続時のアラート表示
public
void
showWifiDisconnectAlert
(
final
int
messageId
,
final
DialogInterface
.
OnClickListener
positive
,
final
DialogInterface
.
OnClickListener
negative
)
throws
NetworkDisconnectedException
{
showWifiDisconnectAlert
(
messageId
,
R
.
string
.
download
,
positive
,
negative
);
...
...
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/common/view/ABVBatchSyncView.java
0 → 100644
View file @
f5c78aa8
package
jp
.
agentec
.
abook
.
abv
.
ui
.
common
.
view
;
import
android.app.ProgressDialog
;
import
android.content.Context
;
import
android.graphics.PixelFormat
;
import
java.util.Stack
;
import
jp.agentec.abook.abv.bl.dto.OperationDto
;
import
jp.agentec.abook.abv.launcher.android.R
;
/**
* Created by leej on 2019/08/26.
*/
public
class
ABVBatchSyncView
extends
ProgressDialog
{
private
Context
mContext
;
private
Stack
<
OperationDto
>
mBatchSyncOperationStack
=
new
Stack
<>();
public
ABVBatchSyncView
(
Context
context
)
{
super
(
context
);
mContext
=
context
;
init
();
}
private
void
init
()
{
if
(
getWindow
()
!=
null
)
{
setIndeterminate
(
false
);
setCancelable
(
false
);
setProgressStyle
(
ProgressDialog
.
STYLE_HORIZONTAL
);
//プログレスバー表示
getWindow
().
setFormat
(
PixelFormat
.
TRANSPARENT
);
setMessage
(
getContext
().
getResources
().
getString
(
R
.
string
.
batch_syncing
));
}
}
public
void
setStack
(
Stack
<
OperationDto
>
operationDtoStack
)
{
setMax
(
operationDtoStack
.
size
());
mBatchSyncOperationStack
=
operationDtoStack
;
}
public
OperationDto
getOperationDtoByStack
()
{
return
mBatchSyncOperationStack
.
peek
();
}
public
boolean
checkMaxProgress
()
{
return
getMax
()
==
getProgress
()
+
1
;
}
public
void
closeProgressDialog
()
{
setProgress
(
0
);
dismiss
();
}
public
Stack
<
OperationDto
>
getBatchSyncOperationStack
()
{
return
mBatchSyncOperationStack
;
}
public
boolean
empty
()
{
return
mBatchSyncOperationStack
.
empty
();
}
}
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/home/activity/OperationListActivity.java
View file @
f5c78aa8
This diff is collapsed.
Click to expand it.
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