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
d7d33ed0
Commit
d7d33ed0
authored
Mar 08, 2019
by
Lee Jaebin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#32825 作業一覧画面改善
parent
e110573d
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
29 changed files
with
273 additions
and
110 deletions
+273
-110
ABVJE_BL/src/jp/agentec/abook/abv/bl/common/Constant.java
+3
-1
ABVJE_BL/src/jp/agentec/abook/abv/bl/data/dao/OperationDao.java
+6
-5
ABVJE_BL/src/jp/agentec/abook/abv/bl/logic/OperationLogic.java
+3
-3
ABVJE_Launcher_Android/AndroidManifest.xml
+1
-0
ABVJE_Res_Default_Android/res/drawable-xhdpi/ic_filter_off.png
+0
-0
ABVJE_Res_Default_Android/res/drawable-xhdpi/ic_filter_on.png
+0
-0
ABVJE_Res_Default_Android/res/drawable-xhdpi/ic_sort_off.png
+0
-0
ABVJE_Res_Default_Android/res/drawable-xhdpi/ic_sort_on.png
+0
-0
ABVJE_Res_Default_Android/res/drawable/ic_filter.xml
+9
-0
ABVJE_Res_Default_Android/res/drawable/icon_sort.xml
+9
-0
ABVJE_Res_Default_Android/res/values-ja/strings.xml
+1
-1
ABVJE_UI_Android/res/layout-large/ac_operation_list.xml
+10
-1
ABVJE_UI_Android/res/layout-normal/ac_operation_list.xml
+13
-4
ABVJE_UI_Android/res/layout-normal/item_operation_list.xml
+2
-20
ABVJE_UI_Android/res/layout/item_checked_list.xml
+14
-0
ABVJE_UI_Android/res/layout/item_related_content_section.xml
+1
-1
ABVJE_UI_Android/res/layout/operation_search_dialog.xml
+0
-38
ABVJE_UI_Android/res/layout/popup_simple_list.xml
+96
-0
ABVJE_UI_Android/res/values-ja/arrays.xml
+7
-0
ABVJE_UI_Android/res/values-ja/popup_menu_values.xml
+3
-0
ABVJE_UI_Android/src/jp/agentec/abook/abv/launcher/android/ABVUIDataCache.java
+43
-2
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/common/activity/ABVContentViewActivity.java
+4
-13
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/common/appinfo/AppDefType.java
+1
-0
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/home/activity/OperationListActivity.java
+0
-0
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/home/adapter/AbstractOperationAdapter.java
+1
-1
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/home/adapter/OperationListAdapter.java
+9
-6
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/home/adapter/OperationPanelAdapter.java
+3
-4
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/home/helper/ABookCheckWebViewHelper.java
+2
-6
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/home/helper/OperationListHelper.java
+32
-4
No files found.
ABVJE_BL/src/jp/agentec/abook/abv/bl/common/Constant.java
View file @
d7d33ed0
...
...
@@ -95,8 +95,10 @@ public class Constant {
}
public
interface
OperationReportType
{
// TODO 変数名は仮実装、変更必要
int
DEFAULT
=
0
;
int
INSPECT_REPORT
=
1
;
int
ROUTINE_TASK
=
1
;
int
REPORT_TYPE
=
2
;
}
public
interface
PushMessageSendType
{
...
...
ABVJE_BL/src/jp/agentec/abook/abv/bl/data/dao/OperationDao.java
View file @
d7d33ed0
package
jp
.
agentec
.
abook
.
abv
.
bl
.
data
.
dao
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.List
;
...
...
@@ -216,12 +217,12 @@ public class OperationDao extends AbstractDao {
delete
(
"m_worker_group"
,
null
,
null
);
}
public
List
<
OperationDto
>
getOperations
(
String
searchOperationName
,
String
searchStartDateStr
,
String
searchEndDateStr
,
int
operationReportType
)
{
String
sql
=
generateGetOperationQuery
(
searchOperationName
,
searchStartDateStr
,
searchEndDateStr
,
operationReportType
);
public
List
<
OperationDto
>
getOperations
(
String
searchOperationName
,
String
searchStartDateStr
,
String
searchEndDateStr
,
String
operationReportTypeStr
)
{
String
sql
=
generateGetOperationQuery
(
searchOperationName
,
searchStartDateStr
,
searchEndDateStr
,
operationReportType
Str
);
return
rawQueryGetDtoList
(
sql
,
null
,
OperationDto
.
class
);
}
private
String
generateGetOperationQuery
(
String
searchOperationName
,
String
searchStartDateStr
,
String
searchEndDateStr
,
int
operationReportType
)
{
private
String
generateGetOperationQuery
(
String
searchOperationName
,
String
searchStartDateStr
,
String
searchEndDateStr
,
String
operationReportTypeStr
)
{
String
curDate
=
DateTimeUtil
.
toStringInTimeZone
(
new
Date
(),
DateTimeFormat
.
yyyyMMddHHmmss_hyphen
,
"UTC"
);
StringBuffer
sql
=
new
StringBuffer
();
...
...
@@ -280,8 +281,8 @@ public class OperationDao extends AbstractDao {
sql
.
append
(
" AND tp.operation_start_date <= '"
+
DateTimeUtil
.
toString
(
endDate
,
DateTimeFormat
.
yyyyMMdd_hyphen
)
+
"'"
);
}
if
(
operationReportType
>
-
1
)
{
sql
.
append
(
" AND tp.operation_report_type
= "
+
operationReportType
);
if
(
operationReportType
Str
!=
null
)
{
sql
.
append
(
" AND tp.operation_report_type
in ("
+
operationReportTypeStr
+
")"
);
}
sql
.
append
(
" ORDER BY tp.operation_report_type DESC, tp.operation_start_date DESC, tp.operation_id DESC"
);
...
...
ABVJE_BL/src/jp/agentec/abook/abv/bl/logic/OperationLogic.java
View file @
d7d33ed0
...
...
@@ -1503,9 +1503,9 @@ public class OperationLogic extends AbstractLogic {
* @param searchEndDateStr
* @return
*/
public
List
<
OperationDto
>
getRefreshOperation
(
String
searchWord
,
String
searchStartDateStr
,
String
searchEndDateStr
,
int
operationReportType
)
{
public
List
<
OperationDto
>
getRefreshOperation
(
String
searchWord
,
String
searchStartDateStr
,
String
searchEndDateStr
,
String
operationReportTypeStr
)
{
List
<
OperationDto
>
operationDtoList
;
operationDtoList
=
mOperationDao
.
getOperations
(
searchWord
,
searchStartDateStr
,
searchEndDateStr
,
operationReportType
);
operationDtoList
=
mOperationDao
.
getOperations
(
searchWord
,
searchStartDateStr
,
searchEndDateStr
,
operationReportType
Str
);
for
(
OperationDto
operationDto
:
operationDtoList
)
{
if
(
ABVDataCache
.
getInstance
().
getMemberInfo
()
!=
null
)
{
// プロジェクト毎に作業の送信フラグがあるかチェックし、存在する場合プロジェクトのデータ同期必要区分をtrueにセット
...
...
@@ -1520,7 +1520,7 @@ public class OperationLogic extends AbstractLogic {
}
}
else
{
boolean
needSyncFlg
=
false
;
if
(
operationDto
.
operationReportType
==
Constant
.
OperationReportType
.
INSPECT_REPORT
)
{
if
(
operationDto
.
operationReportType
==
Constant
.
OperationReportType
.
ROUTINE_TASK
)
{
needSyncFlg
=
mRoutineTaskReportDao
.
isExistSendRoutineTaskData
(
operationDto
.
operationId
);
}
else
{
needSyncFlg
=
mTaskReportDao
.
isExistSendTaskData
(
operationDto
.
operationId
);
...
...
ABVJE_Launcher_Android/AndroidManifest.xml
View file @
d7d33ed0
...
...
@@ -41,6 +41,7 @@
android:icon=
"@drawable/app_icon"
android:label=
"@string/app_name"
android:theme=
"@style/ABook"
android:allowBackup=
"false"
android:largeHeap=
"true"
>
<service
android:name=
"jp.agentec.abook.abv.cl.push.ABVFcmListenerService"
>
<intent-filter>
...
...
ABVJE_Res_Default_Android/res/drawable-xhdpi/ic_filter_off.png
0 → 100644
View file @
d7d33ed0
782 Bytes
ABVJE_Res_Default_Android/res/drawable-xhdpi/ic_filter_on.png
0 → 100644
View file @
d7d33ed0
579 Bytes
ABVJE_Res_Default_Android/res/drawable-xhdpi/ic_sort_off.png
0 → 100644
View file @
d7d33ed0
503 Bytes
ABVJE_Res_Default_Android/res/drawable-xhdpi/ic_sort_on.png
0 → 100644
View file @
d7d33ed0
324 Bytes
ABVJE_Res_Default_Android/res/drawable/ic_filter.xml
0 → 100644
View file @
d7d33ed0
<?xml version="1.0" encoding="UTF-8"?>
<selector
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<item
android:state_pressed=
"true"
android:drawable=
"@drawable/ic_filter_on"
/>
<item
android:drawable=
"@drawable/ic_filter_off"
/>
</selector>
\ No newline at end of file
ABVJE_Res_Default_Android/res/drawable/icon_sort.xml
0 → 100644
View file @
d7d33ed0
<?xml version="1.0" encoding="UTF-8"?>
<selector
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<item
android:state_pressed=
"true"
android:drawable=
"@drawable/ic_sort_on"
/>
<item
android:drawable=
"@drawable/ic_sort_off"
/>
</selector>
\ No newline at end of file
ABVJE_Res_Default_Android/res/values-ja/strings.xml
View file @
d7d33ed0
...
...
@@ -659,7 +659,7 @@
<!-- 1.9.3-->
<string
name=
"date_label"
>
期間
</string>
<string
name=
"operation_name"
>
プロジェクト名
</string>
<string
name=
"operation_list"
>
プロジェクト一覧
</string>
<string
name=
"operation_list"
>
作業
</string>
<string
name=
"operation_search_count"
>
%1$s件、検索されました。
</string>
<string
name=
"msg_date_validation"
>
開始日は終了日の前に設定してください
</string>
<string
name=
"search_result"
>
検索結果
</string>
...
...
ABVJE_UI_Android/res/layout-large/ac_operation_list.xml
View file @
d7d33ed0
...
...
@@ -20,7 +20,16 @@
android:layout_height=
"wrap_content"
android:layout_centerVertical=
"true"
android:layout_marginLeft=
"10dp"
android:background=
"@drawable/ic_communication_menu"
/>
android:background=
"@drawable/icon_sort"
/>
<ImageButton
android:id=
"@+id/icon_filter"
style=
"@style/ToolBarIcon"
android:layout_centerVertical=
"true"
android:layout_marginLeft=
"10dp"
android:layout_toRightOf=
"@+id/btn_view_mode"
android:onClick=
"onClickOperationFilterList"
android:src=
"@drawable/ic_filter"
/>
<TextView
android:id=
"@+id/title"
...
...
ABVJE_UI_Android/res/layout-normal/ac_operation_list.xml
View file @
d7d33ed0
...
...
@@ -4,7 +4,6 @@
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:background=
"@color/background"
android:descendantFocusability=
"blocksDescendants"
android:orientation=
"vertical"
>
<RelativeLayout
...
...
@@ -21,7 +20,16 @@
android:layout_height=
"wrap_content"
android:layout_centerVertical=
"true"
android:layout_marginLeft=
"10dp"
android:background=
"@drawable/ic_communication_menu"
/>
android:background=
"@drawable/icon_sort"
/>
<ImageButton
android:id=
"@+id/icon_filter"
style=
"@style/ToolBarIcon"
android:layout_centerVertical=
"true"
android:layout_marginLeft=
"10dp"
android:layout_toRightOf=
"@+id/btn_view_mode"
android:onClick=
"onClickOperationFilterList"
android:src=
"@drawable/ic_filter"
/>
<LinearLayout
android:layout_width=
"wrap_content"
...
...
@@ -129,8 +137,8 @@
<FrameLayout
android:id=
"@+id/operation_list_layout"
style=
"@style/content_list_bg"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:clickable=
"true"
/>
android:layout_height=
"match_parent"
/>
</LinearLayout>
\ No newline at end of file
ABVJE_UI_Android/res/layout-normal/item_operation_list.xml
View file @
d7d33ed0
...
...
@@ -2,7 +2,8 @@
<LinearLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:background=
"@drawable/operation_underline"
android:background=
"@drawable/list_selector_holo_light"
android:descendantFocusability=
"blocksDescendants"
android:orientation=
"vertical"
>
...
...
@@ -109,24 +110,6 @@
android:text=
"@string/information_update"
/>
</LinearLayout>
<LinearLayout
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginRight=
"10dp"
android:orientation=
"vertical"
>
<ImageView
android:id=
"@+id/btn_work"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:background=
"@drawable/btn_work"
/>
<TextView
android:id=
"@+id/txt_work"
style=
"@style/ProjectIconText"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
/>
</LinearLayout>
</LinearLayout>
</LinearLayout>
</LinearLayout>
\ No newline at end of file
ABVJE_UI_Android/res/layout/item_checked_list.xml
0 → 100644
View file @
d7d33ed0
<?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/textCheckMark"
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_related_content_section.xml
View file @
d7d33ed0
...
...
@@ -19,7 +19,7 @@
android:textColor=
"@color/operation_search_button_color"
android:textSize=
"18sp"
/>
<jp.agentec.abook.abv.ui.common.view.ABVOpe
a
rationContentGridView
<jp.agentec.abook.abv.ui.common.view.ABVOperationContentGridView
android:id=
"@+id/gv_content_list"
android:layout_width=
"fill_parent"
android:layout_height=
"fill_parent"
...
...
ABVJE_UI_Android/res/layout/operation_search_dialog.xml
View file @
d7d33ed0
...
...
@@ -153,44 +153,6 @@
android:textColor=
"@color/text_select"
android:textSize=
"@dimen/text_size_noraml"
/>
</LinearLayout>
<LinearLayout
android:id=
"@+id/report_type_layout_btn"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_weight=
"1"
android:paddingTop=
"10dp"
android:paddingBottom=
"10dp"
android:gravity=
"center"
android:orientation=
"horizontal"
android:visibility=
"gone"
>
<Button
android:id=
"@+id/btn_operation_type_all"
android:layout_width=
"0dp"
android:layout_weight=
".3"
android:layout_height=
"40dp"
android:background=
"@color/operation_search_button_color"
android:text=
"@string/label_operation_report_type_all"
android:textColor=
"@color/text_color"
/>
<Button
android:id=
"@+id/btn_operation_type_default"
android:layout_width=
"0dp"
android:layout_weight=
".3"
android:layout_height=
"40dp"
android:background=
"@color/operation_disable_color"
android:text=
"@string/label_operation_report_type_default"
android:textColor=
"@color/text_color"
/>
<Button
android:id=
"@+id/btn_operation_type_routineTask"
android:layout_width=
"0dp"
android:layout_weight=
".3"
android:layout_height=
"40dp"
android:background=
"@color/operation_disable_color"
android:text=
"@string/label_operation_report_type_routineTask"
android:textColor=
"@color/text_color"
/>
</LinearLayout>
</LinearLayout>
...
...
ABVJE_UI_Android/res/layout/popup_simple_list.xml
0 → 100644
View file @
d7d33ed0
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:id=
"@+id/LinearLayout1"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:background=
"@color/mydata_bg"
android:orientation=
"vertical"
>
<RelativeLayout
android:id=
"@+id/toolbar"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:minHeight=
"@dimen/toolbar_min_size"
>
<TextView
android:id=
"@+id/popup_title"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_centerHorizontal=
"true"
android:layout_centerVertical=
"true"
android:gravity=
"center"
android:paddingTop=
"5dp"
android:text=
"@string/dummy_str"
android:textColor=
"@color/text_color"
android:textSize=
"@dimen/app_normal_text_size"
android:maxLines=
"1"
/>
<Button
android:id=
"@+id/popup_title_left"
style=
"@style/ButtonABookLight"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_alignParentLeft=
"true"
android:layout_centerVertical=
"true"
android:paddingRight=
"10dp"
android:text=
"@string/dummy_str"
android:textSize=
"@dimen/app_normal_text_size"
android:visibility=
"gone"
android:maxLines=
"1"
/>
<Button
android:id=
"@+id/popup_right_title"
style=
"@style/ButtonABookLight"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_alignParentRight=
"true"
android:layout_centerVertical=
"true"
android:paddingLeft=
"10dp"
android:text=
"@string/dummy_str"
android:textSize=
"@dimen/app_normal_text_size"
android:visibility=
"gone"
android:maxLines=
"1"
/>
</RelativeLayout>
<LinearLayout
android:id=
"@+id/listLayout"
android:layout_width=
"match_parent"
android:layout_height=
"0dp"
android:layout_margin=
"5dp"
android:paddingTop=
"5dp"
android:paddingBottom=
"5dp"
android:paddingLeft=
"3dp"
android:paddingRight=
"3dp"
android:layout_weight=
"1"
android:background=
"@drawable/radius_frame"
android:orientation=
"vertical"
>
<ListView
android:id=
"@+id/popup_list_menu"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:divider=
"#cccccc"
android:dividerHeight=
"1px"
android:fadingEdge=
"none"
android:scrollingCache=
"false"
android:background=
"@color/list_background"
>
</ListView>
<LinearLayout
android:id=
"@+id/empty_layout"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:visibility=
"gone"
>
<TextView
android:id=
"@+id/empty_list_item"
android:layout_width=
"match_parent"
android:layout_height=
"?android:attr/listPreferredItemHeight"
android:gravity=
"center_vertical"
android:textColor=
"@color/text_select"
android:paddingLeft=
"?android:attr/expandableListPreferredItemPaddingLeft"
android:textAppearance=
"?android:attr/textAppearanceLarge"
/>
</LinearLayout>
</LinearLayout>
</LinearLayout>
\ No newline at end of file
ABVJE_UI_Android/res/values-ja/arrays.xml
View file @
d7d33ed0
...
...
@@ -72,4 +72,10 @@
<item>
縦
</item>
<item>
縦(反転)
</item>
</string-array>
<string-array
name=
"operation_report_types"
>
<item>
タイプ1
</item>
<item>
タイプ2
</item>
<item>
タイプ3
</item>
</string-array>
</resources>
\ No newline at end of file
ABVJE_UI_Android/res/values-ja/popup_menu_values.xml
View file @
d7d33ed0
...
...
@@ -9,4 +9,6 @@
<string
name=
"text_copy"
>
テキストコピー
</string>
<string
name=
"content_share"
>
共有
</string>
<string
name=
"filter"
>
フィルター
</string>
</resources>
\ No newline at end of file
ABVJE_UI_Android/src/jp/agentec/abook/abv/launcher/android/ABVUIDataCache.java
View file @
d7d33ed0
...
...
@@ -3,14 +3,16 @@ package jp.agentec.abook.abv.launcher.android;
import
java.util.ArrayList
;
import
java.util.Stack
;
import
jp.agentec.abook.abv.bl.common.Constant
;
import
jp.agentec.abook.abv.bl.common.Constant.OperationReportType
;
import
jp.agentec.abook.abv.bl.common.log.Logger
;
import
jp.agentec.abook.abv.bl.dto.CategoryDto
;
import
jp.agentec.abook.abv.bl.dto.GroupDto
;
import
jp.agentec.abook.abv.cl.util.PreferenceUtil
;
import
jp.agentec.abook.abv.ui.common.appinfo.AppDefType
;
import
jp.agentec.abook.abv.ui.common.appinfo.AppDefType.DefPrefKey
;
import
jp.agentec.abook.abv.ui.common.appinfo.AppDefType.UserPrefKey
;
import
jp.agentec.adf.util.DateTimeUtil
;
import
jp.agentec.adf.util.StringUtil
;
import
android.content.Context
;
import
java.util.List
;
...
...
@@ -21,6 +23,8 @@ public class ABVUIDataCache {
// ホーム画面項目
private
int
viewMode
;
// パンネル、リスト形式
private
ArrayList
<
Integer
>
mOperationReportTypes
;
public
long
lastUpdateTime
=
-
1
;
public
String
searchText
;
...
...
@@ -107,4 +111,41 @@ public class ABVUIDataCache {
returnContentIdList
.
clear
();
}
}
public
void
setOperationReportTypes
(
ArrayList
<
Integer
>
operationReportTypes
)
{
this
.
mOperationReportTypes
=
operationReportTypes
;
String
val
=
null
;
if
(
operationReportTypes
.
size
()
>
0
)
{
// カンマ区切りで保存
StringBuffer
sb
=
new
StringBuffer
();
for
(
int
contentType
:
operationReportTypes
)
{
sb
.
append
(
contentType
);
sb
.
append
(
","
);
}
val
=
sb
.
substring
(
0
,
sb
.
length
()
-
1
);
}
PreferenceUtil
.
putUserPref
(
context
,
UserPrefKey
.
OPERATION_REPORT_TYPES
,
val
);
}
public
ArrayList
<
Integer
>
getOperationReportTypes
()
{
String
operationReportTypesStr
=
PreferenceUtil
.
getUserPref
(
context
,
UserPrefKey
.
OPERATION_REPORT_TYPES
,
null
);
if
(
operationReportTypesStr
!=
null
)
{
ArrayList
<
Integer
>
operationReportTypes
=
new
ArrayList
<>();
String
[]
operationReportTypesStrList
=
operationReportTypesStr
.
split
(
","
);
for
(
String
contentType
:
operationReportTypesStrList
)
{
if
(!
StringUtil
.
isNullOrEmpty
(
contentType
))
{
operationReportTypes
.
add
(
Integer
.
parseInt
(
contentType
));
}
}
mOperationReportTypes
=
operationReportTypes
;
}
else
{
mOperationReportTypes
=
new
ArrayList
<
Integer
>();
mOperationReportTypes
.
add
(
OperationReportType
.
DEFAULT
);
mOperationReportTypes
.
add
(
OperationReportType
.
ROUTINE_TASK
);
mOperationReportTypes
.
add
(
OperationReportType
.
REPORT_TYPE
);
}
return
mOperationReportTypes
;
}
}
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/common/activity/ABVContentViewActivity.java
View file @
d7d33ed0
...
...
@@ -3,11 +3,8 @@ package jp.agentec.abook.abv.ui.common.activity;
import
android.content.Context
;
import
android.content.DialogInterface
;
import
android.content.Intent
;
import
android.content.SharedPreferences
;
import
android.content.pm.ActivityInfo
;
import
android.database.Cursor
;
import
android.graphics.Color
;
import
android.graphics.Point
;
import
android.location.Location
;
import
android.net.Uri
;
import
android.os.Bundle
;
...
...
@@ -18,15 +15,12 @@ import android.view.KeyEvent;
import
android.view.MotionEvent
;
import
android.view.View
;
import
android.view.ViewGroup
;
import
android.webkit.WebView
;
import
android.widget.AdapterView
;
import
android.widget.AdapterView.OnItemClickListener
;
import
android.widget.Button
;
import
android.widget.FrameLayout
;
import
android.widget.ImageButton
;
import
android.widget.LinearLayout
;
import
android.widget.RelativeLayout
;
import
android.widget.ScrollView
;
import
android.widget.TextView
;
import
android.widget.Toast
;
...
...
@@ -50,7 +44,6 @@ import jp.agentec.abook.abv.bl.common.Constant;
import
jp.agentec.abook.abv.bl.common.constant.ABookKeys
;
import
jp.agentec.abook.abv.bl.common.log.Logger
;
import
jp.agentec.abook.abv.bl.data.ABVDataCache
;
import
jp.agentec.abook.abv.bl.download.ContentDownloader
;
import
jp.agentec.abook.abv.bl.download.ContentFileExtractor
;
import
jp.agentec.abook.abv.bl.dto.ContentDto
;
import
jp.agentec.abook.abv.bl.dto.MydataDto
;
...
...
@@ -69,9 +62,7 @@ import jp.agentec.abook.abv.cl.util.PreferenceUtil;
import
jp.agentec.abook.abv.launcher.android.R
;
import
jp.agentec.abook.abv.ui.common.appinfo.AppDefType
;
import
jp.agentec.abook.abv.ui.common.appinfo.AppDefType.DefPrefKey
;
import
jp.agentec.abook.abv.ui.common.appinfo.AppDefType.PrefName
;
import
jp.agentec.abook.abv.ui.common.appinfo.AppDefType.UserPrefKey
;
import
jp.agentec.abook.abv.ui.common.appinfo.options.Options
;
import
jp.agentec.abook.abv.ui.common.constant.ErrorCode
;
import
jp.agentec.abook.abv.ui.common.constant.ErrorMessage
;
import
jp.agentec.abook.abv.ui.common.dialog.ABookAlertDialog
;
...
...
@@ -789,7 +780,7 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
helpViewType
=
Constant
.
HelpViewType
.
ListOperationDirector
;
break
;
case
Constant
.
XWalkOpenType
.
TASK_REPORT
:
if
(
operationDto
.
operationReportType
==
Constant
.
OperationReportType
.
INSPECT_REPORT
)
{
if
(
operationDto
.
operationReportType
==
Constant
.
OperationReportType
.
ROUTINE_TASK
)
{
helpViewType
=
Constant
.
HelpViewType
.
RoutineTaskOperation
;
}
else
{
helpViewType
=
Constant
.
HelpViewType
.
ListOperationReporter
;
...
...
@@ -826,7 +817,7 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
if
(
mXWalkOpenType
==
Constant
.
XWalkOpenType
.
TASK_DERECTION
)
{
helpViewType
=
Constant
.
HelpViewType
.
DirectorTask
;
}
else
if
(
mXWalkOpenType
==
Constant
.
XWalkOpenType
.
TASK_REPORT
)
{
if
(
operationDto
.
operationReportType
==
Constant
.
OperationReportType
.
INSPECT_REPORT
)
{
if
(
operationDto
.
operationReportType
==
Constant
.
OperationReportType
.
ROUTINE_TASK
)
{
helpViewType
=
Constant
.
HelpViewType
.
RoutineTaskOperationReport
;
}
else
{
helpViewType
=
Constant
.
HelpViewType
.
ReportTask
;
...
...
@@ -860,7 +851,7 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
int
taskReportId
=
0
;
String
reportStartDate
=
""
;
if
(
operationDto
.
operationReportType
==
Constant
.
OperationReportType
.
INSPECT_REPORT
&&
abookCheckParam
.
get
(
ABookKeys
.
TASK_REPORT_ID
)
!=
null
&&
abookCheckParam
.
get
(
ABookKeys
.
REPORT_START_DATE
)
!=
null
)
{
if
(
operationDto
.
operationReportType
==
Constant
.
OperationReportType
.
ROUTINE_TASK
&&
abookCheckParam
.
get
(
ABookKeys
.
TASK_REPORT_ID
)
!=
null
&&
abookCheckParam
.
get
(
ABookKeys
.
REPORT_START_DATE
)
!=
null
)
{
taskReportId
=
Integer
.
parseInt
(
abookCheckParam
.
get
(
ABookKeys
.
TASK_REPORT_ID
));
reportStartDate
=
abookCheckParam
.
get
(
ABookKeys
.
REPORT_START_DATE
);
}
...
...
@@ -918,7 +909,7 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
return
null
;
}
};
ABookCheckWebViewHelper
.
getInstance
().
doABookCheckParam
(
ABVContentViewActivity
.
this
,
mCmd
,
mTaskKey
,
reportUpdateType
,
abookCheckParam
,
mOperationId
,
mContentPath
,
getContentId
(),
operationDto
.
operationReportType
==
Constant
.
OperationReportType
.
INSPECT_REPORT
,
finishCallback
);
ABookCheckWebViewHelper
.
getInstance
().
doABookCheckParam
(
ABVContentViewActivity
.
this
,
mCmd
,
mTaskKey
,
reportUpdateType
,
abookCheckParam
,
mOperationId
,
mContentPath
,
getContentId
(),
operationDto
.
operationReportType
==
Constant
.
OperationReportType
.
ROUTINE_TASK
,
finishCallback
);
}
catch
(
Exception
e
)
{
Logger
.
e
(
TAG
,
"doABookCheckParam error"
,
e
);
}
...
...
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/common/appinfo/AppDefType.java
View file @
d7d33ed0
...
...
@@ -53,6 +53,7 @@ public interface AppDefType {
String
SYNCED_OPERATION_ID
=
"syncedOperationId_%d"
;
//一日一回情報更新が出来るように
String
VIEW_MODE
=
"viewMode"
;
String
OPERATION_REPORT_TYPES
=
"operationReportTypes"
;
}
/**
...
...
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/home/activity/OperationListActivity.java
View file @
d7d33ed0
This diff is collapsed.
Click to expand it.
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/home/adapter/AbstractOperationAdapter.java
View file @
d7d33ed0
...
...
@@ -21,7 +21,7 @@ import jp.agentec.abook.abv.launcher.android.R;
public
abstract
class
AbstractOperationAdapter
extends
BaseAdapter
{
protected
AbstractOperationListAdapterListener
listener
;
protected
List
<
OperationDto
>
listItem
=
new
ArrayList
<>();
// NullPointException防止
protected
int
mOperationAuthLevel
=
ABVDataCache
.
getInstance
().
getMemberInfo
().
operationAuthLevel
;
protected
Integer
mOperationAuthLevel
=
ABVDataCache
.
getInstance
().
getMemberInfo
().
operationAuthLevel
;
protected
ContentDao
mContentDao
=
AbstractDao
.
getDao
(
ContentDao
.
class
);
public
interface
AbstractOperationListAdapterListener
{
...
...
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/home/adapter/OperationListAdapter.java
View file @
d7d33ed0
...
...
@@ -15,10 +15,7 @@ import jp.agentec.abook.abv.bl.acms.type.OperationAuthLevel;
import
jp.agentec.abook.abv.bl.acms.type.OperationButtonType
;
import
jp.agentec.abook.abv.bl.acms.type.OperationType
;
import
jp.agentec.abook.abv.bl.common.Constant
;
import
jp.agentec.abook.abv.bl.dto.CategoryContentDto
;
import
jp.agentec.abook.abv.bl.dto.OperationDto
;
import
jp.agentec.abook.abv.bl.logic.AbstractLogic
;
import
jp.agentec.abook.abv.bl.logic.OperationLogic
;
import
jp.agentec.abook.abv.launcher.android.R
;
import
jp.agentec.abook.abv.ui.common.appinfo.AppDefType
;
import
jp.agentec.abook.abv.ui.home.activity.OperationListActivity
;
...
...
@@ -90,9 +87,9 @@ public class OperationListAdapter extends AbstractOperationAdapter {
final
OperationDto
operationDto
=
getItem
(
position
);
if
(
operationDto
!=
null
)
{
boolean
noRoutineTaskAll
=
(
operationDto
.
operationReportType
==
Constant
.
OperationReportType
.
INSPECT_REPORT
&&
operationDto
.
reportCount
==
0
);
boolean
noRoutineTaskAll
=
(
operationDto
.
operationReportType
==
Constant
.
OperationReportType
.
ROUTINE_TASK
&&
operationDto
.
reportCount
==
0
);
holder
.
tvOperationName
.
setText
(
operationDto
.
operationName
);
if
(
operationDto
.
operationReportType
==
Constant
.
OperationReportType
.
INSPECT_REPORT
)
{
if
(
operationDto
.
operationReportType
==
Constant
.
OperationReportType
.
ROUTINE_TASK
)
{
if
(
StringUtil
.
isNullOrEmpty
(
operationDto
.
reportPeriod
))
{
holder
.
tvDate
.
setText
(
mContext
.
getString
(
R
.
string
.
date_label_routineTask
)
+
" : "
+
mContext
.
getString
(
R
.
string
.
msg_no_report_data
));
}
else
{
...
...
@@ -109,7 +106,7 @@ public class OperationListAdapter extends AbstractOperationAdapter {
setButtonEnabled
(
holder
,
OperationButtonType
.
INFORMATION_UPDATE
,
true
);
}
else
{
// needSyncFlgがfalseの場合
if
(
operationDto
.
operationReportType
==
Constant
.
OperationReportType
.
INSPECT_REPORT
)
{
if
(
operationDto
.
operationReportType
==
Constant
.
OperationReportType
.
ROUTINE_TASK
)
{
// 定期点検プロジェクトの場合のみ、以下の処理を行う
String
syncedDate
=
getUserPref
(
mContext
,
String
.
format
(
AppDefType
.
UserPrefKey
.
SYNCED_OPERATION_ID
,
operationDto
.
operationId
),
""
);
if
(
StringUtil
.
isNullOrEmpty
(
operationDto
.
reportPeriod
)
&&
!
syncedDate
.
equals
(
DateTimeUtil
.
toString
(
DateTimeUtil
.
getCurrentSqlDate
(),
DateTimeFormat
.
yyyyMMdd_none
)))
{
...
...
@@ -182,6 +179,12 @@ public class OperationListAdapter extends AbstractOperationAdapter {
TextView
tvInformationUpdateText
;
}
/**
* 作業一覧の各ボタンの活性化、非活性化に変更する
* @param holder
* @param buttonType
* @param isEnabled
*/
private
void
setButtonEnabled
(
ViewHolder
holder
,
int
buttonType
,
boolean
isEnabled
)
{
switch
(
buttonType
)
{
case
OperationButtonType
.
PANO_EDIT
:
...
...
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/home/adapter/OperationPanelAdapter.java
View file @
d7d33ed0
...
...
@@ -14,7 +14,6 @@ import jp.agentec.abook.abv.bl.acms.type.OperationAuthLevel;
import
jp.agentec.abook.abv.bl.acms.type.OperationButtonType
;
import
jp.agentec.abook.abv.bl.acms.type.OperationType
;
import
jp.agentec.abook.abv.bl.common.Constant
;
import
jp.agentec.abook.abv.bl.dto.ContentDto
;
import
jp.agentec.abook.abv.bl.dto.OperationDto
;
import
jp.agentec.abook.abv.launcher.android.R
;
import
jp.agentec.abook.abv.ui.common.appinfo.AppDefType
;
...
...
@@ -120,9 +119,9 @@ public class OperationPanelAdapter extends AbstractOperationAdapter {
final
OperationDto
operationDto
=
getItem
(
position
);
if
(
operationDto
!=
null
)
{
boolean
noRoutineTaskAll
=
(
operationDto
.
operationReportType
==
Constant
.
OperationReportType
.
INSPECT_REPORT
&&
operationDto
.
reportCount
==
0
);
boolean
noRoutineTaskAll
=
(
operationDto
.
operationReportType
==
Constant
.
OperationReportType
.
ROUTINE_TASK
&&
operationDto
.
reportCount
==
0
);
holder
.
tvOperationName
.
setText
(
operationDto
.
operationName
);
if
(
operationDto
.
operationReportType
==
Constant
.
OperationReportType
.
INSPECT_REPORT
)
{
if
(
operationDto
.
operationReportType
==
Constant
.
OperationReportType
.
ROUTINE_TASK
)
{
if
(
StringUtil
.
isNullOrEmpty
(
operationDto
.
reportPeriod
))
{
holder
.
tvDate
.
setText
(
mContext
.
getString
(
R
.
string
.
date_label_routineTask
)
+
" : "
+
mContext
.
getString
(
R
.
string
.
msg_no_report_data
));
}
else
{
...
...
@@ -138,7 +137,7 @@ public class OperationPanelAdapter extends AbstractOperationAdapter {
setButtonEnabled
(
holder
,
OperationButtonType
.
INFORMATION_UPDATE
,
true
);
}
else
{
// needSyncFlgがfalseの場合
if
(
operationDto
.
operationReportType
==
Constant
.
OperationReportType
.
INSPECT_REPORT
)
{
if
(
operationDto
.
operationReportType
==
Constant
.
OperationReportType
.
ROUTINE_TASK
)
{
// 定期点検プロジェクトの場合のみ、以下の処理を行う
String
syncedDate
=
getUserPref
(
mContext
,
String
.
format
(
AppDefType
.
UserPrefKey
.
SYNCED_OPERATION_ID
,
operationDto
.
operationId
),
""
);
if
(
StringUtil
.
isNullOrEmpty
(
operationDto
.
reportPeriod
)
&&
!
syncedDate
.
equals
(
DateTimeUtil
.
toString
(
DateTimeUtil
.
getCurrentSqlDate
(),
DateTimeFormat
.
yyyyMMdd_none
)))
{
...
...
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/home/helper/ABookCheckWebViewHelper.java
View file @
d7d33ed0
...
...
@@ -18,9 +18,6 @@ import java.util.Date;
import
java.util.List
;
import
java.util.Map
;
import
jp.agentec.abook.abv.bl.acms.client.AcmsClient
;
import
jp.agentec.abook.abv.bl.acms.client.json.OperationDataJSON
;
import
jp.agentec.abook.abv.bl.acms.client.parameters.GetOperationDataParameters
;
import
jp.agentec.abook.abv.bl.acms.type.OperationAuthLevel
;
import
jp.agentec.abook.abv.bl.common.ABVEnvironment
;
import
jp.agentec.abook.abv.bl.common.Callback
;
...
...
@@ -28,7 +25,6 @@ import jp.agentec.abook.abv.bl.common.CommonExecutor;
import
jp.agentec.abook.abv.bl.common.Constant
;
import
jp.agentec.abook.abv.bl.common.constant.ABookKeys
;
import
jp.agentec.abook.abv.bl.common.exception.ABVException
;
import
jp.agentec.abook.abv.bl.common.exception.NetworkDisconnectedException
;
import
jp.agentec.abook.abv.bl.common.log.Logger
;
import
jp.agentec.abook.abv.bl.data.ABVDataCache
;
import
jp.agentec.abook.abv.bl.dto.RoutineTaskReportDto
;
...
...
@@ -327,7 +323,7 @@ public class ABookCheckWebViewHelper extends ABookHelper {
mOperationLogic
.
updateSyncOperation
(
operationId
,
true
);
}
else
{
OperationDto
operationDto
=
mOperationLogic
.
getOperation
(
operationId
);
if
(
operationDto
.
operationReportType
==
Constant
.
OperationReportType
.
INSPECT_REPORT
)
{
if
(
operationDto
.
operationReportType
==
Constant
.
OperationReportType
.
ROUTINE_TASK
)
{
if
(
mOperationLogic
.
sendRoutineTaskReportSendData
(
operationId
,
taskKey
,
progressCallback
)
>
0
){
context
.
handleErrorMessageToast
(
R
.
string
.
P005
);
}
...
...
@@ -613,7 +609,7 @@ public class ABookCheckWebViewHelper extends ABookHelper {
try
{
List
<
TaskDto
>
taskDtoList
=
mOperationLogic
.
getOperationTask
(
operationId
);
for
(
TaskDto
taskDto
:
taskDtoList
)
{
if
(
operationDto
.
operationReportType
==
Constant
.
OperationReportType
.
INSPECT_REPORT
)
{
if
(
operationDto
.
operationReportType
==
Constant
.
OperationReportType
.
ROUTINE_TASK
)
{
List
<
RoutineTaskReportDto
>
listRoutineTaskReport
=
mOperationLogic
.
getRoutineTaskReportByTaskKey
(
taskDto
.
taskKey
);
for
(
RoutineTaskReportDto
routineTaskDto
:
listRoutineTaskReport
)
{
copyRoutineTaskReportAttachedMovie
(
operationId
,
contentId
,
routineTaskDto
.
taskKey
,
routineTaskDto
.
taskReportId
,
routineTaskDto
.
reportStartDate
);
...
...
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/home/helper/OperationListHelper.java
View file @
d7d33ed0
...
...
@@ -19,8 +19,10 @@ import jp.agentec.abook.abv.bl.common.log.Logger;
import
jp.agentec.abook.abv.bl.dto.OperationDto
;
import
jp.agentec.abook.abv.bl.logic.AbstractLogic
;
import
jp.agentec.abook.abv.bl.logic.OperationLogic
;
import
jp.agentec.abook.abv.cl.util.PreferenceUtil
;
import
jp.agentec.abook.abv.launcher.android.ABVApplication
;
import
jp.agentec.abook.abv.launcher.android.R
;
import
jp.agentec.abook.abv.ui.common.appinfo.AppDefType
;
import
jp.agentec.abook.abv.ui.common.appinfo.AppDefType.ViewMode
;
import
jp.agentec.abook.abv.ui.common.constant.ErrorCode
;
import
jp.agentec.abook.abv.ui.common.constant.ErrorMessage
;
...
...
@@ -43,7 +45,15 @@ public class OperationListHelper {
private
PullToRefreshListView
mPullToRefreshListView
;
private
PullToRefreshGridView
mPullToRefreshGridView
;
private
OperationLogic
mOperationLogic
=
AbstractLogic
.
getLogic
(
OperationLogic
.
class
);
private
List
<
OperationDto
>
operationDtoList
=
new
ArrayList
<>();;
private
List
<
OperationDto
>
operationDtoList
=
new
ArrayList
<>();
// スマートフォンの1行のパンネル数
private
static
final
int
NORMAL_SIZE_COLUMN
=
1
;
// タブレット縦で1行のパンネル数
private
static
final
int
LARGE_ORIENTATION_PORTRAIT_SIZE_COLUMN
=
2
;
// タブレット横で1行のパンネル数
private
static
final
int
LARGE_ORIENTATION_LANDSCAPE_SIZE_COLUMN
=
3
;
public
OperationListHelper
(
OperationListActivity
activity
)
{
mAppActivity
=
activity
;
...
...
@@ -53,7 +63,8 @@ public class OperationListHelper {
private
List
<
OperationDto
>
filterOperationList
()
{
try
{
operationDtoList
=
mOperationLogic
.
getRefreshOperation
(
mAppActivity
.
mSearchWord
,
mAppActivity
.
mStartDateStr
,
mAppActivity
.
mEndDateStr
,
mAppActivity
.
mSearchOperationReportType
);
String
operationReportTypeStr
=
PreferenceUtil
.
getUserPref
(
mAppActivity
,
AppDefType
.
UserPrefKey
.
OPERATION_REPORT_TYPES
,
null
);
operationDtoList
=
mOperationLogic
.
getRefreshOperation
(
mAppActivity
.
mSearchWord
,
mAppActivity
.
mStartDateStr
,
mAppActivity
.
mEndDateStr
,
operationReportTypeStr
);
}
catch
(
Exception
e
)
{
Logger
.
e
(
TAG
,
"findOperationList"
,
e
);
ErrorMessage
.
showErrorMessageToast
(
mAppActivity
.
getApplicationContext
(),
ErrorCode
.
E107
);
...
...
@@ -61,6 +72,7 @@ public class OperationListHelper {
return
operationDtoList
;
}
// リスト・パンネルビューの取得
public
ViewGroup
getOperationView
()
{
int
checkedViewModeId
=
ABVApplication
.
getABVUIDataCache
(
mAppActivity
).
getViewMode
();
ViewGroup
child
;
...
...
@@ -96,7 +108,20 @@ public class OperationListHelper {
child
.
setSelector
(
mAppActivity
.
getResources
().
getDrawable
(
R
.
drawable
.
grid_selecter
));
child
.
setNumColumns
(
3
);
if
(
mAppActivity
.
isNormalSize
())
{
// スマートフォンの場合、1行当たりのパンネル数
child
.
setNumColumns
(
NORMAL_SIZE_COLUMN
);
}
else
{
// タブレットの場合、1行当たりのパンネル数
if
(
mAppActivity
.
isOrientationPortrait
())
{
// 縦
child
.
setNumColumns
(
LARGE_ORIENTATION_PORTRAIT_SIZE_COLUMN
);
}
else
{
// 横
child
.
setNumColumns
(
LARGE_ORIENTATION_LANDSCAPE_SIZE_COLUMN
);
}
}
OperationPanelAdapter
adapter
=
new
OperationPanelAdapter
(
mAppActivity
,
filterOperationList
());
child
.
setAdapter
(
adapter
);
...
...
@@ -123,7 +148,7 @@ public class OperationListHelper {
}
});
// リスト
以外の
クリック処理
// リスト
の要素であるボタン
クリック処理
adapter
.
setAdapterListener
(
new
AbstractOperationAdapter
.
AbstractOperationListAdapterListener
()
{
@Override
public
void
onPanoEdit
(
OperationDto
operationDto
)
{
...
...
@@ -210,6 +235,9 @@ public class OperationListHelper {
return
mPullToRefreshListView
;
}
/**
* 作業の画面更新
*/
public
void
refreshList
()
{
if
(
mAdapter
!=
null
)
{
mAdapter
.
setItem
(
filterOperationList
());
...
...
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