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
1349ecdb
Commit
1349ecdb
authored
Mar 12, 2021
by
onuma
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#41843 @Form I/O帳票Android
parent
371eac2b
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
212 additions
and
7 deletions
+212
-7
ABVJE_BL/src/jp/agentec/abook/abv/bl/data/ABVDataOpenHelper.java
+2
-0
ABVJE_BL/src/jp/agentec/abook/abv/bl/data/tables/ROperationGroupMasterOperation.java
+47
-0
ABVJE_BL/src/jp/agentec/abook/abv/bl/download/ContentRefresher.java
+10
-0
ABVJE_Res_Default_Android/res/drawable-xhdpi/ic_batch_sync_off.png
+0
-0
ABVJE_Res_Default_Android/res/drawable-xhdpi/ic_batch_sync_on.png
+0
-0
ABVJE_Res_Default_Android/res/drawable/btn_operation_batch_sync.xml
+9
-0
ABVJE_Res_Default_Android/res/values/strings.xml
+4
-3
ABVJE_UI_Android/res/layout-normal/ac_operation_list.xml
+8
-0
ABVJE_UI_Android/src/jp/agentec/abook/abv/launcher/android/ABVUIDataCache.java
+14
-1
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/home/activity/OperationListActivity.java
+118
-3
No files found.
ABVJE_BL/src/jp/agentec/abook/abv/bl/data/ABVDataOpenHelper.java
View file @
1349ecdb
...
...
@@ -20,6 +20,7 @@ import jp.agentec.abook.abv.bl.data.tables.MWorkerGroup;
import
jp.agentec.abook.abv.bl.data.tables.ROperationContent
;
import
jp.agentec.abook.abv.bl.data.tables.RContentCategory
;
import
jp.agentec.abook.abv.bl.data.tables.RContentGroup
;
import
jp.agentec.abook.abv.bl.data.tables.ROperationGroupMasterOperation
;
import
jp.agentec.abook.abv.bl.data.tables.RTaskWorkerGroup
;
import
jp.agentec.abook.abv.bl.data.tables.SQLiteTableScript
;
import
jp.agentec.abook.abv.bl.data.tables.TContent
;
...
...
@@ -104,6 +105,7 @@ public class ABVDataOpenHelper {
// カテゴリ選択機能
///////////////////////////////////////////////////////////////////////////////////////////////////////
iTableScripts
.
add
(
new
MOperationGroupMaster
());
iTableScripts
.
add
(
new
ROperationGroupMasterOperation
());
return
iTableScripts
;
}
...
...
ABVJE_BL/src/jp/agentec/abook/abv/bl/data/tables/ROperationGroupMasterOperation.java
0 → 100644
View file @
1349ecdb
package
jp
.
agentec
.
abook
.
abv
.
bl
.
data
.
tables
;
import
java.util.ArrayList
;
import
java.util.List
;
import
jp.agentec.abook.abv.bl.common.db.SQLiteDatabase
;
import
jp.agentec.abook.abv.bl.data.DatabaseVersions
;
/**
* Created by leej on 2019/06/25.
*/
public
class
ROperationGroupMasterOperation
extends
SQLiteTableScript
{
public
ROperationGroupMasterOperation
()
{
super
();
}
@Override
public
List
<
String
>
getCreateScript
(
int
version
)
{
List
<
String
>
ddl
=
new
ArrayList
<
String
>();
StringBuffer
sql
=
new
StringBuffer
();
sql
.
append
(
" CREATE TABLE r_operation_group_master_relation ( "
);
sql
.
append
(
" operation_group_master_id INTEGER NOT NULL "
);
sql
.
append
(
" , operation_id BIGINT NOT NULL "
);
sql
.
append
(
" , PRIMARY KEY (operation_group_master_id, operation_id) "
);
sql
.
append
(
" , FOREIGN KEY (operation_group_master_id) REFERENCES m_operation_group_master (operation_group_master_id) "
);
sql
.
append
(
" , FOREIGN KEY (operation_id) REFERENCES t_operation (operation_id)"
);
sql
.
append
(
" ) "
);
ddl
.
add
(
sql
.
toString
());
return
ddl
;
}
@Override
public
List
<
String
>
getUpgradeScript
(
int
oldVersion
,
int
newVersion
)
{
return
null
;
}
@Override
public
List
<
String
>
getMigrationScript
(
SQLiteDatabase
databaseConnection
,
int
oldVersion
,
int
newVersion
,
Object
...
params
)
{
return
null
;
}
}
\ No newline at end of file
ABVJE_BL/src/jp/agentec/abook/abv/bl/download/ContentRefresher.java
View file @
1349ecdb
...
...
@@ -31,6 +31,7 @@ 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.MasterDataLogic
;
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
;
...
...
@@ -175,6 +176,11 @@ import jp.agentec.adf.util.DateTimeUtil;
// マスタデータの最新更新された時のFetchDateを一時に保存する。
ABVDataCache
.
getInstance
().
tempMasterDataFetchDate
=
fetchDate
;
}
///////////////////////////////////////////////////////////////////////////////////////////////////////
// カテゴリ選択機能
///////////////////////////////////////////////////////////////////////////////////////////////////////
// 作業種別情報を取得
operationGroupMasterLogic
.
setOperationGroupMaster
();
if
(
interrupt
)
{
// この時点で停止要求が来た場合先には進まない。(ServiceOption/Group/Categoryの更新は1セットで行う(トランザクションはそれぞれ別))
Logger
.
d
(
TAG
,
"stop refresh worker before content update."
);
...
...
@@ -464,4 +470,8 @@ import jp.agentec.adf.util.DateTimeUtil;
Logger
.
e
(
"batchSendDownloadLog failed."
,
e
);
// 例外は上にあげない。失敗したら次送られるはず(要確認)
}
}
///////////////////////////////////////////////////////////////////////////////////////////////////////
// カテゴリ選択機能
///////////////////////////////////////////////////////////////////////////////////////////////////////
private
OperationGroupMasterLogic
operationGroupMasterLogic
=
AbstractLogic
.
getLogic
(
OperationGroupMasterLogic
.
class
);
}
ABVJE_Res_Default_Android/res/drawable-xhdpi/ic_batch_sync_off.png
0 → 100644
View file @
1349ecdb
1.02 KB
ABVJE_Res_Default_Android/res/drawable-xhdpi/ic_batch_sync_on.png
0 → 100644
View file @
1349ecdb
1.57 KB
ABVJE_Res_Default_Android/res/drawable/btn_operation_batch_sync.xml
0 → 100644
View file @
1349ecdb
<?xml version="1.0" encoding="utf-8"?>
<selector
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<item
android:state_enabled=
"false"
android:drawable=
"@drawable/ic_batch_sync_off"
/>
<item
android:drawable=
"@drawable/ic_batch_sync_on"
/>
</selector>
\ No newline at end of file
ABVJE_Res_Default_Android/res/values/strings.xml
View file @
1349ecdb
...
...
@@ -1441,7 +1441,7 @@
<!-- カテゴリ選択機能 -->
<string
name=
"no_child"
>
No more data below.
</string>
<string
name=
"category_list"
>
Select Category
</string>
<string
name=
"title_category"
>
Category
</string>
<string
name=
"title_all_operation"
>
All
</string>
<string
name=
"category_list"
>
aaa
</string>
<string
name=
"title_category"
>
bbbb
</string>
<string
name=
"title_all_operation"
>
A
bsdafas
ll
</string>
</resources>
\ No newline at end of file
ABVJE_UI_Android/res/layout-normal/ac_operation_list.xml
View file @
1349ecdb
...
...
@@ -59,6 +59,14 @@
android:visibility=
"visible"
android:textStyle=
"bold"
/>
<ImageButton
android:id=
"@+id/btn_batch_sync"
style=
"@style/ToolBarIcon"
android:layout_marginRight=
"10dp"
android:layout_toLeftOf=
"@+id/btn_sort"
android:src=
"@drawable/btn_operation_batch_sync"
android:visibility=
"gone"
/>
</LinearLayout>
<ImageButton
...
...
ABVJE_UI_Android/src/jp/agentec/abook/abv/launcher/android/ABVUIDataCache.java
View file @
1349ecdb
...
...
@@ -55,7 +55,11 @@ public class ABVUIDataCache {
}
private
void
init
()
{
viewMode
=
loadViewMode
();
viewMode
=
loadViewMode
();
///////////////////////////////////////////////////////////////////////////////////////////////////////
// カテゴリ選択機能
///////////////////////////////////////////////////////////////////////////////////////////////////////
operationGroupMasterStack
=
new
Stack
<>();
}
public
long
saveLastUpdateTime
()
{
...
...
@@ -313,4 +317,13 @@ public class ABVUIDataCache {
public
void
setOperationGroupMasterId
(
int
operationGroupMasterId
)
{
PreferenceUtil
.
putUserPref
(
context
,
UserPrefKey
.
OPERATION_GROUP_MASERT_ID
,
operationGroupMasterId
);
}
/**
* 保持していた作業種別のデータをクリアする
*/
public
void
clearOperationGroupMaster
()
{
setOperationGroupMasterMode
(
AppDefType
.
OperationLocationType
.
ALL
);
setOperationGroupMasterId
(
0
);
operationGroupMasterStack
.
clear
();
}
}
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/home/activity/OperationListActivity.java
View file @
1349ecdb
...
...
@@ -208,6 +208,10 @@ public class OperationListActivity extends ABVUIActivity {
}
else
{
mViewModeButton
.
setBackground
(
getRDrawable
(
R
.
drawable
.
ic_display_pannel
));
}
///////////////////////////////////////////////////////////////////////////////////////////////////////
// カテゴリ選択機能
///////////////////////////////////////////////////////////////////////////////////////////////////////
closeProgressPopup
();
}
}
...
...
@@ -216,7 +220,7 @@ public class OperationListActivity extends ABVUIActivity {
super
.
onCreate
(
savedInstanceState
);
setContentView
(
R
.
layout
.
ac_operation_list
);
//mListHelper = new OperationListHelper(this);
// カテゴリ選択機能
で修正
// カテゴリ選択機能
mListHelper
=
getListHelper
();
mViewModeButton
=
(
ImageButton
)
findViewById
(
R
.
id
.
btn_view_mode
);
mSearchButton
=
(
ImageButton
)
findViewById
(
R
.
id
.
btn_search
);
...
...
@@ -226,6 +230,12 @@ public class OperationListActivity extends ABVUIActivity {
mCommunicationButton
=
(
ImageButton
)
findViewById
(
R
.
id
.
btn_communication_menu
);
mCommonContentButton
=
(
ImageButton
)
findViewById
(
R
.
id
.
btn_common_content
);
// ツールバーのタイトル表示
//mOperationTitle = (TextView) findViewById(R.id.operation_title);
mOperationBatchSyncButton
=
(
ImageButton
)
findViewById
(
R
.
id
.
btn_batch_sync
);
mCategoryLocationButton
=
(
ImageButton
)
findViewById
(
R
.
id
.
btn_category_location
);
// 作業一覧のタイトルパータンでセット
mTitleView
.
setText
(
PatternStringUtil
.
patternToString
(
getApplicationContext
(),
R
.
string
.
operation_list
,
...
...
@@ -243,6 +253,10 @@ public class OperationListActivity extends ABVUIActivity {
}
});
// カテゴリ選択機能
// サービスオプション(作業種別使用)をセット
mOperationGroupMasterServiceOperationFlg
=
ABVDataCache
.
getInstance
().
serviceOption
.
isOperationGroupMaster
();
// 検索アイコンのクリックイベント
mSearchButton
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
@Override
...
...
@@ -371,12 +385,61 @@ public class OperationListActivity extends ABVUIActivity {
}
// フィルター選択判定
checkSelectedFilterType
();
///////////////////////////////////////////////////////////////////////////////////////////////////////
// カテゴリ選択機能
///////////////////////////////////////////////////////////////////////////////////////////////////////
// 作業種別表示・非表示
if
(
mOperationGroupMasterServiceOperationFlg
)
{
mCategoryLocationButton
.
setVisibility
(
View
.
VISIBLE
);
// アイコンの変更
if
(
getABVUIDataCache
().
getOperationGroupMasterMode
()
==
OperationLocationType
.
CATEGORY
)
{
setCategoryImage
(
true
);
//mOperationTitle.setText(R.string.title_category);
mTitleView
.
setText
(
R
.
string
.
title_category
);
// 検索ワード削除
clearSearch
();
// 検索ボタンを無効にする
mSearchButton
.
setEnabled
(
false
);
// 一括同期ボタン表示
mOperationBatchSyncButton
.
setVisibility
(
View
.
VISIBLE
);
}
else
{
// 全て
// 検索ボタンを活性化
mSearchButton
.
setEnabled
(
true
);
setCategoryImage
(
false
);
// 一括同期ボタン非表示
mOperationBatchSyncButton
.
setVisibility
(
View
.
GONE
);
//mOperationTitle.setText(R.string.title_all_operation);
mTitleView
.
setText
(
R
.
string
.
title_all_operation
);
}
}
else
{
//mOperationTitle.setText(R.string.title_all_operation);
mTitleView
.
setText
(
R
.
string
.
title_all_operation
);
// アイコン非表示
setCategoryImage
(
false
);
mCategoryLocationButton
.
setVisibility
(
View
.
GONE
);
// 一括同期ボタンを非表示
mOperationBatchSyncButton
.
setVisibility
(
View
.
GONE
);
// 検索ボタンを活性化
mSearchButton
.
setEnabled
(
true
);
}
// 検索済みの場合、タイトルを「検索結果」にする
if
(
isSearched
())
{
//mOperationTitle.setText(R.string.search_result);
mTitleView
.
setText
(
R
.
string
.
search_result
);
}
}
/**
* ビューを作り直す。
*/
public
void
setOperationListView
()
{
///////////////////////////////////////////////////////////////////////////////////////////////////////
// カテゴリ選択機能
///////////////////////////////////////////////////////////////////////////////////////////////////////
mListHelper
=
getListHelper
();
handler
.
post
(
new
ReloadHandler
());
configurationToolbarIcon
();
}
...
...
@@ -404,7 +467,24 @@ public class OperationListActivity extends ABVUIActivity {
setResourcePattern
();
// マスタデータ最新更新する時fetchDateをローカルに保存する。
setMasterDataFetchDate
();
refreshOperationList
();
///////////////////////////////////////////////////////////////////////////////////////////////////////
// カテゴリ選択機能
///////////////////////////////////////////////////////////////////////////////////////////////////////
//refreshOperationList();
if
(
mOperationGroupMasterServiceOperationFlg
==
ABVDataCache
.
getInstance
().
serviceOption
.
isOperationGroupMaster
())
{
// サービスオプションが変わってない場合は、ビューは作らずにデータのみ更新
refreshOperationList
();
}
else
{
// 初期化
getABVUIDataCache
().
clearOperationGroupMaster
();
mOperationGroupMasterServiceOperationFlg
=
ABVDataCache
.
getInstance
().
serviceOption
.
isOperationGroupMaster
();
// 作業種別の選択画面を閉じる
closeOperationGroupMasterDialog
();
// ビューを作り直す
setOperationListView
();
}
}
}
});
...
...
@@ -574,6 +654,24 @@ public class OperationListActivity extends ABVUIActivity {
}
private
void
clearData
()
{
///////////////////////////////////////////////////////////////////////////////////////////////////////
// カテゴリ選択機能
///////////////////////////////////////////////////////////////////////////////////////////////////////
// 開始日の初期化
if
(
mStartDate
!=
null
)
{
mStartDate
.
setText
(
StringUtil
.
Empty
);
}
// 終了日の初期化
if
(
mEndDate
!=
null
)
{
mEndDate
.
setText
(
StringUtil
.
Empty
);
}
// 作業名の初期化
if
(
mSearchTextView
!=
null
)
{
mSearchTextView
.
setText
(
StringUtil
.
Empty
);
}
/**
// 開始日の初期化
mStartDate.setText(StringUtil.Empty);
...
...
@@ -582,6 +680,7 @@ public class OperationListActivity extends ABVUIActivity {
// プロジェクト名の初期化
mSearchTextView.setText(StringUtil.Empty);
*/
}
// 開始日と終了日のバリデーション
...
...
@@ -1935,7 +2034,8 @@ public class OperationListActivity extends ABVUIActivity {
// カテゴリ選択機能
//
///////////////////////////////////////////////////////////////////////////////////////////////////////
//private TextView mOperationTitle; // 一覧のタイトル
private
ImageButton
mCategoryLocationButton
;
// カテゴリ選択ボタン
private
Map
<
Integer
,
Integer
>
operationCountMap
;
private
OperationGroupMasterLogic
mOperationGroupMasterLogic
=
AbstractLogic
.
getLogic
(
OperationGroupMasterLogic
.
class
);
private
ABVListDialog
mShowDialog
;
...
...
@@ -2154,4 +2254,19 @@ public class OperationListActivity extends ABVUIActivity {
}
return
operationListHelper
;
}
// カテゴリのアイコンイメージ設定
private
void
setCategoryImage
(
boolean
isCategory
)
{
mCategoryLocationButton
.
setImageResource
(
isCategory
?
R
.
drawable
.
ic_category_on
:
R
.
drawable
.
ic_category_off
);
}
// 検索ワードのクリア
private
void
clearSearch
()
{
mSearchWord
=
null
;
mStartDateStr
=
null
;
mEndDateStr
=
null
;
clearData
();
}
// 検索済みかどうかチェック
private
boolean
isSearched
()
{
return
!(
StringUtil
.
isNullOrEmpty
(
mSearchWord
)
&&
StringUtil
.
isNullOrEmpty
(
mStartDateStr
)
&&
StringUtil
.
isNullOrEmpty
(
mEndDateStr
));
}
}
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