Commit 3c251a38 by Lee Jaebin

#34867 作業並び替え機能(韓国語修正・カテゴリ対応)

parent 5d60379c
...@@ -36,27 +36,25 @@ public enum OperationSortingType { ...@@ -36,27 +36,25 @@ public enum OperationSortingType {
OperationSortingType sortingType; OperationSortingType sortingType;
switch (operationSorting) { switch (operationSorting) {
case 0: case 0: // 作業名
sortingType = OperationSortingType.OperationName; sortingType = OperationSortingType.OperationName;
break; break;
case 1: case 1: // 作業期間が新しい順
sortingType = OperationSortingType.OperationStartDateDESC; sortingType = OperationSortingType.OperationStartDateDESC;
break; break;
case 2: case 2: // 作業時間が古い順
sortingType = OperationSortingType.OperationStartDateASC; sortingType = OperationSortingType.OperationStartDateASC;
break; break;
case 3: case 3: // 報告タイプ
sortingType = OperationSortingType.OperationType; sortingType = OperationSortingType.OperationType;
break; break;
case 4: case 4: // 閲覧日が新しい順
sortingType = OperationSortingType.ReadingDate; sortingType = OperationSortingType.ReadingDate;
break; break;
default: default: // 作業名(デフォルト)
sortingType = OperationSortingType.OperationName; sortingType = OperationSortingType.OperationName;
break; break;
} }
return sortingType; return sortingType;
} }
} }
...@@ -266,8 +266,8 @@ public class OperationDao extends AbstractDao { ...@@ -266,8 +266,8 @@ public class OperationDao extends AbstractDao {
* @param operationGroupMasterId * @param operationGroupMasterId
* @return * @return
*/ */
public List<OperationDto> getOperationsByGroupMasterId(Integer operationGroupMasterId) { public List<OperationDto> getOperationsByGroupMasterId(Integer operationGroupMasterId, OperationSortingType operationSortingType) {
String sql = generateGetOperationQuery(null, null, null, null, operationGroupMasterId); String sql = generateGetOperationQuery(null, null, null, operationSortingType, operationGroupMasterId);
return rawQueryGetDtoList(sql, null, OperationDto.class); return rawQueryGetDtoList(sql, null, OperationDto.class);
} }
......
...@@ -8,6 +8,7 @@ import java.util.Map; ...@@ -8,6 +8,7 @@ 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.acms.type.OperationSortingType;
import jp.agentec.abook.abv.bl.common.ABVEnvironment; 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;
...@@ -165,7 +166,7 @@ public class OperationGroupMasterLogic extends AbstractLogic { ...@@ -165,7 +166,7 @@ public class OperationGroupMasterLogic extends AbstractLogic {
* @param operationGroupMasterId * @param operationGroupMasterId
* @return * @return
*/ */
public List<OperationDto> getOperationByOperationGroupMasterId(Integer operationGroupMasterId) { public List<OperationDto> getOperationByOperationGroupMasterId(Integer operationGroupMasterId, OperationSortingType operationSortingType) {
return mOperationDao.getOperationsByGroupMasterId(operationGroupMasterId); return mOperationDao.getOperationsByGroupMasterId(operationGroupMasterId, operationSortingType);
} }
} }
...@@ -2,10 +2,10 @@ ...@@ -2,10 +2,10 @@
<resources> <resources>
<string-array name="sort_names"> <string-array name="sort_names">
        <item>작업명(가나다)</item>         <item>작업명(가나다)</item>
        <item>작업개시일 최신</item>         <item>최신 작업</item>
        <item>작업개시일 오래된</item>         <item>오래된 작업</item>
        <item>보고타입</item>         <item>보고타입</item>
        <item>열람최신</item>         <item>최신 열람</item>
</string-array> </string-array>
</resources> </resources>
...@@ -70,14 +70,6 @@ public interface AppDefType { ...@@ -70,14 +70,6 @@ public interface AppDefType {
String APERTURE_MASTER_DATA_FETCH_DATE = "apertureMasterDataFetchDate"; // 絞り検索マスタデータのFetchDate String APERTURE_MASTER_DATA_FETCH_DATE = "apertureMasterDataFetchDate"; // 絞り検索マスタデータのFetchDate
} }
interface SortType {
int OPERATION_NAME = 0; // 作業名
int OPERATION_START_DATE_DESC = 1; // 作業時間が新しい順
int OPERATION_START_DATE_ASC = 2; // 作業時間が古い順
int OPERATION_TYPE = 3; // 報告タイプ
int READING_DATE = 4; // 閲覧日が新しい順
}
interface SubMenuType { interface SubMenuType {
int CONTENT_DETAIL_OPEN = 0; // コンテンツ詳細画面 int CONTENT_DETAIL_OPEN = 0; // コンテンツ詳細画面
int CONTENT_OPEN = 1; // コンテンツ閲覧 int CONTENT_OPEN = 1; // コンテンツ閲覧
......
...@@ -28,8 +28,7 @@ public class HomeOperationListHelper extends OperationListHelper { ...@@ -28,8 +28,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 = getUserPref(mAppActivity, AppDefType.UserPrefKey.OPERATION_SORT_CONDITION, 0);
OperationSortingType operationSortingType = OperationSortingType.parse(operationSortType);
OperationSortingType operationSortingType = convertSortType(operationSortType);
return operationLogic.getRefreshOperation(mAppActivity.mSearchWord, mAppActivity.mStartDateStr, mAppActivity.mEndDateStr, operationSortingType); return operationLogic.getRefreshOperation(mAppActivity.mSearchWord, mAppActivity.mStartDateStr, mAppActivity.mEndDateStr, operationSortingType);
} }
} }
package jp.agentec.abook.abv.ui.home.helper; package jp.agentec.abook.abv.ui.home.helper;
import java.util.ArrayList;
import java.util.List; import java.util.List;
import jp.agentec.abook.abv.bl.acms.type.OperationSortingType;
import jp.agentec.abook.abv.bl.common.ABVEnvironment; 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;
...@@ -76,8 +76,10 @@ public class OperationGroupMasterListHelper extends HierarchyOperationListHelper ...@@ -76,8 +76,10 @@ public class OperationGroupMasterListHelper extends HierarchyOperationListHelper
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);
OperationSortingType operationSortingType = OperationSortingType.parse(operationSortType);
// 作業種別IDで紐づく作業リストを取得 // 作業種別IDで紐づく作業リストを取得
return mOperationGroupMasterLogic.getOperationByOperationGroupMasterId(peekOperationGroupMasterDto.operationGroupMasterId); return mOperationGroupMasterLogic.getOperationByOperationGroupMasterId(peekOperationGroupMasterDto.operationGroupMasterId, operationSortingType);
} }
/** /**
......
...@@ -11,7 +11,6 @@ import com.handmark.pulltorefresh.library.PullToRefreshListView; ...@@ -11,7 +11,6 @@ import com.handmark.pulltorefresh.library.PullToRefreshListView;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import jp.agentec.abook.abv.bl.acms.type.OperationSortingType;
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.dto.OperationDto; import jp.agentec.abook.abv.bl.dto.OperationDto;
...@@ -59,35 +58,6 @@ public abstract class OperationListHelper { ...@@ -59,35 +58,6 @@ public abstract class OperationListHelper {
mPullToRefreshGridView = new PullToRefreshGridView(activity); mPullToRefreshGridView = new PullToRefreshGridView(activity);
} }
/**
* ソートタイプをOperationSortingTypeに変換する
* @param sortType
* @return operationSortingType {@link OperationSortingType}
*/
public static OperationSortingType convertSortType(int sortType) {
OperationSortingType operationSortingType;
switch (sortType) {
case AppDefType.SortType.OPERATION_NAME:
operationSortingType = OperationSortingType.OperationName;
break;
case AppDefType.SortType.OPERATION_START_DATE_ASC:
operationSortingType = OperationSortingType.OperationStartDateASC;
break;
case AppDefType.SortType.OPERATION_START_DATE_DESC:
operationSortingType = OperationSortingType.OperationStartDateDESC;
break;
case AppDefType.SortType.OPERATION_TYPE:
operationSortingType = OperationSortingType.OperationType;
break;
case AppDefType.SortType.READING_DATE:
operationSortingType = OperationSortingType.ReadingDate;
break;
default:
operationSortingType = OperationSortingType.OperationName;
break;
}
return operationSortingType;
}
/** /**
* 作業を検索してListを返す * 作業を検索してListを返す
......
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