Commit 870267ce by Kazuyuki Hida

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

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