Commit 12edc56c by Kazuyuki Hida

ロック周りの不具合修正

parent 658b9ed9
...@@ -5,6 +5,7 @@ import org.json.adf.JSONObject; ...@@ -5,6 +5,7 @@ import org.json.adf.JSONObject;
import java.util.Date; import java.util.Date;
import jp.agentec.abook.abv.bl.common.exception.AcmsException; import jp.agentec.abook.abv.bl.common.exception.AcmsException;
import jp.agentec.abook.abv.bl.common.exception.JSONValidationException;
/** /**
* checkapi/lockReport/のレスポンスを変換するクラス * checkapi/lockReport/のレスポンスを変換するクラス
...@@ -23,7 +24,8 @@ public class LockReportJSON extends AcmsCommonJSON { ...@@ -23,7 +24,8 @@ public class LockReportJSON extends AcmsCommonJSON {
} }
@Override @Override
protected void parse(JSONObject json) { protected void parse(JSONObject json) throws JSONValidationException {
super.parse(json);
presentTimeUTC = getDateOrNull(json, "presentTimeUTC"); presentTimeUTC = getDateOrNull(json, "presentTimeUTC");
reportStatus = getIntOrDef(json, "reportStatus", BAD_STATE); reportStatus = getIntOrDef(json, "reportStatus", BAD_STATE);
reportLockUserId = getStringOrNull(json, "reportLockUserId"); reportLockUserId = getStringOrNull(json, "reportLockUserId");
......
...@@ -5,6 +5,7 @@ import org.json.adf.JSONObject; ...@@ -5,6 +5,7 @@ import org.json.adf.JSONObject;
import java.util.Date; import java.util.Date;
import jp.agentec.abook.abv.bl.common.exception.AcmsException; import jp.agentec.abook.abv.bl.common.exception.AcmsException;
import jp.agentec.abook.abv.bl.common.exception.JSONValidationException;
public class UnlockReportJSON extends AcmsCommonJSON { public class UnlockReportJSON extends AcmsCommonJSON {
...@@ -17,7 +18,8 @@ public class UnlockReportJSON extends AcmsCommonJSON { ...@@ -17,7 +18,8 @@ public class UnlockReportJSON extends AcmsCommonJSON {
} }
@Override @Override
protected void parse(JSONObject json) { protected void parse(JSONObject json) throws JSONValidationException {
super.parse(json);
presentTimeUTC = getDateOrNull(json, "presentTimeUTC"); presentTimeUTC = getDateOrNull(json, "presentTimeUTC");
reportStatus = getIntOrDef(json, "", BAD_STATE); reportStatus = getIntOrDef(json, "", BAD_STATE);
} }
......
...@@ -247,7 +247,9 @@ public class TaskReportDao extends AbstractDao { ...@@ -247,7 +247,9 @@ public class TaskReportDao extends AbstractDao {
if (reportStartDate != null) { if (reportStartDate != null) {
sql.append("AND datetime(report_start_date)=datetime(?);"); sql.append("AND datetime(report_start_date)=datetime(?);");
} }
if (loginId != null) {
sql.append(" AND report_lock_user_id <> ? "); //自分以外のロックを変更しないため
}
args.add(reportStatus); args.add(reportStatus);
args.add(reportLockUserId); args.add(reportLockUserId);
args.add(reportLockUserName); args.add(reportLockUserName);
......
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