Commit 908bccb6 by Lee Jaebin

ソート順のデフォルト値変更「作業期間が新しい順」

parent caef5b16
...@@ -124,10 +124,10 @@ public class ABVUIDataCache { ...@@ -124,10 +124,10 @@ public class ABVUIDataCache {
/** /**
* ソート条件を取得 * ソート条件を取得
* @return ソートタイプ(デフォルト : 0 * @return ソートタイプ(デフォルト : 1(作業期間が新しい順)
*/ */
public int getSortCondition() { public int getSortCondition() {
return PreferenceUtil.getUserPref(context, UserPrefKey.OPERATION_SORT_CONDITION, 0); return PreferenceUtil.getUserPref(context, UserPrefKey.OPERATION_SORT_CONDITION, 1);
} }
/** /**
......
...@@ -1977,4 +1977,12 @@ public class OperationListActivity extends ABVUIActivity { ...@@ -1977,4 +1977,12 @@ public class OperationListActivity extends ABVUIActivity {
showOperationGroupMasterDialog(true); showOperationGroupMasterDialog(true);
} }
} }
/**
* ソート順取得(デフォルト:1(作業期間が新しい順))
* @return
*/
public int getSortCondition() {
return getABVUIDataCache().getSortCondition();
}
} }
...@@ -3,16 +3,9 @@ package jp.agentec.abook.abv.ui.home.helper; ...@@ -3,16 +3,9 @@ package jp.agentec.abook.abv.ui.home.helper;
import java.util.List; import java.util.List;
import jp.agentec.abook.abv.bl.acms.type.OperationSortingType; import jp.agentec.abook.abv.bl.acms.type.OperationSortingType;
import jp.agentec.abook.abv.bl.common.log.Logger;
import jp.agentec.abook.abv.bl.dto.ContentDto;
import jp.agentec.abook.abv.bl.dto.OperationDto; 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.ui.common.appinfo.AppDefType;
import jp.agentec.abook.abv.ui.home.activity.OperationListActivity; import jp.agentec.abook.abv.ui.home.activity.OperationListActivity;
import static jp.agentec.abook.abv.cl.util.PreferenceUtil.getUserPref;
/** /**
* Created by leej on 2019/06/24. * Created by leej on 2019/06/24.
*/ */
...@@ -27,7 +20,7 @@ public class HomeOperationListHelper extends OperationListHelper { ...@@ -27,7 +20,7 @@ public class HomeOperationListHelper extends OperationListHelper {
@Override @Override
protected List<OperationDto> findOperationList() throws Exception { protected List<OperationDto> findOperationList() throws Exception {
int operationSortType = getUserPref(mAppActivity, AppDefType.UserPrefKey.OPERATION_SORT_CONDITION, 0); int operationSortType = mAppActivity.getSortCondition();
OperationSortingType operationSortingType = OperationSortingType.parse(operationSortType); OperationSortingType operationSortingType = OperationSortingType.parse(operationSortType);
return operationLogic.getRefreshOperation(mAppActivity.mSearchWord, mAppActivity.mStartDateStr, mAppActivity.mEndDateStr, operationSortingType); return operationLogic.getRefreshOperation(mAppActivity.mSearchWord, mAppActivity.mStartDateStr, mAppActivity.mEndDateStr, operationSortingType);
} }
......
...@@ -12,12 +12,9 @@ import jp.agentec.abook.abv.bl.dto.OperationGroupMasterDto; ...@@ -12,12 +12,9 @@ import jp.agentec.abook.abv.bl.dto.OperationGroupMasterDto;
import jp.agentec.abook.abv.bl.logic.AbstractLogic; import jp.agentec.abook.abv.bl.logic.AbstractLogic;
import jp.agentec.abook.abv.bl.logic.OperationGroupMasterLogic; import jp.agentec.abook.abv.bl.logic.OperationGroupMasterLogic;
import jp.agentec.abook.abv.launcher.android.ABVApplication; import jp.agentec.abook.abv.launcher.android.ABVApplication;
import jp.agentec.abook.abv.ui.common.appinfo.AppDefType;
import jp.agentec.abook.abv.ui.home.activity.OperationListActivity; import jp.agentec.abook.abv.ui.home.activity.OperationListActivity;
import jp.agentec.adf.util.CollectionUtil; import jp.agentec.adf.util.CollectionUtil;
import static jp.agentec.abook.abv.cl.util.PreferenceUtil.getUserPref;
public class OperationGroupMasterListHelper extends CategoryOperationListHelper<OperationGroupMasterDto> { public class OperationGroupMasterListHelper extends CategoryOperationListHelper<OperationGroupMasterDto> {
private static final String TAG = "OperationGroupMasterListHelper"; private static final String TAG = "OperationGroupMasterListHelper";
...@@ -76,7 +73,7 @@ public class OperationGroupMasterListHelper extends CategoryOperationListHelper< ...@@ -76,7 +73,7 @@ public class OperationGroupMasterListHelper extends CategoryOperationListHelper<
OperationGroupMasterDto peekOperationGroupMasterDto = stack.peek(); OperationGroupMasterDto peekOperationGroupMasterDto = stack.peek();
mAppActivity.checkBatchNeedSyncButton(peekOperationGroupMasterDto.operationGroupMasterId); mAppActivity.checkBatchNeedSyncButton(peekOperationGroupMasterDto.operationGroupMasterId);
int operationSortType = getUserPref(mAppActivity, AppDefType.UserPrefKey.OPERATION_SORT_CONDITION, 0); int operationSortType = mAppActivity.getSortCondition();
OperationSortingType operationSortingType = OperationSortingType.parse(operationSortType); OperationSortingType operationSortingType = OperationSortingType.parse(operationSortType);
// 作業種別IDで紐づく作業リストを取得 // 作業種別IDで紐づく作業リストを取得
return mOperationGroupMasterLogic.getOperationByOperationGroupMasterId(peekOperationGroupMasterDto.operationGroupMasterId, operationSortingType); return mOperationGroupMasterLogic.getOperationByOperationGroupMasterId(peekOperationGroupMasterDto.operationGroupMasterId, operationSortingType);
......
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