Commit ceb59f42 by Kazuyuki Hida

ダッシュボードからの画面遷移を実装。報告書含む

parent e1cb2064
...@@ -157,7 +157,10 @@ public class ReportStatusDao extends AbstractDao { ...@@ -157,7 +157,10 @@ public class ReportStatusDao extends AbstractDao {
dto.operationName = stringOrEmpty(cursor, "operation_name"); dto.operationName = stringOrEmpty(cursor, "operation_name");
dto.taskKey = stringOrEmpty(cursor, "task_key"); dto.taskKey = stringOrEmpty(cursor, "task_key");
dto.taskCode = stringOrNull(cursor, "task_code"); dto.taskCode = stringOrNull(cursor, "task_code");
dto.taskReportInfo = stringOrEmpty(cursor, "json_data"); String jsonData = stringOrEmpty(cursor, "json_data").trim();
if (jsonData.startsWith("{") && jsonData.endsWith("}")) {
dto.taskReportInfo = new JSONObject(jsonData);
}
dto.taskReportId = longOrNull(cursor, "task_report_id"); dto.taskReportId = longOrNull(cursor, "task_report_id");
dto.reportStartDate = dateOrNull(cursor, "report_start_date"); dto.reportStartDate = dateOrNull(cursor, "report_start_date");
dto.reportLockUserId = stringOrNull(cursor, "report_lock_user_id"); dto.reportLockUserId = stringOrNull(cursor, "report_lock_user_id");
......
package jp.agentec.abook.abv.bl.dto; package jp.agentec.abook.abv.bl.dto;
import org.json.adf.JSONObject;
import java.util.Date; import java.util.Date;
import jp.agentec.adf.util.DateTimeFormat; import jp.agentec.adf.util.DateTimeFormat;
...@@ -12,7 +14,7 @@ public class ReportStatusDto extends AbstractDto { ...@@ -12,7 +14,7 @@ public class ReportStatusDto extends AbstractDto {
public String operationName; public String operationName;
public String taskKey; public String taskKey;
public String taskCode; public String taskCode;
public String taskReportInfo; public JSONObject taskReportInfo;
public Long taskReportId; public Long taskReportId;
public Date reportStartDate; public Date reportStartDate;
public String reportLockUserId; public String reportLockUserId;
...@@ -53,7 +55,7 @@ public class ReportStatusDto extends AbstractDto { ...@@ -53,7 +55,7 @@ public class ReportStatusDto extends AbstractDto {
return taskCode; return taskCode;
} }
public String getTaskReportInfo() { public JSONObject getTaskReportInfo() {
return taskReportInfo; return taskReportInfo;
} }
......
...@@ -294,8 +294,8 @@ public class DashboardActivity extends OperationActivity { ...@@ -294,8 +294,8 @@ public class DashboardActivity extends OperationActivity {
} }
case CMD_LOCK_REPORT: { case CMD_LOCK_REPORT: {
String taskKey = json.getString(TaskKey); String taskKey = json.getString(TaskKey);
long taskReportId = json.getLong(TaskReportId); long taskReportId = json.has(TaskReportId) ? json.getLong(TaskReportId) : 0;
Date reportStartDate = getDateOrNull(json.getString(ReportStartDate)); Date reportStartDate = json.has(ReportStartDate) ? getDateOrNull(json.getString(ReportStartDate)) : null;
lockReport(taskKey, taskReportId, reportStartDate); lockReport(taskKey, taskReportId, reportStartDate);
break; break;
} }
......
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