Commit a64f797a by Jeong Gilmo

#32926 作業報告画面改善(Android)

parent 4554093e
......@@ -1273,7 +1273,10 @@ public class OperationLogic extends AbstractLogic {
public void createJsonForOpenABookCheckPano(Long operationId, Long contentId, String contentPath) throws IOException {
try {
createContentJson(operationId, contentId, contentPath);
createWorkerGroupJson(contentPath);
// #32926 start
// 作業タイプ確認用のparameterを追加
createWorkerGroupJson(operationId, contentPath);
// #32926 end
} catch (IOException e) {
Logger.e(TAG, "createJsonForOpenABookCheckPano error : ", e);
throw e;
......@@ -1299,13 +1302,18 @@ public class OperationLogic extends AbstractLogic {
FileUtil.createFile(contentPath + "/content.json", jsonObject.toString());
}
// #32926 start
// 現在作業タイプを確認用のparameter追加
/**
* workerGroup.jsonファイル作成
*
* @param operationId
* @param contentPath
* @throws IOException
*/
private void createWorkerGroupJson(String contentPath) throws IOException {
// #32926 end
private void createWorkerGroupJson(Long operationId, String contentPath) throws IOException {
List<JSONObject> workerGroupJsonList = new ArrayList<JSONObject>();
JSONObject taskGroupJson = new JSONObject();
......@@ -1317,7 +1325,22 @@ public class OperationLogic extends AbstractLogic {
workerGroupJsonList.add(workerGroupJson);
}
// #32926 start
// 作業タイプを確認してJSONファイルを作成する
int operationType = mOperationDao.getOperation(operationId).operationReportType;
// 作業タイプは報告と報告(Type3)の場合
if (operationType == Constant.OperationReportType.REPORT_TYPE) {
taskGroupJson.put("taskGroup_0", workerGroupJsonList);
taskGroupJson.put("taskGroup_1", workerGroupJsonList);
// 作業タイプは報告(Type1)の場合
} else if (operationType == Constant.OperationReportType.DEFAULT) {
taskGroupJson.put("taskGroup_1", workerGroupJsonList);
// その以外の作業タイプの場合
} else {
taskGroupJson.put("taskGroup", workerGroupJsonList);
}
Logger.d(TAG, "createWorkerGroupJson : " + taskGroupJson.toString());
// #32926 end
FileUtil.createFile(contentPath + "/workerGroup.json", taskGroupJson.toString());
}
......@@ -1417,7 +1440,19 @@ public class OperationLogic extends AbstractLogic {
taskReportJsonList.add(new JSONObject(dto.jsonData));
}
}
// #32926 start
int operationType = mOperationDao.getOperation(operationId).operationReportType;
// 現在の作業タイプは報告と報告(Type3)の場合
if (operationType == Constant.OperationReportType.REPORT_TYPE) {
taskReportJson.put("taskReport_0", taskReportJsonList);
taskReportJson.put("taskReport_1", taskReportJsonList);
} else if (operationType == Constant.OperationReportType.ROUTINE_TASK) {
taskReportJson.put("taskReport", taskReportJsonList);
} else {
taskReportJson.put("taskReport_1", taskReportJsonList);
}
// #32926 end
Logger.d(TAG, "createTaskReportJson : " + taskReportJson.toString());
FileUtil.createFile(contentPath + "/" + ABookKeys.TASK_REPORT + ".json", taskReportJson.toString());
}
......@@ -1442,8 +1477,14 @@ public class OperationLogic extends AbstractLogic {
taskReportJsonList.add(taskReportJsonRow);
}
// #32926 start
// 現在の作業タイプは報告と報告(Type3)の場合
if (mOperationDao.getOperation(operationId).operationReportType == Constant.OperationReportType.REPORT_TYPE) {
taskReportJsonRoot.put("taskReport", taskReportJsonList);
Logger.d(TAG, "createTaskReportJson : " + taskReportJsonRoot.toString());
} else {
taskReportJsonRoot.put("taskReport", taskReportJsonList);
}
Logger.d(TAG, "createRoutineTaskReportJson : " + taskReportJsonRoot.toString());
FileUtil.createFile(contentPath + "/" + ABookKeys.TASK_REPORT + ".json", taskReportJsonRoot.toString());
}
......
......@@ -629,11 +629,20 @@ public class OperationListActivity extends ABVUIActivity {
// サーバ作業後、対応必要
StringBuffer path = new StringBuffer();
path.append(contentPath);
// #32926 start
// TODO change : view_mode -> delete , project_type -> content_type , full_screen_flg -> mobile_flg , project_report_type -> operation_type
path.append("/index.html?app=android");
path.append("&view_mode=" + mOperationAuthLevel);
path.append("&project_type=" + operationDto.operationType);
path.append("&full_screen_flg=" + (isNormalSize() ? "1" : "0"));
path.append("&project_report_type=" + (operationDto.operationReportType == Constant.OperationReportType.ROUTINE_TASK ? "1" : "0"));
// path.append("&content_type=" + operationDto.operationType);
// path.append("&mobile_flg=" + (isNormalSize() ? "1" : "0"));
// path.append("&operation_type=" + (operationDto.operationReportType == Constant.OperationReportType.ROUTINE_TASK ? "1" : "0"));
Logger.d(TAG, "path : " + path);
// #32926 end
Intent intent = new Intent();
intent.putExtra(ABookKeys.CONTENT_ID, operationDto.contentId);
intent.putExtra(ABookKeys.OPERATION_ID, operationDto.operationId);
......
......@@ -379,8 +379,15 @@ public class OperationTaskLayout extends RelativeLayout {
setLayoutParams(params);
} else {
DisplayMetrics displayMetrics = getResources().getDisplayMetrics();
int halfWidth = (int) (displayMetrics.density * OperationTaskLayout.HALF_WIDTH);
params = createParam(halfWidth, ViewGroup.LayoutParams.WRAP_CONTENT);
// #32926 start
// 作業報告画面を全画面に表示する
// int halfWidth = (int) (displayMetrics.density * OperationTaskLayout.HALF_WIDTH);
// params = createParam(halfWidth, ViewGroup.LayoutParams.WRAP_CONTENT);
int screenWidth = displayMetrics.widthPixels;
params = createParam(screenWidth, ViewGroup.LayoutParams.WRAP_CONTENT);
// #32926 end
if (!StringUtil.isNullOrEmpty(taskKey)) {
TaskDto taskDto = mTaskDao.getTaskByTaskKey(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