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
815b1a49
Commit
815b1a49
authored
Jul 01, 2019
by
Lee Jaebin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#34190 作業種別毎に作業を絞り込み機能追加
parent
1e37ede3
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
91 additions
and
25 deletions
+91
-25
ABVJE_BL/src/jp/agentec/abook/abv/bl/data/dao/OperationGroupMasterDao.java
+33
-2
ABVJE_BL/src/jp/agentec/abook/abv/bl/logic/OperationGroupMasterLogic.java
+8
-3
ABVJE_UI_Android/res/layout/list_dialog.xml
+14
-5
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/common/view/ABVListDialog.java
+17
-2
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/home/activity/OperationListActivity.java
+19
-13
No files found.
ABVJE_BL/src/jp/agentec/abook/abv/bl/data/dao/OperationGroupMasterDao.java
View file @
815b1a49
package
jp
.
agentec
.
abook
.
abv
.
bl
.
data
.
dao
;
package
jp
.
agentec
.
abook
.
abv
.
bl
.
data
.
dao
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.List
;
import
jp.agentec.abook.abv.bl.acms.type.SearchDivisionType
;
import
jp.agentec.abook.abv.bl.acms.type.SearchDivisionType
;
...
@@ -9,6 +10,8 @@ import jp.agentec.abook.abv.bl.common.db.SQLiteDatabase;
...
@@ -9,6 +10,8 @@ import jp.agentec.abook.abv.bl.common.db.SQLiteDatabase;
import
jp.agentec.abook.abv.bl.common.log.Logger
;
import
jp.agentec.abook.abv.bl.common.log.Logger
;
import
jp.agentec.abook.abv.bl.dto.GroupDto
;
import
jp.agentec.abook.abv.bl.dto.GroupDto
;
import
jp.agentec.abook.abv.bl.dto.OperationGroupMasterDto
;
import
jp.agentec.abook.abv.bl.dto.OperationGroupMasterDto
;
import
jp.agentec.adf.util.DateTimeFormat
;
import
jp.agentec.adf.util.DateTimeUtil
;
import
jp.agentec.adf.util.NumericUtil
;
import
jp.agentec.adf.util.NumericUtil
;
import
jp.agentec.adf.util.StringUtil
;
import
jp.agentec.adf.util.StringUtil
;
...
@@ -152,17 +155,45 @@ public class OperationGroupMasterDao extends AbstractDao {
...
@@ -152,17 +155,45 @@ public class OperationGroupMasterDao extends AbstractDao {
}
}
/**
/**
* 階層の作業種別情報取得
* 階層の作業種別情報取得(検索結果を元にデータ取得)
* @param searchOperationName
* @param searchStartDateStr
* @param searchEndDateStr
* @param reportTypeStr
* @param level
* @param level
* @return
* @return
*/
*/
public
List
<
OperationGroupMasterDto
>
getOperationGroupMasterListBylevel
(
Integer
level
)
{
public
List
<
OperationGroupMasterDto
>
getOperationGroupMasterListBylevel
(
String
searchOperationName
,
String
searchStartDateStr
,
String
searchEndDateStr
,
String
reportTypeStr
,
Integer
level
)
{
StringBuffer
sql
=
new
StringBuffer
();
StringBuffer
sql
=
new
StringBuffer
();
sql
.
append
(
" SELECT M1.*, count(R1.operation_id) AS operation_count FROM m_operation_group_master AS M1"
);
sql
.
append
(
" SELECT M1.*, count(R1.operation_id) AS operation_count FROM m_operation_group_master AS M1"
);
sql
.
append
(
" LEFT OUTER JOIN r_operation_group_master_relation R1"
);
sql
.
append
(
" LEFT OUTER JOIN r_operation_group_master_relation R1"
);
sql
.
append
(
" ON R1.operation_group_master_id = M1.operation_group_master_id"
);
sql
.
append
(
" ON R1.operation_group_master_id = M1.operation_group_master_id"
);
sql
.
append
(
" AND R1.operation_id IN("
);
sql
.
append
(
" SELECT operation_id FROM t_operation top"
);
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
(
" )"
);
sql
.
append
(
" WHERE M1.operation_group_master_level =? "
);
sql
.
append
(
" WHERE M1.operation_group_master_level =? "
);
sql
.
append
(
" GROUP BY M1.operation_group_master_id"
);
sql
.
append
(
" GROUP BY M1.operation_group_master_id"
);
Logger
.
v
(
TAG
,
"sql=%s"
,
sql
);
return
rawQueryGetDtoList
(
sql
.
toString
(),
new
String
[]{
""
+
level
},
OperationGroupMasterDto
.
class
);
return
rawQueryGetDtoList
(
sql
.
toString
(),
new
String
[]{
""
+
level
},
OperationGroupMasterDto
.
class
);
}
}
...
...
ABVJE_BL/src/jp/agentec/abook/abv/bl/logic/OperationGroupMasterLogic.java
View file @
815b1a49
...
@@ -14,6 +14,7 @@ import jp.agentec.abook.abv.bl.common.exception.AcmsException;
...
@@ -14,6 +14,7 @@ import jp.agentec.abook.abv.bl.common.exception.AcmsException;
import
jp.agentec.abook.abv.bl.common.exception.NetworkDisconnectedException
;
import
jp.agentec.abook.abv.bl.common.exception.NetworkDisconnectedException
;
import
jp.agentec.abook.abv.bl.common.log.Logger
;
import
jp.agentec.abook.abv.bl.common.log.Logger
;
import
jp.agentec.abook.abv.bl.data.dao.AbstractDao
;
import
jp.agentec.abook.abv.bl.data.dao.AbstractDao
;
import
jp.agentec.abook.abv.bl.data.dao.OperationDao
;
import
jp.agentec.abook.abv.bl.data.dao.OperationGroupMasterDao
;
import
jp.agentec.abook.abv.bl.data.dao.OperationGroupMasterDao
;
import
jp.agentec.abook.abv.bl.data.dao.OperationGroupMasterOperationDao
;
import
jp.agentec.abook.abv.bl.data.dao.OperationGroupMasterOperationDao
;
import
jp.agentec.abook.abv.bl.dto.OperationGroupMasterDto
;
import
jp.agentec.abook.abv.bl.dto.OperationGroupMasterDto
;
...
@@ -116,12 +117,16 @@ public class OperationGroupMasterLogic extends AbstractLogic {
...
@@ -116,12 +117,16 @@ public class OperationGroupMasterLogic extends AbstractLogic {
/**
/**
* 作業種別毎に作業数(子グループの作業も含む)を
* 作業種別毎に作業数(子グループの作業も含む)を
* operationCountMapにセットする
* operationCountMapにセットする
* @param searchOperationName
* @param searchStartDateStr
* @param searchEndDateStr
* @param reportTypeStr
* @param level
* @param level
* @param operationCountMap
* @param operationCountMap
*/
*/
public
void
getAllOperationCount
(
int
level
,
Map
<
Integer
,
Integer
>
operationCountMap
)
{
public
void
getAllOperationCount
(
String
searchOperationName
,
String
searchStartDateStr
,
String
searchEndDateStr
,
String
reportTypeStr
,
int
level
,
Map
<
Integer
,
Integer
>
operationCountMap
)
{
List
<
OperationGroupMasterDto
>
operationGroupMasterDtoList
;
List
<
OperationGroupMasterDto
>
operationGroupMasterDtoList
;
operationGroupMasterDtoList
=
mOperationGroupMasterDao
.
getOperationGroupMasterListBylevel
(
level
);
operationGroupMasterDtoList
=
mOperationGroupMasterDao
.
getOperationGroupMasterListBylevel
(
searchOperationName
,
searchStartDateStr
,
searchEndDateStr
,
reportTypeStr
,
level
);
// ルート階層の場合は以下の処理しない
// ルート階層の場合は以下の処理しない
if
(
level
>
0
&&
operationGroupMasterDtoList
!=
null
)
{
if
(
level
>
0
&&
operationGroupMasterDtoList
!=
null
)
{
...
@@ -144,7 +149,7 @@ public class OperationGroupMasterLogic extends AbstractLogic {
...
@@ -144,7 +149,7 @@ public class OperationGroupMasterLogic extends AbstractLogic {
}
}
}
}
level
--;
level
--;
getAllOperationCount
(
level
,
operationCountMap
);
// 再帰呼び出し
getAllOperationCount
(
searchOperationName
,
searchStartDateStr
,
searchEndDateStr
,
reportTypeStr
,
level
,
operationCountMap
);
// 再帰呼び出し
}
}
}
}
...
...
ABVJE_UI_Android/res/layout/list_dialog.xml
View file @
815b1a49
...
@@ -10,6 +10,15 @@
...
@@ -10,6 +10,15 @@
android:id=
"@+id/toolbar"
android:id=
"@+id/toolbar"
style=
"@style/DialogToolBarHolo"
>
style=
"@style/DialogToolBarHolo"
>
<Button
android:id=
"@+id/popup_left_title"
style=
"@style/ButtonABookLight"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_alignParentLeft=
"true"
android:layout_centerVertical=
"true"
android:visibility=
"gone"
/>
<TextView
<TextView
android:id=
"@+id/popup_title"
android:id=
"@+id/popup_title"
style=
"@style/DialogToolBarTitle"
style=
"@style/DialogToolBarTitle"
...
@@ -48,24 +57,24 @@
...
@@ -48,24 +57,24 @@
</LinearLayout>
</LinearLayout>
<LinearLayout
<LinearLayout
android:id=
"@+id/
left
_item"
android:id=
"@+id/
header
_item"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:background=
"@drawable/btn_layout"
android:background=
"@drawable/btn_layout"
android:orientation=
"vertical"
android:orientation=
"vertical"
android:paddingLeft=
"10dp"
android:paddingBottom=
"8dp"
android:paddingBottom=
"8dp"
android:visibility=
"gone"
>
<!-- ツールバー背景イメージの影の高さがあるため、8dpほどpaddingを入れる -->
android:paddingLeft=
"10dp"
android:visibility=
"gone"
>
<!-- ツールバー背景イメージの影の高さがあるため、8dpほどpaddingを入れる -->
<TextView
<TextView
android:id=
"@+id/header_title"
android:id=
"@+id/header_title"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:drawableLeft=
"@drawable/blue_arrow_up"
android:drawableLeft=
"@drawable/blue_arrow_up"
android:gravity=
"center_vertical"
android:gravity=
"center_vertical"
android:maxLines=
"1"
android:text=
"@string/dummy_str"
android:text=
"@string/dummy_str"
android:textColor=
"@color/text_select"
android:textColor=
"@color/text_select"
android:textSize=
"@dimen/app_normal_text_size"
android:textSize=
"@dimen/app_normal_text_size"
/>
android:maxLines=
"1"
/>
</LinearLayout>
</LinearLayout>
<View
<View
...
...
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/common/view/ABVListDialog.java
View file @
815b1a49
...
@@ -103,7 +103,7 @@ public class ABVListDialog extends Dialog {
...
@@ -103,7 +103,7 @@ public class ABVListDialog extends Dialog {
getListView
().
setOnItemLongClickListener
(
listener
);
getListView
().
setOnItemLongClickListener
(
listener
);
}
}
public
void
set
Left
ItemOnClickListener
(
String
itemName
,
View
.
OnClickListener
l
)
{
public
void
set
Header
ItemOnClickListener
(
String
itemName
,
View
.
OnClickListener
l
)
{
// Button itemButton = (Button) mRoot.findViewById(R.id.popup_title_left);
// Button itemButton = (Button) mRoot.findViewById(R.id.popup_title_left);
// if (itemButton != null) {
// if (itemButton != null) {
// itemButton.setVisibility(View.VISIBLE);
// itemButton.setVisibility(View.VISIBLE);
...
@@ -111,7 +111,7 @@ public class ABVListDialog extends Dialog {
...
@@ -111,7 +111,7 @@ public class ABVListDialog extends Dialog {
// itemButton.setOnClickListener(l);
// itemButton.setOnClickListener(l);
// } else {
// } else {
// 携帯の場合
// 携帯の場合
LinearLayout
linearLayout
=
(
LinearLayout
)
mRoot
.
findViewById
(
R
.
id
.
left
_item
);
LinearLayout
linearLayout
=
(
LinearLayout
)
mRoot
.
findViewById
(
R
.
id
.
header
_item
);
linearLayout
.
setOnClickListener
(
l
);
linearLayout
.
setOnClickListener
(
l
);
linearLayout
.
setVisibility
(
View
.
VISIBLE
);
linearLayout
.
setVisibility
(
View
.
VISIBLE
);
TextView
textView
=
(
TextView
)
mRoot
.
findViewById
(
R
.
id
.
header_title
);
TextView
textView
=
(
TextView
)
mRoot
.
findViewById
(
R
.
id
.
header_title
);
...
@@ -119,6 +119,21 @@ public class ABVListDialog extends Dialog {
...
@@ -119,6 +119,21 @@ public class ABVListDialog extends Dialog {
textView
.
setText
(
String
.
format
(
suffixText
,
itemName
));
textView
.
setText
(
String
.
format
(
suffixText
,
itemName
));
// }
// }
}
}
/**
* 左側の要素イベント
* @param itemName
* @param l
*/
public
void
setLeftItemOnClickListener
(
String
itemName
,
View
.
OnClickListener
l
)
{
Button
itemButton
=
(
Button
)
mRoot
.
findViewById
(
R
.
id
.
popup_left_title
);
if
(
itemButton
!=
null
)
{
itemButton
.
setText
(
itemName
);
itemButton
.
setVisibility
(
View
.
VISIBLE
);
itemButton
.
setOnClickListener
(
l
);
}
}
public
void
setRightItemOnClickListener
(
int
resId
,
View
.
OnClickListener
l
)
{
public
void
setRightItemOnClickListener
(
int
resId
,
View
.
OnClickListener
l
)
{
ImageButton
itemButton
=
(
ImageButton
)
mRoot
.
findViewById
(
R
.
id
.
popup_right_image
);
ImageButton
itemButton
=
(
ImageButton
)
mRoot
.
findViewById
(
R
.
id
.
popup_right_image
);
if
(
itemButton
!=
null
)
{
if
(
itemButton
!=
null
)
{
...
...
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/home/activity/OperationListActivity.java
View file @
815b1a49
...
@@ -133,8 +133,6 @@ public class OperationListActivity extends ABVUIActivity {
...
@@ -133,8 +133,6 @@ public class OperationListActivity extends ABVUIActivity {
private
ImageButton
mCommunicationButton
;
private
ImageButton
mCommunicationButton
;
private
ImageButton
mCommonContentButton
;
private
ImageButton
mCommonContentButton
;
private
List
<
OperationDto
>
mOperationList
;
public
String
mSearchWord
;
public
String
mSearchWord
;
public
String
mStartDateStr
;
public
String
mStartDateStr
;
public
String
mEndDateStr
;
public
String
mEndDateStr
;
...
@@ -254,19 +252,13 @@ public class OperationListActivity extends ABVUIActivity {
...
@@ -254,19 +252,13 @@ public class OperationListActivity extends ABVUIActivity {
mOperationGroupMasterButton
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
mOperationGroupMasterButton
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
@Override
@Override
public
void
onClick
(
View
v
)
{
public
void
onClick
(
View
v
)
{
// インジケーター表示
showProgressPopup
();
showProgressPopup
();
if
(
getABVUIDataCache
().
getOperationGroupMasterMode
()
==
AppDefType
.
OperationGroupMasterMode
.
NO
)
{
getABVUIDataCache
().
setOperationGroupMasterMode
(
AppDefType
.
OperationGroupMasterMode
.
YES
);
getABVUIDataCache
().
setOperationGroupMasterMode
(
AppDefType
.
OperationGroupMasterMode
.
YES
);
}
else
{
getABVUIDataCache
().
setOperationGroupMasterMode
(
AppDefType
.
OperationGroupMasterMode
.
NO
);
}
mListHelper
=
getListHelper
();
setOperationListView
();
setOperationListView
();
//作業種別モードの場合は、作業種別選択ダイアログ画面を表示
//作業種別モードの場合は、作業種別選択ダイアログ画面を表示
if
(
getABVUIDataCache
().
getOperationGroupMasterMode
()
==
AppDefType
.
OperationGroupMasterMode
.
YES
)
{
showOperationGroupMasterDialog
(
true
,
false
);
showOperationGroupMasterDialog
(
true
,
false
);
}
}
}
});
});
...
@@ -373,6 +365,9 @@ public class OperationListActivity extends ABVUIActivity {
...
@@ -373,6 +365,9 @@ public class OperationListActivity extends ABVUIActivity {
private
void
configurationToolbarIcon
()
{
private
void
configurationToolbarIcon
()
{
// ツールバーの検索結果レイアウトの表示・非表示
checkShowSearchResult
();
List
<
PushMessageDto
>
pushMessageDtoList
=
mPushMessageLogic
.
getAllPushMessageList
();
List
<
PushMessageDto
>
pushMessageDtoList
=
mPushMessageLogic
.
getAllPushMessageList
();
boolean
existUnreadFlg
=
false
;
boolean
existUnreadFlg
=
false
;
...
@@ -1985,7 +1980,8 @@ public class OperationListActivity extends ABVUIActivity {
...
@@ -1985,7 +1980,8 @@ public class OperationListActivity extends ABVUIActivity {
Integer
lastLevel
=
mOperationGroupMasterLogic
.
getLastGroupLevel
();
Integer
lastLevel
=
mOperationGroupMasterLogic
.
getLastGroupLevel
();
operationCountMap
=
new
HashMap
<
Integer
,
Integer
>();
operationCountMap
=
new
HashMap
<
Integer
,
Integer
>();
// 作業種別毎に作業数をMapにセット
// 作業種別毎に作業数をMapにセット
mOperationGroupMasterLogic
.
getAllOperationCount
(
lastLevel
,
operationCountMap
);
String
reportTypeStr
=
getUserPref
(
AppDefType
.
UserPrefKey
.
OPERATION_REPORT_TYPES
,
null
);
mOperationGroupMasterLogic
.
getAllOperationCount
(
mSearchWord
,
mStartDateStr
,
mEndDateStr
,
reportTypeStr
,
lastLevel
,
operationCountMap
);
}
}
// 既にダイアログが存在するか、開いた状態である場合は何もしない
// 既にダイアログが存在するか、開いた状態である場合は何もしない
if
(
mShowDialog
!=
null
&&
mShowDialog
.
isShowing
())
{
if
(
mShowDialog
!=
null
&&
mShowDialog
.
isShowing
())
{
...
@@ -2001,6 +1997,16 @@ public class OperationListActivity extends ABVUIActivity {
...
@@ -2001,6 +1997,16 @@ public class OperationListActivity extends ABVUIActivity {
dialog
.
setTitle
(
helper
.
getPeekName
(),
R
.
drawable
.
ic_title_group
);
dialog
.
setTitle
(
helper
.
getPeekName
(),
R
.
drawable
.
ic_title_group
);
dialog
.
setLeftItemOnClickListener
(
"解除"
,
new
View
.
OnClickListener
()
{
@Override
public
void
onClick
(
View
v
)
{
dialog
.
dismiss
();
getABVUIDataCache
().
setOperationGroupMasterMode
(
AppDefType
.
OperationGroupMasterMode
.
NO
);
setOperationListView
();
}
});
// autoCloseがtrueの場合、下位階層が存在しなければreturnで以下の処理は行わない
// autoCloseがtrueの場合、下位階層が存在しなければreturnで以下の処理は行わない
if
(
autoClose
&&
operationGroupMasterDtoList
.
size
()
<
1
)
{
if
(
autoClose
&&
operationGroupMasterDtoList
.
size
()
<
1
)
{
return
;
return
;
...
@@ -2025,7 +2031,7 @@ public class OperationListActivity extends ABVUIActivity {
...
@@ -2025,7 +2031,7 @@ public class OperationListActivity extends ABVUIActivity {
if
(
helper
.
getStackSize
()
>
1
)
{
if
(
helper
.
getStackSize
()
>
1
)
{
dialog
.
setListViewAdapter
(
adapter
);
dialog
.
setListViewAdapter
(
adapter
);
String
backToName
=
helper
.
getPrePeekName
();
String
backToName
=
helper
.
getPrePeekName
();
dialog
.
set
Left
ItemOnClickListener
(
backToName
,
new
View
.
OnClickListener
()
{
dialog
.
set
Header
ItemOnClickListener
(
backToName
,
new
View
.
OnClickListener
()
{
@Override
@Override
public
void
onClick
(
View
v
)
{
public
void
onClick
(
View
v
)
{
OperationGroupMasterListHelper
helper
=
(
OperationGroupMasterListHelper
)
mListHelper
;
OperationGroupMasterListHelper
helper
=
(
OperationGroupMasterListHelper
)
mListHelper
;
...
...
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