Commit d3af397f by Yujin Seo

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

表示関係の不具合を修正

See merge request !280
parents 60cd4c8a 0c1f732c
......@@ -228,6 +228,7 @@ public class TaskReportDao extends AbstractDao {
*/
public void updateReportLock(
String taskKey,
Long taskReportId,
Date reportStartDate,
int reportStatus,
String reportLockUserId,
......@@ -243,20 +244,24 @@ public class TaskReportDao extends AbstractDao {
sql.append(" report_lock_user_id=?, ");
sql.append(" report_lock_user_name=?, ");
sql.append(" report_lock_time=? ");
sql.append(" WHERE task_key=? ");
if (reportStartDate != null) {
sql.append("AND datetime(report_start_date)=datetime(?) ");
sql.append(" WHERE task_report_id=? ");
sql.append(" AND datetime(report_start_date)=datetime(?) ");
} else {
sql.append(" WHERE task_key=? ");
}
if (loginId != null) {
sql.append(" AND report_lock_user_id <> ? "); //自分以外のロックを変更しないため
sql.append(" AND report_lock_user_id=? "); //自分以外のロックを変更しないため
}
args.add(reportStatus);
args.add(reportLockUserId);
args.add(reportLockUserName);
args.add(reportLockTime);
args.add(taskKey);
if (reportStartDate != null) {
args.add(reportStartDate);
args.add(taskReportId);
args.add(DateTimeUtil.toStringInTimeZone(reportStartDate, DateTimeFormat.yyyyMMddHHmmss_hyphen, "UTC"));
} else {
args.add(taskKey);
}
if (loginId != null) {
args.add(loginId);
......
......@@ -30,7 +30,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, reportStartDate, r.getExtParam().reportStatus);
updateLocalDB(taskKey, taskReportId, reportStartDate, r.getExtParam().reportStatus);
}
return r;
}
......@@ -66,6 +66,7 @@ public class LockReportLogic extends AbstractLogic {
private void updateLocalDB(
String taskKey,
Long taskReportId,
Date reportStartDate,
int reportStatus
) {
......@@ -73,6 +74,7 @@ public class LockReportLogic extends AbstractLogic {
TaskReportDao dao = AbstractDao.getDao(TaskReportDao.class);
dao.updateReportLock(
taskKey,
taskReportId,
reportStartDate,
reportStatus,
member.loginId,
......
......@@ -17,7 +17,6 @@ import jp.agentec.adf.util.DateTimeUtil;
import static java.net.HttpURLConnection.HTTP_OK;
import static jp.agentec.abook.abv.bl.acms.client.json.OperationDataJSON.ReportStartDate;
import static jp.agentec.abook.abv.bl.acms.client.json.OperationDataJSON.ReportStatus;
import static jp.agentec.abook.abv.bl.acms.client.json.OperationDataJSON.TaskKey;
import static jp.agentec.abook.abv.bl.acms.client.json.OperationDataJSON.TaskReportId;
public class UnlockReportLogic extends AbstractLogic {
......@@ -30,7 +29,7 @@ public class UnlockReportLogic extends AbstractLogic {
String loginId = cache.getMemberInfo().loginId;
Result r = sendUnlockReport(taskKey, taskReportId, reportStartDate);
if (r.result == 0) {
updateLocalDB(taskKey, reportStartDate, r.extParam.getReportStatus(), loginId);
updateLocalDB(taskKey, taskReportId, reportStartDate, r.extParam.getReportStatus(), loginId);
}
return r;
}
......@@ -64,6 +63,7 @@ public class UnlockReportLogic extends AbstractLogic {
private void updateLocalDB(
String taskKey,
Long taskReportId,
Date reportStartDate,
int reportStatus,
String loginId
......@@ -72,6 +72,7 @@ public class UnlockReportLogic extends AbstractLogic {
TaskReportDao dao = AbstractDao.getDao(TaskReportDao.class);
dao.updateReportLock(
taskKey,
taskReportId,
reportStartDate,
reportStatus,
null,
......
Subproject commit 65ba4f84e09897cbf524b7f266bcefb158448b33
Subproject commit b1f1c80f998120d31c1f58128434c894ae57e2e1
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