Commit c203b456 by Kazuyuki Hida

一時保存時のロックの処理を修正。

parent c7d8013b
......@@ -1110,7 +1110,7 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
TaskReportDao dao = AbstractDao.getDao(TaskReportDao.class);
if (dao.isLocalSaved(mTaskKey, taskReportId, DateTimeUtil.toString(startDate, DateTimeFormat.yyyyMMddHHmmss_hyphen))) {
// ローカルにしかない場合はロックしない
afterABookCheckApi(mCmd, mTaskKey, 0, "", null);
afterABookCheckApi(mCmd, mTaskKey, 0, "", "{'reportStatus':0}");
} else {
// ロック
LockReportLogic.Result r = LockReportLogic.newInstance().lock(taskKey, taskReportId, startDate);
......@@ -1123,7 +1123,12 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
// アンロック
UnlockReportLogic.Result r = UnlockReportLogic.newInstance().unlock(taskKey, taskReportId, startDate);
// JSコールバック
afterABookCheckApi(mCmd, mTaskKey, r.getResult(), r.getMessage(), r.getExtParam().json());
if (r.getMessage().length() > 0) {
// アンロックの失敗は無視
afterABookCheckApi(mCmd, mTaskKey, 0, "", "{'reportStatus':0}");
} else {
afterABookCheckApi(mCmd, mTaskKey, r.getResult(), r.getMessage(), r.getExtParam().json());
}
}
}
......
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