Commit 2044e9c0 by Lee Munkyeong

Merge branch 'features/1.4.100_develop_mk' into 'features/1.4.201'

課題票75,110対応

See merge request !238
parents 47084337 1e9de99e
......@@ -130,7 +130,7 @@ public class OperationDao extends AbstractDao {
dto.permitCodeRequiredFlg = cursor.getInt(column);
}
column = cursor.getColumnIndex("display_permission_flg ");
column = cursor.getColumnIndex("display_permission_flg");
if (column != -1) {
dto.displayPermissionFlg = cursor.getInt(column);
}
......
Subproject commit 89f7f804a54cf4890189864d9384f6b3de21ccb4
Subproject commit 4b07d503bb21575b86ecea757fd8ca4323806371
......@@ -959,6 +959,7 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
if (StringUtil.equalsAny(mCmd, ABookKeys.CMD_MOVE_HOT_SPOT, ABookKeys.CMD_INSERT_TASK_REPORT, ABookKeys.CMD_UPDATE_TASK_REPORT,
ABookKeys.CMD_DELETE_TASK_REPORT, ABookKeys.CMD_CANCEL_TASK_REPORT, ABookKeys.CMD_LOCAL_SAVE_TASK_REPORT, ABookKeys.CMD_CHANGE_TASK_REPORT, ABookKeys.CMD_DELETE_PROCESS)) {
try {
if (StringUtil.equalsAny(mCmd, ABookKeys.CMD_INSERT_TASK_REPORT, ABookKeys.CMD_UPDATE_TASK_REPORT)) {
// リソースパターンの適用
......@@ -1012,6 +1013,7 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
public Object callback(Object ret) {
final boolean isError = (boolean)ret;
closeProgressPopup();
syncOperation(mOperationId, mOperationType, false);
// 報告・報告(回答)の切り替えボタンタップ、連続作業の全削除ボタンタップ
if (mCmd.equals(ABookKeys.CMD_CHANGE_TASK_REPORT) || mCmd.equals(ABookKeys.CMD_DELETE_PROCESS)) {
afterABookCheckApi(mCmd, mTaskKey, 0, "", null, isOperationPdf());
......
......@@ -240,6 +240,35 @@ public abstract class ABVUIActivity extends ABVAuthenticatedActivity {
// ログ送信可否を確認
LogUtil.checkSendLogFlag();
}
} catch (ABVException e) {
stopUpdateAnimation();
switch (e.getCode()) {
case C_I_CONTENT_0001:
handleErrorMessageToast(ABVExceptionCode.C_I_CONTENT_0001);
break;
case S_E_ACMS_1403:
// 再ログイン
onAuthenticationFailed();
break;
case C_I_CONTENT_0002:
// コンテンツダウンロード中は自動更新を行わない。
if (!isAutoRefresh) {
handleErrorMessageToast(ABVExceptionCode.C_I_CONTENT_0002);
}
break;
case S_E_ACMS_0500:
handleErrorMessageToast(ABVExceptionCode.S_E_ACMS_0500);
break;
case S_E_ACMS_INVALID_RESPONSE:
// サーバー通信エラー時、エラーメッセージ表示
handleErrorMessageToast(ABVExceptionCode.S_E_ACMS_INVALID_RESPONSE);
break;
default:
Logger.e(TAG, "Exception DataRefresh", e);
handleErrorMessageToast(ErrorCode.E107);
break;
}
throw e;
} catch (Exception e) {
stopUpdateAnimation();
if (startRefresh) {
......
......@@ -54,6 +54,7 @@ public enum ErrorCode {
L121(R.string.L121),
L122(R.string.L122),
L124(R.string.L124),
L125(R.string.L125),
C_E_SYSTEM_0001(R.string.C_E_SYSTEM_0001),
C_E_SYSTEM_0002(R.string.C_E_SYSTEM_0002),
......
......@@ -133,17 +133,6 @@ public class OperationListActivity extends ABVUIActivity {
private TextView mEndDate; // 検索画面の作業終了日
private Dialog mSearchDialog;
private Date mOperationLastEditDate;
private OperationDao mOperationDao = AbstractDao.getDao(OperationDao.class);
private OperationContentDao mOperationContentDao = AbstractDao.getDao(OperationContentDao.class);
private TaskReportDao mTaskReportDao = AbstractDao.getDao(TaskReportDao.class);
private OperationLogic mOperationLogic = AbstractLogic.getLogic(OperationLogic.class);
private OperationGroupMasterLogic mOperationGroupMasterLogic = AbstractLogic.getLogic(OperationGroupMasterLogic.class);
private PushMessageLogic mPushMessageLogic = AbstractLogic.getLogic(PushMessageLogic.class);
private TaskDao mTaskDao = AbstractDao.getDao(TaskDao.class);
private boolean activityResultFlg;
......@@ -922,6 +911,7 @@ public class OperationListActivity extends ABVUIActivity {
* @param buttonEventFlag
* @return result errorMessage
*/
@Override
public String syncOperation(final long operationId, int reportType, boolean buttonEventFlag) {
final StringBuilder errorMsg = new StringBuilder();
Logger.i(TAG, "---sync start");
......@@ -1082,6 +1072,7 @@ public class OperationListActivity extends ABVUIActivity {
* @throws NoSuchAlgorithmException
* @throws ZipException
*/
@Override
public Date receptionTaskData(long operationId, Callback progressCallback, StringBuilder errorMsg) throws NetworkDisconnectedException, ABVException, IOException, InterruptedException, NoSuchAlgorithmException, ZipException {
GetOperationDataParameters param = new GetOperationDataParameters(ABVDataCache.getInstance().getMemberInfo().sid, operationId);
OperationDto operationDto = mOperationLogic.getOperation(operationId);
......@@ -1216,80 +1207,9 @@ public class OperationListActivity extends ABVUIActivity {
return lastEditDate;
}
/**
* 添付ファイルが存在する場合、取得して解凍する。
* @param operationId
* @param taskReportLevel
* @param contentId
* @param taskId
* @param taskKey
* @param attachedFileName
* @param processKey 固定キー
* @param phaseNo 固定NO
* @throws ABVException
* @throws InterruptedException
* @throws ZipException
* @throws NoSuchAlgorithmException
* @throws IOException
*/
public void refreshTaskFile(final long operationId, final int taskReportLevel, long contentId,
final long taskId, final String taskKey, final String attachedFileName,
final String processKey, final Integer phaseNo) throws Exception {
// 既存の添付ディレクトリ削除
FileUtil.delete(ABVEnvironment.getInstance().getTempTaskDirPath(contentId, taskKey));
String reportLocalAttachedFileName = mTaskReportDao.getTaskReportAttachedFileName(taskKey, taskReportLevel);
if (attachedFileName != null && !attachedFileName.equals(reportLocalAttachedFileName)) {
Logger.i(TAG, "[Get Task Report Files] operationId=%s, taskKey=%s, taskId=%s, attachedFileName=%s", operationId, taskKey, taskId, attachedFileName);
// #32926 start
String saveAttacedFilePath = ABVEnvironment.getInstance().getOperationTaskReportLevelDirPath(operationId, taskKey, taskReportLevel);
if (processKey != null && phaseNo != 0) {
saveAttacedFilePath = ABVEnvironment.getInstance().getOperationDirectionOrContinuousReportDirPath(operationId, taskKey, taskReportLevel, processKey, phaseNo);
}
FileUtil.delete(saveAttacedFilePath);
// #32926 end
String outputFilePath = mOperationLogic.getTaskFile(operationId, taskKey, taskId, attachedFileName, taskReportLevel);
ContentFileExtractor.getInstance().extractZipFile(contentId, outputFilePath, saveAttacedFilePath,null, true);
}
}
/**
* 定期点検用ファイル更新
* @param operationId
* @param contentId
* @param taskId
* @param taskKey
* @param taskReportId
* @param reportStartDate
* @param reportAttachedFileName
* @throws ABVException
* @throws InterruptedException
* @throws ZipException
* @throws NoSuchAlgorithmException
* @throws IOException
*/
public void refreshRoutineTaskFile(final long operationId, final long contentId, final long taskId, final String taskKey, final int taskReportId, final int taskReportInfoId, final Date reportStartDate, final String reportAttachedFileName) throws Exception {
String reportStartDateHypn = DateTimeUtil.toString(reportStartDate, DateTimeFormat.yyyyMMddHHmmss_hyphen);
final String reportStartDateNone = DateTimeUtil.toString_yyyyMMddHHmmss_none(reportStartDate);
// 既存の添付ディレクトリ削除
FileUtil.delete(ABVEnvironment.getInstance().getTempTaskDirPath(contentId, taskKey));
String reportLocalAttachedFileName = mTaskReportDao.getRoutineTaskReportAttachedFileName(taskKey, taskReportId, reportStartDateHypn);
boolean getReportFileFlg = !StringUtil.isNullOrEmpty(reportAttachedFileName) && !reportAttachedFileName.equals(reportLocalAttachedFileName);
if (getReportFileFlg) {
Logger.i(TAG, "[Get Task Report Files] operationId=%s, taskKey=%s, taskId=%s, attachedFileName=%s", operationId, taskKey, taskId, reportAttachedFileName);
// #32926 start
int taskReportLevel = 0;
FileUtil.delete(ABVEnvironment.getInstance().getRoutineTaskReportDirFilePath(operationId, taskKey, taskReportId, reportStartDateNone));
// #32926 end
String outputFilePath = mOperationLogic.getRoutineTaskReportFile(operationId, taskKey, taskId, taskReportId, taskReportInfoId, reportStartDateNone, reportAttachedFileName);
// #32926 start
ContentFileExtractor.getInstance().extractZipFile(contentId, outputFilePath,
ABVEnvironment.getInstance().getRoutineTaskReportDirFilePath(operationId, taskKey, taskReportId, reportStartDateNone), null, true);
// #32926 end
}
}
/**
* 360コンテンツ登録ダイアログ
......@@ -1373,47 +1293,6 @@ public class OperationListActivity extends ABVUIActivity {
}
/**
* listDtoの中に第2引数のdtoが存在するかチェックメソッド
* @param listDto リストDto
* @param dto ターゲットDto
* @return
*/
private boolean isExistsTaskInList(List<TaskDto> listDto, TaskDto dto) {
for (TaskDto lDto : listDto) {
if (lDto.taskKey.equals(dto.taskKey)) {
return true;
}
}
return false;
}
/**
* 報告存在チェック
* @param listDto
* @param rDto
* @return
*/
private boolean isExistsTaskReportInList(List<TaskReportDto> listDto, TaskReportDto rDto, boolean isRoutineTask) {
for (TaskReportDto lDto : listDto) {
if (isRoutineTask) {
// 定期点検の場合、taskKey,taskReportId,reportStartDateで判定
if (lDto.taskKey.equals(rDto.taskKey) &&
lDto.taskReportId == rDto.taskReportId &&
lDto.reportStartDate.equals(rDto.reportStartDate)) {
return true;
}
} else {
// taskKeyと作業報告階層で判定
if (lDto.taskKey.equals(rDto.taskKey) &&
lDto.taskReportLevel == rDto.taskReportLevel) {
return true;
}
}
}
return false;
}
/**
* 作業報告画面に移動
* @param operationDto
*/
......
......@@ -4957,7 +4957,7 @@ public class ContentViewActivity extends ABVContentViewActivity {
// 空き容量が足りない
handleErrorMessageToast(ErrorCode.STORAGE_ERROR);
} else {
handleErrorMessageToast(ErrorCode.L120);
handleErrorMessageToast(ErrorCode.L125);
}
}
});
......
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