Commit e527fe6c by Kim Jinsung

作業一覧のカテゴリ選択時の並び替え問題対応

parent d423c69f
......@@ -490,33 +490,34 @@ public class OperationDao extends AbstractDao {
sql.append(" AND top.report_type in (" + reportTypeStr + ")");
}
// 並び順
if (operationSortingType != null) {
switch (operationSortingType) {
case OperationName:
sql.append(" ORDER BY top.operation_name ASC ");
break;
case OperationStartDateASC:
sql.append(" ORDER BY top.operation_start_date ASC ");
break;
case OperationStartDateDESC:
sql.append(" ORDER BY top.operation_start_date DESC ");
break;
case OperationType:
sql.append(" ORDER BY top.report_type ASC ");
break;
case ReadingDate:
sql.append(" ORDER BY top.operation_open_date DESC ");
break;
default:
sql.append(" ORDER BY top.operation_name ASC ");
break;
}
} else {
sql.append(" ORDER BY top.operation_name ASC ");
}
// 必ずORDER BYが存在する 2次ソート
sql.append(", top.operation_id DESC");
sql.append(" ORDER BY top.operation_start_date DESC, top.operation_name ASC");
//並び替え情報がないので以下はコメントアウト(次回開発のため残す)
// if (operationSortingType != null) {
// switch (operationSortingType) {
// case OperationName:
// sql.append(" ORDER BY top.operation_name ASC ");
// break;
// case OperationStartDateASC:
// sql.append(" ORDER BY top.operation_start_date ASC ");
// break;
// case OperationStartDateDESC:
// sql.append(" ORDER BY top.operation_start_date DESC ");
// break;
// case OperationType:
// sql.append(" ORDER BY top.report_type ASC ");
// break;
// case ReadingDate:
// sql.append(" ORDER BY top.operation_open_date DESC ");
// break;
// default:
// sql.append(" ORDER BY top.operation_name ASC ");
// break;
// }
// } else {
// sql.append(" ORDER BY top.operation_name ASC ");
// }
// // 必ずORDER BYが存在する 2次ソート
// sql.append(", top.operation_id DESC");
Logger.v(TAG, "sql=%s", sql);
......
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