Commit 9cbb3dc9 by Kazuyuki Hida

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

ダッシュボードの件数表示と一覧表示の不具合を修正

See merge request !272
parents 5887a91f b10a77da
......@@ -181,13 +181,15 @@ public abstract class AcmsJSONParser extends CloneableObject {
}
}
protected Date getDateOrNull(JSONObject json, String key) {
protected Date getDateOrNull(JSONObject json, String key, String timeZone) {
if (json.has(key)) {
return DateTimeUtil.toDate(json.getString(key), "UTC", DateTimeFormat.yyyyMMddHHmmss_hyphen);
return DateTimeUtil.toDate(json.getString(key), timeZone, DateTimeFormat.yyyyMMddHHmmss_hyphen);
} else {
return null;
}
}
protected Date getDateOrNull(JSONObject json, String key) {
return getDateOrNull(json, key, "UTC");
}
}
......@@ -6,6 +6,7 @@ import org.json.adf.JSONObject;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.TimeZone;
import jp.agentec.abook.abv.bl.common.exception.AcmsException;
import jp.agentec.abook.abv.bl.common.log.Logger;
......@@ -34,6 +35,7 @@ public class DashboardStatusJSON extends AcmsCommonJSON {
// 使わないので無視 → //presentTimeUTC = dateOrNull(json.getString("presentTimeUTC"));
JSONArray oprations = json.getJSONArray(OperationList);
String timeZone = TimeZone.getDefault().getID();
reportStatuses = new ArrayList<DashboardStatusDto>();
for (int i = 0; i < oprations.length(); i++) {
......@@ -46,7 +48,7 @@ public class DashboardStatusJSON extends AcmsCommonJSON {
JSONObject repJson = reports.getJSONObject(j);
String taskKey = getStringOrNull(repJson, TaskKey);
Long taskReportId = getLongOrNull(repJson, TaskReportId);
Date reportStartDate = getDateOrNull(repJson, ReportStartDate);
Date reportStartDate = getDateOrNull(repJson, ReportStartDate, timeZone);
int reportStatus = getIntOrZero(repJson,ReportStatus);
DashboardStatusDto rep = new DashboardStatusDto(
taskKey,
......
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