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
aa4ea1b4
Commit
aa4ea1b4
authored
Mar 19, 2021
by
onuma
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
古いDBからパージョンアップ用関数追加
parent
9d297936
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
58 additions
and
223 deletions
+58
-223
ABVJE_BL/src/jp/agentec/abook/abv/bl/acms/client/json/OperationListJSON.java
+0
-4
ABVJE_BL/src/jp/agentec/abook/abv/bl/common/ABVEnvironment.java
+1
-5
ABVJE_BL/src/jp/agentec/abook/abv/bl/data/DBConnector.java
+0
-3
ABVJE_BL/src/jp/agentec/abook/abv/bl/data/dao/OperationDao.java
+0
-81
ABVJE_BL/src/jp/agentec/abook/abv/bl/data/tables/MOperationGroupMaster.java
+7
-2
ABVJE_BL/src/jp/agentec/abook/abv/bl/data/tables/ROperationGroupMasterOperation.java
+9
-2
ABVJE_BL/src/jp/agentec/abook/abv/bl/data/tables/TOperation.java
+10
-19
ABVJE_BL/src/jp/agentec/abook/abv/bl/download/ContentRefresher.java
+3
-9
ABVJE_BL/src/jp/agentec/abook/abv/bl/dto/OperationDto.java
+3
-9
ABVJE_BL/src/jp/agentec/abook/abv/bl/logic/OperationLogic.java
+3
-22
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/home/activity/OperationListActivity.java
+9
-53
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/home/adapter/OperationRelatedContentPanelAdapter.java
+13
-13
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/home/helper/OperationGroupMasterListHelper.java
+0
-1
No files found.
ABVJE_BL/src/jp/agentec/abook/abv/bl/acms/client/json/OperationListJSON.java
View file @
aa4ea1b4
...
...
@@ -57,11 +57,7 @@ public class OperationListJSON extends AcmsCommonJSON {
public
static
final
String
EnableAddReport
=
"enableAddReport"
;
///////////////////////////////////////////////////////////////////////////////////////////////////////
// カテゴリ選択機能
///////////////////////////////////////////////////////////////////////////////////////////////////////
public
static
final
String
OperationGroupMasterIdList
=
"operationGroupMasterIdList"
;
public
static
final
String
QuickReport
=
"quickReport"
;
public
List
<
OperationDto
>
operationList
;
...
...
ABVJE_BL/src/jp/agentec/abook/abv/bl/common/ABVEnvironment.java
View file @
aa4ea1b4
...
...
@@ -61,6 +61,7 @@ public class ABVEnvironment {
// Serverから取得したcontentVersion時のリソースパターンを一時的に保存するための変数
public
int
resourcePatternType
;
public
boolean
operationGroupMasterClearFlg
;
////////////////////////////// 定数 //////////////////////////////////
...
...
@@ -776,11 +777,6 @@ public class ABVEnvironment {
return
String
.
format
(
OperationMasterDataDirFormat
,
rootDirectory
);
}
///////////////////////////////////////////////////////////////////////////////////////////////////////
// カテゴリ選択機能
///////////////////////////////////////////////////////////////////////////////////////////////////////
public
boolean
operationGroupMasterClearFlg
;
/**
* 作業種別のクリア判定フラグをセット
...
...
ABVJE_BL/src/jp/agentec/abook/abv/bl/data/DBConnector.java
View file @
aa4ea1b4
...
...
@@ -19,9 +19,6 @@ import jp.agentec.abook.abv.bl.common.db.SQLiteDatabase;
public
class
DBConnector
{
private
static
volatile
DBConnector
dbConnector
=
null
;
public
static
final
String
DatabaseName
=
"ABVJE"
;
///////////////////////////////////////////////////////////////////////////////////////////////////////
// カテゴリ選択機能
///////////////////////////////////////////////////////////////////////////////////////////////////////
public
static
final
int
DatabaseVersion
=
DatabaseVersions
.
Ver1_0_3
;
protected
SQLiteDatabase
db
=
null
;
...
...
ABVJE_BL/src/jp/agentec/abook/abv/bl/data/dao/OperationDao.java
View file @
aa4ea1b4
...
...
@@ -236,82 +236,6 @@ public class OperationDao extends AbstractDao {
delete
(
"m_worker_group"
,
null
,
null
);
}
public
List
<
OperationDto
>
getOperations
(
String
searchOperationName
,
String
searchStartDateStr
,
String
searchEndDateStr
,
String
reportTypeStr
)
{
String
sql
=
generateGetOperationQuery
(
searchOperationName
,
searchStartDateStr
,
searchEndDateStr
,
reportTypeStr
);
return
rawQueryGetDtoList
(
sql
,
null
,
OperationDto
.
class
);
}
private
String
generateGetOperationQuery
(
String
searchOperationName
,
String
searchStartDateStr
,
String
searchEndDateStr
,
String
reportTypeStr
)
{
String
curDate
=
DateTimeUtil
.
toStringInTimeZone
(
new
Date
(),
DateTimeFormat
.
yyyyMMddHHmmss_hyphen
,
"UTC"
);
StringBuffer
sql
=
new
StringBuffer
();
sql
.
append
(
" SELECT top.operation_id, "
);
sql
.
append
(
" top.operation_name, "
);
sql
.
append
(
" top.operation_type, "
);
sql
.
append
(
" top.operation_descriptions, "
);
sql
.
append
(
" top.operation_start_date, "
);
sql
.
append
(
" top.operation_end_date, "
);
sql
.
append
(
" top.last_edit_date, "
);
sql
.
append
(
" top.edit_lock_flg, "
);
sql
.
append
(
" top.need_sync_flg, "
);
sql
.
append
(
" top.content_creating_flg, "
);
sql
.
append
(
" top.report_type, "
);
sql
.
append
(
" top.report_cycle, "
);
sql
.
append
(
" top.enable_report_update, "
);
sql
.
append
(
" top.enable_report_edit, "
);
sql
.
append
(
" top.enable_add_report, "
);
sql
.
append
(
" CASE "
);
sql
.
append
(
" WHEN report_type = 1 THEN ( "
);
sql
.
append
(
" SELECT strftime('%Y/%m/%d %H:%M', datetime(ttr.report_start_date, 'localtime')) || ' ~ ' || strftime('%Y/%m/%d %H:%M', datetime(ttr.report_end_date, 'localtime')) "
);
sql
.
append
(
" FROM t_task tt "
);
sql
.
append
(
" INNER JOIN t_task_report ttr "
);
sql
.
append
(
" ON tt.task_key = ttr.task_key "
);
sql
.
append
(
" AND tt.del_flg = 0 "
);
//sql.append(" AND datetime(ttr.report_start_date) <= datetime('" + curDate + "') ");
sql
.
append
(
" AND datetime(ttr.report_end_date) >= datetime('"
+
curDate
+
"') "
);
sql
.
append
(
" WHERE tt.operation_id = top.operation_id "
);
sql
.
append
(
" ORDER BY ttr.report_start_date ASC LIMIT 1 ) "
);
sql
.
append
(
" ELSE '' "
);
sql
.
append
(
" END AS report_period, "
);
sql
.
append
(
" CASE "
);
sql
.
append
(
" WHEN report_type = 1 THEN ( "
);
sql
.
append
(
" SELECT count(*) "
);
sql
.
append
(
" FROM t_task_report "
);
sql
.
append
(
" WHERE task_key = (SELECT task_key FROM t_task WHERE operation_id = top.operation_id LIMIT 1) ) "
);
sql
.
append
(
" ELSE 0 "
);
sql
.
append
(
" END AS report_count, "
);
sql
.
append
(
" rpc.content_id "
);
sql
.
append
(
" FROM t_operation AS top "
);
sql
.
append
(
" LEFT OUTER JOIN r_operation_content AS rpc "
);
sql
.
append
(
" ON top.operation_id = rpc.operation_id "
);
sql
.
append
(
" AND rpc.operation_content_flg = 1 "
);
sql
.
append
(
" WHERE top.operation_id IS NOT NULL "
);
if
(!
StringUtil
.
isNullOrEmpty
(
searchOperationName
))
{
sql
.
append
(
" AND top.operation_name GLOB "
+
"'*"
+
searchOperationName
+
"*'"
);
}
if
(!
StringUtil
.
isNullOrEmpty
(
searchStartDateStr
))
{
Date
startDate
=
DateTimeUtil
.
toDate
(
searchStartDateStr
,
"UTC"
,
DateTimeFormat
.
yyyyMMdd_hyphen
);
sql
.
append
(
" AND top.operation_end_date >= '"
+
DateTimeUtil
.
toString
(
startDate
,
DateTimeFormat
.
yyyyMMdd_hyphen
)
+
"'"
);
}
if
(!
StringUtil
.
isNullOrEmpty
(
searchEndDateStr
))
{
Date
endDate
=
DateTimeUtil
.
toDate
(
searchEndDateStr
,
"UTC"
,
DateTimeFormat
.
yyyyMMdd_hyphen
);
sql
.
append
(
" AND top.operation_start_date <= '"
+
DateTimeUtil
.
toString
(
endDate
,
DateTimeFormat
.
yyyyMMdd_hyphen
)
+
"'"
);
}
if
(
reportTypeStr
!=
null
)
{
sql
.
append
(
" AND top.report_type in ("
+
reportTypeStr
+
")"
);
}
sql
.
append
(
" ORDER BY top.operation_start_date DESC, top.operation_id DESC"
);
Logger
.
v
(
TAG
,
"sql=%s"
,
sql
);
return
sql
.
toString
();
}
public
boolean
updateContentCreatingFlg
(
long
operationId
,
boolean
contentCreatingFlg
)
{
OperationDto
dto
=
getOperation
(
operationId
);
if
(
dto
!=
null
)
{
...
...
@@ -344,9 +268,6 @@ public class OperationDao extends AbstractDao {
updateNeedSyncFlg
(
operationDto
.
operationId
,
true
);
}
}
///////////////////////////////////////////////////////////////////////////////////////////////////////
// カテゴリ選択機能
///////////////////////////////////////////////////////////////////////////////////////////////////////
// quick_report フィールドを追加
...
...
@@ -390,8 +311,6 @@ public class OperationDao extends AbstractDao {
return
rawQueryGetDtoList
(
sql
,
null
,
OperationDto
.
class
);
}
// ABookCheckでは、同名の関数があるが、引数の数がちがったのでコピーした
/**
* 引数の検索条件で作業情報リストを
* 取得用のsql文作成
...
...
ABVJE_BL/src/jp/agentec/abook/abv/bl/data/tables/MOperationGroupMaster.java
View file @
aa4ea1b4
...
...
@@ -9,8 +9,9 @@ import jp.agentec.adf.util.StringUtil;
/**
* Created by leej on 2019/06/24.
*
* カテゴリ選択機能で追加されたテーブル
*/
public
class
MOperationGroupMaster
extends
SQLiteTableScript
{
public
MOperationGroupMaster
()
{
...
...
@@ -44,7 +45,11 @@ public class MOperationGroupMaster extends SQLiteTableScript {
@Override
public
List
<
String
>
getUpgradeScript
(
int
oldVersion
,
int
newVersion
)
{
return
null
;
List
<
String
>
ddl
=
new
ArrayList
<
String
>();
if
(
oldVersion
<
DatabaseVersions
.
Ver1_0_3
)
{
ddl
.
addAll
(
getCreateScript
(
newVersion
));
}
return
ddl
;
}
@Override
...
...
ABVJE_BL/src/jp/agentec/abook/abv/bl/data/tables/ROperationGroupMasterOperation.java
View file @
aa4ea1b4
...
...
@@ -8,8 +8,10 @@ import jp.agentec.abook.abv.bl.data.DatabaseVersions;
/**
* Created by leej on 2019/06/25.
*
* カテゴリ選択機能で追加されたテーブル
*
*/
public
class
ROperationGroupMasterOperation
extends
SQLiteTableScript
{
public
ROperationGroupMasterOperation
()
{
...
...
@@ -36,7 +38,12 @@ public class ROperationGroupMasterOperation extends SQLiteTableScript {
@Override
public
List
<
String
>
getUpgradeScript
(
int
oldVersion
,
int
newVersion
)
{
return
null
;
// 「カテゴリ選択機能」アップデートで追加されたテーブル
List
<
String
>
ddl
=
new
ArrayList
<
String
>();
if
(
oldVersion
<
DatabaseVersions
.
Ver1_0_3
)
{
ddl
.
addAll
(
getCreateScript
(
newVersion
));
}
return
ddl
;
}
@Override
...
...
ABVJE_BL/src/jp/agentec/abook/abv/bl/data/tables/TOperation.java
View file @
aa4ea1b4
...
...
@@ -8,6 +8,10 @@ import jp.agentec.abook.abv.bl.data.DatabaseVersions;
/**
* Created by leej on 2018/08/17.
*
* カテゴリ選択機能で2つ列追加
* operation_open_date
* quick_report
*/
public
class
TOperation
extends
SQLiteTableScript
{
...
...
@@ -38,9 +42,6 @@ public class TOperation extends SQLiteTableScript {
sql
.
append
(
" , enable_report_history SMALLINT NOT NULL DEFAULT 0 "
);
sql
.
append
(
" , enable_report_edit SMALLINT NOT NULL DEFAULT 0 "
);
sql
.
append
(
" , enable_add_report SMALLINT NOT NULL DEFAULT 0 "
);
///////////////////////////////////////////////////////////////////////////////////////////////////////
// カテゴリ選択機能
///////////////////////////////////////////////////////////////////////////////////////////////////////
sql
.
append
(
" , operation_open_date DATETIME "
);
sql
.
append
(
" , quick_report SMALLINT NOT NULL DEFAULT 0 "
);
sql
.
append
(
" , PRIMARY KEY (operation_id) "
);
...
...
@@ -53,22 +54,12 @@ public class TOperation extends SQLiteTableScript {
@Override
public
List
<
String
>
getUpgradeScript
(
int
oldVersion
,
int
newVersion
)
{
// List<String> ddl = new ArrayList<String>();
// if (oldVersion < DatabaseVersions.Plus_1_9_3) {
// ddl.addAll(getCreateScript(newVersion));
// }
//
// if (oldVersion < DatabaseVersions.Plus_1_9_3_5) { // カラムの追加
// ddl.add(" ALTER TABLE t_operation ADD COLUMN report_update_type INTEGER NOT NULL DEFAULT 0 ");
// }
//
// if (oldVersion < DatabaseVersions.Plus_1_9_4) { // カラムの追加
// ddl.add(" ALTER TABLE t_operation ADD COLUMN project_report_type INTEGER NOT NULL DEFAULT 0 ");
// ddl.add(" ALTER TABLE t_operation ADD COLUMN report_cycle INTEGER NOT NULL DEFAULT 0 ");
// ddl.add(" ALTER TABLE t_operation ADD COLUMN enable_report_update INTEGER NOT NULL DEFAULT 0 ");
// }
// return ddl;
return
null
;
List
<
String
>
ddl
=
new
ArrayList
<
String
>();
if
(
oldVersion
<
DatabaseVersions
.
Ver1_0_3
)
{
ddl
.
add
(
" ALTER TABLE t_operation ADD COLUMN operation_open_date DATETIME "
);
ddl
.
add
(
" ALTER TABLE t_operation ADD COLUMN quick_report SMALLINT NOT NULL DEFAULT 0 "
);
}
return
ddl
;
}
@Override
...
...
ABVJE_BL/src/jp/agentec/abook/abv/bl/download/ContentRefresher.java
View file @
aa4ea1b4
...
...
@@ -53,9 +53,9 @@ import jp.agentec.adf.util.DateTimeUtil;
private
ContentLogic
contentLogic
=
AbstractLogic
.
getLogic
(
ContentLogic
.
class
);
private
OperationLogic
operationLogic
=
AbstractLogic
.
getLogic
(
OperationLogic
.
class
);
private
ContentDao
contentDao
=
AbstractDao
.
getDao
(
ContentDao
.
class
);
private
SppDeviceDao
sppDeviceDao
=
AbstractDao
.
getDao
(
SppDeviceDao
.
class
);
private
OperationGroupMasterLogic
operationGroupMasterLogic
=
AbstractLogic
.
getLogic
(
OperationGroupMasterLogic
.
class
);
private
ABVDataCache
cache
=
ABVDataCache
.
getInstance
();
private
ContentDownloader
contentDownloader
=
ContentDownloader
.
getInstance
();
private
NetworkAdapter
networkAdapter
=
ABVEnvironment
.
getInstance
().
networkAdapter
;
...
...
@@ -176,9 +176,7 @@ import jp.agentec.adf.util.DateTimeUtil;
// マスタデータの最新更新された時のFetchDateを一時に保存する。
ABVDataCache
.
getInstance
().
tempMasterDataFetchDate
=
fetchDate
;
}
///////////////////////////////////////////////////////////////////////////////////////////////////////
// カテゴリ選択機能
///////////////////////////////////////////////////////////////////////////////////////////////////////
// 作業種別情報を取得
operationGroupMasterLogic
.
setOperationGroupMaster
();
...
...
@@ -470,8 +468,4 @@ import jp.agentec.adf.util.DateTimeUtil;
Logger
.
e
(
"batchSendDownloadLog failed."
,
e
);
// 例外は上にあげない。失敗したら次送られるはず(要確認)
}
}
///////////////////////////////////////////////////////////////////////////////////////////////////////
// カテゴリ選択機能
///////////////////////////////////////////////////////////////////////////////////////////////////////
private
OperationGroupMasterLogic
operationGroupMasterLogic
=
AbstractLogic
.
getLogic
(
OperationGroupMasterLogic
.
class
);
}
ABVJE_BL/src/jp/agentec/abook/abv/bl/dto/OperationDto.java
View file @
aa4ea1b4
...
...
@@ -31,9 +31,12 @@ public class OperationDto extends AbstractDto {
public
int
enableReportHistory
;
// 0: 履歴無し, 1: 履歴可
public
int
enableReportEdit
;
// 作業編集可能区分
public
int
enableAddReport
;
// 作業追加区分
public
int
quickReport
;
// 簡易帳票区分
// 作業担当グループリスト
public
List
<
TaskWorkerGroupDto
>
taskWorkerGroupDtoList
;
// 作業種別に紐づく作業Dto
public
List
<
OperationGroupMasterRelationDto
>
operationGroupMasterRelationDtoList
;
public
boolean
equalsLastEdit
(
OperationDto
dto
)
{
if
(
dto
!=
null
)
{
...
...
@@ -59,13 +62,4 @@ public class OperationDto extends AbstractDto {
return
new
String
[]
{
""
+
operationId
};
}
///////////////////////////////////////////////////////////////////////////////////////////////////////
// カテゴリ選択機能
///////////////////////////////////////////////////////////////////////////////////////////////////////
// getInsertValues() getUpdateValues() も更新した
public
int
quickReport
;
// 簡易帳票区分
public
List
<
OperationGroupMasterRelationDto
>
operationGroupMasterRelationDtoList
;
// 作業種別に紐づく作業Dto
}
ABVJE_BL/src/jp/agentec/abook/abv/bl/logic/OperationLogic.java
View file @
aa4ea1b4
...
...
@@ -81,9 +81,6 @@ public class OperationLogic extends AbstractLogic {
private
TaskReportDao
mTaskReportDao
=
AbstractDao
.
getDao
(
TaskReportDao
.
class
);
private
TaskReportSendDao
mTaskReportSendDao
=
AbstractDao
.
getDao
(
TaskReportSendDao
.
class
);
private
TaskReportItemsDao
mTaskReportItemsDao
=
AbstractDao
.
getDao
(
TaskReportItemsDao
.
class
);
///////////////////////////////////////////////////////////////////////////////////////////////////////
// カテゴリ選択機能 追加
///////////////////////////////////////////////////////////////////////////////////////////////////////
private
OperationGroupMasterOperationDao
mOperationGroupMasterOperationDao
=
AbstractDao
.
getDao
(
OperationGroupMasterOperationDao
.
class
);
private
ContentLogic
mContentLogic
=
AbstractLogic
.
getLogic
(
ContentLogic
.
class
);
...
...
@@ -145,9 +142,7 @@ public class OperationLogic extends AbstractLogic {
if
(
mOperationContentDao
.
isExistMainOperationContent
(
serverOperationDto
.
operationId
))
{
serverOperationDto
.
contentCreatingFlg
=
false
;
}
///////////////////////////////////////////////////////////////////////////////////////////////////////
// カテゴリ選択機能 追加
///////////////////////////////////////////////////////////////////////////////////////////////////////
// ローカルにある作業情報に紐づく全作業IDを取得
List
<
Integer
>
localOperationGroupMasterIds
=
mOperationGroupMasterOperationDao
.
getOperationGroupMasterIds
(
serverOperationDto
.
operationId
);
for
(
OperationGroupMasterRelationDto
operationGroupMasterRelationDto
:
serverOperationDto
.
operationGroupMasterRelationDtoList
)
{
...
...
@@ -172,9 +167,7 @@ public class OperationLogic extends AbstractLogic {
mOperationGroupMasterOperationDao
.
deleteOperationGroupMasterOperation
(
deleteOperationGroupMasterId
,
serverOperationDto
.
operationId
);
}
}
///////////////////////////////////////////////////////////////////////////////////////////////////////
// カテゴリ選択機能 追加ここまで
///////////////////////////////////////////////////////////////////////////////////////////////////////
mOperationDao
.
update
(
serverOperationDto
);
// 更新することで登録フラグをfalseにセット
insertFlg
=
false
;
...
...
@@ -202,16 +195,11 @@ public class OperationLogic extends AbstractLogic {
for
(
OperationContentDto
operationContentDto
:
serverOperationDto
.
operationContentDtoList
)
{
mOperationContentDao
.
insertOperationContent
(
operationContentDto
);
}
///////////////////////////////////////////////////////////////////////////////////////////////////////
// カテゴリ選択機能
///////////////////////////////////////////////////////////////////////////////////////////////////////
// 作業種別・作業のリレーションテーブルにデータ登録
for
(
OperationGroupMasterRelationDto
operationGroupMasterRelationDto
:
serverOperationDto
.
operationGroupMasterRelationDtoList
)
{
mOperationGroupMasterOperationDao
.
insertOperationGroupMasterOperation
(
operationGroupMasterRelationDto
);
}
///////////////////////////////////////////////////////////////////////////////////////////////////////
// カテゴリ選択機能 追加ここまで
///////////////////////////////////////////////////////////////////////////////////////////////////////
}
// 作業担当グループ登録
...
...
@@ -1807,13 +1795,6 @@ public class OperationLogic extends AbstractLogic {
return
result
;
}
///////////////////////////////////////////////////////////////////////////////////////////////////////
// カテゴリ選択機能
///////////////////////////////////////////////////////////////////////////////////////////////////////
// ABookCheckでは、同名の関数があるが、引数の数がちがったのでコピーした
/**
* 作業一覧取得
*
...
...
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/home/activity/OperationListActivity.java
View file @
aa4ea1b4
...
...
@@ -131,6 +131,7 @@ public class OperationListActivity extends OperationActivity {
private
ImageButton
mViewModeButton
;
// 左上
private
ImageButton
mSearchButton
;
// 検索ボタン
private
ImageButton
mCategoryLocationButton
;
// カテゴリ選択ボタン
private
List
<
OperationDto
>
mOperationList
;
...
...
@@ -187,6 +188,14 @@ public class OperationListActivity extends OperationActivity {
private
ArrayList
<
Integer
>
mAllOperationReportTypes
;
private
Map
<
Integer
,
Integer
>
operationCountMap
;
private
OperationGroupMasterLogic
mOperationGroupMasterLogic
=
AbstractLogic
.
getLogic
(
OperationGroupMasterLogic
.
class
);
private
ABVListDialog
mShowDialog
;
private
OperationDao
mOperationDao
=
AbstractDao
.
getDao
(
OperationDao
.
class
);
// 作業種別のサービスオプション値を保持用フラグ
private
boolean
mOperationGroupMasterServiceOperationFlg
;
// ビューの作成
private
class
ReloadHandler
implements
Runnable
{
@Override
...
...
@@ -322,9 +331,6 @@ public class OperationListActivity extends OperationActivity {
// フィルター選択判定
checkSelectedFilterType
();
///////////////////////////////////////////////////////////////////////////////////////////////////////
// カテゴリ選択機能
///////////////////////////////////////////////////////////////////////////////////////////////////////
// 作業種別表示・非表示
if
(
mOperationGroupMasterServiceOperationFlg
)
{
// サービスオプションON
...
...
@@ -368,9 +374,6 @@ public class OperationListActivity extends OperationActivity {
* ビューを作り直す。
*/
public
void
setOperationListView
()
{
///////////////////////////////////////////////////////////////////////////////////////////////////////
// カテゴリ選択機能
///////////////////////////////////////////////////////////////////////////////////////////////////////
mListHelper
=
getListHelper
();
handler
.
post
(
new
ReloadHandler
());
configurationToolbarIcon
();
...
...
@@ -400,10 +403,6 @@ public class OperationListActivity extends OperationActivity {
// マスタデータ最新更新する時fetchDateをローカルに保存する。
setMasterDataFetchDate
();
///////////////////////////////////////////////////////////////////////////////////////////////////////
// カテゴリ選択機能
///////////////////////////////////////////////////////////////////////////////////////////////////////
//refreshOperationList();
if
(
mOperationGroupMasterServiceOperationFlg
==
ABVDataCache
.
getInstance
().
serviceOption
.
isOperationGroupMaster
())
{
// サービスオプションが変わってない場合は、ビューは作らずにデータのみ更新
refreshOperationList
();
...
...
@@ -413,7 +412,6 @@ public class OperationListActivity extends OperationActivity {
mOperationGroupMasterServiceOperationFlg
=
ABVDataCache
.
getInstance
().
serviceOption
.
isOperationGroupMaster
();
// 作業種別の選択画面を閉じる
closeOperationGroupMasterDialog
();
// ビューを作り直す
setOperationListView
();
}
...
...
@@ -586,9 +584,6 @@ public class OperationListActivity extends OperationActivity {
}
private
void
clearData
()
{
///////////////////////////////////////////////////////////////////////////////////////////////////////
// カテゴリ選択機能
///////////////////////////////////////////////////////////////////////////////////////////////////////
// 開始日の初期化
if
(
mStartDate
!=
null
)
{
mStartDate
.
setText
(
StringUtil
.
Empty
);
...
...
@@ -635,19 +630,6 @@ public class OperationListActivity extends OperationActivity {
return
result
;
}
// ツールバーの検索結果レイアウトの表示・非表示
private
void
checkShowSearchResult
()
{
if
(
StringUtil
.
isNullOrEmpty
(
mSearchWord
)
&&
StringUtil
.
isNullOrEmpty
(
mStartDateStr
)
&&
StringUtil
.
isNullOrEmpty
(
mEndDateStr
))
{
// 検索ワードが存在しない場合、検索結果ではないので非表示
//mSearchResultLayout.setVisibility(View.GONE);
mTitleView
.
setVisibility
(
View
.
VISIBLE
);
}
else
{
// 検索ワードが存在するため、検索結果と見做し、表示
//mSearchResultLayout.setVisibility(View.VISIBLE);
mTitleView
.
setVisibility
(
View
.
GONE
);
}
}
public
void
startTaskDirectionOrReportView
(
OperationDto
operationDto
)
{
ContentDto
contentDto
=
contentDao
.
getContent
(
operationDto
.
contentId
);
try
{
...
...
@@ -1858,18 +1840,6 @@ public class OperationListActivity extends OperationActivity {
putUserPref
(
AppDefType
.
UserPrefKey
.
MASTER_DATA_FETCH_DATE
,
ABVDataCache
.
getInstance
().
tempMasterDataFetchDate
);
}
///////////////////////////////////////////////////////////////////////////////////////////////////////
// カテゴリ選択機能
///////////////////////////////////////////////////////////////////////////////////////////////////////
private
ImageButton
mCategoryLocationButton
;
// カテゴリ選択ボタン
private
Map
<
Integer
,
Integer
>
operationCountMap
;
private
OperationGroupMasterLogic
mOperationGroupMasterLogic
=
AbstractLogic
.
getLogic
(
OperationGroupMasterLogic
.
class
);
private
ABVListDialog
mShowDialog
;
private
OperationDao
mOperationDao
=
AbstractDao
.
getDao
(
OperationDao
.
class
);
// 作業種別のサービスオプション値を保持用フラグ
private
boolean
mOperationGroupMasterServiceOperationFlg
;
// 全て・カテゴリ選択画面(スマートフォン)
public
void
onClickGroupLocationByNormalSize
(
View
view
)
{
final
ABVListDialog
dialog
=
new
ABVListDialog
(
this
);
...
...
@@ -2039,19 +2009,6 @@ public class OperationListActivity extends OperationActivity {
}
/**
* 一括同期の活性化・非活性化チェック
*/
public
void
checkBatchNeedSyncButton
(
Integer
operationGroupMasterId
)
{
if
(
mOperationDao
.
hasNeedSyncOperationByGroupMasterId
(
operationGroupMasterId
))
{
// 選択したカテゴリ一覧でneedSyncFlgがtrueの作業が存在すれば、活性化する
//mOperationBatchSyncButton.setEnabled(true);
}
else
{
// 一括同期ボタンを非活性化する
//mOperationBatchSyncButton.setEnabled(false);
}
}
/**
* ソート順取得(デフォルト:1(作業期間が新しい順))
* @return
*/
...
...
@@ -2127,5 +2084,4 @@ public class OperationListActivity extends OperationActivity {
popup
.
showAsDropDown
(
anchor
);
}
}
}
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/home/adapter/OperationRelatedContentPanelAdapter.java
View file @
aa4ea1b4
...
...
@@ -116,7 +116,7 @@ public class OperationRelatedContentPanelAdapter extends BaseAdapter {
public
View
getView
(
int
position
,
View
convertView
,
final
ViewGroup
parent
)
{
ViewHolder
holder
=
null
;
Logger
.
i
(
TAG
,
"OperationRelatedContentPanelAdapter getView ......"
);
Logger
.
d
(
TAG
,
"OperationRelatedContentPanelAdapter getView ......"
);
if
(
null
==
convertView
)
{
holder
=
new
ViewHolder
();
...
...
@@ -190,7 +190,7 @@ public class OperationRelatedContentPanelAdapter extends BaseAdapter {
public
void
configureOperationButton
(
final
ViewHolder
holder
,
final
ContentDto
contentDto
)
{
Logger
.
i
(
TAG
,
"configureOperationButton ......"
);
Logger
.
d
(
TAG
,
"configureOperationButton ......"
);
holder
.
tvNewContentMark
.
setVisibility
(
View
.
GONE
);
holder
.
operationLayout
.
setVisibility
(
View
.
VISIBLE
);
...
...
@@ -205,18 +205,18 @@ public class OperationRelatedContentPanelAdapter extends BaseAdapter {
setNewRibbon
(
holder
,
contentDto
);
if
(
contentDto
.
downloadingFlg
&&
!
contentDto
.
isDownloadPaused
())
{
Logger
.
i
(
TAG
,
"isPauseDownloading ......"
);
Logger
.
d
(
TAG
,
"isPauseDownloading ......"
);
// ダウンロード中
holder
.
btnPauseSave
.
setVisibility
(
View
.
VISIBLE
);
holder
.
btnPauseSave
.
setOnClickListener
(
new
OnDownloadPauseButtonClickListener
(
contentDto
));
}
else
if
(!
contentDto
.
downloadedFlg
&&
!
contentDto
.
isDownloadPaused
()
)
{
Logger
.
i
(
TAG
,
"isDownloadable ......"
);
Logger
.
d
(
TAG
,
"isDownloadable ......"
);
holder
.
btnSaveContent
.
setVisibility
(
View
.
VISIBLE
);
holder
.
btnSaveContent
.
setOnClickListener
(
new
OnDownloadButtonClickListener
(
contentDto
));
}
else
if
(
contentDto
.
downloadedFlg
&&
contentDto
.
updatedFlg
&&
!
contentDto
.
isDownloadPaused
()
)
{
Logger
.
i
(
TAG
,
"isOpenable & isDeletable & isUpdatable......"
);
Logger
.
d
(
TAG
,
"isOpenable & isDeletable & isUpdatable......"
);
holder
.
btnOpenContent
.
setVisibility
(
View
.
VISIBLE
);
holder
.
btnOpenContent
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
@Override
...
...
@@ -237,7 +237,7 @@ public class OperationRelatedContentPanelAdapter extends BaseAdapter {
holder
.
btnUpdateContent
.
setOnClickListener
(
new
OnDownloadButtonClickListener
(
contentDto
));
}
else
if
(
contentDto
.
downloadedFlg
&&
!
contentDto
.
updatedFlg
)
{
Logger
.
i
(
TAG
,
"isOpenable & isDeletable......"
);
Logger
.
d
(
TAG
,
"isOpenable & isDeletable......"
);
holder
.
btnOpenContent
.
setVisibility
(
View
.
VISIBLE
);
holder
.
btnOpenContent
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
@Override
...
...
@@ -256,7 +256,7 @@ public class OperationRelatedContentPanelAdapter extends BaseAdapter {
}
else
if
(
contentDto
.
isDownloadPaused
())
{
// ダウンロード一時停止中
Logger
.
i
(
TAG
,
"isDownloadPaused & isCancelable......"
);
Logger
.
d
(
TAG
,
"isDownloadPaused & isCancelable......"
);
holder
.
btnRestartSave
.
setVisibility
(
View
.
VISIBLE
);
holder
.
btnRestartSave
.
setOnClickListener
(
new
OnDownloadResumeButtonClickListener
(
contentDto
));
...
...
@@ -284,7 +284,7 @@ public class OperationRelatedContentPanelAdapter extends BaseAdapter {
}
public
void
updateDownloadView
(
ContentDto
contentDto
)
{
Logger
.
i
(
TAG
,
"updateDownloadView ......"
);
Logger
.
d
(
TAG
,
"updateDownloadView ......"
);
ViewHolder
holder
=
viewHolderMap
.
get
(
contentDto
.
contentId
);
if
(
holder
!=
null
&&
holder
.
contentId
==
contentDto
.
contentId
)
{
createDownloadView
(
holder
,
contentDto
);
...
...
@@ -301,7 +301,7 @@ public class OperationRelatedContentPanelAdapter extends BaseAdapter {
* @param contentDto
*/
private
void
createDownloadView
(
ViewHolder
holder
,
final
ContentDto
contentDto
)
{
Logger
.
i
(
TAG
,
"createDownloadView ......"
);
Logger
.
d
(
TAG
,
"createDownloadView ......"
);
ProgressBar
downloadProgressBar
=
holder
.
downloadProgressBar
;
ImageView
thumbnail
=
holder
.
ivThumbnail
;
...
...
@@ -347,7 +347,7 @@ public class OperationRelatedContentPanelAdapter extends BaseAdapter {
AsyncTask
<
Params
,
Void
,
Result
>
task
=
new
AsyncTask
<
Params
,
Void
,
Result
>()
{
@Override
protected
Result
doInBackground
(
Params
...
params
)
{
Logger
.
i
(
TAG
,
"onContentDownload start ......"
);
Logger
.
d
(
TAG
,
"onContentDownload start ......"
);
Result
result
=
new
Result
();
result
.
result
=
mListener
.
onContentDownload
(
params
[
0
].
contentId
);
return
result
;
...
...
@@ -355,7 +355,7 @@ public class OperationRelatedContentPanelAdapter extends BaseAdapter {
@Override
protected
void
onPostExecute
(
Result
result
)
{
Logger
.
i
(
TAG
,
"onContentDownload after ......"
);
Logger
.
d
(
TAG
,
"onContentDownload after ......"
);
if
(!
result
.
result
)
{
contentDto
.
downloadingFlg
=
false
;
}
...
...
@@ -379,7 +379,7 @@ public class OperationRelatedContentPanelAdapter extends BaseAdapter {
AsyncTask
<
Params
,
Void
,
Void
>
task
=
new
AsyncTask
<
Params
,
Void
,
Void
>()
{
@Override
protected
Void
doInBackground
(
Params
...
params
)
{
Logger
.
i
(
TAG
,
"onContentDownloadPause start ......"
);
Logger
.
d
(
TAG
,
"onContentDownloadPause start ......"
);
mListener
.
onContentDownloadPause
(
contentDto
);
return
null
;
}
...
...
@@ -405,7 +405,7 @@ public class OperationRelatedContentPanelAdapter extends BaseAdapter {
AsyncTask
<
Params
,
Void
,
Void
>
task
=
new
AsyncTask
<
Params
,
Void
,
Void
>()
{
@Override
protected
Void
doInBackground
(
Params
...
params
)
{
Logger
.
i
(
TAG
,
"onContentDownloadResume start ......"
);
Logger
.
d
(
TAG
,
"onContentDownloadResume start ......"
);
mListener
.
onContentDownloadResume
(
contentDto
);
return
null
;
}
...
...
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/home/helper/OperationGroupMasterListHelper.java
View file @
aa4ea1b4
...
...
@@ -72,7 +72,6 @@ public class OperationGroupMasterListHelper extends CategoryOperationListHelper<
}
OperationGroupMasterDto
peekOperationGroupMasterDto
=
stack
.
peek
();
mAppActivity
.
checkBatchNeedSyncButton
(
peekOperationGroupMasterDto
.
operationGroupMasterId
);
int
operationSortType
=
mAppActivity
.
getSortCondition
();
OperationSortingType
operationSortingType
=
OperationSortingType
.
parse
(
operationSortType
);
// 作業種別IDで紐づく作業リストを取得
...
...
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