Commit c976e02c by onuma

カテゴリ選択機能(スマホ)まで実装

parent 1349ecdb
...@@ -9,6 +9,7 @@ import java.util.List; ...@@ -9,6 +9,7 @@ import java.util.List;
import jp.agentec.abook.abv.bl.common.exception.AcmsException; import jp.agentec.abook.abv.bl.common.exception.AcmsException;
import jp.agentec.abook.abv.bl.dto.OperationContentDto; import jp.agentec.abook.abv.bl.dto.OperationContentDto;
import jp.agentec.abook.abv.bl.dto.OperationDto; import jp.agentec.abook.abv.bl.dto.OperationDto;
import jp.agentec.abook.abv.bl.dto.OperationGroupMasterRelationDto;
import jp.agentec.abook.abv.bl.dto.PushMessageDto; import jp.agentec.abook.abv.bl.dto.PushMessageDto;
import jp.agentec.abook.abv.bl.dto.TaskWorkerGroupDto; import jp.agentec.abook.abv.bl.dto.TaskWorkerGroupDto;
import jp.agentec.adf.util.DateTimeFormat; import jp.agentec.adf.util.DateTimeFormat;
...@@ -56,6 +57,13 @@ public class OperationListJSON extends AcmsCommonJSON { ...@@ -56,6 +57,13 @@ public class OperationListJSON extends AcmsCommonJSON {
public static final String EnableAddReport = "enableAddReport"; public static final String EnableAddReport = "enableAddReport";
///////////////////////////////////////////////////////////////////////////////////////////////////////
// カテゴリ選択機能
///////////////////////////////////////////////////////////////////////////////////////////////////////
public static final String OperationGroupMasterIdList = "operationGroupMasterIdList";
public static final String QuickReport = "quickReport";
public List<OperationDto> operationList; public List<OperationDto> operationList;
public OperationListJSON(String jsonString) throws AcmsException { public OperationListJSON(String jsonString) throws AcmsException {
...@@ -73,6 +81,8 @@ public class OperationListJSON extends AcmsCommonJSON { ...@@ -73,6 +81,8 @@ public class OperationListJSON extends AcmsCommonJSON {
OperationDto dto = new OperationDto(); OperationDto dto = new OperationDto();
dto.operationContentDtoList = new ArrayList<OperationContentDto>(); dto.operationContentDtoList = new ArrayList<OperationContentDto>();
dto.taskWorkerGroupDtoList = new ArrayList<TaskWorkerGroupDto>(); dto.taskWorkerGroupDtoList = new ArrayList<TaskWorkerGroupDto>();
dto.operationGroupMasterRelationDtoList = new ArrayList<OperationGroupMasterRelationDto>();
dto.operationId = operationJson.getLong(OperationId); dto.operationId = operationJson.getLong(OperationId);
dto.operationType = operationJson.getInt(OperationType); dto.operationType = operationJson.getInt(OperationType);
dto.operationName = operationJson.getString(OperationName); dto.operationName = operationJson.getString(OperationName);
...@@ -83,6 +93,7 @@ public class OperationListJSON extends AcmsCommonJSON { ...@@ -83,6 +93,7 @@ public class OperationListJSON extends AcmsCommonJSON {
dto.enableReportHistory = operationJson.getInt(EnableReportHistory); // 報告履歴管理 dto.enableReportHistory = operationJson.getInt(EnableReportHistory); // 報告履歴管理
dto.enableReportEdit = operationJson.has(EnableReportEdit) ? operationJson.getInt(EnableReportEdit) : 0; // 作業編集区分 dto.enableReportEdit = operationJson.has(EnableReportEdit) ? operationJson.getInt(EnableReportEdit) : 0; // 作業編集区分
dto.enableAddReport = operationJson.has(EnableAddReport) ? operationJson.getInt(EnableAddReport) : 0; // 作業追加区分 dto.enableAddReport = operationJson.has(EnableAddReport) ? operationJson.getInt(EnableAddReport) : 0; // 作業追加区分
dto.quickReport = operationJson.has(QuickReport) ? operationJson.getInt(QuickReport) : 0;
// 作業終了更新日 // 作業終了更新日
if (operationJson.has(OperationLastEditDate)) { if (operationJson.has(OperationLastEditDate)) {
...@@ -100,7 +111,7 @@ public class OperationListJSON extends AcmsCommonJSON { ...@@ -100,7 +111,7 @@ public class OperationListJSON extends AcmsCommonJSON {
if (operationJson.has(ContentId)) { if (operationJson.has(ContentId)) {
// プロジェクト用資料の登録 // プロジェクト用資料の登録
OperationContentDto operationContentDto = new OperationContentDto(); OperationContentDto operationContentDto = new OperationContentDto();
operationContentDto.operationId = operationJson.getLong(OperationId); operationContentDto.operationId = dto.operationId;
operationContentDto.contentId = operationJson.getLong(ContentId); operationContentDto.contentId = operationJson.getLong(ContentId);
operationContentDto.operationContentFlg = true; operationContentDto.operationContentFlg = true;
dto.operationContentDtoList.add(operationContentDto); dto.operationContentDtoList.add(operationContentDto);
...@@ -111,7 +122,7 @@ public class OperationListJSON extends AcmsCommonJSON { ...@@ -111,7 +122,7 @@ public class OperationListJSON extends AcmsCommonJSON {
for (int k = 0; k < relatedContentJsonArray.length(); k++) { for (int k = 0; k < relatedContentJsonArray.length(); k++) {
// 関連資料の登録 // 関連資料の登録
OperationContentDto operationContentDto = new OperationContentDto(); OperationContentDto operationContentDto = new OperationContentDto();
operationContentDto.operationId = operationJson.getLong(OperationId); operationContentDto.operationId = dto.operationId;
operationContentDto.contentId = relatedContentJsonArray.getJSONObject(k).getInt(ContentId); operationContentDto.contentId = relatedContentJsonArray.getJSONObject(k).getInt(ContentId);
operationContentDto.operationContentFlg = false; operationContentDto.operationContentFlg = false;
dto.operationContentDtoList.add(operationContentDto); dto.operationContentDtoList.add(operationContentDto);
...@@ -154,6 +165,17 @@ public class OperationListJSON extends AcmsCommonJSON { ...@@ -154,6 +165,17 @@ public class OperationListJSON extends AcmsCommonJSON {
} }
} }
// 作業種別IDリストをセット
if (operationJson.has(OperationGroupMasterIdList)) {
// 作業種別に紐づく作業種別ID、作業IDセット
JSONArray operationGroupMasterIdJsonArray = operationJson.getJSONArray(OperationGroupMasterIdList);
for (int j = 0; j < operationGroupMasterIdJsonArray.length(); j++) {
OperationGroupMasterRelationDto operationGroupMasterRelationDto = new OperationGroupMasterRelationDto();
operationGroupMasterRelationDto.operationId = dto.operationId;
operationGroupMasterRelationDto.operationGroupMasterId = operationGroupMasterIdJsonArray.getInt(j);
dto.operationGroupMasterRelationDtoList.add(operationGroupMasterRelationDto);
}
}
operationList.add(dto); operationList.add(dto);
} }
} }
......
package jp.agentec.abook.abv.bl.data.dao;
import java.util.List;
import jp.agentec.abook.abv.bl.common.db.Cursor;
import jp.agentec.abook.abv.bl.common.db.SQLiteDatabase;
import jp.agentec.abook.abv.bl.common.db.SQLiteStatement;
import jp.agentec.abook.abv.bl.common.log.Logger;
import jp.agentec.abook.abv.bl.dto.OperationGroupMasterRelationDto;
/**
* Created by leej on 2019/06/26.
*/
public class OperationGroupMasterOperationDao extends AbstractDao {
private static final String TAG = "OperationGroupMasterDao";
private enum QueryType {GetAllGroups, GetRootGroups, GetGroups}
/*package*/ OperationGroupMasterOperationDao() {
}
@Override
protected OperationGroupMasterRelationDto convert(Cursor cursor) {
OperationGroupMasterRelationDto dto = new OperationGroupMasterRelationDto();
int column = cursor.getColumnIndex("operation_group_master_id");
if (column != -1) {
dto.operationGroupMasterId = cursor.getInt(column);
}
column = cursor.getColumnIndex("operation_id");
if (column != -1) {
dto.operationId = cursor.getLong(column);
}
return dto;
}
/**
* 作業種別と作業のリレーションテーブル削除
* @param operationGroupMasterId
*/
public void deleteOperationGroupMasterOperation(Integer operationGroupMasterId, Long operationId) {
delete("r_operation_group_master_relation", "operation_group_master_id=? AND operation_id=?", new String[]{""+ operationGroupMasterId, ""+ operationId});
}
/**
* 作業種別と作業のリレーションテーブルのDB登録処理
* @param dto
*/
public boolean insertOperationGroupMasterOperation(OperationGroupMasterRelationDto dto) {
StringBuffer sql = new StringBuffer();
sql.append(" INSERT OR IGNORE INTO r_operation_group_master_relation ");
sql.append(" SELECT " + dto.operationGroupMasterId);
sql.append(" , " + dto.operationId);
sql.append(" FROM t_operation AS top ");
sql.append(" LEFT OUTER JOIN r_operation_group_master_relation AS rmogm ");
sql.append(" ON rmogm.operation_group_master_id = ? ");
sql.append(" AND top.operation_id <> rmogm.operation_id ");
sql.append(" WHERE top.operation_id = ? ");
sql.append(" GROUP BY rmogm.operation_group_master_id ");
SQLiteStatement stmt = null;
Logger.v(TAG, "sql=%s", sql);
try {
SQLiteDatabase db = getDatabase();
stmt = db.compileStatement(sql.toString());
stmt.bindLong(1, dto.operationGroupMasterId);
stmt.bindLong(2, dto.operationId);
return (stmt.executeInsert() > 0);
} finally {
if (stmt != null) {
stmt.close();
}
}
}
/**
* 作業種別IDで関連する作業のIDを取得
* @param operationId
* @return
*/
public List<Integer> getOperationGroupMasterIds(Long operationId) {
return rawQueryGetIntegerList("select operation_group_master_id from r_operation_group_master_relation where operation_id=?", new String[]{""+ operationId});
}
}
\ No newline at end of file
...@@ -41,6 +41,7 @@ import jp.agentec.abook.abv.bl.data.dao.AbstractDao; ...@@ -41,6 +41,7 @@ import jp.agentec.abook.abv.bl.data.dao.AbstractDao;
import jp.agentec.abook.abv.bl.data.dao.ContentDao; import jp.agentec.abook.abv.bl.data.dao.ContentDao;
import jp.agentec.abook.abv.bl.data.dao.OperationContentDao; import jp.agentec.abook.abv.bl.data.dao.OperationContentDao;
import jp.agentec.abook.abv.bl.data.dao.OperationDao; import jp.agentec.abook.abv.bl.data.dao.OperationDao;
import jp.agentec.abook.abv.bl.data.dao.OperationGroupMasterOperationDao;
import jp.agentec.abook.abv.bl.data.dao.PushMessageDao; import jp.agentec.abook.abv.bl.data.dao.PushMessageDao;
import jp.agentec.abook.abv.bl.data.dao.TaskDao; import jp.agentec.abook.abv.bl.data.dao.TaskDao;
import jp.agentec.abook.abv.bl.data.dao.TaskReportDao; import jp.agentec.abook.abv.bl.data.dao.TaskReportDao;
...@@ -52,6 +53,7 @@ import jp.agentec.abook.abv.bl.dto.CategoryContentDto; ...@@ -52,6 +53,7 @@ import jp.agentec.abook.abv.bl.dto.CategoryContentDto;
import jp.agentec.abook.abv.bl.dto.ContentDto; import jp.agentec.abook.abv.bl.dto.ContentDto;
import jp.agentec.abook.abv.bl.dto.OperationContentDto; import jp.agentec.abook.abv.bl.dto.OperationContentDto;
import jp.agentec.abook.abv.bl.dto.OperationDto; import jp.agentec.abook.abv.bl.dto.OperationDto;
import jp.agentec.abook.abv.bl.dto.OperationGroupMasterRelationDto;
import jp.agentec.abook.abv.bl.dto.PushMessageDto; import jp.agentec.abook.abv.bl.dto.PushMessageDto;
import jp.agentec.abook.abv.bl.dto.TaskDto; import jp.agentec.abook.abv.bl.dto.TaskDto;
import jp.agentec.abook.abv.bl.dto.TaskReportDto; import jp.agentec.abook.abv.bl.dto.TaskReportDto;
...@@ -79,6 +81,10 @@ public class OperationLogic extends AbstractLogic { ...@@ -79,6 +81,10 @@ public class OperationLogic extends AbstractLogic {
private TaskReportDao mTaskReportDao = AbstractDao.getDao(TaskReportDao.class); private TaskReportDao mTaskReportDao = AbstractDao.getDao(TaskReportDao.class);
private TaskReportSendDao mTaskReportSendDao = AbstractDao.getDao(TaskReportSendDao.class); private TaskReportSendDao mTaskReportSendDao = AbstractDao.getDao(TaskReportSendDao.class);
private TaskReportItemsDao mTaskReportItemsDao = AbstractDao.getDao(TaskReportItemsDao.class); private TaskReportItemsDao mTaskReportItemsDao = AbstractDao.getDao(TaskReportItemsDao.class);
///////////////////////////////////////////////////////////////////////////////////////////////////////
// カテゴリ選択機能 追加
///////////////////////////////////////////////////////////////////////////////////////////////////////
private OperationGroupMasterOperationDao mOperationGroupMasterOperationDao = AbstractDao.getDao(OperationGroupMasterOperationDao.class);
private ContentLogic mContentLogic = AbstractLogic.getLogic(ContentLogic.class); private ContentLogic mContentLogic = AbstractLogic.getLogic(ContentLogic.class);
...@@ -139,7 +145,36 @@ public class OperationLogic extends AbstractLogic { ...@@ -139,7 +145,36 @@ public class OperationLogic extends AbstractLogic {
if (mOperationContentDao.isExistMainOperationContent(serverOperationDto.operationId)) { if (mOperationContentDao.isExistMainOperationContent(serverOperationDto.operationId)) {
serverOperationDto.contentCreatingFlg = false; serverOperationDto.contentCreatingFlg = false;
} }
///////////////////////////////////////////////////////////////////////////////////////////////////////
// カテゴリ選択機能 追加
///////////////////////////////////////////////////////////////////////////////////////////////////////
// ローカルにある作業情報に紐づく全作業IDを取得
List<Integer> localOperationGroupMasterIds = mOperationGroupMasterOperationDao.getOperationGroupMasterIds(serverOperationDto.operationId);
for (OperationGroupMasterRelationDto operationGroupMasterRelationDto : serverOperationDto.operationGroupMasterRelationDtoList) {
if (localOperationGroupMasterIds == null || localOperationGroupMasterIds.size() == 0) {
// 作業IDが存在しなければ、登録する
mOperationGroupMasterOperationDao.insertOperationGroupMasterOperation(operationGroupMasterRelationDto);
} else {
// ローカル(DB)に作業IDが存在するかチェックして更新・登録を判定
int localOperationContentIndex = localOperationGroupMasterIds.indexOf(operationGroupMasterRelationDto.operationGroupMasterId);
if (localOperationContentIndex >= 0) {
// 作業IDが存在するので更新
localOperationGroupMasterIds.remove(localOperationContentIndex);
} else {
// 作業IDが存在しないので登録
mOperationGroupMasterOperationDao.insertOperationGroupMasterOperation(operationGroupMasterRelationDto);
}
}
}
if (localOperationGroupMasterIds != null) {
// ローカルとサーバーの差分は削除と見做し、削除処理を行う。
for (Integer deleteOperationGroupMasterId : localOperationGroupMasterIds) {
mOperationGroupMasterOperationDao.deleteOperationGroupMasterOperation(deleteOperationGroupMasterId, serverOperationDto.operationId);
}
}
///////////////////////////////////////////////////////////////////////////////////////////////////////
// カテゴリ選択機能 追加ここまで
///////////////////////////////////////////////////////////////////////////////////////////////////////
mOperationDao.update(serverOperationDto); mOperationDao.update(serverOperationDto);
// 更新することで登録フラグをfalseにセット // 更新することで登録フラグをfalseにセット
insertFlg = false; insertFlg = false;
...@@ -167,6 +202,16 @@ public class OperationLogic extends AbstractLogic { ...@@ -167,6 +202,16 @@ public class OperationLogic extends AbstractLogic {
for (OperationContentDto operationContentDto : serverOperationDto.operationContentDtoList) { for (OperationContentDto operationContentDto : serverOperationDto.operationContentDtoList) {
mOperationContentDao.insertOperationContent(operationContentDto); mOperationContentDao.insertOperationContent(operationContentDto);
} }
///////////////////////////////////////////////////////////////////////////////////////////////////////
// カテゴリ選択機能
///////////////////////////////////////////////////////////////////////////////////////////////////////
// 作業種別・作業のリレーションテーブルにデータ登録
for (OperationGroupMasterRelationDto operationGroupMasterRelationDto : serverOperationDto.operationGroupMasterRelationDtoList) {
mOperationGroupMasterOperationDao.insertOperationGroupMasterOperation(operationGroupMasterRelationDto);
}
///////////////////////////////////////////////////////////////////////////////////////////////////////
// カテゴリ選択機能 追加ここまで
///////////////////////////////////////////////////////////////////////////////////////////////////////
} }
// 作業担当グループ登録 // 作業担当グループ登録
...@@ -1135,9 +1180,9 @@ public class OperationLogic extends AbstractLogic { ...@@ -1135,9 +1180,9 @@ public class OperationLogic extends AbstractLogic {
* @param searchEndDateStr 終了期間 * @param searchEndDateStr 終了期間
* @return 作業情報配列 * @return 作業情報配列
*/ */
public List<OperationDto> getRefreshOperation(String searchWord, String searchStartDateStr, String searchEndDateStr, String reportTypeStr) { //public List<OperationDto> getRefreshOperation(String searchWord, String searchStartDateStr, String searchEndDateStr, String reportTypeStr) {
return mOperationDao.getOperations(searchWord, searchStartDateStr, searchEndDateStr, reportTypeStr); // return mOperationDao.getOperations(searchWord, searchStartDateStr, searchEndDateStr, reportTypeStr);
} //}
/** /**
* 作業毎に情報更新ボタンを表示するため、NeedSyncFlgをセットする。 * 作業毎に情報更新ボタンを表示するため、NeedSyncFlgをセットする。
......
...@@ -1435,7 +1435,8 @@ ...@@ -1435,7 +1435,8 @@
<!-- カテゴリ選択機能 --> <!-- カテゴリ選択機能 -->
<string name="no_child">これより下はありません。</string> <string name="no_child">これより下はありません。</string>
<string name="category_list">カテゴリ一覧</string>
<string name="title_category">カテゴリ</string> <string name="title_category">カテゴリ</string>
<string name="title_all_operation">全作業</string> <string name="title_all_operation">全作業</string>
<string name="category_list">カテゴリ一覧</string>
</resources> </resources>
...@@ -1443,7 +1443,8 @@ ...@@ -1443,7 +1443,8 @@
<!-- カテゴリ選択機能 --> <!-- カテゴリ選択機能 -->
<string name="no_child">이 아래로는 데이터가 없습니다.</string> <string name="no_child">이 아래로는 데이터가 없습니다.</string>
<string name="category_list">분류 목록</string>
<string name="title_category">분류</string> <string name="title_category">분류</string>
<string name="title_all_operation">전체 작업</string> <string name="title_all_operation">전체 작업</string>
<string name="category_list">분류 목록</string>
</resources> </resources>
\ No newline at end of file
...@@ -1441,7 +1441,8 @@ ...@@ -1441,7 +1441,8 @@
<!-- カテゴリ選択機能 --> <!-- カテゴリ選択機能 -->
<string name="no_child">No more data below.</string> <string name="no_child">No more data below.</string>
<string name="category_list">aaa</string> <string name="title_category">Category</string>
<string name="title_category">bbbb</string> <string name="title_all_operation">All</string>
<string name="title_all_operation">Absdafasll</string> <string name="category_list">Select Category</string>
</resources> </resources>
\ No newline at end of file
...@@ -72,4 +72,10 @@ ...@@ -72,4 +72,10 @@
<item></item> <item></item>
<item>縦(反転)</item> <item>縦(反転)</item>
</string-array> </string-array>
<string-array name="category_types">
<item>全て</item>
<item>カテゴリ</item>
</string-array>
</resources> </resources>
\ No newline at end of file
...@@ -74,4 +74,10 @@ ...@@ -74,4 +74,10 @@
<item>세로</item> <item>세로</item>
<item>세로(역방향)</item> <item>세로(역방향)</item>
</string-array> </string-array>
<string-array name="category_types">
<item>전체</item>
<item>분류</item>
</string-array>
</resources> </resources>
...@@ -117,4 +117,5 @@ ...@@ -117,4 +117,5 @@
<item>All</item> <item>All</item>
<item>Category</item> <item>Category</item>
</string-array> </string-array>
</resources> </resources>
\ No newline at end of file
...@@ -232,7 +232,7 @@ public class OperationListActivity extends ABVUIActivity { ...@@ -232,7 +232,7 @@ public class OperationListActivity extends ABVUIActivity {
// ツールバーのタイトル表示 // ツールバーのタイトル表示
//mOperationTitle = (TextView) findViewById(R.id.operation_title); //mOperationTitle = (TextView) findViewById(R.id.operation_title);
mOperationBatchSyncButton = (ImageButton) findViewById(R.id.btn_batch_sync); //mOperationBatchSyncButton = (ImageButton) findViewById(R.id.btn_batch_sync);
mCategoryLocationButton = (ImageButton) findViewById(R.id.btn_category_location); mCategoryLocationButton = (ImageButton) findViewById(R.id.btn_category_location);
...@@ -402,14 +402,14 @@ public class OperationListActivity extends ABVUIActivity { ...@@ -402,14 +402,14 @@ public class OperationListActivity extends ABVUIActivity {
// 検索ボタンを無効にする // 検索ボタンを無効にする
mSearchButton.setEnabled(false); mSearchButton.setEnabled(false);
// 一括同期ボタン表示 // 一括同期ボタン表示
mOperationBatchSyncButton.setVisibility(View.VISIBLE); //mOperationBatchSyncButton.setVisibility(View.VISIBLE);
} else { } else {
// 全て // 全て
// 検索ボタンを活性化 // 検索ボタンを活性化
mSearchButton.setEnabled(true); mSearchButton.setEnabled(true);
setCategoryImage(false); setCategoryImage(false);
// 一括同期ボタン非表示 // 一括同期ボタン非表示
mOperationBatchSyncButton.setVisibility(View.GONE); //mOperationBatchSyncButton.setVisibility(View.GONE);
//mOperationTitle.setText(R.string.title_all_operation); //mOperationTitle.setText(R.string.title_all_operation);
mTitleView.setText(R.string.title_all_operation); mTitleView.setText(R.string.title_all_operation);
} }
...@@ -420,7 +420,7 @@ public class OperationListActivity extends ABVUIActivity { ...@@ -420,7 +420,7 @@ public class OperationListActivity extends ABVUIActivity {
setCategoryImage(false); setCategoryImage(false);
mCategoryLocationButton.setVisibility(View.GONE); mCategoryLocationButton.setVisibility(View.GONE);
// 一括同期ボタンを非表示 // 一括同期ボタンを非表示
mOperationBatchSyncButton.setVisibility(View.GONE); //mOperationBatchSyncButton.setVisibility(View.GONE);
// 検索ボタンを活性化 // 検索ボタンを活性化
mSearchButton.setEnabled(true); mSearchButton.setEnabled(true);
} }
...@@ -2040,7 +2040,7 @@ public class OperationListActivity extends ABVUIActivity { ...@@ -2040,7 +2040,7 @@ public class OperationListActivity extends ABVUIActivity {
private OperationGroupMasterLogic mOperationGroupMasterLogic = AbstractLogic.getLogic(OperationGroupMasterLogic.class); private OperationGroupMasterLogic mOperationGroupMasterLogic = AbstractLogic.getLogic(OperationGroupMasterLogic.class);
private ABVListDialog mShowDialog; private ABVListDialog mShowDialog;
private OperationDao mOperationDao = AbstractDao.getDao(OperationDao.class); private OperationDao mOperationDao = AbstractDao.getDao(OperationDao.class);
private ImageButton mOperationBatchSyncButton; // カテゴリの一括同期ボタン //private ImageButton mOperationBatchSyncButton; // カテゴリの一括同期ボタン
// 作業種別のサービスオプション値を保持用フラグ // 作業種別のサービスオプション値を保持用フラグ
private boolean mOperationGroupMasterServiceOperationFlg; private boolean mOperationGroupMasterServiceOperationFlg;
...@@ -2218,10 +2218,10 @@ public class OperationListActivity extends ABVUIActivity { ...@@ -2218,10 +2218,10 @@ public class OperationListActivity extends ABVUIActivity {
public void checkBatchNeedSyncButton(Integer operationGroupMasterId) { public void checkBatchNeedSyncButton(Integer operationGroupMasterId) {
if (mOperationDao.hasNeedSyncOperationByGroupMasterId(operationGroupMasterId)) { if (mOperationDao.hasNeedSyncOperationByGroupMasterId(operationGroupMasterId)) {
// 選択したカテゴリ一覧でneedSyncFlgがtrueの作業が存在すれば、活性化する // 選択したカテゴリ一覧でneedSyncFlgがtrueの作業が存在すれば、活性化する
mOperationBatchSyncButton.setEnabled(true); //mOperationBatchSyncButton.setEnabled(true);
} else { } else {
// 一括同期ボタンを非活性化する // 一括同期ボタンを非活性化する
mOperationBatchSyncButton.setEnabled(false); //mOperationBatchSyncButton.setEnabled(false);
} }
} }
......
...@@ -65,7 +65,9 @@ public abstract class OperationListHelper { ...@@ -65,7 +65,9 @@ public abstract class OperationListHelper {
private List<OperationDto> filterOperationList() { private List<OperationDto> filterOperationList() {
try { try {
String reportTypeStr = getUserPref(mAppActivity, AppDefType.UserPrefKey.OPERATION_REPORT_TYPES, null); String reportTypeStr = getUserPref(mAppActivity, AppDefType.UserPrefKey.OPERATION_REPORT_TYPES, null);
operationDtoList = operationLogic.getRefreshOperation(mAppActivity.mSearchWord, mAppActivity.mStartDateStr, mAppActivity.mEndDateStr, reportTypeStr); // OperationGroupMasterListHelper か HomeOperationListHelper かどちらかのを実行
operationDtoList = findOperationList();
//operationDtoList = operationLogic.getRefreshOperation(mAppActivity.mSearchWord, mAppActivity.mStartDateStr, mAppActivity.mEndDateStr, reportTypeStr);
for (OperationDto operationDto : operationDtoList) { for (OperationDto operationDto : operationDtoList) {
// 該当する作業の最後に同期した日付を取得 // 該当する作業の最後に同期した日付を取得
......
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