Commit 9ad55880 by Yujin Seo

Merge branch 'feature/contract/sato/1.0.300_51898_look4' into 'contract/sato/1.0.300'

ロック周りを修正

See merge request !282
parents 4cc7e141 3d97a019
......@@ -522,7 +522,7 @@ public class TaskReportDao extends AbstractDao {
int count;
StringBuilder sql = new StringBuilder();
sql.append("SELECT count(*) FROM t_task_report");
sql.append(" WHERE task_report_info_id > 0");
sql.append(" WHERE task_status = 999 ");
if (reportStartDate == null) {
// 報告
sql.append(" AND task_key=?");
......
......@@ -13,6 +13,7 @@ import jp.agentec.abook.abv.bl.dto.MemberInfoDto;
import jp.agentec.adf.util.DateTimeFormat;
import jp.agentec.adf.util.DateTimeUtil;
import static java.net.HttpURLConnection.HTTP_NOT_FOUND;
import static java.net.HttpURLConnection.HTTP_OK;
import static jp.agentec.abook.abv.bl.acms.client.json.OperationDataJSON.ReportLockTime;
import static jp.agentec.abook.abv.bl.acms.client.json.OperationDataJSON.ReportLockUserId;
......@@ -94,7 +95,7 @@ public class LockReportLogic extends AbstractLogic {
static Result succsess(LockReportJSON reportJSON, Long taskReportId, Date reportStartDate) {
// 成功したとき
Result result = new Result();
result.result = reportJSON.httpStatus == HTTP_OK ? 0 : 1;
result.result = reportJSON.httpStatus == HTTP_OK || reportJSON.httpStatus == HTTP_NOT_FOUND ? 0 : 1;
result.message = "";
result.extParam = new ExtParam(
reportJSON.getReportStatus(),
......
......@@ -1112,15 +1112,10 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
String taskKey = abookCheckParam.get(TaskKey);
Date startDate = dateOrNull(abookCheckParam.get("reportStartDate"));
TaskReportDao dao = AbstractDao.getDao(TaskReportDao.class);
if (dao.isLocalSaved(mTaskKey, taskReportId, DateTimeUtil.toString(startDate, DateTimeFormat.yyyyMMddHHmmss_hyphen))) {
// ローカルにしかない場合はロックしない
afterABookCheckApi(mCmd, mTaskKey, 0, "", "{'reportStatus':0}");
} else {
// ロック
LockReportLogic.Result r = LockReportLogic.newInstance().lock(taskKey, taskReportId, startDate);
// JSコールバック
afterABookCheckApi(mCmd, mTaskKey, r.getResult(), r.getMessage(), r.getExtParam().json());
}
// ロック
LockReportLogic.Result r = LockReportLogic.newInstance().lock(taskKey, taskReportId, startDate);
// JSコールバック
afterABookCheckApi(mCmd, mTaskKey, r.getResult(), r.getMessage(), r.getExtParam().json());
} else if (mCmd.equals(ABookKeys.CMD_UNLOCK_REPORT)) {
String taskKey = abookCheckParam.get(TaskKey);
Date startDate = dateOrNull(abookCheckParam.get("reportStartDate"));
......
......@@ -184,6 +184,7 @@ public class DashboardActivity extends OperationActivity {
settings.setPluginState(WebSettings.PluginState.ON); // 「EventHub.removeMessages(int what = 107) is not supported before the WebViewCore is set up.」のエラー対応(あまり効果ない?)
settings.setDomStorageEnabled(true); // WebStorage有効化
settings.setAppCacheEnabled(false);
settings.setDisplayZoomControls(false);
settings.setCacheMode(WebSettings.LOAD_NO_CACHE);
settings.setAllowFileAccessFromFileURLs(true); //Android7利用で警告ダイヤログ表示問題対応
//ターゲットバージョン30以上からデフォルトがfalseに設定されている問題対応
......
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