Commit 3820fd74 by yuichiro ogawa

Merge branch 'features/1.2.1_kagome_ogawa-y' into contract/kagome/1.2.2

parents a778f3fa 1f696988
......@@ -211,6 +211,9 @@ public class OperationListActivity extends ABVUIActivity {
// 定期点検で同期ボタンタップの日付と現在の日付が異なる且つ、作業するデータが存在しない場合、needSyncFlgをtrueに更新
updateNeedSyncRoutineOperation();
// KAGOME対応#41427
// 報告回答で同期ボタンタップの日付と現在の日付が異なる且つ、作業するデータが存在しない場合、needSyncFlgをtrueに更新
updateNeedSyncReplyOperation();
// 非活性化する(ホーム画面ではホームボタンが必要ないため)
ImageButton operationHomeButton = (ImageButton) findViewById(R.id.btn_operation_home);
......@@ -855,6 +858,9 @@ public class OperationListActivity extends ABVUIActivity {
}
}
putUserPref(String.format(AppDefType.UserPrefKey.SYNCED_OPERATION_ID, operationId), DateTimeUtil.toString(DateTimeUtil.getCurrentSqlDate(), DateTimeFormat.yyyyMMdd_none));
} else if (reportType == ReportType.ReportReply) {
// KAGOME対応 #41427 報告回答の場合も同期のタイミングを保管し、前日完了にして以降同期していない作業を判定する
putUserPref(String.format(AppDefType.UserPrefKey.SYNCED_OPERATION_ID, operationId), DateTimeUtil.toString(DateTimeUtil.getCurrentSqlDate(), DateTimeFormat.yyyyMMdd_none));
}
} catch (AcmsException e) {
//noinspection EnumSwitchStatementWhichMissesCases
......@@ -1070,6 +1076,17 @@ public class OperationListActivity extends ABVUIActivity {
}
// サーバーから取得した作業情報がローカルに存在しないので削除する
for (TaskDto taskDto : localTaskList) {
// KAGOME #41415 複数端末で報告時にCMS同期すると、一時保存データがすべて消えてしまう不具合の対応
boolean localSaved = false;
List<TaskReportDto> taskReportDtos = mTaskReportDao.getTaskReportListByTaskKey(taskDto.taskKey);
for (TaskReportDto taskReportDto : taskReportDtos) {
if (taskReportDto.localSavedFlg) {
localSaved = true;
break;
}
}
if (localSaved) {continue;}
mOperationLogic.deleteTaskFileData(operationId, operationContentDto.contentId, taskDto.taskKey, TaskReportLevel.ReportType);
mTaskDao.delete(taskDto);
}
......@@ -1764,6 +1781,23 @@ public class OperationListActivity extends ABVUIActivity {
}
/**
* KAGOME対応
* 報告回答の同期ボタンタップの日付と現在の日付が異なる且つ、作業するデータが存在しない場合
* needSyncFlgをtrueに更新する
*/
private void updateNeedSyncReplyOperation() {
// 同期ボタンタップの日付と現在の日付が異なる且つ、作業するデータが存在しない場合needSyncFlgをtrueに更新する
List<OperationDto> replyOperationList = mOperationDao.getOperationByReportType(Constant.ReportType.ReportReply);
for (OperationDto replyDto : replyOperationList) {
String syncedDate = getUserPref(String.format(AppDefType.UserPrefKey.SYNCED_OPERATION_ID, replyDto.operationId), "");
if (!replyDto.needSyncFlg && !syncedDate.equals(DateTimeUtil.toString(DateTimeUtil.getCurrentSqlDate(), DateTimeFormat.yyyyMMdd_none))) {
// 同期ボタンタップの日付と現在の日付が異なる且つ、作業するデータが存在しない場合
mOperationLogic.updateSyncOperation(replyDto.operationId, true);
}
}
}
/**
* 作業用コンテンツダウンロード時、ダウンロードかダウンロード再開か判定して行う。
* @param contentDto
* @return
......
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