Commit df204cb9 by Yujin Seo

Merge branch 'feature/contract/sato/1.0.300_goto_detail_from_dashboard' into…

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

ダッシュボードから報告書への画面遷移

See merge request !273
parents 9cbb3dc9 ceb59f42
......@@ -157,7 +157,10 @@ public class ReportStatusDao extends AbstractDao {
dto.operationName = stringOrEmpty(cursor, "operation_name");
dto.taskKey = stringOrEmpty(cursor, "task_key");
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.reportStartDate = dateOrNull(cursor, "report_start_date");
dto.reportLockUserId = stringOrNull(cursor, "report_lock_user_id");
......
package jp.agentec.abook.abv.bl.dto;
import org.json.adf.JSONObject;
import java.util.Date;
import jp.agentec.adf.util.DateTimeFormat;
......@@ -12,7 +14,7 @@ public class ReportStatusDto extends AbstractDto {
public String operationName;
public String taskKey;
public String taskCode;
public String taskReportInfo;
public JSONObject taskReportInfo;
public Long taskReportId;
public Date reportStartDate;
public String reportLockUserId;
......@@ -53,7 +55,7 @@ public class ReportStatusDto extends AbstractDto {
return taskCode;
}
public String getTaskReportInfo() {
public JSONObject getTaskReportInfo() {
return taskReportInfo;
}
......
Subproject commit 39a8f243e91a4a70143ef6cfe7ba33807de9cdfb
Subproject commit b397d1ae65c18fff760eec9390402b04eae9bd0b
......@@ -66,6 +66,7 @@ import static jp.agentec.abook.abv.bl.acms.client.json.OperationDataJSON.TaskRep
import static jp.agentec.abook.abv.bl.acms.client.json.OperationDataJSON.TaskReportInfo;
import static jp.agentec.abook.abv.bl.acms.client.json.OperationListJSON.OperationList;
import static jp.agentec.abook.abv.bl.acms.client.json.OperationListJSON.OperationName;
import static jp.agentec.abook.abv.bl.common.Constant.ReportType.RoutineTask;
import static jp.agentec.abook.abv.bl.common.constant.ABookKeys.CMD_GET_REPORT_LIST;
import static jp.agentec.abook.abv.bl.common.constant.ABookKeys.CMD_GET_REPORT_STATUS_COUNT;
import static jp.agentec.abook.abv.bl.common.constant.ABookKeys.CMD_GO_REPORT_DETAIL;
......@@ -285,13 +286,16 @@ public class DashboardActivity extends OperationActivity {
}
case CMD_GO_REPORT_DETAIL: {
long operationId = json.getLong(OperationId);
goReportDetail(operationId);
String taskKey = json.has(TaskKey) ? json.getString(TaskKey) : null;
Long taskReportId = json.has(TaskReportId) ? json.getLong(TaskReportId) : null;
String reportStartDate = json.has(ReportStartDate) ? json.getString(ReportStartDate) : null;
goReportDetail(operationId, taskKey, taskReportId, reportStartDate);
break;
}
case CMD_LOCK_REPORT: {
String taskKey = json.getString(TaskKey);
long taskReportId = json.getLong(TaskReportId);
Date reportStartDate = getDateOrNull(json.getString(ReportStartDate));
long taskReportId = json.has(TaskReportId) ? json.getLong(TaskReportId) : 0;
Date reportStartDate = json.has(ReportStartDate) ? getDateOrNull(json.getString(ReportStartDate)) : null;
lockReport(taskKey, taskReportId, reportStartDate);
break;
}
......@@ -393,7 +397,7 @@ public class DashboardActivity extends OperationActivity {
return tree;
}
private void goReportDetail(long operationId) {
private void goReportDetail(long operationId, String taskKey, Long taskReportId, String reportStartDate) {
if (ActivityHandlingHelper.getInstance().isMeetingConnected()) {
return;
}
......@@ -416,7 +420,7 @@ public class DashboardActivity extends OperationActivity {
// プロジェクトの指示/報告表示時、必要なJSONファイル作成
OperationLogic operationLogic = AbstractLogic.getLogic(OperationLogic.class);
operationLogic.createJsonForOperationContent(operationDto.operationId, contentPath, operationDto.reportType == Constant.ReportType.RoutineTask);
operationLogic.createJsonForOperationContent(operationDto.operationId, contentPath, operationDto.reportType == RoutineTask);
// サーバ作業後、対応必要
StringBuilder path = new StringBuilder();
......@@ -425,6 +429,13 @@ public class DashboardActivity extends OperationActivity {
path.append("/index.html?app=android");
path.append("&report_type=").append(operationDto.reportType); // 作業報告タイプ : 0:報告 1:定期点検 2:報告(回答)
path.append("&mobile_flg=").append(isNormalSize() ? "1" : "0"); // ScreenType
if (operationDto.reportType == RoutineTask) {
path.append("&taskKey=").append(taskKey);
path.append("&taskReportId=").append(taskReportId);
path.append("&reportStartDate=").append(reportStartDate);
} else {
path.append("&taskKey=").append(taskKey);
}
Logger.d(TAG, "path : " + path);
Intent intent = new Intent();
......
......@@ -37,10 +37,10 @@ app_versioncode=1
# abvEnvironments.xml
#cms server
acms_address=https://check.abookcloud.com/acms
download_server_address=https://check.abookcloud.com/acms
#acms_address=https://abook188-1.abook.bz/acms
#download_server_address=https://abook188-1.abook.bz/acms
#acms_address=https://check.abookcloud.com/acms
#download_server_address=https://check.abookcloud.com/acms
acms_address=https://abook188-1.abook.bz/acms
download_server_address=https://abook188-1.abook.bz/acms
#acms_address=http://10.0.2.2:8080/acms
#download_server_address=http://10.0.2.2:8080/acms
......@@ -96,8 +96,8 @@ hope_page=http://www.sato.co.jp
contact_email=grp-atform_support@sato-global.com
#Log Settings
log_level=2
#log_level=1
#log_level=2
log_level=1
default_log_name=abvje
#エラーレポート/Exportログ送信方法 1:acms 2:平文メール(開発・テスト時のみ) 3:暗号化添付メール
......
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