Commit 01d1e81a by Kazuyuki Hida

ロック周りの不具合修正

parent 368658bf
...@@ -2,6 +2,9 @@ package jp.agentec.abook.abv.bl.acms.client.parameters; ...@@ -2,6 +2,9 @@ package jp.agentec.abook.abv.bl.acms.client.parameters;
import java.util.Date; import java.util.Date;
import jp.agentec.adf.util.DateTimeFormat;
import jp.agentec.adf.util.DateTimeUtil;
/** /**
* checkapi/unlockReport/のリクエストに使うパラメータ * checkapi/unlockReport/のリクエストに使うパラメータ
*/ */
...@@ -9,7 +12,7 @@ public class UnlockReportParameters extends AcmsParameters { ...@@ -9,7 +12,7 @@ public class UnlockReportParameters extends AcmsParameters {
private String taskKey; private String taskKey;
private Long taskReportId; private Long taskReportId;
private Date reportStartDate; private String reportStartDate; // 書式の問題があるので、あえて文字列
public UnlockReportParameters( public UnlockReportParameters(
String sid, String sid,
...@@ -21,18 +24,18 @@ public class UnlockReportParameters extends AcmsParameters { ...@@ -21,18 +24,18 @@ public class UnlockReportParameters extends AcmsParameters {
this.taskKey = taskKey; this.taskKey = taskKey;
this.taskReportId = taskReportId; this.taskReportId = taskReportId;
this.reportStartDate = reportStartDate; this.reportStartDate = DateTimeUtil.toString(reportStartDate, DateTimeFormat.yyyyMMddHHmmssSSS_hyphen);
} }
String getTaskKey() { public String getTaskKey() {
return taskKey; return taskKey;
} }
Long getTaskReportId() { public Long getTaskReportId() {
return taskReportId; return taskReportId;
} }
Date getReportStartDate() { public String getReportStartDate() {
return reportStartDate; return reportStartDate;
} }
} }
...@@ -23,7 +23,9 @@ public class LockReportLogic extends AbstractLogic { ...@@ -23,7 +23,9 @@ 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) {
updateLocalDB(taskKey, reportStartDate, r.getExtParam().reportStatus); updateLocalDB(taskKey, reportStartDate, r.getExtParam().reportStatus);
}
return r; return r;
} }
......
...@@ -25,7 +25,9 @@ public class UnlockReportLogic extends AbstractLogic { ...@@ -25,7 +25,9 @@ public class UnlockReportLogic extends AbstractLogic {
public Result unlock(String taskKey, Long taskReportId, Date reportStartDate) { public Result unlock(String taskKey, Long taskReportId, Date reportStartDate) {
String loginId = cache.getMemberInfo().loginId; String loginId = cache.getMemberInfo().loginId;
Result r = sendUnlockReport(taskKey, taskReportId, reportStartDate); Result r = sendUnlockReport(taskKey, taskReportId, reportStartDate);
if (r.result == 0) {
updateLocalDB(taskKey, reportStartDate, r.extParam.getReportStatus(), loginId); updateLocalDB(taskKey, reportStartDate, r.extParam.getReportStatus(), loginId);
}
return r; return r;
} }
......
Subproject commit 1814792895150146df8e38612247fc6f5c2ce69d Subproject commit 30c9f2ce9b4bb74e8851afb11b2b4670bca6ce68
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