Commit 1bea882c by Jeong Gilmo

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

レビュー対応
parent 9ac153e2
...@@ -45,9 +45,9 @@ public class OperationDataJSON extends AcmsCommonJSON { ...@@ -45,9 +45,9 @@ public class OperationDataJSON extends AcmsCommonJSON {
public List<TaskDto> taskDtoList; public List<TaskDto> taskDtoList;
public Date lastEditDate; public Date lastEditDate;
// #32926 start // #32926 作業報告画面改善 start
public static final String TaskReportLevel = "taskReportLevel"; public static final String TaskReportLevel = "taskReportLevel";
// #32926 end // #32926 作業報告画面改善 end
public OperationDataJSON(String jsonString) throws AcmsException { public OperationDataJSON(String jsonString) throws AcmsException {
super(jsonString); super(jsonString);
...@@ -95,10 +95,6 @@ public class OperationDataJSON extends AcmsCommonJSON { ...@@ -95,10 +95,6 @@ public class OperationDataJSON extends AcmsCommonJSON {
dto.taskReportDto.attachedFileName = taskJson.getString(TaskReportKey); dto.taskReportDto.attachedFileName = taskJson.getString(TaskReportKey);
} }
// #32926 start
// dto.taskReportLevel = taskJson.getInt(TaskReportLevel);
// #32926 end
taskDtoList.add(dto); taskDtoList.add(dto);
} }
} }
......
...@@ -68,12 +68,6 @@ public class ABVEnvironment { ...@@ -68,12 +68,6 @@ public class ABVEnvironment {
public static final String LoginPasswordAESKey = "ABook+!\"#$+kooBA"; // 桁数を変更しないこと(16桁) public static final String LoginPasswordAESKey = "ABook+!\"#$+kooBA"; // 桁数を変更しないこと(16桁)
public static final String MacAddressAESKey = "aAg+b2o#n0T}ke3c"; // 桁数を変更しないこと(16桁) public static final String MacAddressAESKey = "aAg+b2o#n0T}ke3c"; // 桁数を変更しないこと(16桁)
public static final String APK_FILE_NAME = "abook_plus.apk"; public static final String APK_FILE_NAME = "abook_plus.apk";
// #32926 start
// public static final String DIRECTION = "direction"; // 作業指示のディレクトリ名
// public static final String REPORT = "report"; // 作業報告のディレクトリ名
public static final String DIRECTION = "0"; // 作業指示のディレクトリ名
public static final String REPORT = "1"; // 作業報告のディレクトリ名
// #32926 end
public static final String REPORT_SEND = "reportSend"; // 作業報告のディレクトリ名 public static final String REPORT_SEND = "reportSend"; // 作業報告のディレクトリ名
public static final int AppId = 3; public static final int AppId = 3;
...@@ -114,10 +108,6 @@ public class ABVEnvironment { ...@@ -114,10 +108,6 @@ public class ABVEnvironment {
public static final String OperationDirFormat = "%s/ABook/projects/%d"; public static final String OperationDirFormat = "%s/ABook/projects/%d";
public static final String OperationTaskKeyDirFormat = "%s/ABook/projects/%d/%s"; public static final String OperationTaskKeyDirFormat = "%s/ABook/projects/%d/%s";
// public static final String OperationTaskKeyReportSendDirFormat = OperationTaskKeyDirFormat + "/reportSend/%d";
// public static final String OperationTaskKeyRoutineTaskReportSendDirFormat = OperationTaskKeyDirFormat + "/reportSend/%d/%s/%d";
// public static final String OperationTaskKeyRoutineTaskReportSendDirFormatForDelete = OperationTaskKeyDirFormat + "/reportSend/%d/%s";
// public static final String OperationTaskKeyRoutineTaskReportDirFormat = OperationTaskKeyDirFormat + "/report/%d/%s";
public static final String PanoImageDirFormat = "%s/panoImage"; public static final String PanoImageDirFormat = "%s/panoImage";
public static final String PanoImageFileFormat = "%s/panoImage.zip"; public static final String PanoImageFileFormat = "%s/panoImage.zip";
public static final String TaskPdfDirFormat = "%s/taskPdf"; public static final String TaskPdfDirFormat = "%s/taskPdf";
...@@ -129,14 +119,8 @@ public class ABVEnvironment { ...@@ -129,14 +119,8 @@ public class ABVEnvironment {
public static final String OperationDirectionOrReportDirFormat = OperationDirFormat + "/%s/%s"; public static final String OperationDirectionOrReportDirFormat = OperationDirFormat + "/%s/%s";
public static final String CacheTempFormat = "%s/temp"; public static final String CacheTempFormat = "%s/temp";
public static final String TempTaskDirFormat = "%s/%d/temp"; public static final String TempTaskDirFormat = "%s/%d/temp";
// #32926 start
// 作業報告レベル(taskReportLevel)によってディレクトリを追加する
public static final String TempTaskKeyDirFormat = TempTaskDirFormat + "/%s"; public static final String TempTaskKeyDirFormat = TempTaskDirFormat + "/%s";
// public static final String TempTaskKeyDirFormat = TempTaskDirFormat + "/%s/%s";
// #32926 end
// public static final String SavedOzFileFormat = OperationDirectionOrReportDirFormat + "/%s";
// public static final String RoutineTaskSavedOzFileFormat = OperationDirectionOrReportDirFormat + "/%d/%s/%s";
public static final String DefaultOzFileFormat = ContentCacheDirectoryFormat + "/%s"; public static final String DefaultOzFileFormat = ContentCacheDirectoryFormat + "/%s";
public static final String TempTaskFileFormat = TempTaskKeyDirFormat + "/%s"; public static final String TempTaskFileFormat = TempTaskKeyDirFormat + "/%s";
public static final String AttachedMoviesDirFormat = "%s/%d/attachedMovie"; public static final String AttachedMoviesDirFormat = "%s/%d/attachedMovie";
...@@ -145,7 +129,7 @@ public class ABVEnvironment { ...@@ -145,7 +129,7 @@ public class ABVEnvironment {
public static final String CacheTempAttachedImageFormat = "%s/temp/attachedImage"; public static final String CacheTempAttachedImageFormat = "%s/temp/attachedImage";
// #32926 start // #32926 作業報告画面改善 start
// 作業報告レベル(taskReportLevel)によってディレクトリを追加する // 作業報告レベル(taskReportLevel)によってディレクトリを追加する
public static final String TaskReportLevelDir = "/%s"; public static final String TaskReportLevelDir = "/%s";
public static final String SavedOzFileFormat = OperationDirectionOrReportDirFormat + TaskReportLevelDir + "/%s"; public static final String SavedOzFileFormat = OperationDirectionOrReportDirFormat + TaskReportLevelDir + "/%s";
...@@ -154,7 +138,7 @@ public class ABVEnvironment { ...@@ -154,7 +138,7 @@ public class ABVEnvironment {
public static final String OperationTaskKeyRoutineTaskReportSendDirFormat = OperationTaskKeyDirFormat + TaskReportLevelDir + "/reportSend/%d/%s/%d"; public static final String OperationTaskKeyRoutineTaskReportSendDirFormat = OperationTaskKeyDirFormat + TaskReportLevelDir + "/reportSend/%d/%s/%d";
public static final String OperationTaskKeyRoutineTaskReportSendDirFormatForDelete = OperationTaskKeyDirFormat + TaskReportLevelDir + "/reportSend/%d/%s"; public static final String OperationTaskKeyRoutineTaskReportSendDirFormatForDelete = OperationTaskKeyDirFormat + TaskReportLevelDir + "/reportSend/%d/%s";
public static final String OperationTaskKeyRoutineTaskReportDirFormat = OperationTaskKeyDirFormat + TaskReportLevelDir + "/report/%d/%s"; public static final String OperationTaskKeyRoutineTaskReportDirFormat = OperationTaskKeyDirFormat + TaskReportLevelDir + "/report/%d/%s";
// #32926 end // #32926 作業報告画面改善 end
/** /**
* コンテンツのファイルを暗号化するときに、暗号化するサイズをバイト単位で指定します。 * コンテンツのファイルを暗号化するときに、暗号化するサイズをバイト単位で指定します。
...@@ -606,22 +590,7 @@ public class ABVEnvironment { ...@@ -606,22 +590,7 @@ public class ABVEnvironment {
return String.format(OperationDirFormat, rootDirectory, operationId); return String.format(OperationDirFormat, rootDirectory, operationId);
} }
/** // #32926 作業報告画面改善 start
* 保存されたOZファイルパス
* @param operationId
* @param taskKey
* @param fileName
* @param directionFlg 指示者(true)と報告者(false)
* @return ファイルパス
*/
public String getSavedOzFilePath(long operationId, String taskKey, String fileName, boolean directionFlg) {
if (directionFlg) {
return String.format(SavedOzFileFormat, rootDirectory, operationId, taskKey, "direction", fileName);
}
return String.format(SavedOzFileFormat, rootDirectory, operationId, taskKey, "report", fileName);
}
// #32926 start
/** /**
* 保存されたOZファイルパス * 保存されたOZファイルパス
* @param operationId * @param operationId
...@@ -633,7 +602,7 @@ public class ABVEnvironment { ...@@ -633,7 +602,7 @@ public class ABVEnvironment {
public String getSavedOzFileTaskReportLevelPath(long operationId, String taskKey, String fileName, String taskReportLevel) { public String getSavedOzFileTaskReportLevelPath(long operationId, String taskKey, String fileName, String taskReportLevel) {
return String.format(SavedOzFileFormat, rootDirectory, operationId, taskKey, taskReportLevel, "report", fileName); return String.format(SavedOzFileFormat, rootDirectory, operationId, taskKey, taskReportLevel, "report", fileName);
} }
// #32926 end // #32926 作業報告画面改善 end
/** /**
* 保存されたOZファイルパス、定期点検用 * 保存されたOZファイルパス、定期点検用
...@@ -645,10 +614,9 @@ public class ABVEnvironment { ...@@ -645,10 +614,9 @@ public class ABVEnvironment {
* @return * @return
*/ */
public String getRoutineTaskSavedOzFilePath(long operationId, String taskKey, int taskReportId, String reportStartDate, String fileName, String taskReportLevel) { public String getRoutineTaskSavedOzFilePath(long operationId, String taskKey, int taskReportId, String reportStartDate, String fileName, String taskReportLevel) {
// #32926 start // #32926 作業報告画面改善 start
// return String.format(RoutineTaskSavedOzFileFormat, rootDirectory, operationId, taskKey, "report", taskReportId, reportStartDate, fileName); return String.format(RoutineTaskSavedOzFileFormat, rootDirectory, operationId, taskKey, taskReportLevel, "report", taskReportId, reportStartDate, fileName);
return String.format(RoutineTaskSavedOzFileFormat, rootDirectory, operationId, taskKey, "report", taskReportLevel, taskReportId, reportStartDate, fileName); // #32926 作業報告画面改善 end
// #32926 end
} }
/** /**
...@@ -705,7 +673,8 @@ public class ABVEnvironment { ...@@ -705,7 +673,8 @@ public class ABVEnvironment {
return String.format(OperationTaskKeyDirFormat, rootDirectory, operationId, taskKey); return String.format(OperationTaskKeyDirFormat, rootDirectory, operationId, taskKey);
} }
// #32926 start // #32926 作業報告画面改善 start
// taskReportLevelの値によってディレクトリを構成
public String getOperationTaskReportSendDirFilePath(long operationId, String taskKey, int taskReportSendId, int taskReportLevel) { public String getOperationTaskReportSendDirFilePath(long operationId, String taskKey, int taskReportSendId, int taskReportLevel) {
return String.format(OperationTaskKeyReportSendDirFormat, rootDirectory, operationId, taskKey, String.valueOf(taskReportLevel), taskReportSendId); return String.format(OperationTaskKeyReportSendDirFormat, rootDirectory, operationId, taskKey, String.valueOf(taskReportLevel), taskReportSendId);
} }
...@@ -721,21 +690,15 @@ public class ABVEnvironment { ...@@ -721,21 +690,15 @@ public class ABVEnvironment {
public String getRoutineTaskReportDirFilePath(long operationId, String taskKey, int taskReportId, String reportStartDate, int taskReportLevel) { public String getRoutineTaskReportDirFilePath(long operationId, String taskKey, int taskReportId, String reportStartDate, int taskReportLevel) {
return String.format(OperationTaskKeyRoutineTaskReportDirFormat, rootDirectory, operationId, taskKey, String.valueOf(taskReportLevel), taskReportId, getReportDate(reportStartDate)); return String.format(OperationTaskKeyRoutineTaskReportDirFormat, rootDirectory, operationId, taskKey, String.valueOf(taskReportLevel), taskReportId, getReportDate(reportStartDate));
} }
// #32926 end
public String getOperationDirectionOrReportDirPath(long operationId, String taskKey, boolean directionFlg) { public String getOperationDirectionOrReportDirPath(long operationId, String taskKey, String taskReportLevel) {
if(directionFlg) { return String.format(OperationDirectionOrReportDirFormat, rootDirectory, operationId, taskKey, taskReportLevel);
return String.format(OperationDirectionOrReportDirFormat, rootDirectory, operationId, taskKey, DIRECTION);
}
return String.format(OperationDirectionOrReportDirFormat, rootDirectory, operationId, taskKey, REPORT);
} }
// #32926 start
// taskReportLevelの値によってディレクトリを構成
public String getOperationTaskReportLevelDirPath(long operationId, String taskKey, String taskReportLevel) { public String getOperationTaskReportLevelDirPath(long operationId, String taskKey, String taskReportLevel) {
return String.format(OperationDirectionOrReportDirFormat, rootDirectory, operationId, taskKey, taskReportLevel); return String.format(OperationDirectionOrReportDirFormat, rootDirectory, operationId, taskKey, taskReportLevel);
} }
// #32926 end // #32926 作業報告画面改善 end
public String getOperationReportSendDirPath(long operationId, String taskKey) { public String getOperationReportSendDirPath(long operationId, String taskKey) {
return String.format(OperationDirectionOrReportDirFormat, rootDirectory, operationId, taskKey, REPORT_SEND); return String.format(OperationDirectionOrReportDirFormat, rootDirectory, operationId, taskKey, REPORT_SEND);
...@@ -746,12 +709,12 @@ public class ABVEnvironment { ...@@ -746,12 +709,12 @@ public class ABVEnvironment {
return String.format(AttachedMoviesDirFormat, cacheDirectory, contentId); return String.format(AttachedMoviesDirFormat, cacheDirectory, contentId);
} }
public String getAttachedDirectionOrReportDirPath(long contentId, String taskKey, boolean directionFlg) { // #32926 作業報告画面改善 start
if(directionFlg) { // taskReportLevelの値によってディレクトリを構成
return String.format(AttachedMoviesTaskTypeDir, cacheDirectory, contentId, taskKey, DIRECTION); public String getAttachedDirectionOrReportDirPath(long contentId, String taskKey, String taskReportLevel) {
} return String.format(AttachedMoviesTaskTypeDir, cacheDirectory, contentId, taskKey, taskReportLevel);
return String.format(AttachedMoviesTaskTypeDir, cacheDirectory, contentId, taskKey, REPORT);
} }
// #32926 作業報告画面改善 end
public String getAttachedRoutineTaskReportDirPath(long contentId, String taskKey, int taskReportId, String reportStartDate) { public String getAttachedRoutineTaskReportDirPath(long contentId, String taskKey, int taskReportId, String reportStartDate) {
return String.format(AttachedMoviesRoutineTaskTypeDir, cacheDirectory, contentId, taskKey, taskReportId, getReportDate(reportStartDate)); return String.format(AttachedMoviesRoutineTaskTypeDir, cacheDirectory, contentId, taskKey, taskReportId, getReportDate(reportStartDate));
......
...@@ -141,11 +141,11 @@ public class Constant { ...@@ -141,11 +141,11 @@ public class Constant {
int Audio =3; int Audio =3;
} }
// #32926 start // #32926 作業報告画面改善 start
public interface ReportType { public interface ReportType {
int Report = 0; // 報告 int Report = 0; // 報告
int Routine = 1; // 定期点検 int Routine = 1; // 定期点検
int Report_Answer = 2; // 報告(回答) int Report_Answer = 2; // 報告(回答)
} }
// #32926 end // #32926 作業報告画面改善 end
} }
...@@ -122,8 +122,8 @@ public class ABookKeys { ...@@ -122,8 +122,8 @@ public class ABookKeys {
public static final String ADD_REPORT = "addReport"; // 作業追加区分 public static final String ADD_REPORT = "addReport"; // 作業追加区分
public static final String CMD_LOCAL_SAVE_TASK_REPORT = "localSaveTaskReport"; // 一時保存 public static final String CMD_LOCAL_SAVE_TASK_REPORT = "localSaveTaskReport"; // 一時保存
// #32861 作業情報追加 end // #32861 作業情報追加 end
// #32926 start // #32926 作業報告画面改善 start
public static final String TASK_REPORT_LEVEL = "taskReportLevel"; // 作業報告レベル(0:報告、1:報告(回答)、2:報告(回答)) public static final String TASK_REPORT_LEVEL = "taskReportLevel"; // 作業報告レベル(0:報告、1:報告(回答)、2:報告(回答))
public static final String TASK_HAS_AUTHORITY = "taskHasAuthority"; public static final String TASK_HAS_AUTHORITY = "taskHasAuthority";
// #32926 end // #32926 作業報告画面改善 end
} }
...@@ -48,12 +48,12 @@ public class TaskDao extends AbstractDao { ...@@ -48,12 +48,12 @@ public class TaskDao extends AbstractDao {
if (column != -1) { if (column != -1) {
dto.delFlg = toBool(cursor.getInt(column)); dto.delFlg = toBool(cursor.getInt(column));
} }
// #32926 start // #32926 作業報告画面改善 start
column = cursor.getColumnIndex("task_has_Authority"); column = cursor.getColumnIndex("task_has_Authority");
if (column != -1) { if (column != -1) {
dto.taskHasAuthority = toBool(cursor.getInt(column)); dto.taskHasAuthority = toBool(cursor.getInt(column));
} }
// #32926 end // #32926 作業報告画面改善 end
return dto; return dto;
} }
......
...@@ -159,9 +159,12 @@ public class TaskReportDao extends AbstractDao { ...@@ -159,9 +159,12 @@ public class TaskReportDao extends AbstractDao {
// #32782 指示者テーブル関連削除 end // #32782 指示者テーブル関連削除 end
} }
public String getTaskReportAttachedFileName(String taskKey) { // #32926 作業報告画面改善 start
return rawQueryGetString("select local_attached_file_name from t_task_report where task_key=?", new String[]{"" + taskKey}); // taskReportLevel によって添付ファイルを取得する
public String getTaskReportAttachedFileName(String taskKey, String taskReportLevel) {
return rawQueryGetString("select local_attached_file_name from t_task_report where task_key=?", new String[]{"" + taskKey, "" + taskReportLevel});
} }
// #32926 作業報告画面改善 end
public List<TaskReportDto> selectByTaskKey(String taskKey) { public List<TaskReportDto> selectByTaskKey(String taskKey) {
return rawQueryGetDtoList("select * from t_task_report where task_key=?", new String[]{ taskKey }, TaskReportDto.class); return rawQueryGetDtoList("select * from t_task_report where task_key=?", new String[]{ taskKey }, TaskReportDto.class);
......
...@@ -30,9 +30,9 @@ public class OperationDto extends AbstractDto { ...@@ -30,9 +30,9 @@ public class OperationDto extends AbstractDto {
public String reportPeriod; //定期点検、2018/12/20 08:10:00 ~ 2018/12/21 18:10:00 public String reportPeriod; //定期点検、2018/12/20 08:10:00 ~ 2018/12/21 18:10:00
public int reportCount; //定期点検、作業数 public int reportCount; //定期点検、作業数
// #32926 start // #32926 作業報告画面改善 start
public int reportType; // 作業報告タイプ 0:報告 1:定期点検 2:報告(回答) public int reportType; // 作業報告タイプ 0:報告 1:定期点検 2:報告(回答)
// #32926 end // #32926 作業報告画面改善 end
public boolean equalsLastEdit(OperationDto dto) { public boolean equalsLastEdit(OperationDto dto) {
if (dto != null) { if (dto != null) {
......
...@@ -26,10 +26,10 @@ public class TaskDto extends AbstractDto { ...@@ -26,10 +26,10 @@ public class TaskDto extends AbstractDto {
public int taskReportId; public int taskReportId;
public List<RoutineTaskReportDto> RoutineTaskReportList; public List<RoutineTaskReportDto> RoutineTaskReportList;
// #32926 start // #32926 作業報告画面改善 start
public boolean taskHasAuthority; // タスク別の権限 public boolean taskHasAuthority; // タスク別の権限
public int taskReportLevel; // 作業報告階層 public int taskReportLevel; // 作業報告階層
// #32926 end // #32926 作業報告画面改善 end
@Override @Override
public Object[] getInsertValues() { public Object[] getInsertValues() {
......
...@@ -86,10 +86,10 @@ public class OperationLogic extends AbstractLogic { ...@@ -86,10 +86,10 @@ public class OperationLogic extends AbstractLogic {
private TaskReportDao mTaskReportDao = AbstractDao.getDao(TaskReportDao.class); private TaskReportDao mTaskReportDao = AbstractDao.getDao(TaskReportDao.class);
private TaskReportSendDao mTaskReportSendDao = AbstractDao.getDao(TaskReportSendDao.class); private TaskReportSendDao mTaskReportSendDao = AbstractDao.getDao(TaskReportSendDao.class);
private TaskReportItemsDao mTaskReportItemsDao = AbstractDao.getDao(TaskReportItemsDao.class); private TaskReportItemsDao mTaskReportItemsDao = AbstractDao.getDao(TaskReportItemsDao.class);
// #32926 start // #32926 作業報告画面改善 start
// TODO delete RoutineTaskReportDao // TODO delete RoutineTaskReportDao
private RoutineTaskReportDao mRoutineTaskReportDao = AbstractDao.getDao(RoutineTaskReportDao.class); private RoutineTaskReportDao mRoutineTaskReportDao = AbstractDao.getDao(RoutineTaskReportDao.class);
// #32926 end // #32926 作業報告画面改善 end
private PushMessageDao mPushMessageDao = AbstractDao.getDao(PushMessageDao.class); private PushMessageDao mPushMessageDao = AbstractDao.getDao(PushMessageDao.class);
...@@ -283,7 +283,7 @@ public class OperationLogic extends AbstractLogic { ...@@ -283,7 +283,7 @@ public class OperationLogic extends AbstractLogic {
// コピー元のファイルで、添付ファイルとして使用しないファイル削除 // コピー元のファイルで、添付ファイルとして使用しないファイル削除
deleteDifferentialFile(tempDirPath, attachedFileNames); deleteDifferentialFile(tempDirPath, attachedFileNames);
String operationDrectionOrReportDirPath = ABVEnvironment.getInstance().getOperationDirectionOrReportDirPath(operationId, taskKey, true); String operationDrectionOrReportDirPath = ABVEnvironment.getInstance().getOperationDirectionOrReportDirPath(operationId, taskKey, "0");
// 添付ディレクトリの移動 // 添付ディレクトリの移動
boolean result = FileUtil.copy(tempDirPath, operationDrectionOrReportDirPath, true); boolean result = FileUtil.copy(tempDirPath, operationDrectionOrReportDirPath, true);
...@@ -358,7 +358,7 @@ public class OperationLogic extends AbstractLogic { ...@@ -358,7 +358,7 @@ public class OperationLogic extends AbstractLogic {
mTaskDao.update(taskDto); mTaskDao.update(taskDto);
String tempDirPath = ABVEnvironment.getInstance().getTempTaskDirPath(contentId, taskKey); String tempDirPath = ABVEnvironment.getInstance().getTempTaskDirPath(contentId, taskKey);
String operationDrectionOrReportDirPath = ABVEnvironment.getInstance().getOperationDirectionOrReportDirPath(operationId, taskKey, true); String operationDrectionOrReportDirPath = ABVEnvironment.getInstance().getOperationDirectionOrReportDirPath(operationId, taskKey, "0");
if (taskDirectionsDto.attachedFileSendFlg) { if (taskDirectionsDto.attachedFileSendFlg) {
//添付ファイル変更の場合、以下の処理を行う //添付ファイル変更の場合、以下の処理を行う
JSONObject attachedListJson = taskDirectionsJson.getJSONObject("attached"); JSONObject attachedListJson = taskDirectionsJson.getJSONObject("attached");
...@@ -517,10 +517,9 @@ public class OperationLogic extends AbstractLogic { ...@@ -517,10 +517,9 @@ public class OperationLogic extends AbstractLogic {
} }
} }
*/ */
// #32926 start // #32926 作業報告画面改善 start
// TODO parameter 追加 taskReportLevel
public void insertTaskReport(String taskKey, long operationId, long contentId, JSONObject taskReportJson, String localAttachedFileName, boolean attachedChangeFlag, boolean dataSendFlg, int taskReportLevel) throws IOException { public void insertTaskReport(String taskKey, long operationId, long contentId, JSONObject taskReportJson, String localAttachedFileName, boolean attachedChangeFlag, boolean dataSendFlg, int taskReportLevel) throws IOException {
// #32926 end // #32926 作業報告画面改善 end
TaskDto taskDto = mTaskDao.getTaskByTaskKey(taskKey); TaskDto taskDto = mTaskDao.getTaskByTaskKey(taskKey);
if (taskDto == null) { if (taskDto == null) {
//TODO error //TODO error
...@@ -562,15 +561,9 @@ public class OperationLogic extends AbstractLogic { ...@@ -562,15 +561,9 @@ public class OperationLogic extends AbstractLogic {
//添付ファイル変更の場合、以下の処理を行う //添付ファイル変更の場合、以下の処理を行う
String tempDirPath = ABVEnvironment.getInstance().getTempTaskDirPath(contentId, taskKey); String tempDirPath = ABVEnvironment.getInstance().getTempTaskDirPath(contentId, taskKey);
// #32926 start // #32926 作業報告画面改善 start
// test start 削除必要
taskReportLevel = 0;
// test end
// TODO 変更必要
// String operationDrectionOrReportDirPath = ABVEnvironment.getInstance().getOperationDirectionOrReportDirPath(operationId, taskKey, false);
String operationDrectionOrReportDirPath = ABVEnvironment.getInstance().getOperationTaskReportLevelDirPath(operationId, taskKey, String.valueOf(taskReportLevel)); String operationDrectionOrReportDirPath = ABVEnvironment.getInstance().getOperationTaskReportLevelDirPath(operationId, taskKey, String.valueOf(taskReportLevel));
// #32926 end // #32926 作業報告画面改善 end
JSONObject attachedListJson = taskReportJson.getJSONObject("attached"); JSONObject attachedListJson = taskReportJson.getJSONObject("attached");
List<String> attachedFileNames = JSONObject.getValues(attachedListJson); List<String> attachedFileNames = JSONObject.getValues(attachedListJson);
...@@ -621,11 +614,11 @@ public class OperationLogic extends AbstractLogic { ...@@ -621,11 +614,11 @@ public class OperationLogic extends AbstractLogic {
//添付ファイル変更の場合、以下の処理を行う //添付ファイル変更の場合、以下の処理を行う
String strReportStartDate = DateTimeUtil.toString_yyyyMMddHHmmss_none(routineTaskReportDto.reportStartDate); String strReportStartDate = DateTimeUtil.toString_yyyyMMddHHmmss_none(routineTaskReportDto.reportStartDate);
String tempDirPath = ABVEnvironment.getInstance().getTempTaskDirPath(contentId, routineTaskReportDto.taskKey); String tempDirPath = ABVEnvironment.getInstance().getTempTaskDirPath(contentId, routineTaskReportDto.taskKey);
// #32926 start // #32926 作業報告画面改善 start
// TODO routineTaskReportDto -> taskReportDto // TODO routineTaskReportDto -> taskReportDto
// String routineTaskReportDirPath = ABVEnvironment.getInstance().getRoutineTaskReportDirFilePath(operationId, routineTaskReportDto.taskKey, routineTaskReportDto.taskReportId, strReportStartDate, taskReportDto.taskReportLevel); // String routineTaskReportDirPath = ABVEnvironment.getInstance().getRoutineTaskReportDirFilePath(operationId, routineTaskReportDto.taskKey, routineTaskReportDto.taskReportId, strReportStartDate, routineTaskReportDto.taskReportLevel);
String routineTaskReportDirPath = ABVEnvironment.getInstance().getRoutineTaskReportDirFilePath(operationId, routineTaskReportDto.taskKey, routineTaskReportDto.taskReportId, strReportStartDate, 0); String routineTaskReportDirPath = ABVEnvironment.getInstance().getRoutineTaskReportDirFilePath(operationId, routineTaskReportDto.taskKey, routineTaskReportDto.taskReportId, strReportStartDate, 0);
// #32926 end // #32926 作業報告画面改善 end
if (!StringUtil.isNullOrEmpty(routineTaskReportDto.jsonData)) { if (!StringUtil.isNullOrEmpty(routineTaskReportDto.jsonData)) {
JSONObject attachedListJson = (new JSONObject(routineTaskReportDto.jsonData)).getJSONObject("attached"); JSONObject attachedListJson = (new JSONObject(routineTaskReportDto.jsonData)).getJSONObject("attached");
...@@ -744,17 +737,15 @@ public class OperationLogic extends AbstractLogic { ...@@ -744,17 +737,15 @@ public class OperationLogic extends AbstractLogic {
} }
} }
*/ */
// #32926 start // #32926 作業報告画面改善 start
// TODO parameter taskReportLevel 追加
public void updateTaskReport(String taskKey, long operationId, long contentId, JSONObject taskReport, String localAttachedFileName, boolean attachedChangeFlag, boolean dataSendFlg, int taskReportLevel) throws IOException { public void updateTaskReport(String taskKey, long operationId, long contentId, JSONObject taskReport, String localAttachedFileName, boolean attachedChangeFlag, boolean dataSendFlg, int taskReportLevel) throws IOException {
// #32926 end // #32926 作業報告画面改善 end
TaskReportDto taskReportDto = mTaskReportDao.getTaskReport(taskKey); TaskReportDto taskReportDto = mTaskReportDao.getTaskReport(taskKey);
if (taskReportDto == null) { if (taskReportDto == null) {
Logger.w(TAG, "taskReportDto is null"); Logger.w(TAG, "taskReportDto is null");
// #32926 start // #32926 作業報告画面改善 start
// TODO parameter taskReportLevel 追加
insertTaskReport(taskKey, operationId, contentId, taskReport, localAttachedFileName, attachedChangeFlag, dataSendFlg, taskReportLevel); insertTaskReport(taskKey, operationId, contentId, taskReport, localAttachedFileName, attachedChangeFlag, dataSendFlg, taskReportLevel);
// #32926 end // #32926 作業報告画面改善 end
return; return;
} }
JSONObject taskJson = taskReport.getJSONObject("task"); JSONObject taskJson = taskReport.getJSONObject("task");
...@@ -787,15 +778,9 @@ public class OperationLogic extends AbstractLogic { ...@@ -787,15 +778,9 @@ public class OperationLogic extends AbstractLogic {
mTaskReportDao.update(taskReportDto); mTaskReportDao.update(taskReportDto);
mTaskDao.update(taskDto); mTaskDao.update(taskDto);
String tempDirPath = ABVEnvironment.getInstance().getTempTaskDirPath(contentId, taskKey); String tempDirPath = ABVEnvironment.getInstance().getTempTaskDirPath(contentId, taskKey);
// #32926 start // #32926 作業報告画面改善 start
// test start
taskReportLevel = 0;
// test end
// TODO 変更必要
// String operationDrectionOrReportDirPath = ABVEnvironment.getInstance().getOperationDirectionOrReportDirPath(operationId, taskKey, false);
String operationDrectionOrReportDirPath = ABVEnvironment.getInstance().getOperationTaskReportLevelDirPath(operationId, taskKey, String.valueOf(taskReportLevel)); String operationDrectionOrReportDirPath = ABVEnvironment.getInstance().getOperationTaskReportLevelDirPath(operationId, taskKey, String.valueOf(taskReportLevel));
// #32926 end // #32926 作業報告画面改善 end
if (taskReportDto.attachedFileSendFlg) { if (taskReportDto.attachedFileSendFlg) {
//添付ファイル変更の場合、以下の処理を行う //添付ファイル変更の場合、以下の処理を行う
JSONObject attachedListJson = taskReport.getJSONObject("attached"); JSONObject attachedListJson = taskReport.getJSONObject("attached");
...@@ -869,15 +854,11 @@ public class OperationLogic extends AbstractLogic { ...@@ -869,15 +854,11 @@ public class OperationLogic extends AbstractLogic {
String strReportStartDate = DateTimeUtil.toString_yyyyMMddHHmmss_none(routineTaskReportDto.reportStartDate); String strReportStartDate = DateTimeUtil.toString_yyyyMMddHHmmss_none(routineTaskReportDto.reportStartDate);
String tempDirPath = ABVEnvironment.getInstance().getTempTaskDirPath(contentId, routineTaskReportDto.taskKey); String tempDirPath = ABVEnvironment.getInstance().getTempTaskDirPath(contentId, routineTaskReportDto.taskKey);
// #32926 start // #32926 作業報告画面改善 start
// TODO 一時的理療する削除対象
// test start
int taskReportLevel = 0;
// test end
// TODO routineTaskReportDto -> taskReportDto // TODO routineTaskReportDto -> taskReportDto
// String routineTaskReportDirPath = ABVEnvironment.getInstance().getRoutineTaskReportDirFilePath(operationId, routineTaskReportDto.taskKey, routineTaskReportDto.taskReportId, strReportStartDate, taskReportDto.taskReportLevel); // String routineTaskReportDirPath = ABVEnvironment.getInstance().getRoutineTaskReportDirFilePath(operationId, routineTaskReportDto.taskKey, routineTaskReportDto.taskReportId, strReportStartDate, taskReportDto.taskReportLevel);
String routineTaskReportDirPath = ABVEnvironment.getInstance().getRoutineTaskReportDirFilePath(operationId, routineTaskReportDto.taskKey, routineTaskReportDto.taskReportId, strReportStartDate, 0); String routineTaskReportDirPath = ABVEnvironment.getInstance().getRoutineTaskReportDirFilePath(operationId, routineTaskReportDto.taskKey, routineTaskReportDto.taskReportId, strReportStartDate, 0);
// #32926 end // #32926 作業報告画面改善 end
if (insertFlg) { if (insertFlg) {
if (!StringUtil.isNullOrEmpty(routineTaskReportDto.jsonData)) { if (!StringUtil.isNullOrEmpty(routineTaskReportDto.jsonData)) {
...@@ -1053,11 +1034,9 @@ public class OperationLogic extends AbstractLogic { ...@@ -1053,11 +1034,9 @@ public class OperationLogic extends AbstractLogic {
// 作業報告のディレクトリ削除 // 作業報告のディレクトリ削除
FileUtil.delete(ABVEnvironment.getInstance().getTempTaskDirPath(contentId, taskKey)); FileUtil.delete(ABVEnvironment.getInstance().getTempTaskDirPath(contentId, taskKey));
// #32926 start // #32926 作業報告画面改善 start
// TODO 変更必要
// FileUtil.delete(ABVEnvironment.getInstance().getOperationDirectionOrReportDirPath(operationId, taskKey, false));
FileUtil.delete(ABVEnvironment.getInstance().getOperationTaskReportLevelDirPath(operationId, taskKey, String.valueOf(taskReportLevel))); FileUtil.delete(ABVEnvironment.getInstance().getOperationTaskReportLevelDirPath(operationId, taskKey, String.valueOf(taskReportLevel)));
// #32926 end // #32926 作業報告画面改善 end
} }
// #32782 指示者テーブル関連削除 end // #32782 指示者テーブル関連削除 end
...@@ -1067,11 +1046,11 @@ public class OperationLogic extends AbstractLogic { ...@@ -1067,11 +1046,11 @@ public class OperationLogic extends AbstractLogic {
* @param contentId * @param contentId
* @param dto * @param dto
*/ */
// #32926 start // #32926 作業報告画面改善 start
// TODO RoutineTaskReportDto -> TaskReportDto // TODO RoutineTaskReportDto -> TaskReportDto
// public void deleteRoutineTaskReport(long operationId, long contentId, TaskReportDto dto) { // public void deleteRoutineTaskReport(long operationId, long contentId, TaskReportDto dto) {
public void deleteRoutineTaskReport(long operationId, long contentId, RoutineTaskReportDto dto) { public void deleteRoutineTaskReport(long operationId, long contentId, RoutineTaskReportDto dto) {
// #32926 end // #32926 作業報告画面改善 end
mRoutineTaskReportDao.delete(dto); mRoutineTaskReportDao.delete(dto);
String reportStartDate = DateTimeUtil.toString(dto.reportStartDate, DateTimeFormat.yyyyMMddHHmmss_hyphen); String reportStartDate = DateTimeUtil.toString(dto.reportStartDate, DateTimeFormat.yyyyMMddHHmmss_hyphen);
...@@ -1081,7 +1060,7 @@ public class OperationLogic extends AbstractLogic { ...@@ -1081,7 +1060,7 @@ public class OperationLogic extends AbstractLogic {
// 作業報告のディレクトリ削除 // 作業報告のディレクトリ削除
FileUtil.delete(ABVEnvironment.getInstance().getTempTaskDirPath(contentId, dto.taskKey)); FileUtil.delete(ABVEnvironment.getInstance().getTempTaskDirPath(contentId, dto.taskKey));
// #32926 start // #32926 作業報告画面改善 start
// TODO routineTaskReportDto -> taskReportDto // TODO routineTaskReportDto -> taskReportDto
// FileUtil.delete(ABVEnvironment.getInstance().getRoutineTaskReportDirFilePath(operationId, dto.taskKey, dto.taskReportId, reportStartDate, dto.taskReportLevel)); // FileUtil.delete(ABVEnvironment.getInstance().getRoutineTaskReportDirFilePath(operationId, dto.taskKey, dto.taskReportId, reportStartDate, dto.taskReportLevel));
FileUtil.delete(ABVEnvironment.getInstance().getRoutineTaskReportDirFilePath(operationId, dto.taskKey, dto.taskReportId, reportStartDate, 0)); FileUtil.delete(ABVEnvironment.getInstance().getRoutineTaskReportDirFilePath(operationId, dto.taskKey, dto.taskReportId, reportStartDate, 0));
...@@ -1090,7 +1069,7 @@ public class OperationLogic extends AbstractLogic { ...@@ -1090,7 +1069,7 @@ public class OperationLogic extends AbstractLogic {
// TODO routineTaskReportDto -> taskReportDto // TODO routineTaskReportDto -> taskReportDto
// FileUtil.delete(ABVEnvironment.getInstance().getRoutineTaskReportSendDirFilePath(operationId, dto.taskKey, dto.taskReportId, reportStartDate, dto.taskReportLevel)); // FileUtil.delete(ABVEnvironment.getInstance().getRoutineTaskReportSendDirFilePath(operationId, dto.taskKey, dto.taskReportId, reportStartDate, dto.taskReportLevel));
FileUtil.delete(ABVEnvironment.getInstance().getRoutineTaskReportSendDirFilePath(operationId, dto.taskKey, dto.taskReportId, reportStartDate, 0)); FileUtil.delete(ABVEnvironment.getInstance().getRoutineTaskReportSendDirFilePath(operationId, dto.taskKey, dto.taskReportId, reportStartDate, 0));
// #32926 end // #32926 作業報告画面改善 end
} }
/** /**
...@@ -1118,10 +1097,10 @@ public class OperationLogic extends AbstractLogic { ...@@ -1118,10 +1097,10 @@ public class OperationLogic extends AbstractLogic {
// 作業報告のディレクトリ削除 // 作業報告のディレクトリ削除
FileUtil.delete(ABVEnvironment.getInstance().getTempTaskDirPath(contentId, taskKey)); FileUtil.delete(ABVEnvironment.getInstance().getTempTaskDirPath(contentId, taskKey));
// #32926 start // #32926 作業報告画面改善 start
// TODO routineTaskReportDto -> taskReportDto // TODO routineTaskReportDto -> taskReportDto
FileUtil.delete(ABVEnvironment.getInstance().getRoutineTaskReportDirFilePath(operationId, taskKey, taskReportId, reportStartDate, 0)); FileUtil.delete(ABVEnvironment.getInstance().getRoutineTaskReportDirFilePath(operationId, taskKey, taskReportId, reportStartDate, 0));
// #32926 end // #32926 作業報告画面改善 end
} }
/** /**
...@@ -1334,10 +1313,10 @@ public class OperationLogic extends AbstractLogic { ...@@ -1334,10 +1313,10 @@ public class OperationLogic extends AbstractLogic {
public void createJsonForOpenABookCheckPano(Long operationId, Long contentId, String contentPath) throws IOException { public void createJsonForOpenABookCheckPano(Long operationId, Long contentId, String contentPath) throws IOException {
try { try {
createContentJson(operationId, contentId, contentPath); createContentJson(operationId, contentId, contentPath);
// #32926 start // #32926 作業報告画面改善 start
// 作業タイプ確認用のparameterを追加 // 作業タイプ確認用のparameterを追加
createWorkerGroupJson(operationId, contentPath); createWorkerGroupJson(operationId, contentPath);
// #32926 end // #32926 作業報告画面改善 end
} catch (IOException e) { } catch (IOException e) {
Logger.e(TAG, "createJsonForOpenABookCheckPano error : ", e); Logger.e(TAG, "createJsonForOpenABookCheckPano error : ", e);
throw e; throw e;
...@@ -1363,8 +1342,6 @@ public class OperationLogic extends AbstractLogic { ...@@ -1363,8 +1342,6 @@ public class OperationLogic extends AbstractLogic {
FileUtil.createFile(contentPath + "/content.json", jsonObject.toString()); FileUtil.createFile(contentPath + "/content.json", jsonObject.toString());
} }
// #32926 start
// 現在作業タイプを確認用のparameter追加
/** /**
* workerGroup.jsonファイル作成 * workerGroup.jsonファイル作成
* *
...@@ -1372,8 +1349,10 @@ public class OperationLogic extends AbstractLogic { ...@@ -1372,8 +1349,10 @@ public class OperationLogic extends AbstractLogic {
* @param contentPath * @param contentPath
* @throws IOException * @throws IOException
*/ */
// #32926 end // #32926 作業報告画面改善 start
// 現在作業タイプを確認用のparameter追加
private void createWorkerGroupJson(Long operationId, String contentPath) throws IOException { private void createWorkerGroupJson(Long operationId, String contentPath) throws IOException {
// #32926 作業報告画面改善 end
List<JSONObject> workerGroupJsonList = new ArrayList<JSONObject>(); List<JSONObject> workerGroupJsonList = new ArrayList<JSONObject>();
JSONObject taskGroupJson = new JSONObject(); JSONObject taskGroupJson = new JSONObject();
...@@ -1386,8 +1365,7 @@ public class OperationLogic extends AbstractLogic { ...@@ -1386,8 +1365,7 @@ public class OperationLogic extends AbstractLogic {
workerGroupJsonList.add(workerGroupJson); workerGroupJsonList.add(workerGroupJson);
} }
// #32926 start // #32926 作業報告画面改善 start
// TODO taskGroup -> taskGroup_%s に変更
// 報告と報告(回答)のデータの区分が必要なので、「taskGroup_0」と「taskGroup_1」で形式で作成 // 報告と報告(回答)のデータの区分が必要なので、「taskGroup_0」と「taskGroup_1」で形式で作成
List<TaskReportDto> taskReportList = mTaskReportDao.getTaskReportByOperationId(operationId); List<TaskReportDto> taskReportList = mTaskReportDao.getTaskReportByOperationId(operationId);
for (TaskReportDto dto : taskReportList) { for (TaskReportDto dto : taskReportList) {
...@@ -1396,7 +1374,7 @@ public class OperationLogic extends AbstractLogic { ...@@ -1396,7 +1374,7 @@ public class OperationLogic extends AbstractLogic {
taskGroupJson.put("taskGroup", workerGroupJsonList); taskGroupJson.put("taskGroup", workerGroupJsonList);
Logger.d(TAG, "createWorkerGroupJson : " + taskGroupJson.toString()); Logger.d(TAG, "createWorkerGroupJson : " + taskGroupJson.toString());
Logger.d(TAG,contentPath + "/workerGroup.json"); Logger.d(TAG,contentPath + "/workerGroup.json");
// #32926 end // #32926 作業報告画面改善 end
FileUtil.createFile(contentPath + "/workerGroup.json", taskGroupJson.toString()); FileUtil.createFile(contentPath + "/workerGroup.json", taskGroupJson.toString());
} }
...@@ -1500,31 +1478,22 @@ public class OperationLogic extends AbstractLogic { ...@@ -1500,31 +1478,22 @@ public class OperationLogic extends AbstractLogic {
JSONObject taskReportJson = new JSONObject(); JSONObject taskReportJson = new JSONObject();
JSONObject taskReportJsonRow; JSONObject taskReportJsonRow;
List<TaskReportDto> taskReportDtoList = mTaskReportDao.getTaskReportByOperationId(operationId); List<TaskReportDto> taskReportDtoList = mTaskReportDao.getTaskReportByOperationId(operationId);
// #32926 start // #32926 作業報告画面改善 start
int taskReportLevel = 0; int taskReportLevel = 0;
for (TaskReportDto dto : taskReportDtoList) { for (TaskReportDto dto : taskReportDtoList) {
taskReportJsonRow = new JSONObject(); taskReportJsonRow = new JSONObject();
taskReportLevel = dto.taskReportLevel; taskReportLevel = dto.taskReportLevel;
// taskReportJson.put(ABookKeys.TASK_KEY, dto.taskKey);
if(dto.jsonData != null && dto.jsonData.length() > 0) { if(dto.jsonData != null && dto.jsonData.length() > 0) {
taskReportJsonRow.put(ABookKeys.TASK_HAS_AUTHORITY, dto.taskHasAuthority); taskReportJsonRow.put(ABookKeys.TASK_HAS_AUTHORITY, dto.taskHasAuthority);
taskReportJsonList.add(new JSONObject(dto.jsonData)); taskReportJsonList.add(new JSONObject(dto.jsonData));
taskReportJsonList.add(taskReportJsonRow); taskReportJsonList.add(taskReportJsonRow);
} }
// TODO delete commnet
// taskReportJsonRow.put(ABookKeys.TASK_HAS_AUTHORITY, dto.taskHasAuthority);
// taskReportJsonList.add(taskReportJson);
} }
// TODO delete comment
if (taskReportLevel > 0) {
taskReportJson.append(String.format("taskReport_%d", String.valueOf(taskReportLevel)), taskReportLevel);
} else {
taskReportJson.put(String.format("taskReport_%d", taskReportLevel), taskReportJsonList); taskReportJson.put(String.format("taskReport_%d", taskReportLevel), taskReportJsonList);
}
// taskReportJson.put("taskReport", taskReportJsonList);
Logger.d(TAG, "createTaskReportJson : " + taskReportJson.toString()); Logger.d(TAG, "createTaskReportJson : " + taskReportJson.toString());
Logger.d(TAG,contentPath + "/" + ABookKeys.TASK_REPORT + ".json"); Logger.d(TAG,contentPath + "/" + ABookKeys.TASK_REPORT + ".json");
// #32926 end // #32926 作業報告画面改善 end
FileUtil.createFile(contentPath + "/" + ABookKeys.TASK_REPORT + ".json", taskReportJson.toString()); FileUtil.createFile(contentPath + "/" + ABookKeys.TASK_REPORT + ".json", taskReportJson.toString());
} }
...@@ -1533,10 +1502,9 @@ public class OperationLogic extends AbstractLogic { ...@@ -1533,10 +1502,9 @@ public class OperationLogic extends AbstractLogic {
List<JSONObject> taskReportJsonList = new ArrayList<JSONObject>(); List<JSONObject> taskReportJsonList = new ArrayList<JSONObject>();
JSONObject taskReportJsonRoot = new JSONObject(); JSONObject taskReportJsonRoot = new JSONObject();
JSONObject taskReportJsonRow; JSONObject taskReportJsonRow;
// #32926 start // #32926 作業報告画面改善 start
int taskReportLevel = 0; int taskReportLevel = 0;
int taskReportId = 0; int taskReportId = 0;
// List<RoutineTaskReportDto> routineTaskReportDtoList = mRoutineTaskReportDao.getRoutineTaskReportByOperationId(operationId);
List<TaskReportDto> routineTaskReportDtoList = mTaskReportDao.getTaskReportByOperationId(operationId); List<TaskReportDto> routineTaskReportDtoList = mTaskReportDao.getTaskReportByOperationId(operationId);
// 現在の作業タイプは定期点検の場合 // 現在の作業タイプは定期点検の場合
for (TaskReportDto dto : routineTaskReportDtoList) { for (TaskReportDto dto : routineTaskReportDtoList) {
...@@ -1555,14 +1523,12 @@ public class OperationLogic extends AbstractLogic { ...@@ -1555,14 +1523,12 @@ public class OperationLogic extends AbstractLogic {
taskReportJsonRow.put(ABookKeys.TASK_REPORT_INFO, taskReportInfoList); taskReportJsonRow.put(ABookKeys.TASK_REPORT_INFO, taskReportInfoList);
taskReportJsonList.add(taskReportJsonRow); taskReportJsonList.add(taskReportJsonRow);
} }
// TODO taskReport -> taskReport_0 に変更
// taskReportJsonRoot.put("taskReport_0", taskReportJsonList);
taskReportJsonRoot.put(ABookKeys.ENABLE_REPORT_UPDATE, mOperationDao.getOperation(operationId).enableReportUpdate); taskReportJsonRoot.put(ABookKeys.ENABLE_REPORT_UPDATE, mOperationDao.getOperation(operationId).enableReportUpdate);
taskReportJsonRoot.put(ABookKeys.TASK_REPORT_ID, taskReportId); taskReportJsonRoot.put(ABookKeys.TASK_REPORT_ID, taskReportId);
taskReportJsonRoot.put(String.format("taskReport_%d", taskReportLevel), taskReportJsonList); taskReportJsonRoot.put(String.format("taskReport_%d", taskReportLevel), taskReportJsonList);
Logger.d(TAG, "createRoutineTaskReportJson : " + taskReportJsonRoot.toString()); Logger.d(TAG, "createRoutineTaskReportJson : " + taskReportJsonRoot.toString());
Logger.d(TAG,contentPath + "/" + ABookKeys.TASK_REPORT + ".json"); Logger.d(TAG,contentPath + "/" + ABookKeys.TASK_REPORT + ".json");
// #32926 end // #32926 作業報告画面改善 end
FileUtil.createFile(contentPath + "/" + ABookKeys.TASK_REPORT + ".json", taskReportJsonRoot.toString()); FileUtil.createFile(contentPath + "/" + ABookKeys.TASK_REPORT + ".json", taskReportJsonRoot.toString());
} }
...@@ -1590,16 +1556,14 @@ public class OperationLogic extends AbstractLogic { ...@@ -1590,16 +1556,14 @@ public class OperationLogic extends AbstractLogic {
itemJson.put(dto.itemKey, jsonArray); itemJson.put(dto.itemKey, jsonArray);
} }
} }
// #32926 start // #32926 作業報告画面改善 start
// TODO 確認
// taskReportSuggestJson.put(ABookKeys.TASK_REPORT_SUGGEST, itemJson);
List<TaskReportDto> taskReportList = mTaskReportDao.getTaskReportByOperationId(operationId); List<TaskReportDto> taskReportList = mTaskReportDao.getTaskReportByOperationId(operationId);
for (TaskReportDto dto : taskReportList) { for (TaskReportDto dto : taskReportList) {
taskReportSuggestJson.put(String.format("%s_%s", ABookKeys.TASK_REPORT_SUGGEST, String.valueOf(dto.taskReportLevel)), itemJson); taskReportSuggestJson.put(String.format("%s_%s", ABookKeys.TASK_REPORT_SUGGEST, String.valueOf(dto.taskReportLevel)), itemJson);
} }
Logger.d(TAG, "createTaskReportSuggestJson : " + taskReportSuggestJson.toString()); Logger.d(TAG, "createTaskReportSuggestJson : " + taskReportSuggestJson.toString());
Logger.d(TAG,contentPath + "/" + ABookKeys.TASK_REPORT_SUGGEST + ".json"); Logger.d(TAG,contentPath + "/" + ABookKeys.TASK_REPORT_SUGGEST + ".json");
// #32926 end // #32926 作業報告画面改善 end
FileUtil.createFile(contentPath + "/" + ABookKeys.TASK_REPORT_SUGGEST + ".json", taskReportSuggestJson.toString()); FileUtil.createFile(contentPath + "/" + ABookKeys.TASK_REPORT_SUGGEST + ".json", taskReportSuggestJson.toString());
} }
...@@ -2034,9 +1998,9 @@ public class OperationLogic extends AbstractLogic { ...@@ -2034,9 +1998,9 @@ public class OperationLogic extends AbstractLogic {
); );
progressCallback.callback(new Integer(progress)); progressCallback.callback(new Integer(progress));
mTaskReportSendDao.deleteBySendId(taskReportSendDto.taskReportSendId); mTaskReportSendDao.deleteBySendId(taskReportSendDto.taskReportSendId);
// #32926 start // #32926 作業報告画面改善 start
FileUtil.delete(ABVEnvironment.getInstance().getOperationTaskReportSendDirFilePath(operationId, taskReportSendDto.taskKey, taskReportSendDto.taskReportSendId, taskReportDto.taskReportLevel)); FileUtil.delete(ABVEnvironment.getInstance().getOperationTaskReportSendDirFilePath(operationId, taskReportSendDto.taskKey, taskReportSendDto.taskReportSendId, taskReportDto.taskReportLevel));
// #32926 end // #32926 作業報告画面改善 end
} catch (Exception ex) { } catch (Exception ex) {
throw ex; throw ex;
} finally { } finally {
...@@ -2104,11 +2068,11 @@ public class OperationLogic extends AbstractLogic { ...@@ -2104,11 +2068,11 @@ public class OperationLogic extends AbstractLogic {
if (routineTaskReportDto.attachedFileSendFlag) { if (routineTaskReportDto.attachedFileSendFlag) {
String fileName = null; String fileName = null;
// #32926 start // #32926 作業報告画面改善 start
// TODO routineTaskReportDto -> taskReportDto // TODO routineTaskReportDto -> taskReportDto
// zipFile = createAttachedFileForSend(operationId, routineTaskReportDto.taskKey, taskReportSendDto.taskReportSendId, true, routineTaskReportDto.taskReportId, strReportStartDate, taskReportDto.taskReportLevel); // zipFile = createAttachedFileForSend(operationId, routineTaskReportDto.taskKey, taskReportSendDto.taskReportSendId, true, routineTaskReportDto.taskReportId, strReportStartDate, taskReportDto.taskReportLevel);
zipFile = createAttachedFileForSend(operationId, routineTaskReportDto.taskKey, taskReportSendDto.taskReportSendId, true, routineTaskReportDto.taskReportId, strReportStartDate, 0); zipFile = createAttachedFileForSend(operationId, routineTaskReportDto.taskKey, taskReportSendDto.taskReportSendId, true, routineTaskReportDto.taskReportId, strReportStartDate, 0);
// #32926 end // #32926 作業報告画面改善 end
if (zipFile != null) { if (zipFile != null) {
fileName = FileUtil.getFilenameWithoutExt(zipFile.getName()); fileName = FileUtil.getFilenameWithoutExt(zipFile.getName());
} }
...@@ -2129,19 +2093,19 @@ public class OperationLogic extends AbstractLogic { ...@@ -2129,19 +2093,19 @@ public class OperationLogic extends AbstractLogic {
); );
progressCallback.callback(new Integer(progress)); progressCallback.callback(new Integer(progress));
mTaskReportSendDao.deleteBySendId(taskReportSendDto.taskReportSendId); mTaskReportSendDao.deleteBySendId(taskReportSendDto.taskReportSendId);
// #32926 start // #32926 作業報告画面改善 start
// TODO routineTaskReportDto -> taskReportDto // TODO routineTaskReportDto -> taskReportDto
// FileUtil.delete(ABVEnvironment.getInstance().getRoutineTaskReportSendDirFilePath(operationId, taskReportSendDto.taskKey, routineTaskReportDto.taskReportId, strReportStartDate, taskReportSendDto.taskReportSendId, taskReportDto.taskReportLevel)); // FileUtil.delete(ABVEnvironment.getInstance().getRoutineTaskReportSendDirFilePath(operationId, taskReportSendDto.taskKey, routineTaskReportDto.taskReportId, strReportStartDate, taskReportSendDto.taskReportSendId, taskReportDto.taskReportLevel));
FileUtil.delete(ABVEnvironment.getInstance().getRoutineTaskReportSendDirFilePath(operationId, taskReportSendDto.taskKey, routineTaskReportDto.taskReportId, strReportStartDate, taskReportSendDto.taskReportSendId, 0)); FileUtil.delete(ABVEnvironment.getInstance().getRoutineTaskReportSendDirFilePath(operationId, taskReportSendDto.taskKey, routineTaskReportDto.taskReportId, strReportStartDate, taskReportSendDto.taskReportSendId, 0));
// #33926 end // #33926 作業報告画面改善 end
} catch (ABVException ex) { } catch (ABVException ex) {
if (ex.getCode() == ABVExceptionCode.P_E_ACMS_P005) { if (ex.getCode() == ABVExceptionCode.P_E_ACMS_P005) {
mTaskReportSendDao.deleteBySendId(taskReportSendDto.taskReportSendId); mTaskReportSendDao.deleteBySendId(taskReportSendDto.taskReportSendId);
// #32926 start // #32926 作業報告画面改善 start
// TODO routineTaskReportDto -> taskReportDto // TODO routineTaskReportDto -> taskReportDto
// FileUtil.delete(ABVEnvironment.getInstance().getRoutineTaskReportSendDirFilePath(operationId, taskReportSendDto.taskKey, routineTaskReportDto.taskReportId, strReportStartDate, taskReportSendDto.taskReportSendId, taskReportDto.taskReportLevel)); // FileUtil.delete(ABVEnvironment.getInstance().getRoutineTaskReportSendDirFilePath(operationId, taskReportSendDto.taskKey, routineTaskReportDto.taskReportId, strReportStartDate, taskReportSendDto.taskReportSendId, taskReportDto.taskReportLevel));
FileUtil.delete(ABVEnvironment.getInstance().getRoutineTaskReportSendDirFilePath(operationId, taskReportSendDto.taskKey, routineTaskReportDto.taskReportId, strReportStartDate, taskReportSendDto.taskReportSendId, 0)); FileUtil.delete(ABVEnvironment.getInstance().getRoutineTaskReportSendDirFilePath(operationId, taskReportSendDto.taskKey, routineTaskReportDto.taskReportId, strReportStartDate, taskReportSendDto.taskReportSendId, 0));
// #32926 end // #32926 作業報告画面改善 end
sendErrorCnt++; sendErrorCnt++;
} }
} catch (Exception ex) { } catch (Exception ex) {
...@@ -2288,11 +2252,9 @@ public class OperationLogic extends AbstractLogic { ...@@ -2288,11 +2252,9 @@ public class OperationLogic extends AbstractLogic {
*/ */
private File createAttachedFile(Long operationId, String taskKey, boolean directionFlg, String taskReportLevel) throws ZipException, NoSuchAlgorithmException, IOException { private File createAttachedFile(Long operationId, String taskKey, boolean directionFlg, String taskReportLevel) throws ZipException, NoSuchAlgorithmException, IOException {
File zipFile; File zipFile;
// #32926 start // #32926 作業報告画面改善 start
// TODO 変更必要
// String filePath = ABVEnvironment.getInstance().getOperationDirectionOrReportDirPath(operationId, taskKey, directionFlg);
String filePath = ABVEnvironment.getInstance().getOperationTaskReportLevelDirPath(operationId, taskKey, taskReportLevel); String filePath = ABVEnvironment.getInstance().getOperationTaskReportLevelDirPath(operationId, taskKey, taskReportLevel);
// #32926 end // #32926 作業報告画面改善 end
File fileDir = new File(filePath); File fileDir = new File(filePath);
if (!fileDir.exists()) { if (!fileDir.exists()) {
......
...@@ -136,10 +136,6 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity { ...@@ -136,10 +136,6 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
protected boolean mLocalSave; // 一時保存情報 protected boolean mLocalSave; // 一時保存情報
protected boolean mAddReport; // 作業追加区分 protected boolean mAddReport; // 作業追加区分
// #32861 作業情報追加 end // #32861 作業情報追加 end
// #32926 start
// protected String mAttachedChageFlag; // 0:変更なし 1:変更あり
protected int mTaskReportLevel; // 作業報告レベル(0:報告、1:報告(回答)、2:報告(回答))
// #32926 end
@Override @Override
protected void onCreate(Bundle savedInstanceState) { protected void onCreate(Bundle savedInstanceState) {
...@@ -859,13 +855,12 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity { ...@@ -859,13 +855,12 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
mCmd = abookCheckParam.get(ABookKeys.CMD); mCmd = abookCheckParam.get(ABookKeys.CMD);
mTaskKey = abookCheckParam.get(ABookKeys.TASK_KEY); mTaskKey = abookCheckParam.get(ABookKeys.TASK_KEY);
// #32926 start // #32926 作業報告画面改善 start
int taskReportLevel = 0; // 作業報告レベル(0:報告、1:報告(回答)、2:報告(回答))
if (abookCheckParam.containsKey(ABookKeys.TASK_REPORT_LEVEL)) { if (abookCheckParam.containsKey(ABookKeys.TASK_REPORT_LEVEL)) {
mTaskReportLevel = Integer.parseInt(abookCheckParam.get(ABookKeys.TASK_REPORT_LEVEL)); // 作業報告レベル taskReportLevel = Integer.parseInt(abookCheckParam.get(ABookKeys.TASK_REPORT_LEVEL)); // 作業報告レベル
} else {
mTaskReportLevel = 0;
} }
// #32926 end // #32926 作業報告画面改善 end
int taskReportId = 0; int taskReportId = 0;
String reportStartDate = ""; String reportStartDate = "";
...@@ -935,13 +930,12 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity { ...@@ -935,13 +930,12 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
return null; return null;
} }
}; };
// #32926 start // #32926 作業報告画面改善 start
// ABookCheckWebViewHelper.getInstance().doABookCheckParam(ABVContentViewActivity.this, mCmd, mTaskKey, reportUpdateType, abookCheckParam, mOperationId, mContentPath, getContentId(), operationDto.operationReportType == Constant.OperationReportType.ROUTINE_TASK, finishCallback);
ABookCheckWebViewHelper.getInstance().doABookCheckParam(ABVContentViewActivity.this, ABookCheckWebViewHelper.getInstance().doABookCheckParam(ABVContentViewActivity.this,
mCmd, mTaskKey, reportUpdateType, abookCheckParam, mOperationId, mContentPath, getContentId(), mCmd, mTaskKey, reportUpdateType, abookCheckParam, mOperationId, mContentPath, getContentId(),
operationDto.reportType == Constant.ReportType.Routine, finishCallback, operationDto.reportType == Constant.ReportType.Routine, finishCallback,
mTaskReportLevel); taskReportLevel);
// #32926 end // #32926 作業報告画面改善 end
} catch(Exception e) { } catch(Exception e) {
Logger.e(TAG, "doABookCheckParam error", e); Logger.e(TAG, "doABookCheckParam error", e);
} }
...@@ -972,15 +966,15 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity { ...@@ -972,15 +966,15 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
if (abookCheckParam.containsKey(ABookKeys.ADD_REPORT)) { if (abookCheckParam.containsKey(ABookKeys.ADD_REPORT)) {
mAddReport = Integer.parseInt(abookCheckParam.get(ABookKeys.ADD_REPORT)) > 0 ? true : false; mAddReport = Integer.parseInt(abookCheckParam.get(ABookKeys.ADD_REPORT)) > 0 ? true : false;
} }
// #32926 start // #32926 作業報告画面改善 start
ActivityHandlingHelper.getInstance().startOZViewerActivity(this, mOperationId, getContentId(), mTaskKey, false, taskReportId, reportStartDate, mReportFileName, mLocalSave, mAddReport, mTaskReportLevel); ActivityHandlingHelper.getInstance().startOZViewerActivity(this, mOperationId, getContentId(), mTaskKey, false, taskReportId, reportStartDate, mReportFileName, mLocalSave, mAddReport, taskReportLevel);
// #32926 end // #32926 作業報告画面改善 end
// #32861 作業情報追加 end // #32861 作業情報追加 end
} else if (mCmd.equals(ABookKeys.CMD_PREVIEW_REPORT_OZD)) { } else if (mCmd.equals(ABookKeys.CMD_PREVIEW_REPORT_OZD)) {
mReportFileName = abookCheckParam.get(ABookKeys.REPORT_FILE_NAME); mReportFileName = abookCheckParam.get(ABookKeys.REPORT_FILE_NAME);
// #32926 start // #32926 作業報告画面改善 start
ActivityHandlingHelper.getInstance().startOZViewerActivity(this, mOperationId, getContentId(), mTaskKey, true, taskReportId, reportStartDate, mReportFileName, false, false, mTaskReportLevel); ActivityHandlingHelper.getInstance().startOZViewerActivity(this, mOperationId, getContentId(), mTaskKey, true, taskReportId, reportStartDate, mReportFileName, false, false, taskReportLevel);
// #32926 end // #32926 作業報告画面改善 end
} else if (mCmd.equals(ABookKeys.CMD_CONTENT_EDIT_CLOSE)) { } else if (mCmd.equals(ABookKeys.CMD_CONTENT_EDIT_CLOSE)) {
showProgressPopup(); showProgressPopup();
handler.postDelayed(new Runnable() { handler.postDelayed(new Runnable() {
...@@ -991,9 +985,9 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity { ...@@ -991,9 +985,9 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
} }
}, 5000); }, 5000);
} else if (mCmd.equals(ABookKeys.CMD_GET_GPS_INFO)) { } else if (mCmd.equals(ABookKeys.CMD_GET_GPS_INFO)) {
// #32926 start // #32926 作業報告画面改善 start
setLocation(true, (Integer.valueOf(abookCheckParam.get(ABookKeys.GPS_TYPE)) != 1), mTaskReportLevel); setLocation((Integer.valueOf(abookCheckParam.get(ABookKeys.GPS_TYPE)) != 1), taskReportLevel);
// #32926 end // #32926 作業報告画面改善 end
} else if (mCmd.equals(ABookKeys.CMD_SCENE_REGIST)) { } else if (mCmd.equals(ABookKeys.CMD_SCENE_REGIST)) {
String successFlg = abookCheckParam.get(ABookKeys.SUCCESS_FLG); String successFlg = abookCheckParam.get(ABookKeys.SUCCESS_FLG);
if(Integer.parseInt(successFlg) == 0) { if(Integer.parseInt(successFlg) == 0) {
...@@ -1045,10 +1039,7 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity { ...@@ -1045,10 +1039,7 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
boolean isError = false; boolean isError = false;
if (data != null) { if (data != null) {
try { try {
// #32926 start
String imagePath = ABVEnvironment.getInstance().getTempFilePath(getContentId(), mTaskKey, mAttachedFileName); String imagePath = ABVEnvironment.getInstance().getTempFilePath(getContentId(), mTaskKey, mAttachedFileName);
// String imagePath = ABVEnvironment.getInstance().getTempFilePath(getContentId(), mTaskKey, String.valueOf(mTaskReportLevel), mAttachedFileName);
// #32926 end
ABookCheckWebViewHelper.getInstance().decodeToImage(data, imagePath); ABookCheckWebViewHelper.getInstance().decodeToImage(data, imagePath);
//アプリ内のファイルのみ削除(Galleryファイルは削除しない) //アプリ内のファイルのみ削除(Galleryファイルは削除しない)
if (mLocalFile != null && mLocalFile.getPath().contains(getPackageName())) { if (mLocalFile != null && mLocalFile.getPath().contains(getPackageName())) {
...@@ -1131,11 +1122,12 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity { ...@@ -1131,11 +1122,12 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
/** /**
* 位置情報取得 * 位置情報取得
* @param isReport * @param showPermissionDialogFlg
* @param taskReportLevel
*/ */
// #32926 start // #32926 作業報告画面改善 start
protected void setLocation(final boolean isReport, final boolean showPermissionDialogFlg, final int taskReportLevel) { protected void setLocation(final boolean showPermissionDialogFlg, final int taskReportLevel) {
// #32926 end // #32926 作業報告画面改善 end
ABookPermissionHelper helper = new ABookPermissionHelper(this, Constant.ABookPermissionType.AccessFineLocation, null); ABookPermissionHelper helper = new ABookPermissionHelper(this, Constant.ABookPermissionType.AccessFineLocation, null);
if (helper.checkMultiPermissions(showPermissionDialogFlg)) { if (helper.checkMultiPermissions(showPermissionDialogFlg)) {
// 位置情報取得 // 位置情報取得
...@@ -1143,11 +1135,10 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity { ...@@ -1143,11 +1135,10 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
@Override @Override
public void onGetLocationFailed() { public void onGetLocationFailed() {
Logger.w(TAG, "onGetLocationFailed"); Logger.w(TAG, "onGetLocationFailed");
// #32926 start // #32926 作業報告画面改善 start
// if (isReport) {
// 報告(回答)の場合 // 報告(回答)の場合
if (taskReportLevel > 0) { if (taskReportLevel > 0) {
// #32926 end // #32926 作業報告画面改善 end
afterABookCheckApi(mCmd, "", 1, getString(R.string.msg_location_search_fail), null); afterABookCheckApi(mCmd, "", 1, getString(R.string.msg_location_search_fail), null);
} }
} }
...@@ -1160,11 +1151,10 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity { ...@@ -1160,11 +1151,10 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
CommonExecutor.execute(new Runnable() { CommonExecutor.execute(new Runnable() {
@Override @Override
public void run() { public void run() {
// #32926 start // #32926 作業報告画面改善 start
// if (isReport) {
// 報告(回答)の場合 // 報告(回答)の場合
if (taskReportLevel > 0) { if (taskReportLevel > 0) {
// #32926 end // #32926 作業報告画面改善 end
JSONObject json = new JSONObject(); JSONObject json = new JSONObject();
json.put("latitude", latitude); json.put("latitude", latitude);
json.put("longitude", longitude); json.put("longitude", longitude);
...@@ -1190,7 +1180,7 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity { ...@@ -1190,7 +1180,7 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
locationManagerUtil.startLocationService(); locationManagerUtil.startLocationService();
} else { } else {
Logger.w(TAG,"onGetLocationFailed AccessFineLocation false"); Logger.w(TAG,"onGetLocationFailed AccessFineLocation false");
if (isReport) { if (taskReportLevel > 0) {
afterABookCheckApi(mCmd, "", 1, getString(R.string.msg_location_search_fail), null); afterABookCheckApi(mCmd, "", 1, getString(R.string.msg_location_search_fail), null);
} }
} }
......
...@@ -609,13 +609,11 @@ public class OperationListActivity extends ABVUIActivity { ...@@ -609,13 +609,11 @@ public class OperationListActivity extends ABVUIActivity {
long operationId = operationDto.operationId; long operationId = operationDto.operationId;
for (TaskReportDto taskReportDto : listTaskReport) { for (TaskReportDto taskReportDto : listTaskReport) {
// #32926 start // #32926 作業報告画面改善 start
// TODO taskReportLevel の値を求める必要がある
// FileUtil.delete(ABVEnvironment.getInstance().getOperationDirectionOrReportDirPath(operationId, taskReportDto.taskKey, false));
if (taskReportDto.reporterFlag) { if (taskReportDto.reporterFlag) {
FileUtil.delete(ABVEnvironment.getInstance().getOperationTaskReportLevelDirPath(operationId, taskReportDto.taskKey, "1")); FileUtil.delete(ABVEnvironment.getInstance().getOperationTaskReportLevelDirPath(operationId, taskReportDto.taskKey, String.valueOf(taskReportDto.taskReportLevel));
} }
// #32926 end // #32926 作業報告画面改善 end
} }
mTaskReportDao.deleteAll(); mTaskReportDao.deleteAll();
...@@ -623,10 +621,6 @@ public class OperationListActivity extends ABVUIActivity { ...@@ -623,10 +621,6 @@ public class OperationListActivity extends ABVUIActivity {
} }
} }
// #32926 start
// TODO taskReportLevel の値が確認できたら利用可能
// contentPath = String.format("%s/%s", contentPath, String.valueOf(taskReportLevel));
// #32926 end
// プロジェクトの指示/報告表示時、必要なJSONファイル作成 // プロジェクトの指示/報告表示時、必要なJSONファイル作成
mOperationLogic.createJsonForOpenABookCheckPano(operationDto.operationId, operationDto.contentId, contentPath); mOperationLogic.createJsonForOpenABookCheckPano(operationDto.operationId, operationDto.contentId, contentPath);
mOperationLogic.createJsonForOperationContent(operationDto.operationId, 0, contentPath, mOperationAuthLevel == OperationAuthLevel.OPERATION_INSTRUCTOR ? true : false, operationDto.operationReportType == Constant.OperationReportType.ROUTINE_TASK); mOperationLogic.createJsonForOperationContent(operationDto.operationId, 0, contentPath, mOperationAuthLevel == OperationAuthLevel.OPERATION_INSTRUCTOR ? true : false, operationDto.operationReportType == Constant.OperationReportType.ROUTINE_TASK);
...@@ -635,21 +629,15 @@ public class OperationListActivity extends ABVUIActivity { ...@@ -635,21 +629,15 @@ public class OperationListActivity extends ABVUIActivity {
mOperationLogic.createJsonForRoutineTaskReport(operationDto.reportCycle, operationDto.enableReportUpdate, mOperationLogic.getLastRoutineTaskReportData(operationDto.operationId).taskReportId, contentPath); mOperationLogic.createJsonForRoutineTaskReport(operationDto.reportCycle, operationDto.enableReportUpdate, mOperationLogic.getLastRoutineTaskReportData(operationDto.operationId).taskReportId, contentPath);
} }
// TODO
// サーバ作業後、対応必要 // サーバ作業後、対応必要
StringBuffer path = new StringBuffer(); StringBuffer path = new StringBuffer();
path.append(contentPath); path.append(contentPath);
// #32926 作業報告画面改善 start // #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("/index.html?app=android");
path.append("&view_mode=" + mOperationAuthLevel); path.append("&view_mode=" + mOperationAuthLevel);
path.append("&project_type=" + operationDto.operationType); path.append("&report_type=" + operationDto.reportType); // 作業報告タイプ : 0:報告 1:定期点検 2:報告(回答)
path.append("&full_screen_flg=" + (isNormalSize() ? "1" : "0")); path.append("&mobile_flg=" + (isNormalSize() ? "1" : "0")); // ScreenType
path.append("&project_report_type=" + (operationDto.operationReportType == Constant.OperationReportType.ROUTINE_TASK ? "1" : "0")); path.append("&operation_type=" + operationDto.operationType); // 作業タイプ : 0:リスト、1:図面、2:360°
// 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); Logger.d(TAG, "path : " + path);
// #32926 作業報告画面改善 end // #32926 作業報告画面改善 end
...@@ -1065,11 +1053,11 @@ public class OperationListActivity extends ABVUIActivity { ...@@ -1065,11 +1053,11 @@ public class OperationListActivity extends ABVUIActivity {
FileUtil.delete(ABVEnvironment.getInstance().getTempTaskDirPath(contentId, taskKey)); FileUtil.delete(ABVEnvironment.getInstance().getTempTaskDirPath(contentId, taskKey));
// #32782 指示者テーブル関連削除 start // #32782 指示者テーブル関連削除 start
// TODO change String directionsLocalAttachedFileName = mTaskReportDao.getTaskReportAttachedFileName(taskKey, taskReportLevel);
String directionsLocalAttachedFileName = mTaskDirectionsDao.getTaskDirectionsAttachedFileName(taskKey);
// String directionsLocalAttachedFileName = mTaskReportDao.getTaskReportAttachedFileName(taskKey);
// #32782 指示者テーブル関連削除 end // #32782 指示者テーブル関連削除 end
String reportLocalAttachedFileName = mTaskReportDao.getTaskReportAttachedFileName(taskKey); // #32926 start
String reportLocalAttachedFileName = mTaskReportDao.getTaskReportAttachedFileName(taskKey, taskReportLevel);
// #32926 end
int count = 0; int count = 0;
boolean getDirectionsFileFlg = directionsAttachedFileName != null && !directionsAttachedFileName.equals(directionsLocalAttachedFileName); boolean getDirectionsFileFlg = directionsAttachedFileName != null && !directionsAttachedFileName.equals(directionsLocalAttachedFileName);
boolean getReportFileFlg = reportAttachedFileName != null && !reportAttachedFileName.equals(reportLocalAttachedFileName); boolean getReportFileFlg = reportAttachedFileName != null && !reportAttachedFileName.equals(reportLocalAttachedFileName);
...@@ -1088,10 +1076,10 @@ public class OperationListActivity extends ABVUIActivity { ...@@ -1088,10 +1076,10 @@ public class OperationListActivity extends ABVUIActivity {
protected Void doInBackground(Void... params) { protected Void doInBackground(Void... params) {
try { try {
Logger.i(TAG, "[Get Task Directions Files] operationId=%s, taskKey=%s, taskId=%s, attachedFileName=%s", operationId, taskKey, taskId, directionsAttachedFileName); Logger.i(TAG, "[Get Task Directions Files] operationId=%s, taskKey=%s, taskId=%s, attachedFileName=%s", operationId, taskKey, taskId, directionsAttachedFileName);
FileUtil.delete(ABVEnvironment.getInstance().getOperationDirectionOrReportDirPath(operationId, taskKey, true)); FileUtil.delete(ABVEnvironment.getInstance().getOperationDirectionOrReportDirPath(operationId, taskKey, taskReportLevel));
String outputFilePath = mOperationLogic.getTaskFile(operationId, taskKey, taskId, directionsAttachedFileName, 0); String outputFilePath = mOperationLogic.getTaskFile(operationId, taskKey, taskId, directionsAttachedFileName, 0);
ContentFileExtractor.getInstance().extractZipFile(contentId, outputFilePath, ContentFileExtractor.getInstance().extractZipFile(contentId, outputFilePath,
ABVEnvironment.getInstance().getOperationDirectionOrReportDirPath(operationId, taskKey, true), null, true); ABVEnvironment.getInstance().getOperationDirectionOrReportDirPath(operationId, taskKey, taskReportLevel), null, true);
} catch (Exception e) { } catch (Exception e) {
Logger.e(TAG, e); Logger.e(TAG, e);
ABVToastUtil.showMakeText(getApplicationContext(), R.string.msg_error_task_receiving_failed, Toast.LENGTH_LONG); ABVToastUtil.showMakeText(getApplicationContext(), R.string.msg_error_task_receiving_failed, Toast.LENGTH_LONG);
...@@ -1116,13 +1104,11 @@ public class OperationListActivity extends ABVUIActivity { ...@@ -1116,13 +1104,11 @@ public class OperationListActivity extends ABVUIActivity {
try { try {
Logger.i(TAG, "[Get Task Report Files] operationId=%s, taskKey=%s, taskId=%s, attachedFileName=%s", operationId, taskKey, taskId, reportAttachedFileName); Logger.i(TAG, "[Get Task Report Files] operationId=%s, taskKey=%s, taskId=%s, attachedFileName=%s", operationId, taskKey, taskId, reportAttachedFileName);
// #32926 start // #32926 start
// FileUtil.delete(ABVEnvironment.getInstance().getOperationDirectionOrReportDirPath(operationId, taskKey, false));
FileUtil.delete(ABVEnvironment.getInstance().getOperationTaskReportLevelDirPath(operationId, taskKey, taskReportLevel)); FileUtil.delete(ABVEnvironment.getInstance().getOperationTaskReportLevelDirPath(operationId, taskKey, taskReportLevel));
// #32926 end // #32926 end
String outputFilePath = mOperationLogic.getTaskFile(operationId, taskKey, taskId, reportAttachedFileName, 1); String outputFilePath = mOperationLogic.getTaskFile(operationId, taskKey, taskId, reportAttachedFileName, 1);
ContentFileExtractor.getInstance().extractZipFile(contentId, outputFilePath, ContentFileExtractor.getInstance().extractZipFile(contentId, outputFilePath,
// #32926 start // #32926 start
// ABVEnvironment.getInstance().getOperationDirectionOrReportDirPath(operationId, taskKey, false),
ABVEnvironment.getInstance().getOperationTaskReportLevelDirPath(operationId, taskKey, taskReportLevel), ABVEnvironment.getInstance().getOperationTaskReportLevelDirPath(operationId, taskKey, taskReportLevel),
// #32926 end // #32926 end
null, true); null, true);
...@@ -1183,14 +1169,13 @@ public class OperationListActivity extends ABVUIActivity { ...@@ -1183,14 +1169,13 @@ public class OperationListActivity extends ABVUIActivity {
try { try {
Logger.i(TAG, "[Get Task Report Files] operationId=%s, taskKey=%s, taskId=%s, attachedFileName=%s", operationId, taskKey, taskId, reportAttachedFileName); Logger.i(TAG, "[Get Task Report Files] operationId=%s, taskKey=%s, taskId=%s, attachedFileName=%s", operationId, taskKey, taskId, reportAttachedFileName);
// #32926 start // #32926 start
// TODO routineTaskReportDto -> taskReportDto int taskReportLevel = 0;
FileUtil.delete(ABVEnvironment.getInstance().getRoutineTaskReportDirFilePath(operationId, taskKey, taskReportId, reportStartDateNone, 0)); FileUtil.delete(ABVEnvironment.getInstance().getRoutineTaskReportDirFilePath(operationId, taskKey, taskReportId, reportStartDateNone, taskReportLevel));
// #32926 end // #32926 end
String outputFilePath = mOperationLogic.getRoutineTaskReportFile(operationId, taskKey, taskId, taskReportId, taskReportInfoId, reportStartDateNone, reportAttachedFileName); String outputFilePath = mOperationLogic.getRoutineTaskReportFile(operationId, taskKey, taskId, taskReportId, taskReportInfoId, reportStartDateNone, reportAttachedFileName);
// #32926 start // #32926 start
// TODO routineTaskReportDto -> taskReportDto
ContentFileExtractor.getInstance().extractZipFile(contentId, outputFilePath, ContentFileExtractor.getInstance().extractZipFile(contentId, outputFilePath,
ABVEnvironment.getInstance().getRoutineTaskReportDirFilePath(operationId, taskKey, taskReportId, reportStartDateNone, 0), null, true); ABVEnvironment.getInstance().getRoutineTaskReportDirFilePath(operationId, taskKey, taskReportId, reportStartDateNone, taskReportLevel), null, true);
// #32926 end // #32926 end
} catch (Exception e) { } catch (Exception e) {
Logger.e(TAG, e); Logger.e(TAG, e);
......
...@@ -194,9 +194,9 @@ public class ABookCheckWebViewHelper extends ABookHelper { ...@@ -194,9 +194,9 @@ public class ABookCheckWebViewHelper extends ABookHelper {
sendTaskDirectionsData(context, operationId, taskKey); sendTaskDirectionsData(context, operationId, taskKey);
break; break;
case ABookKeys.CMD_MOVE_HOT_SPOT: case ABookKeys.CMD_MOVE_HOT_SPOT:
// #32926 start // #32926 作業報告画面改善 start
mOperationLogic.updateTaskHotspot(taskKey, param, taskReportLevel); mOperationLogic.updateTaskHotspot(taskKey, param, taskReportLevel);
// #32926 end // #32926 作業報告画面改善 end
mOperationLogic.createHopSpotJson(operationId, contentPath); mOperationLogic.createHopSpotJson(operationId, contentPath);
break; break;
case ABookKeys.CMD_INSERT_TASK_REPORT: case ABookKeys.CMD_INSERT_TASK_REPORT:
...@@ -258,12 +258,9 @@ public class ABookCheckWebViewHelper extends ABookHelper { ...@@ -258,12 +258,9 @@ public class ABookCheckWebViewHelper extends ABookHelper {
break; break;
case ABookKeys.CMD_CANCEL_TASK_DIRECTIONS: case ABookKeys.CMD_CANCEL_TASK_DIRECTIONS:
case ABookKeys.CMD_CANCEL_TASK_REPORT: case ABookKeys.CMD_CANCEL_TASK_REPORT:
// #32926 start // #32926 作業報告画面改善 start
// TODO 一時的理療する削除対象
// String tempDirPath = ABVEnvironment.getInstance().getTempTaskDirPath(contentId, taskKey);
// tempDirPath = String.format(tempDirPath + "/%d", taskReportLevel);
FileUtil.delete(ABVEnvironment.getInstance().getTempTaskDirPath(contentId, taskKey)); FileUtil.delete(ABVEnvironment.getInstance().getTempTaskDirPath(contentId, taskKey));
// #32926 end // #32926 作業報告画面改善 end
mFinishCallback.callback(false); mFinishCallback.callback(false);
break; break;
} }
...@@ -591,10 +588,9 @@ public class ABookCheckWebViewHelper extends ABookHelper { ...@@ -591,10 +588,9 @@ public class ABookCheckWebViewHelper extends ABookHelper {
mOperationLogic.updateRoutineTaskReport(operationId, contentId, routineTaskTaskReportDto, attachedChangeFlag, true, insertFlg, true); mOperationLogic.updateRoutineTaskReport(operationId, contentId, routineTaskTaskReportDto, attachedChangeFlag, true, insertFlg, true);
} else { } else {
if (insertFlg) { if (insertFlg) {
// #32926 start // #32926 作業報告画面改善 start
// mOperationLogic.insertTaskReport(taskKey, operationId, contentId, taskReportJson, null, attachedChangeFlag, true);
mOperationLogic.insertTaskReport(taskKey, operationId, contentId, taskReportJson, null, attachedChangeFlag, true, taskReportLevel); mOperationLogic.insertTaskReport(taskKey, operationId, contentId, taskReportJson, null, attachedChangeFlag, true, taskReportLevel);
// #32926 end // #32926 作業報告画面改善 end
} else { } else {
mOperationLogic.updateTaskReport(taskKey, operationId, contentId, taskReportJson, null, attachedChangeFlag, true, taskReportLevel); mOperationLogic.updateTaskReport(taskKey, operationId, contentId, taskReportJson, null, attachedChangeFlag, true, taskReportLevel);
} }
...@@ -625,22 +621,16 @@ public class ABookCheckWebViewHelper extends ABookHelper { ...@@ -625,22 +621,16 @@ public class ABookCheckWebViewHelper extends ABookHelper {
} }
} }
// #32926 start // #32926 作業報告画面改善 start
copyReportTaskSendFiles(operationId, taskKey, taskReportSendId, routineTaskReportFlg, taskReportId, reportStartDate, taskReportLevel); copyReportTaskSendFiles(operationId, taskKey, taskReportSendId, routineTaskReportFlg, taskReportId, reportStartDate, taskReportLevel);
// #32926 end // #32926 作業報告画面改善 end
if (reportUpdateType == Constant.OperationUpdateType.HISTORY_ADD) { if (reportUpdateType == Constant.OperationUpdateType.HISTORY_ADD) {
// 作業報告のディレクトリ削除 // 作業報告のディレクトリ削除
// #32926 start // #32926 作業報告画面改善 start
// TODO 一時的理療する削除対象
// String tempDirPath = ABVEnvironment.getInstance().getTempTaskDirPath(contentId, taskKey);
// tempDirPath = String.format(tempDirPath + "/%d", taskReportLevel);
FileUtil.delete(ABVEnvironment.getInstance().getTempTaskDirPath(contentId, taskKey)); FileUtil.delete(ABVEnvironment.getInstance().getTempTaskDirPath(contentId, taskKey));
// TODO 変更必要
// FileUtil.delete(ABVEnvironment.getInstance().getOperationDirectionOrReportDirPath(operationId, taskKey, false));
FileUtil.delete(ABVEnvironment.getInstance().getOperationTaskReportLevelDirPath(operationId, taskKey, String.valueOf(taskReportLevel))); FileUtil.delete(ABVEnvironment.getInstance().getOperationTaskReportLevelDirPath(operationId, taskKey, String.valueOf(taskReportLevel)));
// #32926 end // #32926 作業報告画面改善 end
} }
} }
// #32782 指示者テーブル関連削除 end // #32782 指示者テーブル関連削除 end
...@@ -656,14 +646,9 @@ public class ABookCheckWebViewHelper extends ABookHelper { ...@@ -656,14 +646,9 @@ public class ABookCheckWebViewHelper extends ABookHelper {
copyRoutineTaskReportAttachedMovie(operationId, contentId, routineTaskDto.taskKey, routineTaskDto.taskReportId, routineTaskDto.reportStartDate, 0); copyRoutineTaskReportAttachedMovie(operationId, contentId, routineTaskDto.taskKey, routineTaskDto.taskReportId, routineTaskDto.reportStartDate, 0);
} }
} else { } else {
// #32926 start // #32926 作業報告画面改善 start
// TODO taskReportLevel の値を求める必要がある copyTaskAttachedMovie(operationId, contentId, taskDto.taskKey, String.valueOf(taskDto.taskReportLevel));
// copyTaskAttachedMovie(operationId, contentId, taskDto.taskKey); // #32926 作業報告画面改善 end
// copyTaskAttachedMovie(operationId, contentId, taskDto.taskKey, String.valueOf(operationDto.taskReportLevel));
// test start
copyTaskAttachedMovie(operationId, contentId, taskDto.taskKey, "0");
// test end
// #32926 end
} }
} }
} catch (IOException e) { } catch (IOException e) {
...@@ -715,15 +700,14 @@ public class ABookCheckWebViewHelper extends ABookHelper { ...@@ -715,15 +700,14 @@ public class ABookCheckWebViewHelper extends ABookHelper {
* @param operationId * @param operationId
* @param contentId * @param contentId
*/ */
// #32926 start // #32926 作業報告画面改善 start
public void copyTaskAttachedMovie(long operationId, long contentId, String taskKey, String taskReportLevel) throws IOException { public void copyTaskAttachedMovie(long operationId, long contentId, String taskKey, String taskReportLevel) throws IOException {
// 作業指示書の添付ファイル(mp4,mov拡張子のみ)コピー // 作業指示書の添付ファイル(mp4,mov拡張子のみ)コピー
// String taskKeyPath = ABVEnvironment.getInstance().getOperationDirectionOrReportDirPath(operationId, taskKey, true);
String taskKeyPath = ABVEnvironment.getInstance().getOperationTaskReportLevelDirPath(operationId, taskKey, taskReportLevel); String taskKeyPath = ABVEnvironment.getInstance().getOperationTaskReportLevelDirPath(operationId, taskKey, taskReportLevel);
// #32926 end // #32926 作業報告画面改善 end
File taskKeyFile = new File(taskKeyPath); File taskKeyFile = new File(taskKeyPath);
if (taskKeyFile.exists()) { if (taskKeyFile.exists()) {
String attachedMoviesFilePath = ABVEnvironment.getInstance().getAttachedDirectionOrReportDirPath(contentId, taskKey, true); String attachedMoviesFilePath = ABVEnvironment.getInstance().getAttachedDirectionOrReportDirPath(contentId, taskKey, taskReportLevel);
// 存在しない場合は無視する // 存在しない場合は無視する
FileUtil.delete(attachedMoviesFilePath); FileUtil.delete(attachedMoviesFilePath);
...@@ -736,10 +720,10 @@ public class ABookCheckWebViewHelper extends ABookHelper { ...@@ -736,10 +720,10 @@ public class ABookCheckWebViewHelper extends ABookHelper {
} }
// 作業報告書の添付ファイル(mp4,mov拡張子のみ)コピー // 作業報告書の添付ファイル(mp4,mov拡張子のみ)コピー
if (ABVDataCache.getInstance().getMemberInfo().operationAuthLevel == OperationAuthLevel.WORKER) { if (ABVDataCache.getInstance().getMemberInfo().operationAuthLevel == OperationAuthLevel.WORKER) {
taskKeyPath = ABVEnvironment.getInstance().getOperationDirectionOrReportDirPath(operationId, taskKey, false); taskKeyPath = ABVEnvironment.getInstance().getOperationDirectionOrReportDirPath(operationId, taskKey, taskReportLevel);
taskKeyFile = new File(taskKeyPath); taskKeyFile = new File(taskKeyPath);
if (taskKeyFile.exists()) { if (taskKeyFile.exists()) {
String attachedMoviesFilePath = ABVEnvironment.getInstance().getAttachedDirectionOrReportDirPath(contentId, taskKey, false); String attachedMoviesFilePath = ABVEnvironment.getInstance().getAttachedDirectionOrReportDirPath(contentId, taskKey, taskReportLevel);
FileUtil.delete(attachedMoviesFilePath); FileUtil.delete(attachedMoviesFilePath);
FileUtil.createNewDirectory(attachedMoviesFilePath); FileUtil.createNewDirectory(attachedMoviesFilePath);
for (String taskAttachedFile : taskKeyFile.list()) { for (String taskAttachedFile : taskKeyFile.list()) {
...@@ -771,10 +755,9 @@ public class ABookCheckWebViewHelper extends ABookHelper { ...@@ -771,10 +755,9 @@ public class ABookCheckWebViewHelper extends ABookHelper {
sReportStartDate = DateTimeUtil.toString_yyyyMMddHHmmss_none(dReportStartDate); sReportStartDate = DateTimeUtil.toString_yyyyMMddHHmmss_none(dReportStartDate);
taskAttachedPath = ABVEnvironment.getInstance().getRoutineTaskReportDirFilePath(operationId, taskKey, taskReportId, sReportStartDate, taskReportLevel); taskAttachedPath = ABVEnvironment.getInstance().getRoutineTaskReportDirFilePath(operationId, taskKey, taskReportId, sReportStartDate, taskReportLevel);
} else { } else {
// #32926 start // #32926 作業報告画面改善 start
// taskAttachedPath = ABVEnvironment.getInstance().getOperationDirectionOrReportDirPath(operationId, taskKey, false);
taskAttachedPath = ABVEnvironment.getInstance().getOperationTaskReportLevelDirPath(operationId, taskKey, String.valueOf(taskReportLevel)); taskAttachedPath = ABVEnvironment.getInstance().getOperationTaskReportLevelDirPath(operationId, taskKey, String.valueOf(taskReportLevel));
// #32926 end // #32926 作業報告画面改善 end
} }
File taskAttachedFiles = new File(taskAttachedPath); File taskAttachedFiles = new File(taskAttachedPath);
......
...@@ -1566,9 +1566,9 @@ public class ActivityHandlingHelper extends ABookHelper implements RemoteObserve ...@@ -1566,9 +1566,9 @@ public class ActivityHandlingHelper extends ABookHelper implements RemoteObserve
intent.putExtra(ABookKeys.LOCAL_SAVE, localSave); // 一時保存情報 intent.putExtra(ABookKeys.LOCAL_SAVE, localSave); // 一時保存情報
intent.putExtra(ABookKeys.ADD_REPORT, addReport); // 作業追加区分 intent.putExtra(ABookKeys.ADD_REPORT, addReport); // 作業追加区分
// #32861 作業情報追加 end // #32861 作業情報追加 end
// #32926 start // #32926 作業報告画面改善 start
intent.putExtra(ABookKeys.TASK_REPORT_LEVEL, taskReportLevel); // 作業報告レベル(0:報告、1:報告(回答)、2:報告(回答)) intent.putExtra(ABookKeys.TASK_REPORT_LEVEL, taskReportLevel); // 作業報告レベル(0:報告、1:報告(回答)、2:報告(回答))
// #32926 end // #32926 作業報告画面改善 end
context.startActivity(intent); context.startActivity(intent);
} }
......
...@@ -100,8 +100,7 @@ public class OzdFileHelper { ...@@ -100,8 +100,7 @@ public class OzdFileHelper {
ozdFileName = reportFileName; ozdFileName = reportFileName;
ozrFileName = reportFileName; ozrFileName = reportFileName;
} else { } else {
// #32926 start // #32926 作業報告画面改善 start
// if (directionFlg) {
if (taskReportLevel == 0) { if (taskReportLevel == 0) {
ozdFileName = DIRECTION_OZD_FILE_NAME; ozdFileName = DIRECTION_OZD_FILE_NAME;
ozrFileName = DIRECTION_OZR_FILE_NAME; ozrFileName = DIRECTION_OZR_FILE_NAME;
...@@ -109,7 +108,7 @@ public class OzdFileHelper { ...@@ -109,7 +108,7 @@ public class OzdFileHelper {
ozdFileName = REPORT_OZD_FILE_NAME; ozdFileName = REPORT_OZD_FILE_NAME;
ozrFileName = REPORT_OZR_FILE_NAME; ozrFileName = REPORT_OZR_FILE_NAME;
} }
// #32926 end // #32926 作業報告画面改善 end
} }
String ozFilePath = ABVEnvironment.getInstance().getTempFilePath(contentId, taskKey, ozdFileName); String ozFilePath = ABVEnvironment.getInstance().getTempFilePath(contentId, taskKey, ozdFileName);
...@@ -120,10 +119,9 @@ public class OzdFileHelper { ...@@ -120,10 +119,9 @@ public class OzdFileHelper {
if (taskReportId > 0 && !StringUtil.isNullOrEmpty(reportStartDate)) { if (taskReportId > 0 && !StringUtil.isNullOrEmpty(reportStartDate)) {
ozFilePath = ABVEnvironment.getInstance().getRoutineTaskSavedOzFilePath(operationId, taskKey, taskReportId, reportStartDate, ozdFileName, String.valueOf(taskReportLevel)); ozFilePath = ABVEnvironment.getInstance().getRoutineTaskSavedOzFilePath(operationId, taskKey, taskReportId, reportStartDate, ozdFileName, String.valueOf(taskReportLevel));
} else { } else {
// #32926 start // #32926 作業報告画面改善 start
// ozFilePath = ABVEnvironment.getInstance().getSavedOzFilePath(operationId, taskKey, ozdFileName, directionFlg);
ozFilePath = ABVEnvironment.getInstance().getSavedOzFileTaskReportLevelPath(operationId, taskKey, ozdFileName, String.valueOf(taskReportLevel)); ozFilePath = ABVEnvironment.getInstance().getSavedOzFileTaskReportLevelPath(operationId, taskKey, ozdFileName, String.valueOf(taskReportLevel));
// #32926 end // #32926 作業報告画面改善 end
} }
if (FileUtil.exists(ozFilePath)) { if (FileUtil.exists(ozFilePath)) {
return ozFilePath; return ozFilePath;
......
...@@ -74,9 +74,9 @@ public class CheckOZDViewActivity extends ABVContentViewActivity { ...@@ -74,9 +74,9 @@ public class CheckOZDViewActivity extends ABVContentViewActivity {
private String mSaveOzdTempFileName; private String mSaveOzdTempFileName;
private String mSaveOzdFileName; private String mSaveOzdFileName;
// #32926 start // #32926 作業報告画面改善 start
private int mTaskReportLevel; // 作業報告レベル private int mTaskReportLevel; // 作業報告レベル
// #32926 end // #32926 作業報告画面改善 end
@Override @Override
public void onCreate(Bundle savedInstanceState) { public void onCreate(Bundle savedInstanceState) {
...@@ -96,9 +96,9 @@ public class CheckOZDViewActivity extends ABVContentViewActivity { ...@@ -96,9 +96,9 @@ public class CheckOZDViewActivity extends ABVContentViewActivity {
mReportStartDate = intent.getStringExtra(ABookKeys.REPORT_START_DATE); mReportStartDate = intent.getStringExtra(ABookKeys.REPORT_START_DATE);
mReportFileName = intent.getStringExtra(ABookKeys.REPORT_FILE_NAME); mReportFileName = intent.getStringExtra(ABookKeys.REPORT_FILE_NAME);
// #32926 start // #32926 作業報告画面改善 start
mTaskReportLevel = intent.getIntExtra(ABookKeys.TASK_REPORT_LEVEL, 0); // 作業報告レベル mTaskReportLevel = intent.getIntExtra(ABookKeys.TASK_REPORT_LEVEL, 0); // 作業報告レベル
// #32926 end // #32926 作業報告画面改善 end
String frontTitle = ""; String frontTitle = "";
String rearTitle = ""; String rearTitle = "";
...@@ -171,10 +171,9 @@ public class CheckOZDViewActivity extends ABVContentViewActivity { ...@@ -171,10 +171,9 @@ public class CheckOZDViewActivity extends ABVContentViewActivity {
}); });
// #32861 作業情報追加 end // #32861 作業情報追加 end
// #32926 start // #32926 作業報告画面改善 start
// mOzFilePath = OzdFileHelper.getOzFilePath(mOperationId, contentId, mTaskKey, mDirectionFlg, mTaskReportId, mReportStartDate, mReportFileName);
mOzFilePath = OzdFileHelper.getOzFilePath(mOperationId, contentId, mTaskKey, mDirectionFlg, mTaskReportId, mReportStartDate, mReportFileName, mTaskReportLevel); mOzFilePath = OzdFileHelper.getOzFilePath(mOperationId, contentId, mTaskKey, mDirectionFlg, mTaskReportId, mReportStartDate, mReportFileName, mTaskReportLevel);
// #32926 end // #32926 作業報告画面改善 end
Logger.i(TAG,"********mOzFilePath = %s" + mOzFilePath); Logger.i(TAG,"********mOzFilePath = %s" + mOzFilePath);
if (mOzFilePath == null) { if (mOzFilePath == null) {
...@@ -537,10 +536,9 @@ public class CheckOZDViewActivity extends ABVContentViewActivity { ...@@ -537,10 +536,9 @@ public class CheckOZDViewActivity extends ABVContentViewActivity {
StringBuilder param = new StringBuilder(); StringBuilder param = new StringBuilder();
param.append("export.mode=silent#"); param.append("export.mode=silent#");
param.append("export.filename=" + FileUtil.getFilenameWithoutExt(mSaveOzdTempFileName) + "#"); param.append("export.filename=" + FileUtil.getFilenameWithoutExt(mSaveOzdTempFileName) + "#");
// #32926 start // #32926 作業報告画面改善 start
// param.append("export.path=" + OzdFileHelper.getTempTaskDirPath(contentId, mTaskKey) + "#");
param.append("export.path=" + OzdFileHelper.getTempTaskDirPath(contentId, mTaskKey) + "/" + mTaskReportLevel + "#"); param.append("export.path=" + OzdFileHelper.getTempTaskDirPath(contentId, mTaskKey) + "/" + mTaskReportLevel + "#");
// #32926 end // #32926 作業報告画面改善 end
param.append("export.confirmsave=false#"); param.append("export.confirmsave=false#");
param.append("export.format=ozd"); param.append("export.format=ozd");
int result = mOzReportViewer.ScriptEx("save", param.toString(), "#"); int result = mOzReportViewer.ScriptEx("save", param.toString(), "#");
......
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