Commit b6731bf7 by Lee Jaebin

#34190 作業種別毎に作業を絞り込み機能追加

parent fd257eb8
...@@ -62,6 +62,8 @@ public class ABVEnvironment { ...@@ -62,6 +62,8 @@ public class ABVEnvironment {
// Serverから取得したcontentVersion時のリソースパターンを一時的に保存するための変数 // Serverから取得したcontentVersion時のリソースパターンを一時的に保存するための変数
public int resourcePatternType; public int resourcePatternType;
public boolean operationGroupMasterClearFlg;
////////////////////////////// 定数 ////////////////////////////////// ////////////////////////////// 定数 //////////////////////////////////
private static final String ServerTimeKey = "ABook"; private static final String ServerTimeKey = "ABook";
...@@ -227,6 +229,22 @@ public class ABVEnvironment { ...@@ -227,6 +229,22 @@ public class ABVEnvironment {
return logLevel; return logLevel;
} }
/**
* 作業種別のクリア判定フラグをセット
* @param clearFlg
*/
public void setOperationGroupMasterClearFlg(boolean clearFlg) {
this.operationGroupMasterClearFlg = clearFlg;
}
/**
* 作業種別のクリア判定フラグ取得
* @return
*/
public boolean getOperationGroupMasterClearFlg() {
return operationGroupMasterClearFlg;
}
///////////////////////////////////////     以下ファイルパス関係     /////////////////////////////////////// ///////////////////////////////////////     以下ファイルパス関係     ///////////////////////////////////////
......
...@@ -243,11 +243,10 @@ public class OperationDao extends AbstractDao { ...@@ -243,11 +243,10 @@ public class OperationDao extends AbstractDao {
* @param searchStartDateStr * @param searchStartDateStr
* @param searchEndDateStr * @param searchEndDateStr
* @param reportTypeStr * @param reportTypeStr
* @param operationGroupMasterId
* @return * @return
*/ */
public List<OperationDto> getOperations(String searchOperationName, String searchStartDateStr, String searchEndDateStr, String reportTypeStr, Integer operationGroupMasterId) { public List<OperationDto> getOperations(String searchOperationName, String searchStartDateStr, String searchEndDateStr, String reportTypeStr) {
String sql = generateGetOperationQuery(searchOperationName, searchStartDateStr, searchEndDateStr, reportTypeStr, operationGroupMasterId); String sql = generateGetOperationQuery(searchOperationName, searchStartDateStr, searchEndDateStr, reportTypeStr);
return rawQueryGetDtoList(sql, null, OperationDto.class); return rawQueryGetDtoList(sql, null, OperationDto.class);
} }
...@@ -258,10 +257,9 @@ public class OperationDao extends AbstractDao { ...@@ -258,10 +257,9 @@ public class OperationDao extends AbstractDao {
* @param searchStartDateStr * @param searchStartDateStr
* @param searchEndDateStr * @param searchEndDateStr
* @param reportTypeStr * @param reportTypeStr
* @param operationGroupMasterId
* @return * @return
*/ */
private String generateGetOperationQuery(String searchOperationName, String searchStartDateStr, String searchEndDateStr, String reportTypeStr, Integer operationGroupMasterId) { private String generateGetOperationQuery(String searchOperationName, String searchStartDateStr, String searchEndDateStr, String reportTypeStr) {
String curDate = DateTimeUtil.toStringInTimeZone(new Date(), DateTimeFormat.yyyyMMddHHmmss_hyphen, "UTC"); String curDate = DateTimeUtil.toStringInTimeZone(new Date(), DateTimeFormat.yyyyMMddHHmmss_hyphen, "UTC");
StringBuffer sql = new StringBuffer(); StringBuffer sql = new StringBuffer();
...@@ -306,12 +304,6 @@ public class OperationDao extends AbstractDao { ...@@ -306,12 +304,6 @@ public class OperationDao extends AbstractDao {
sql.append(" LEFT OUTER JOIN r_operation_content AS rpc "); sql.append(" LEFT OUTER JOIN r_operation_content AS rpc ");
sql.append(" ON top.operation_id = rpc.operation_id "); sql.append(" ON top.operation_id = rpc.operation_id ");
sql.append(" AND rpc.operation_content_flg = 1 "); sql.append(" AND rpc.operation_content_flg = 1 ");
// 作業種別IDに紐づく作業のみ検索するため、INNER JOINする
if (operationGroupMasterId != null) {
sql.append(" INNER JOIN r_operation_group_master_relation AS rogmo ");
sql.append(" ON rogmo.operation_id = top.operation_id ");
sql.append(" AND rogmo.operation_group_master_id =" + operationGroupMasterId);
}
sql.append(" WHERE top.operation_id IS NOT NULL "); sql.append(" WHERE top.operation_id IS NOT NULL ");
if (!StringUtil.isNullOrEmpty(searchOperationName)) { if (!StringUtil.isNullOrEmpty(searchOperationName)) {
sql.append(" AND top.operation_name GLOB " + "'*" + searchOperationName + "*'"); sql.append(" AND top.operation_name GLOB " + "'*" + searchOperationName + "*'");
...@@ -353,12 +345,12 @@ public class OperationDao extends AbstractDao { ...@@ -353,12 +345,12 @@ public class OperationDao extends AbstractDao {
* @return 作業リスト * @return 作業リスト
*/ */
public List<OperationDto> getOperationByReportType(Integer reportType) { public List<OperationDto> getOperationByReportType(Integer reportType) {
StringBuffer sql = new StringBuffer(); StringBuffer sql = new StringBuffer();
sql.append(" SELECT * "); sql.append(" SELECT * ");
sql.append(" FROM t_operation "); sql.append(" FROM t_operation ");
sql.append(" WHERE report_type = ?"); sql.append(" WHERE report_type = ?");
return rawQueryGetDtoList(sql.toString(), new String[] { "" + reportType }, OperationDto.class); return rawQueryGetDtoList(sql.toString(), new String[] { "" + reportType }, OperationDto.class);
} }
/** /**
* ユーザ情報でグループが変更した時のみ使用 * ユーザ情報でグループが変更した時のみ使用
...@@ -370,4 +362,19 @@ public class OperationDao extends AbstractDao { ...@@ -370,4 +362,19 @@ public class OperationDao extends AbstractDao {
updateNeedSyncFlg(operationDto.operationId, true); updateNeedSyncFlg(operationDto.operationId, true);
} }
} }
/**
* 作業種別IDで関連する作業リストを取得
* @param operationGroupMasterId
* @return
*/
public List<OperationDto> getOperationByOperationGroupMasterId(Integer operationGroupMasterId) {
StringBuffer sql = new StringBuffer();
sql.append(" SELECT * ");
sql.append(" FROM t_operation AS top");
sql.append(" INNER JOIN r_operation_group_master_relation AS rog");
sql.append(" ON rog.operation_id = top.operation_id");
sql.append(" WHERE rog.operation_group_master_id = ?");
return rawQueryGetDtoList(sql.toString(), new String[] { "" + operationGroupMasterId }, OperationDto.class);
}
} }
\ No newline at end of file
...@@ -8,11 +8,15 @@ import java.util.Map; ...@@ -8,11 +8,15 @@ import java.util.Map;
import jp.agentec.abook.abv.bl.acms.client.AcmsClient; import jp.agentec.abook.abv.bl.acms.client.AcmsClient;
import jp.agentec.abook.abv.bl.acms.client.json.OperationGroupMasterJSON; import jp.agentec.abook.abv.bl.acms.client.json.OperationGroupMasterJSON;
import jp.agentec.abook.abv.bl.acms.client.parameters.AcmsParameters; import jp.agentec.abook.abv.bl.acms.client.parameters.AcmsParameters;
import jp.agentec.abook.abv.bl.common.ABVEnvironment;
import jp.agentec.abook.abv.bl.common.exception.AcmsException; 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.ABVDataCache;
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.dto.OperationDto;
import jp.agentec.abook.abv.bl.dto.OperationGroupMasterDto; import jp.agentec.abook.abv.bl.dto.OperationGroupMasterDto;
import jp.agentec.abook.abv.bl.dto.OperationGroupMasterRelationDto; import jp.agentec.abook.abv.bl.dto.OperationGroupMasterRelationDto;
import jp.agentec.abook.abv.bl.dto.comparator.OperationGroupMasterLevelComparator; import jp.agentec.abook.abv.bl.dto.comparator.OperationGroupMasterLevelComparator;
...@@ -25,48 +29,58 @@ public class OperationGroupMasterLogic extends AbstractLogic { ...@@ -25,48 +29,58 @@ public class OperationGroupMasterLogic extends AbstractLogic {
private static final String TAG = "OperationGroupMasterLogic"; private static final String TAG = "OperationGroupMasterLogic";
private OperationGroupMasterDao mOperationGroupMasterDao = AbstractDao.getDao(OperationGroupMasterDao.class); private OperationGroupMasterDao mOperationGroupMasterDao = AbstractDao.getDao(OperationGroupMasterDao.class);
private OperationDao mOperationDao = AbstractDao.getDao(OperationDao.class);
/** /**
* 作業種別・作業種別に紐づいた作業IDを取得して * 作業種別・作業種別に紐づいた作業IDを取得して
* DBに登録する * DBに登録する
*/ */
public void setOperationGroupMaster() throws NetworkDisconnectedException, AcmsException { public void setOperationGroupMaster() throws NetworkDisconnectedException, AcmsException {
try {
// サーバー通信で、作業種別情報を取得する
List<OperationGroupMasterDto> serverOperationGroupMasterDtos = getOperationGroupMasterServerData();
// ローカルDBに存在する作業種別情報をDto配列でセット
List<OperationGroupMasterDto> localOperationGroupMasterDtos = mOperationGroupMasterDao.getAllOperationGroupMaster();
List<Integer> localOperationGroupMasterIds = new ArrayList<Integer>();
boolean updateFlg = false;
for (OperationGroupMasterDto serverOperationGroupMasterDto : serverOperationGroupMasterDtos) {
// DB登録フラグ
boolean insertFlg = true;
for (OperationGroupMasterDto localOperationGroupMasterDto : localOperationGroupMasterDtos) {
// サーバーで取得したIDでローカルに存在するか比較して、更新・登録を判定
if (serverOperationGroupMasterDto.operationGroupMasterId == localOperationGroupMasterDto.operationGroupMasterId) {
// DB更新処理(作業種別の親階層が変更されたか、作業種別名が変更されたときのみ)
if (serverOperationGroupMasterDto.parentOperationGroupMasterId != localOperationGroupMasterDto.parentOperationGroupMasterId || !serverOperationGroupMasterDto.operationGroupMasterName.equals(localOperationGroupMasterDto.operationGroupMasterName)) {
Logger.d(TAG, "[UPDATE] OperationGroupMaster operationGroupMasterId=" + serverOperationGroupMasterDto.operationGroupMasterId + " operationGroupMasterName=" + serverOperationGroupMasterDto.operationGroupMasterName);
mOperationGroupMasterDao.updateOperationGroupMaster(serverOperationGroupMasterDto);
updateFlg = true;
}
// 更新処理が終わったら登録フラグをfalseにしてlocalOperationGroupMasterDtosから除外する
insertFlg = false;
localOperationGroupMasterDtos.remove(localOperationGroupMasterDto);
break;
}
}
// サーバー通信で、作業種別情報を取得する // 更新されたら以下の処理は行わない
List<OperationGroupMasterDto> serverOperationGroupMasterDtos = getOperationGroupMasterServerData(); if (insertFlg) {
// ローカルDBに存在する作業種別情報をDto配列でセット Logger.d(TAG, "[INSERT] OperationGroupMaster operationGroupMasterId=" + serverOperationGroupMasterDto.operationGroupMasterId + " operationGroupMasterName=" + serverOperationGroupMasterDto.operationGroupMasterName);
List<OperationGroupMasterDto> localOperationGroupMasterDtos = mOperationGroupMasterDao.getAllOperationGroupMaster(); // DB登録処理
List<Integer> localOperationGroupMasterIds = new ArrayList<Integer>(); mOperationGroupMasterDao.insertOperationGroupMaster(serverOperationGroupMasterDto);
for (OperationGroupMasterDto serverOperationGroupMasterDto : serverOperationGroupMasterDtos) {
// DB登録フラグ
boolean insertFlg = true;
for (OperationGroupMasterDto localOperationGroupMasterDto : localOperationGroupMasterDtos) {
// サーバーで取得したIDでローカルに存在するか比較して、更新・登録を判定
if (serverOperationGroupMasterDto.operationGroupMasterId == localOperationGroupMasterDto.operationGroupMasterId) {
// DB更新処理
Logger.d(TAG, "[UPDATE] OperationGroupMaster operationGroupMasterId=" + serverOperationGroupMasterDto.operationGroupMasterId + " operationGroupMasterName=" + serverOperationGroupMasterDto.operationGroupMasterName);
mOperationGroupMasterDao.updateOperationGroupMaster(serverOperationGroupMasterDto);
// 更新処理が終わったら登録フラグをfalseにしてlocalOperationGroupMasterDtosから除外する
insertFlg = false;
localOperationGroupMasterDtos.remove(localOperationGroupMasterDto);
break;
} }
} }
// 更新されたら以下の処理は行わない // 作業種別関連テーブルの削除処理
if (insertFlg) { for (OperationGroupMasterDto deleteOperationGroupMasterDto : localOperationGroupMasterDtos) {
Logger.d(TAG, "[INSERT] OperationGroupMaster operationGroupMasterId=" + serverOperationGroupMasterDto.operationGroupMasterId + " operationGroupMasterName=" + serverOperationGroupMasterDto.operationGroupMasterName); updateFlg = true;
// DB登録処理 mOperationGroupMasterDao.delete(deleteOperationGroupMasterDto);
mOperationGroupMasterDao.insertOperationGroupMaster(serverOperationGroupMasterDto);
} }
}
// 作業種別関連テーブルの削除処理 // 作業種別のクリアフラグをセット
for (OperationGroupMasterDto deleteOperationGroupMasterDto : localOperationGroupMasterDtos) { ABVEnvironment.getInstance().setOperationGroupMasterClearFlg(updateFlg);
mOperationGroupMasterDao.delete(deleteOperationGroupMasterDto); } catch (Exception e) {
Logger.e(e.getMessage());
} }
} }
...@@ -129,7 +143,12 @@ public class OperationGroupMasterLogic extends AbstractLogic { ...@@ -129,7 +143,12 @@ public class OperationGroupMasterLogic extends AbstractLogic {
return mOperationGroupMasterDao.getLastGroupLevel(); return mOperationGroupMasterDao.getLastGroupLevel();
} }
public List<OperationGroupMasterDto> test (Integer operationGroupMasterId) { /**
* 親の階層パスをリストでセット
* @param operationGroupMasterId
* @return
*/
public List<OperationGroupMasterDto> getParentOperationGroupMasterForPath (Integer operationGroupMasterId) {
List<OperationGroupMasterDto> operationGroupMasterDtoList = new ArrayList<OperationGroupMasterDto>(); List<OperationGroupMasterDto> operationGroupMasterDtoList = new ArrayList<OperationGroupMasterDto>();
// 作業種別DTO取得 // 作業種別DTO取得
OperationGroupMasterDto dto = mOperationGroupMasterDao.getOperationGroupMaster(operationGroupMasterId); OperationGroupMasterDto dto = mOperationGroupMasterDao.getOperationGroupMaster(operationGroupMasterId);
...@@ -144,4 +163,13 @@ public class OperationGroupMasterLogic extends AbstractLogic { ...@@ -144,4 +163,13 @@ public class OperationGroupMasterLogic extends AbstractLogic {
Collections.sort(operationGroupMasterDtoList, new OperationGroupMasterLevelComparator()); Collections.sort(operationGroupMasterDtoList, new OperationGroupMasterLevelComparator());
return operationGroupMasterDtoList; return operationGroupMasterDtoList;
} }
/**
* 作業種別IDで関連する作業リストを取得
* @param operationGroupMasterId
* @return
*/
public List<OperationDto> getOperationByOperationGroupMasterId(Integer operationGroupMasterId) {
return mOperationDao.getOperationByOperationGroupMasterId(operationGroupMasterId);
}
} }
...@@ -1074,9 +1074,9 @@ public class OperationLogic extends AbstractLogic { ...@@ -1074,9 +1074,9 @@ public class OperationLogic extends AbstractLogic {
* @param searchEndDateStr * @param searchEndDateStr
* @return * @return
*/ */
public List<OperationDto> getRefreshOperation(String searchWord, String searchStartDateStr, String searchEndDateStr, String reportTypeStr, Integer operationGroupMasterId) { public List<OperationDto> getRefreshOperation(String searchWord, String searchStartDateStr, String searchEndDateStr, String reportTypeStr) {
List<OperationDto> operationDtoList; List<OperationDto> operationDtoList;
operationDtoList = mOperationDao.getOperations(searchWord, searchStartDateStr, searchEndDateStr, reportTypeStr, operationGroupMasterId); operationDtoList = mOperationDao.getOperations(searchWord, searchStartDateStr, searchEndDateStr, reportTypeStr);
for (OperationDto operationDto : operationDtoList) { for (OperationDto operationDto : operationDtoList) {
// 作業送信フラグが存在する場合またはホットスポット更新フラグが存在する場合、needSyncFlgをtrueにセット // 作業送信フラグが存在する場合またはホットスポット更新フラグが存在する場合、needSyncFlgをtrueにセット
if (mTaskReportDao.isExistSendTaskData(operationDto.operationId) || mTaskReportDao.isExistUpdateTargetHotSpotTaskData(operationDto.operationId)) { if (mTaskReportDao.isExistSendTaskData(operationDto.operationId) || mTaskReportDao.isExistUpdateTargetHotSpotTaskData(operationDto.operationId)) {
......
...@@ -24,21 +24,61 @@ ...@@ -24,21 +24,61 @@
<ImageButton <ImageButton
android:id="@+id/icon_filter" android:id="@+id/icon_filter"
style="@style/ToolBarIcon" android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true" android:layout_centerVertical="true"
android:layout_marginLeft="10dp" android:layout_marginLeft="10dp"
android:layout_toRightOf="@+id/btn_view_mode" android:layout_toRightOf="@+id/btn_view_mode"
android:onClick="onClickOperationFilterList" android:onClick="onClickOperationFilterList"
android:src="@drawable/ic_filter" /> android:background="@drawable/ic_filter" />
<ImageButton <ImageButton
android:id="@+id/icon_operation_group_master" android:id="@+id/btn_search"
style="@style/ToolBarIcon" android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true" android:layout_centerVertical="true"
android:layout_marginLeft="10dp" android:layout_marginLeft="10dp"
android:layout_toRightOf="@+id/icon_filter" android:layout_toRightOf="@+id/icon_filter"
android:src="@drawable/ic_filter" android:background="@drawable/ic_operation_search" />
android:visibility="gone"/>
<RadioGroup
android:id="@+id/segment_group"
android:layout_width="150dp"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginLeft="10dp"
android:layout_toRightOf="@+id/btn_search"
android:orientation="horizontal"
android:visibility="visible">
<RadioButton
android:id="@+id/operation_location_type_all"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_weight="1"
android:background="@drawable/radio_left"
android:button="@null"
android:checked="true"
android:gravity="center"
android:onClick="onClickOperationLocationType"
android:text="全て"
android:textColor="@color/operation_default_text_color"
android:textStyle="bold" />
<RadioButton
android:id="@+id/operation_location_type_group"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_weight="1"
android:background="@drawable/radio_right"
android:button="@null"
android:gravity="center"
android:onClick="onClickOperationLocationType"
android:text="カテゴリ"
android:textColor="@color/operation_default_text_color"
android:textStyle="bold" />
</RadioGroup>
<TextView <TextView
android:id="@+id/title" android:id="@+id/title"
...@@ -84,18 +124,8 @@ ...@@ -84,18 +124,8 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_centerVertical="true" android:layout_centerVertical="true"
android:layout_marginRight="10dp" android:layout_marginRight="10dp"
android:layout_toLeftOf="@+id/btn_search"
android:background="@drawable/ic_communication_menu" />
<ImageButton
android:id="@+id/btn_search"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginRight="10dp"
android:layout_toLeftOf="@+id/btn_sub_menu" android:layout_toLeftOf="@+id/btn_sub_menu"
android:background="@drawable/ic_operation_search" android:background="@drawable/ic_communication_menu" />
android:contentDescription="@string/list" />
<ImageButton <ImageButton
android:id="@+id/btn_sub_menu" android:id="@+id/btn_sub_menu"
...@@ -131,6 +161,9 @@ ...@@ -131,6 +161,9 @@
android:id="@+id/operation_list_layout" android:id="@+id/operation_list_layout"
style="@style/operation_list_bg" style="@style/operation_list_bg"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" /> android:layout_height="match_parent"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_alignParentTop="true" />
</LinearLayout> </LinearLayout>
\ No newline at end of file
...@@ -9,6 +9,7 @@ import jp.agentec.abook.abv.cl.util.PreferenceUtil; ...@@ -9,6 +9,7 @@ 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;
import jp.agentec.abook.abv.ui.common.appinfo.AppDefType.DefPrefKey; import jp.agentec.abook.abv.ui.common.appinfo.AppDefType.DefPrefKey;
import jp.agentec.abook.abv.ui.common.appinfo.AppDefType.UserPrefKey; import jp.agentec.abook.abv.ui.common.appinfo.AppDefType.UserPrefKey;
import jp.agentec.abook.abv.ui.common.appinfo.AppDefType.OperationLocationType;
import jp.agentec.adf.util.DateTimeUtil; import jp.agentec.adf.util.DateTimeUtil;
import jp.agentec.adf.util.StringUtil; import jp.agentec.adf.util.StringUtil;
...@@ -132,7 +133,7 @@ public class ABVUIDataCache { ...@@ -132,7 +133,7 @@ public class ABVUIDataCache {
* 保持していた作業種別のデータをクリアする * 保持していた作業種別のデータをクリアする
*/ */
public void clearOperationGroupMaster() { public void clearOperationGroupMaster() {
setOperationGroupMasterMode(AppDefType.OperationGroupMasterMode.NO); setOperationGroupMasterMode(OperationLocationType.ALL);
setOperationGroupMasterId(0); setOperationGroupMasterId(0);
operationGroupMasterStack.clear(); operationGroupMasterStack.clear();
} }
......
...@@ -13,9 +13,9 @@ public interface AppDefType { ...@@ -13,9 +13,9 @@ public interface AppDefType {
} }
// 作業種別モードフラグ // 作業種別モードフラグ
interface OperationGroupMasterMode { interface OperationLocationType {
int NO = 0; int ALL = 0;
int YES = 1; int GROUP = 1;
} }
interface DefPrefKey { interface DefPrefKey {
......
...@@ -93,7 +93,9 @@ import jp.agentec.abook.abv.bl.logic.PushMessageLogic; ...@@ -93,7 +93,9 @@ import jp.agentec.abook.abv.bl.logic.PushMessageLogic;
import jp.agentec.abook.abv.cl.util.PreferenceUtil; import jp.agentec.abook.abv.cl.util.PreferenceUtil;
import jp.agentec.abook.abv.launcher.android.R; import jp.agentec.abook.abv.launcher.android.R;
import jp.agentec.abook.abv.ui.common.activity.ABVUIActivity; import jp.agentec.abook.abv.ui.common.activity.ABVUIActivity;
import jp.agentec.abook.abv.ui.common.appinfo.AppDefType.OperationLocationType;
import jp.agentec.abook.abv.ui.common.appinfo.AppDefType; 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.ErrorCode;
import jp.agentec.abook.abv.ui.common.constant.ErrorMessage; import jp.agentec.abook.abv.ui.common.constant.ErrorMessage;
import jp.agentec.abook.abv.ui.common.dialog.ABookAlertDialog; import jp.agentec.abook.abv.ui.common.dialog.ABookAlertDialog;
...@@ -130,6 +132,7 @@ public class OperationListActivity extends ABVUIActivity { ...@@ -130,6 +132,7 @@ public class OperationListActivity extends ABVUIActivity {
private ImageButton mViewModeButton; private ImageButton mViewModeButton;
private ImageButton mSearchButton; private ImageButton mSearchButton;
private ImageButton mFilterButton;
private ImageButton mCommunicationButton; private ImageButton mCommunicationButton;
private ImageButton mCommonContentButton; private ImageButton mCommonContentButton;
...@@ -190,8 +193,9 @@ public class OperationListActivity extends ABVUIActivity { ...@@ -190,8 +193,9 @@ public class OperationListActivity extends ABVUIActivity {
private ABVListDialog mShowDialog; private ABVListDialog mShowDialog;
private ImageButton mOperationGroupMasterButton;
private Map<Integer, Integer> operationCountMap; private Map<Integer, Integer> operationCountMap;
// 全て・作業種別のセグメントボタン
private RadioGroup mLocationTypeRadioGroup;
// 作業種別のサービスオプション値を保持用フラグ // 作業種別のサービスオプション値を保持用フラグ
private boolean mOperationGroupMasterServiceOperationFlg; private boolean mOperationGroupMasterServiceOperationFlg;
...@@ -223,14 +227,18 @@ public class OperationListActivity extends ABVUIActivity { ...@@ -223,14 +227,18 @@ public class OperationListActivity extends ABVUIActivity {
super.onCreate(savedInstanceState); super.onCreate(savedInstanceState);
setContentView(R.layout.ac_operation_list); setContentView(R.layout.ac_operation_list);
mListHelper = getListHelper(); mListHelper = getListHelper();
// ビュー変更ボタン
mViewModeButton = (ImageButton) findViewById(R.id.btn_view_mode); mViewModeButton = (ImageButton) findViewById(R.id.btn_view_mode);
// 検索ボタン
mSearchButton = (ImageButton) findViewById(R.id.btn_search); mSearchButton = (ImageButton) findViewById(R.id.btn_search);
// フィルターボタン
mFilterButton = (ImageButton) findViewById(R.id.icon_filter);
mSearchResultLayout = (LinearLayout) findViewById(R.id.search_result); mSearchResultLayout = (LinearLayout) findViewById(R.id.search_result);
mTitleView = (TextView) findViewById(R.id.title); mTitleView = (TextView) findViewById(R.id.title);
mCommunicationButton = (ImageButton) findViewById(R.id.btn_communication_menu); mCommunicationButton = (ImageButton) findViewById(R.id.btn_communication_menu);
mCommonContentButton = (ImageButton) findViewById(R.id.btn_common_content); mCommonContentButton = (ImageButton) findViewById(R.id.btn_common_content);
mOperationGroupMasterButton = (ImageButton) findViewById(R.id.icon_operation_group_master); mLocationTypeRadioGroup = (RadioGroup) findViewById(R.id.segment_group);
// 作業一覧のタイトルパータンでセット // 作業一覧のタイトルパータンでセット
mTitleView.setText(PatternStringUtil.patternToString(getApplicationContext(), mTitleView.setText(PatternStringUtil.patternToString(getApplicationContext(),
...@@ -240,31 +248,21 @@ public class OperationListActivity extends ABVUIActivity { ...@@ -240,31 +248,21 @@ public class OperationListActivity extends ABVUIActivity {
mViewModeButton.setOnClickListener(new View.OnClickListener() { mViewModeButton.setOnClickListener(new View.OnClickListener() {
@Override @Override
public void onClick(View v) { public void onClick(View v) {
if (getABVUIDataCache().getViewMode() == AppDefType.ViewMode.PANEL) { if (getABVUIDataCache().getViewMode() == ViewMode.PANEL) {
getABVUIDataCache().setViewMode(AppDefType.ViewMode.LIST); getABVUIDataCache().setViewMode(ViewMode.LIST);
} else { } else {
getABVUIDataCache().setViewMode(AppDefType.ViewMode.PANEL); getABVUIDataCache().setViewMode(ViewMode.PANEL);
} }
setOperationListView(); setOperationListView();
} }
}); });
mOperationGroupMasterButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
// インジケーター表示
showProgressPopup();
getABVUIDataCache().setOperationGroupMasterMode(AppDefType.OperationGroupMasterMode.YES);
setOperationListView();
//作業種別モードの場合は、作業種別選択ダイアログ画面を表示
showOperationGroupMasterDialog(true, false);
}
});
// サービスオプション(作業種別使用)をセット // サービスオプション(作業種別使用)をセット
mOperationGroupMasterServiceOperationFlg = ABVDataCache.getInstance().serviceOption.isOperationGroupMaster(); mOperationGroupMasterServiceOperationFlg = ABVDataCache.getInstance().serviceOption.isOperationGroupMaster();
// 全て・作業種別のセグメントチェック設定
checkOperationGroupType(getABVUIDataCache().getOperationGroupMasterMode());
// 検索アイコンのクリックイベント // 検索アイコンのクリックイベント
mSearchButton.setOnClickListener(new View.OnClickListener() { mSearchButton.setOnClickListener(new View.OnClickListener() {
@Override @Override
...@@ -365,9 +363,6 @@ public class OperationListActivity extends ABVUIActivity { ...@@ -365,9 +363,6 @@ 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;
...@@ -396,19 +391,54 @@ public class OperationListActivity extends ABVUIActivity { ...@@ -396,19 +391,54 @@ public class OperationListActivity extends ABVUIActivity {
// 作業種別表示・非表示 // 作業種別表示・非表示
if (mOperationGroupMasterServiceOperationFlg) { if (mOperationGroupMasterServiceOperationFlg) {
mOperationGroupMasterButton.setVisibility(View.VISIBLE); mLocationTypeRadioGroup.setVisibility(View.VISIBLE);
// アイコンの変更 // アイコンの変更
//TODO アイコンを変更(仮アイコン) if (getABVUIDataCache().getOperationGroupMasterMode() == OperationLocationType.GROUP) {
if (getABVUIDataCache().getOperationGroupMasterMode() == AppDefType.OperationGroupMasterMode.YES) { // 検索ワード削除
mOperationGroupMasterButton.setImageDrawable(getRDrawable(R.drawable.ic_group_operation)); clearSearch();
// フィルタのリセット
getABVUIDataCache().setOperationReportTypes(mAllOperationReportTypes);
// フィルターボタンを無効にする
mFilterButton.setImageDrawable(getRDrawable(R.drawable.ic_filter));
setEnabledImageButton(mFilterButton);
// 検索ボタンを無効にする
mSearchButton.setImageDrawable(getRDrawable(R.drawable.ic_operation_search));
setEnabledImageButton(mSearchButton);
} else { } else {
mOperationGroupMasterButton.setImageDrawable(getRDrawable(R.drawable.ic_normal_operation)); cancelToolbarEnabledIcon();
} }
} else { } else {
// アイコン非表示 // アイコン非表示
mOperationGroupMasterButton.setVisibility(View.GONE); mLocationTypeRadioGroup.setVisibility(View.GONE);
cancelToolbarEnabledIcon();
} }
// ツールバーの検索結果レイアウトの表示・非表示
checkShowSearchResult();
}
// 検索ワードのクリア
private void clearSearch() {
mSearchWord = null;
mStartDateStr = null;
mEndDateStr = null;
clearData();
}
// イメージボタンを無効にする
private void setEnabledImageButton(ImageButton button) {
button.setEnabled(false);
button.setColorFilter(0xaa808080);
}
/**
* ツールバーのアイコンを有効にする
*/
private void cancelToolbarEnabledIcon() {
mFilterButton.setEnabled(true);
mFilterButton.setColorFilter(null);
mSearchButton.setEnabled(true);
mSearchButton.setColorFilter(null);
} }
/** /**
...@@ -514,13 +544,12 @@ public class OperationListActivity extends ABVUIActivity { ...@@ -514,13 +544,12 @@ public class OperationListActivity extends ABVUIActivity {
mEndDate = (TextView) mSearchDialog.findViewById(R.id.end_date); mEndDate = (TextView) mSearchDialog.findViewById(R.id.end_date);
// 33 // 検索ダイアログ画面の作業名要素
mSearchTextView = (EditText) mSearchDialog.findViewById(R.id.operation_name); mSearchTextView = (EditText) mSearchDialog.findViewById(R.id.operation_name);
mSearchTextView.setOnKeyListener(new View.OnKeyListener() { mSearchTextView.setOnKeyListener(new View.OnKeyListener() {
@Override @Override
public boolean onKey(View v, int keyCode, KeyEvent event) { public boolean onKey(View v, int keyCode, KeyEvent event) {
if (event.getAction() == KeyEvent.ACTION_DOWN && keyCode == KeyEvent.KEYCODE_ENTER) { if (event.getAction() == KeyEvent.ACTION_DOWN && keyCode == KeyEvent.KEYCODE_ENTER) {
Logger.d("------------------------------------------------set key");
//キーボードのエンターキーを無効にする //キーボードのエンターキーを無効にする
return true; return true;
} }
...@@ -620,13 +649,19 @@ public class OperationListActivity extends ABVUIActivity { ...@@ -620,13 +649,19 @@ public class OperationListActivity extends ABVUIActivity {
private void clearData() { private void clearData() {
// 開始日の初期化 // 開始日の初期化
mStartDate.setText(StringUtil.Empty); if (mStartDate != null) {
mStartDate.setText(StringUtil.Empty);
}
// 終了日の初期化 // 終了日の初期化
mEndDate.setText(StringUtil.Empty); if (mEndDate != null) {
mEndDate.setText(StringUtil.Empty);
}
// プロジェクト名の初期化 // 作業名の初期化
mSearchTextView.setText(StringUtil.Empty); if (mSearchTextView != null) {
mSearchTextView.setText(StringUtil.Empty);
}
} }
// 開始日と終了日のバリデーション // 開始日と終了日のバリデーション
...@@ -1961,11 +1996,10 @@ public class OperationListActivity extends ABVUIActivity { ...@@ -1961,11 +1996,10 @@ public class OperationListActivity extends ABVUIActivity {
private void checkSelectedFilterType() { private void checkSelectedFilterType() {
List<Integer> defaultTypeList = getOperationReportTypeList(true); List<Integer> defaultTypeList = getOperationReportTypeList(true);
ArrayList<Integer> selectedOperationReportTypes = getOperationReportTypeList(false); ArrayList<Integer> selectedOperationReportTypes = getOperationReportTypeList(false);
ImageButton imgBtn = (ImageButton) findViewById(R.id.icon_filter);
if (defaultTypeList.size() == selectedOperationReportTypes.size()) { if (defaultTypeList.size() == selectedOperationReportTypes.size()) {
imgBtn.setImageDrawable(getRDrawable(R.drawable.ic_filter)); mFilterButton.setImageDrawable(getRDrawable(R.drawable.ic_filter));
} else { } else {
imgBtn.setImageDrawable(getRDrawable(R.drawable.ic_filter_selected)); mFilterButton.setImageDrawable(getRDrawable(R.drawable.ic_filter_selected));
} }
} }
...@@ -1997,17 +2031,6 @@ public class OperationListActivity extends ABVUIActivity { ...@@ -1997,17 +2031,6 @@ public class OperationListActivity extends ABVUIActivity {
dialog.setTitle(helper.getPeekName(), R.drawable.ic_title_group_operation); dialog.setTitle(helper.getPeekName(), R.drawable.ic_title_group_operation);
//TODO 多言語化
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;
...@@ -2036,7 +2059,7 @@ public class OperationListActivity extends ABVUIActivity { ...@@ -2036,7 +2059,7 @@ public class OperationListActivity extends ABVUIActivity {
@Override @Override
public void onClick(View v) { public void onClick(View v) {
OperationGroupMasterListHelper helper = (OperationGroupMasterListHelper) mListHelper; OperationGroupMasterListHelper helper = (OperationGroupMasterListHelper) mListHelper;
helper.popList(1); helper.popList(1, true);
// ポップアップ再表示 // ポップアップ再表示
dialog.dismiss(); dialog.dismiss();
showOperationGroupMasterDialog(false, false); showOperationGroupMasterDialog(false, false);
...@@ -2074,7 +2097,7 @@ public class OperationListActivity extends ABVUIActivity { ...@@ -2074,7 +2097,7 @@ public class OperationListActivity extends ABVUIActivity {
*/ */
private OperationListHelper getListHelper() { private OperationListHelper getListHelper() {
OperationListHelper operationListHelper; OperationListHelper operationListHelper;
if (mOperationGroupMasterServiceOperationFlg && getABVUIDataCache().getOperationGroupMasterMode() == AppDefType.OperationGroupMasterMode.YES) { if (mOperationGroupMasterServiceOperationFlg && getABVUIDataCache().getOperationGroupMasterMode() == OperationLocationType.GROUP) {
operationListHelper = new OperationGroupMasterListHelper(this); operationListHelper = new OperationGroupMasterListHelper(this);
} else { } else {
operationListHelper = new HomeOperationListHelper(this); operationListHelper = new HomeOperationListHelper(this);
...@@ -2097,4 +2120,51 @@ public class OperationListActivity extends ABVUIActivity { ...@@ -2097,4 +2120,51 @@ public class OperationListActivity extends ABVUIActivity {
public void setOperationGroupMasterId(int operationGroupMasterId) { public void setOperationGroupMasterId(int operationGroupMasterId) {
getABVUIDataCache().setOperationGroupMasterId(operationGroupMasterId); getABVUIDataCache().setOperationGroupMasterId(operationGroupMasterId);
} }
/**
* 作業種別選択画面を閉じる処理
*/
public void closeOperationGroupMasterDialog() {
if (mShowDialog != null && mShowDialog.isShowing()) {
mShowDialog.dismiss();
}
}
/**
* 全て・作業種別セグメントのクリックイベント
* @param view
*/
public void onClickOperationLocationType(View view) {
if (view.getId() == R.id.operation_location_type_group) {
// 種別モード
getABVUIDataCache().setOperationGroupMasterMode(OperationLocationType.GROUP);
} else {
// 全て
getABVUIDataCache().setOperationGroupMasterMode(OperationLocationType.ALL);
}
// プログレスバー表示(ビューが作り終わるとcloseProgressPopup()が呼ばれる
showProgressPopup();
setOperationListView();
if (getABVUIDataCache().getOperationGroupMasterMode() == OperationLocationType.GROUP) {
//作業種別モードの場合は、作業種別選択ダイアログ画面を表示
showOperationGroupMasterDialog(true, false);
}
}
/**
* セグメントのチェック設定
* @param operationGroupType
*/
private void checkOperationGroupType(final int operationGroupType) {
switch (operationGroupType) {
case OperationLocationType.GROUP:
mLocationTypeRadioGroup.check(R.id.operation_location_type_group);
break;
case OperationLocationType.ALL:
default:
mLocationTypeRadioGroup.check(R.id.operation_location_type_all);
break;
}
}
} }
...@@ -125,7 +125,7 @@ public abstract class HierarchyOperationListHelper<StackObject> extends Operatio ...@@ -125,7 +125,7 @@ public abstract class HierarchyOperationListHelper<StackObject> extends Operatio
int popCount = mBreadCrumbsLayout.getChildCount() - button.level; int popCount = mBreadCrumbsLayout.getChildCount() - button.level;
if (popCount > 0) { if (popCount > 0) {
popList(popCount); popList(popCount, true);
} }
} }
...@@ -143,7 +143,7 @@ public abstract class HierarchyOperationListHelper<StackObject> extends Operatio ...@@ -143,7 +143,7 @@ public abstract class HierarchyOperationListHelper<StackObject> extends Operatio
* *
* @param popCount いくつ上の階層を表示するか指定します。 * @param popCount いくつ上の階層を表示するか指定します。
*/ */
abstract public void popList(int popCount); abstract public void popList(int popCount, boolean isReload);
/** /**
* 一つ下の階層のリストへ移動する * 一つ下の階層のリストへ移動する
......
...@@ -27,6 +27,6 @@ public class HomeOperationListHelper extends OperationListHelper { ...@@ -27,6 +27,6 @@ public class HomeOperationListHelper extends OperationListHelper {
@Override @Override
protected List<OperationDto> findOperationList() throws Exception { protected List<OperationDto> findOperationList() throws Exception {
String reportTypeStr = getUserPref(mAppActivity, AppDefType.UserPrefKey.OPERATION_REPORT_TYPES, null); String reportTypeStr = getUserPref(mAppActivity, AppDefType.UserPrefKey.OPERATION_REPORT_TYPES, null);
return operationLogic.getRefreshOperation(mAppActivity.mSearchWord, mAppActivity.mStartDateStr, mAppActivity.mEndDateStr, reportTypeStr, null); return operationLogic.getRefreshOperation(mAppActivity.mSearchWord, mAppActivity.mStartDateStr, mAppActivity.mEndDateStr, reportTypeStr);
} }
} }
...@@ -3,6 +3,7 @@ package jp.agentec.abook.abv.ui.home.helper; ...@@ -3,6 +3,7 @@ package jp.agentec.abook.abv.ui.home.helper;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import jp.agentec.abook.abv.bl.common.ABVEnvironment;
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.OperationGroupMasterDao; import jp.agentec.abook.abv.bl.data.dao.OperationGroupMasterDao;
...@@ -31,7 +32,8 @@ public class OperationGroupMasterListHelper extends HierarchyOperationListHelper ...@@ -31,7 +32,8 @@ public class OperationGroupMasterListHelper extends HierarchyOperationListHelper
if (stack.size() == 0) { if (stack.size() == 0) {
// スタックが空の場合、全体を入れる // スタックが空の場合、全体を入れる
OperationGroupMasterDto operationGroupMasterDto; OperationGroupMasterDto operationGroupMasterDto;
if (mAppActivity.getOperationGroupMasterId() == 0) { // 保存されたoperationGroupmasterIdが0または、存在しない場合
if (mAppActivity.getOperationGroupMasterId() == 0 || !mOperationGroupMasterDao.isExistOperationGroupMaster(mAppActivity.getOperationGroupMasterId())) {
// 最上位階層をセット // 最上位階層をセット
operationGroupMasterDto = mOperationGroupMasterDao.getTopOperationGroupMaster(); operationGroupMasterDto = mOperationGroupMasterDao.getTopOperationGroupMaster();
if (operationGroupMasterDto != null) { if (operationGroupMasterDto != null) {
...@@ -39,7 +41,7 @@ public class OperationGroupMasterListHelper extends HierarchyOperationListHelper ...@@ -39,7 +41,7 @@ public class OperationGroupMasterListHelper extends HierarchyOperationListHelper
} }
} else { } else {
// 前回開いた際のIDでセット // 前回開いた際のIDでセット
List<OperationGroupMasterDto> operationGroupMasterDtoList = mOperationGroupMasterLogic.test(mAppActivity.getOperationGroupMasterId()); List<OperationGroupMasterDto> operationGroupMasterDtoList = mOperationGroupMasterLogic.getParentOperationGroupMasterForPath(mAppActivity.getOperationGroupMasterId());
if (CollectionUtil.isNotEmpty(operationGroupMasterDtoList)) { if (CollectionUtil.isNotEmpty(operationGroupMasterDtoList)) {
for (OperationGroupMasterDto dto : operationGroupMasterDtoList) { for (OperationGroupMasterDto dto : operationGroupMasterDtoList) {
pushList(dto); pushList(dto);
...@@ -55,34 +57,48 @@ public class OperationGroupMasterListHelper extends HierarchyOperationListHelper ...@@ -55,34 +57,48 @@ public class OperationGroupMasterListHelper extends HierarchyOperationListHelper
} }
} }
/**
* データの取得処理(新着更新処理完了後行われる)
* @return
* @throws Exception
*/
@Override @Override
protected List<OperationDto> findOperationList() throws Exception { protected List<OperationDto> findOperationList() throws Exception {
OperationGroupMasterDto peekOperationGroupMasterDto = stack.peek(); OperationGroupMasterDto peekOperationGroupMasterDto = stack.peek();
String reportTypeStr = getUserPref(mAppActivity, AppDefType.UserPrefKey.OPERATION_REPORT_TYPES, null); String reportTypeStr = getUserPref(mAppActivity, AppDefType.UserPrefKey.OPERATION_REPORT_TYPES, null);
Integer operationGroupMasterId; Integer operationGroupMasterId = null;
// operationGroupMasterIdのデータが存在しないと // operationGroupMasterIdのデータが存在、且つクリアフラグがfalseの場合
if (mOperationGroupMasterDao.isExistOperationGroupMaster(peekOperationGroupMasterDto.operationGroupMasterId)) { if (mOperationGroupMasterDao.isExistOperationGroupMaster(peekOperationGroupMasterDto.operationGroupMasterId) && !ABVEnvironment.getInstance().getOperationGroupMasterClearFlg()) {
operationGroupMasterId = peekOperationGroupMasterDto.operationGroupMasterId; operationGroupMasterId = peekOperationGroupMasterDto.operationGroupMasterId;
} else { } else {
// 表示する作業種別が既に削除された場合、最上位階層に戻る(リセット) // 表示する作業種別が既に削除された場合、最上位階層に戻る(リセット)
popList(breadCrumbList.size() - 1); popList(breadCrumbList.size() - 1, false);
// 保存されたoperationGroupMasterIDを0にセット // 最上位階層のデータ取得(全体)
mAppActivity.setOperationGroupMasterId(0); OperationGroupMasterDto topLevelOperationGroupMasterDto = mOperationGroupMasterDao.getTopOperationGroupMaster();
//TODO 最上位階層のID取得 if (topLevelOperationGroupMasterDto != null) {
operationGroupMasterId = 0; operationGroupMasterId = topLevelOperationGroupMasterDto.operationGroupMasterId;
// 最上位階層のoperationGroupMasterIdをセット
mAppActivity.setOperationGroupMasterId(operationGroupMasterId);
}
ABVEnvironment.getInstance().setOperationGroupMasterClearFlg(false);
// 作業種別の選択画面を閉じる
mAppActivity.closeOperationGroupMasterDialog();
} }
return operationLogic.getRefreshOperation(mAppActivity.mSearchWord, mAppActivity.mStartDateStr, mAppActivity.mEndDateStr, reportTypeStr, operationGroupMasterId); return mOperationGroupMasterLogic.getOperationByOperationGroupMasterId(operationGroupMasterId);
} }
@Override @Override
public void popList(int popCount) { public void popList(int popCount, boolean isReload) {
for (int i = 0; i < popCount; i++) { for (int i = 0; i < popCount; i++) {
stack.pop(); stack.pop();
// パンくずリスト削除 // パンくずリスト削除
removeBreadCrumbs(breadCrumbList.get(breadCrumbList.size() - 1)); removeBreadCrumbs(breadCrumbList.get(breadCrumbList.size() - 1));
} }
refreshList(); if (isReload) {
// 作業一覧画面を更新する
refreshList();
}
} }
@Override @Override
...@@ -121,12 +137,21 @@ public class OperationGroupMasterListHelper extends HierarchyOperationListHelper ...@@ -121,12 +137,21 @@ public class OperationGroupMasterListHelper extends HierarchyOperationListHelper
return groupName; return groupName;
} }
/**
* 親階層の情報で下の階層をリストで取得
* @return List<OperationGroupMasterDto>
*/
@Override @Override
public List<OperationGroupMasterDto> getChildList() { public List<OperationGroupMasterDto> getChildList() {
OperationGroupMasterDto peekOperationGroupMasterDto = stack.peek(); OperationGroupMasterDto peekOperationGroupMasterDto = stack.peek();
return getChildList(peekOperationGroupMasterDto.operationGroupMasterId); return getChildList(peekOperationGroupMasterDto.operationGroupMasterId);
} }
/**
* 親階層のIDで下の階層をリストで取得
* @param operationGroupMasterId
* @return List<OperationGroupMasterDto>
*/
public List<OperationGroupMasterDto> getChildList(Integer operationGroupMasterId) { public List<OperationGroupMasterDto> getChildList(Integer operationGroupMasterId) {
return mOperationGroupMasterDao.getOperationGroupMasterChildList(operationGroupMasterId); return mOperationGroupMasterDao.getOperationGroupMasterChildList(operationGroupMasterId);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment