Commit 870267ce by Kazuyuki Hida

一時保存の作業を再度開いたときに、DBの内容をロックが成功した状態にしてしまっていたのを修正。

parent 66104d4f
......@@ -31,7 +31,7 @@ public class LockReportLogic extends AbstractLogic {
public Result lock(String taskKey, Long taskReportId, Date reportStartDate) {
Result r = sendLockReport(taskKey, taskReportId, reportStartDate);
if (r.result == 0) {
updateLocalDB(taskKey, taskReportId, reportStartDate, r.getExtParam().reportStatus);
updateLocalDB(taskKey, taskReportId, reportStartDate, r.getExtParam());
}
return r;
}
......@@ -69,18 +69,17 @@ public class LockReportLogic extends AbstractLogic {
String taskKey,
Long taskReportId,
Date reportStartDate,
int reportStatus
ExtParam extParam
) {
MemberInfoDto member = cache.getMemberInfo();
TaskReportDao dao = AbstractDao.getDao(TaskReportDao.class);
dao.updateReportLock(
taskKey,
taskReportId,
reportStartDate,
reportStatus,
member.loginId,
member.memberName,
new Date()
extParam.reportStatus,
extParam.reportLockUserId,
extParam.reportLockUserName,
extParam.reportLockTime
);
}
......@@ -94,16 +93,40 @@ public class LockReportLogic extends AbstractLogic {
static Result succsess(LockReportJSON reportJSON, Long taskReportId, Date reportStartDate) {
// 成功したとき
Result result = new Result();
result.result = reportJSON.httpStatus == HTTP_OK || reportJSON.httpStatus == HTTP_NOT_FOUND ? 0 : 1;
result.message = "";
result.extParam = new ExtParam(
reportJSON.httpStatus == HTTP_OK ? reportJSON.getReportStatus() : 0,
reportJSON.getReportLockUserId(),
reportJSON.getReportLockUserName(),
reportJSON.getReportLockTime(),
taskReportId,
reportStartDate
);
if (reportJSON.httpStatus == HTTP_OK) {
result.result = 0;
result.message = "";
result.extParam = new ExtParam(
reportJSON.getReportStatus(),
reportJSON.getReportLockUserId(),
reportJSON.getReportLockUserName(),
reportJSON.getReportLockTime(),
taskReportId,
reportStartDate
);
} else if (reportJSON.httpStatus == HTTP_NOT_FOUND) {
result.result = 0;
result.message = "";
result.extParam = new ExtParam(
0,
null,
null,
null,
taskReportId,
reportStartDate
);
} else {
result.result = 1;
result.message = "";
result.extParam = new ExtParam(
0,
null,
null,
null,
taskReportId,
reportStartDate
);
}
return result;
}
......
......@@ -39,14 +39,14 @@ app_versioncode=1
#cms server
#acms_address=https://check.abookcloud.com/acms
#download_server_address=https://check.abookcloud.com/acms
acms_address=https://abook188-1.abook.bz/acms
download_server_address=https://abook188-1.abook.bz/acms
acms_address=https://atform-st.sato.co.jp/acms
download_server_address=https://atform-st.sato.co.jp/acms
#acms_address=http://10.0.2.2:8080/acms
#download_server_address=http://10.0.2.2:8080/acms
#syncview server
websocket_server_http_url=https://abook188-1.abook.bz/v1
websocket_server_ws_url=wss://abook188-1.abook.bz/v1
websocket_server_http_url=https://atform-st.sato.co.jp/v1
websocket_server_ws_url=wss://atform-st.sato.co.jp/v1
#WebSocket debug出力
websocket_debug=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