Commit 4da293d2 by Lee Jaebin

・添付ファイルの保存先のパス修正

・t_task_reportのreported_flgカラム削除
・送信中にサーバーエラー後、同期できないバグ修正
parent 5a3875f9
......@@ -36,7 +36,6 @@ public class TaskHotspotJSON extends AbstractJSON {
taskHotspot = new OperationTaskDto();
taskHotspot.pageNum = obj.getInt(PAGE_NUM);
taskHotspot.seqId = obj.getInt(SEQ_ID);
//taskHotspot.taskKey = obj.getLong(TASK_ID);
taskHotspot.taskKey = obj.getString(TASK_KEY);
taskHotspot.taskCode = obj.getString(TASK_CODE);
taskHotspot.pdfX = (float) obj.getDouble(VIEW_X);
......
......@@ -125,7 +125,7 @@ public class ABVEnvironment {
public static final String TempTaskFileFormat = TempTaskKeyDirFormat + "/%s";
public static final String AttachedMoviesDirFormat = "%s/%d/attachedMovie";
public static final String AttachedMoviesTaskTypeDir = AttachedMoviesDirFormat + "/%s/%s";
public static final String AttachedMoviesRoutineTaskTypeDir = AttachedMoviesDirFormat + "/%s/report/%d/%s";
public static final String AttachedMoviesRoutineTaskTypeDir = AttachedMoviesDirFormat + "/%s/%s/%d/%s";
public static final String CacheTempAttachedImageFormat = "%s/temp/attachedImage";
......@@ -134,10 +134,8 @@ public class ABVEnvironment {
public static final String TaskReportLevelDir = "/%s";
public static final String SavedOzFileFormat = OperationDirectionOrReportDirFormat + TaskReportLevelDir;
public static final String RoutineTaskSavedOzFileFormat = OperationDirectionOrReportDirFormat + TaskReportLevelDir + "/%d/%s/%s";
public static final String OperationTaskKeyReportSendDirFormat = OperationTaskKeyDirFormat + TaskReportLevelDir + "/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 OperationTaskKeyReportSendDirFormat = OperationTaskKeyDirFormat + "/reportSend/%d";
public static final String OperationTaskKeyRoutineTaskReportDirFormat = OperationTaskKeyDirFormat + "/%d/%s/%s";
// #32926 作業報告画面改善 end
/**
......@@ -674,23 +672,41 @@ public class ABVEnvironment {
}
/**
* 報告送信ディレクトリパス
* 例)root/files/ABook/operation/[operation_id]/[task_key]/reportSend/{taskReportSendId}
* @param operationId
* @param taskKey
* @param taskReportSendId
* @return
*/
// taskReportLevelの値によってディレクトリを構成
public String getOperationTaskReportSendDirFilePath(long operationId, String taskKey, int taskReportLevel, int taskReportSendId) {
return String.format(OperationTaskKeyReportSendDirFormat, rootDirectory, operationId, taskKey, taskReportLevel, taskReportSendId);
public String getOperationTaskReportSendDirFilePath(long operationId, String taskKey, int taskReportSendId) {
return String.format(OperationTaskKeyReportSendDirFormat, rootDirectory, operationId, taskKey, taskReportSendId);
}
public String getRoutineTaskReportSendDirFilePath(long operationId, String taskKey, int taskReportId, String reportStartDate) {
return String.format(OperationTaskKeyRoutineTaskReportSendDirFormatForDelete, rootDirectory, operationId, taskKey, taskReportId, getReportDate(reportStartDate));
}
public String getRoutineTaskReportSendDirFilePath(long operationId, String taskKey, int taskReportId, String reportStartDate, int taskReportSendId) {
return String.format(OperationTaskKeyRoutineTaskReportSendDirFormat, rootDirectory, operationId, taskKey, taskReportId, getReportDate(reportStartDate), taskReportSendId);
}
/**
* 定期点検で添付ファイルのパス
* 例)root/files/ABook/operation/[operation_id]/[task_key]/0/{taskReportId}/{reportStartDate}
* @param operationId
* @param taskKey
* @param taskReportId
* @param reportStartDate
* @return
*/
public String getRoutineTaskReportDirFilePath(long operationId, String taskKey, int taskReportId, String reportStartDate) {
return String.format(OperationTaskKeyRoutineTaskReportDirFormat, rootDirectory, operationId, taskKey, taskReportId, getReportDate(reportStartDate));
return String.format(OperationTaskKeyRoutineTaskReportDirFormat, rootDirectory, operationId, taskKey, Constant.TaskReportLevel.ReportType, taskReportId, getReportDate(reportStartDate));
}
/**
* 添付ファイル管理パス
* 例)root/files/ABook/operation/[operation_id]/[task_key]/{task_report_level}
* @param operationId
* @param taskKey
* @param taskReportLevel
* @return
*/
public String getOperationDirectionOrReportDirPath(long operationId, String taskKey, int taskReportLevel) {
return String.format(OperationDirectionOrReportDirFormat, rootDirectory, operationId, taskKey, String.valueOf(taskReportLevel));
}
......@@ -707,14 +723,12 @@ public class ABVEnvironment {
return String.format(OperationDirectionOrReportDirFormat, rootDirectory, operationId, taskKey, String.valueOf(taskReportLevel));
}
public String getOperationTaskReportDirPath(long operationId, String taskKey) {
return String.format(OperationDirectionOrReportDirFormat, rootDirectory, operationId, taskKey);
}
public String getOperationReportSendDirPath(long operationId, String taskKey) {
return String.format(OperationDirectionOrReportDirFormat, rootDirectory, operationId, taskKey, REPORT_SEND);
}
/**
* 添付動画の臨時保存パス
* 例)root/cache/{contentId}/attachedMovie
* @param contentId
* @return
*/
public String getAttachedMoviesFilePath(long contentId) {
Logger.d(TAG, "cacheDirectory : " + cacheDirectory);
return String.format(AttachedMoviesDirFormat, cacheDirectory, contentId);
......@@ -727,12 +741,16 @@ public class ABVEnvironment {
}
// #32926 作業報告画面改善 end
/**
* 例)root/cache/{contentId}/attachedMovie/[task_key]/{task_report_level}/{task_report_id}/{report_start_date}
* @param contentId
* @param taskKey
* @param taskReportId
* @param reportStartDate
* @return
*/
public String getAttachedRoutineTaskReportDirPath(long contentId, String taskKey, int taskReportId, String reportStartDate) {
return String.format(AttachedMoviesRoutineTaskTypeDir, cacheDirectory, contentId, taskKey, taskReportId, getReportDate(reportStartDate));
}
public String getCacheTempDirPath() {
return String.format(CacheTempFormat, cacheDirectory);
return String.format(AttachedMoviesRoutineTaskTypeDir, cacheDirectory, contentId, taskKey, Constant.TaskReportLevel.ReportType, taskReportId, getReportDate(reportStartDate));
}
public String getCacheTempAttachedImageDirPath() {
......
......@@ -105,6 +105,7 @@ public class TaskDao extends AbstractDao {
delete("t_task", "task_key=?", keyValues);
delete("t_task_report", "task_key=?", keyValues);
delete("t_task_report_items", "task_key=?", keyValues);
delete("t_task_report_send", "task_key=?", keyValues);
}
/**
......@@ -115,5 +116,6 @@ public class TaskDao extends AbstractDao {
delete("t_task", "task_key=?", dto.getKeyValues());
delete("t_task_report", "task_key=?", dto.getKeyValues());
delete("t_task_report_items", "task_key=?", dto.getKeyValues());
delete("t_task_report_send", "task_key=?", dto.getKeyValues());
}
}
\ No newline at end of file
......@@ -56,10 +56,6 @@ public class TaskReportDao extends AbstractDao {
if (column != -1) {
dto.delFlg = toBool(cursor.getInt(column));
}
column = cursor.getColumnIndex("reported_flg");
if (column != -1) {
dto.reportedFlg = toBool(cursor.getInt(column));
}
column = cursor.getColumnIndex("enable_report");
if (column != -1) {
......@@ -116,11 +112,10 @@ public class TaskReportDao extends AbstractDao {
+ "report_start_date, "
+ "report_end_date, "
+ "enable_report, "
+ "reported_flg, "
+ "task_report_level, "
+ "local_saved_flg ) "
+ "values "
+ "(?,?,?,?,?,?,?,?,?,?,?,?,?,?)",
+ "(?,?,?,?,?,?,?,?,?,?,?,?,?)",
dto.getInsertValues());
}
......@@ -140,17 +135,16 @@ public class TaskReportDao extends AbstractDao {
sql.append("data_send_flg=?, ");
sql.append("report_end_date=?, ");
sql.append("enable_report=?, ");
sql.append("reported_flg=?, ");
sql.append("task_report_level=?, ");
sql.append("local_saved_flg=? ");
sql.append("WHERE task_key=? AND task_report_level=?");
if (dto.reportStartDate != null) {
sql.append(" AND datetime(report_start_date)=datetime(?)");
objects = new Object[]{dto.jsonData, dto.attachedFileName, dto.localAttachedFileName, dto.attachedFileSendFlg, dto.dataSendFlg,
dto.reportEndDate, dto.enableReport, dto.reportedFlg, dto.taskReportLevel, dto.localSavedFlg, dto.taskKey, dto.taskReportLevel, dto.reportStartDate};
dto.reportEndDate, dto.enableReport, dto.taskReportLevel, dto.localSavedFlg, dto.taskKey, dto.taskReportLevel, dto.reportStartDate};
} else {
objects = new Object[]{dto.jsonData, dto.attachedFileName, dto.localAttachedFileName, dto.attachedFileSendFlg, dto.dataSendFlg,
dto.reportEndDate, dto.enableReport, dto.reportedFlg, dto.taskReportLevel, dto.localSavedFlg, dto.taskKey, dto.taskReportLevel};
dto.reportEndDate, dto.enableReport, dto.taskReportLevel, dto.localSavedFlg, dto.taskKey, dto.taskReportLevel};
}
return update(sql.toString(), objects) > 0;
......
......@@ -34,7 +34,6 @@ public class TTaskReport extends SQLiteTableScript {
sql.append(" , task_report_info_id INTEGER NOT NULL DEFAULT 0 ");
sql.append(" , enable_report SMALLINT NOT NULL DEFAULT 0 ");
sql.append(" , task_report_level SMALLINT NOT NULL DEFAULT 0 ");
sql.append(" , reported_flg BOOLEAN DEFAULT 0 ");
sql.append(" , local_saved_flg BOOLEAN DEFAULT 0 ");
sql.append(" ) ");
ddl.add(sql.toString());
......
......@@ -24,17 +24,16 @@ public class TaskReportDto extends AbstractDto {
public Date reportEndDate; // 作業終了日
public int enableReport; // 報告可能区分
public String attachedFileName;
public boolean reportedFlg; // 定期点検用
public boolean localSavedFlg; // 一時保存用
@Override
public Object[] getInsertValues() {
return new Object[] { taskKey, jsonData, attachedFileName, localAttachedFileName, attachedFileSendFlg, dataSendFlg, taskReportId, taskReportInfoId, reportStartDate, reportEndDate, enableReport, reportedFlg, taskReportLevel, localSavedFlg};
return new Object[] { taskKey, jsonData, attachedFileName, localAttachedFileName, attachedFileSendFlg, dataSendFlg, taskReportId, taskReportInfoId, reportStartDate, reportEndDate, enableReport, taskReportLevel, localSavedFlg};
}
@Override
public Object[] getUpdateValues() {
return new Object[] { jsonData, attachedFileName, localAttachedFileName, attachedFileSendFlg, dataSendFlg, reportEndDate, enableReport, reportedFlg, taskReportLevel, localSavedFlg, taskKey, taskReportLevel , reportStartDate };
return new Object[] { jsonData, attachedFileName, localAttachedFileName, attachedFileSendFlg, dataSendFlg, reportEndDate, enableReport, taskReportLevel, localSavedFlg, taskKey, taskReportLevel , reportStartDate };
}
@Override
......
......@@ -464,16 +464,16 @@ public class OperationLogic extends AbstractLogic {
/**
* 定期点検データ更新
* @param operationId
* @param contentId
* @param taskReportDto
* @param attachedChangeFlag
* @param dataSendFlg
* @param reportedFlg
* @param localSavedFlg
* @throws IOException
*/
public void updateRoutineTaskReport(long operationId, long contentId, TaskReportDto taskReportDto, boolean attachedChangeFlag, boolean dataSendFlg, boolean reportedFlg, boolean localSavedFlg) throws IOException {
public void updateRoutineTaskReport(long operationId, long contentId, TaskReportDto taskReportDto, boolean attachedChangeFlag, boolean dataSendFlg, boolean localSavedFlg) throws IOException {
taskReportDto.attachedFileSendFlg = attachedChangeFlag;
taskReportDto.dataSendFlg = dataSendFlg;
taskReportDto.reportedFlg = reportedFlg;
taskReportDto.localSavedFlg = localSavedFlg;
mTaskReportDao.update(taskReportDto);
......@@ -632,9 +632,6 @@ public class OperationLogic extends AbstractLogic {
// 作業報告のディレクトリ削除
FileUtil.delete(ABVEnvironment.getInstance().getTempTaskDirPath(contentId, dto.taskKey));
FileUtil.delete(ABVEnvironment.getInstance().getRoutineTaskReportDirFilePath(operationId, dto.taskKey, dto.taskReportId, reportStartDate));
// 作業報告送信のディレクトリ削除
FileUtil.delete(ABVEnvironment.getInstance().getRoutineTaskReportSendDirFilePath(operationId, dto.taskKey, dto.taskReportId, reportStartDate));
}
/**
......@@ -651,7 +648,6 @@ public class OperationLogic extends AbstractLogic {
taskReportDto.dataSendFlg = true;
taskReportDto.attachedFileSendFlg = false;
taskReportDto.jsonData = "";
taskReportDto.reportedFlg = false;
mTaskReportDao.update(taskReportDto);
}
......@@ -918,7 +914,6 @@ public class OperationLogic extends AbstractLogic {
taskReportJsonRow.put(ABookKeys.TASK_REPORT_INFO_ID, dto.taskReportInfoId);
taskReportJsonRow.put(ABookKeys.REPORT_START_DATE, DateTimeUtil.toStringInTimeZone(dto.reportStartDate, DateTimeFormat.yyyyMMddHHmmss_hyphen, DateTimeUtil.getLocalTimeZone()));
taskReportJsonRow.put(ABookKeys.REPORT_END_DATE, DateTimeUtil.toStringInTimeZone(dto.reportEndDate, DateTimeFormat.yyyyMMddHHmmss_hyphen, DateTimeUtil.getLocalTimeZone()));
taskReportJsonRow.put(ABookKeys.REPORTED, dto.reportedFlg ? 1 : 0);
List<JSONObject> taskReportInfoList = new ArrayList<JSONObject>();
if (!StringUtil.isNullOrEmpty(dto.jsonData)) {
......@@ -928,9 +923,9 @@ public class OperationLogic extends AbstractLogic {
taskReportJsonList.add(taskReportJsonRow);
}
taskReportJsonRoot.put(ABookKeys.ENABLE_REPORT_UPDATE, mOperationDao.getOperation(operationId).enableReportUpdate);
TaskReportDto taskReportDto = mTaskReportDao.getLastRoutineTaskReportData(operationId);
// 最後のtaskReportId
taskReportJsonRoot.put(ABookKeys.TASK_REPORT_ID, taskReportDto.taskReportId);
TaskReportDto lastRoutineTaskReportDto = mTaskReportDao.getLastRoutineTaskReportData(operationId);
taskReportJsonRoot.put(ABookKeys.TASK_REPORT_ID, lastRoutineTaskReportDto.taskReportId);
taskReportJsonRoot.put("taskReport_0", taskReportJsonList);
Logger.d(TAG, "createRoutineTaskReportJson : " + taskReportJsonRoot.toString());
Logger.d(TAG,contentPath + "/" + ABookKeys.TASK_REPORT + ".json");
......@@ -1139,7 +1134,7 @@ public class OperationLogic extends AbstractLogic {
if (taskReportDtoList != null && taskReportDtoList.size() > 0) {
int allSendCount = mTaskReportSendDao.getSendableTaskReportSendDataCount(operationId, taskKey);
int progress = maxProgress / allSendCount;
int progress = maxProgress / allSendCount == 0 ? 1 : allSendCount;
// 送信済みsendIdをまとめて削除するため、リストに追加して最後に削除
List<Integer> removeTaskReportSendIds = new ArrayList<Integer>();
......@@ -1188,16 +1183,11 @@ public class OperationLogic extends AbstractLogic {
progressCallback.callback(new Integer(progress));
removeTaskReportSendIds.add(taskReportSendDto.taskReportSendId);
if (operationDto.reportType == Constant.ReportType.RoutineTask) {
// 定期点検
FileUtil.delete(ABVEnvironment.getInstance().getRoutineTaskReportSendDirFilePath(operationId, taskReportSendDto.taskKey, taskReportSendDto.taskReportId, strReportStartDate, taskReportSendDto.taskReportSendId));
} else {
FileUtil.delete(ABVEnvironment.getInstance().getOperationTaskReportSendDirFilePath(operationId, taskReportSendDto.taskKey, taskReportDto.taskReportLevel, taskReportSendDto.taskReportSendId));
}
FileUtil.delete(ABVEnvironment.getInstance().getOperationTaskReportSendDirFilePath(operationId, taskReportSendDto.taskKey, taskReportSendDto.taskReportSendId));
} catch (ABVException ex) {
if (ex.getCode() == ABVExceptionCode.P_E_ACMS_P005) {
mTaskReportSendDao.deleteBySendId(taskReportSendDto.taskReportSendId);
FileUtil.delete(ABVEnvironment.getInstance().getRoutineTaskReportSendDirFilePath(operationId, taskReportSendDto.taskKey, taskReportSendDto.taskReportId, strReportStartDate, taskReportSendDto.taskReportSendId));
FileUtil.delete(ABVEnvironment.getInstance().getOperationTaskReportSendDirFilePath(operationId, taskReportSendDto.taskKey, taskReportSendDto.taskReportSendId));
return true;
}
throw ex;
......@@ -1298,7 +1288,7 @@ public class OperationLogic extends AbstractLogic {
* @throws InterruptedException
*/
public String getRoutineTaskReportFile(long operationId, String taskKey, long taskId, int taskReportId, int taskReportInfoId, String reportStartDate, String attachedFileName) throws ABVException, InterruptedException {
GetTaskFileParameters parameters = new GetTaskFileParameters(cache.getMemberInfo().sid, taskId, 1, taskReportInfoId);
GetTaskFileParameters parameters = new GetTaskFileParameters(cache.getMemberInfo().sid, taskId, Constant.ReportType.Report, taskReportInfoId);
String outputFilePath = ABVEnvironment.getInstance().getRoutineTaskReportDirFilePath(operationId, taskKey, taskReportId, reportStartDate) + "/" + attachedFileName + ".zip";
AcmsClient.getInstance(cache.getUrlPath(), networkAdapter).getTaskFile(parameters, operationId, outputFilePath);
return outputFilePath;
......@@ -1400,13 +1390,7 @@ public class OperationLogic extends AbstractLogic {
*/
private File createAttachedFileForSend(Long operationId, String taskKey, int taskReportSendId, boolean routineFlag, int reportId, String reportStartDate, int taskReportLevel) throws ZipException, NoSuchAlgorithmException, IOException {
File zipFile;
String filePath;
if (routineFlag) {
filePath = ABVEnvironment.getInstance().getRoutineTaskReportSendDirFilePath(operationId, taskKey, reportId, reportStartDate, taskReportSendId);
} else {
filePath = ABVEnvironment.getInstance().getOperationTaskReportSendDirFilePath(operationId, taskKey, taskReportLevel, taskReportSendId);
}
String filePath = ABVEnvironment.getInstance().getOperationTaskReportSendDirFilePath(operationId, taskKey, taskReportSendId);
File fileDir = new File(filePath);
if (!fileDir.exists()) {
......@@ -1529,10 +1513,24 @@ public class OperationLogic extends AbstractLogic {
* @param hotSpotInfo
* @param taskStatus
*/
public void registTaskData(String taskKey, Long operationId, String hotSpotInfo, Integer taskStatus) {
public void registTaskData(String taskKey, Long operationId, String hotSpotInfo, Integer taskStatus, JSONObject taskJson) {
TaskDto taskDto = mTaskDao.getTaskByTaskKey(taskKey);
String taskCode = null;
if (taskJson != null) {
// 作業コード取得
Iterator taskKeys = taskJson.keys();
while (taskKeys.hasNext()) {
String itemKey = (String) taskKeys.next();
if (itemKey.startsWith("q_1_")) {
taskCode = taskJson.getString(itemKey);
}
}
}
if (taskDto != null) {
// 更新
taskDto.taskCode = taskCode;
if (hotSpotInfo != null) {
taskDto.taskHotSpotInfo = hotSpotInfo;
}
......@@ -1543,6 +1541,7 @@ public class OperationLogic extends AbstractLogic {
} else {
// 登録
taskDto = new TaskDto();
taskDto.taskCode = taskCode;
taskDto.taskKey = taskKey;
taskDto.operationId = operationId;
if (hotSpotInfo != null) {
......
......@@ -885,7 +885,7 @@ public class OperationListActivity extends ABVUIActivity {
}
if (localTaskReportDto != null) {
// 報告データが存在すると作業報告を更新する
mOperationLogic.updateRoutineTaskReport(serverTaskDto.operationId, operationContentDto.contentId, serverTaskReportDto, false, false, false, localTaskReportDto.localSavedFlg);
mOperationLogic.updateRoutineTaskReport(serverTaskDto.operationId, operationContentDto.contentId, serverTaskReportDto, false, false, localTaskReportDto.localSavedFlg);
} else {
mOperationLogic.insertRoutineTaskReport(serverTaskDto.operationId, operationContentDto.contentId, serverTaskReportDto, false, false);
}
......
......@@ -88,11 +88,11 @@ public class ABookCheckWebViewHelper extends ABookHelper {
copyTaskAttachedMovie(operationId, contentId, taskKey, taskReportLevel);
sendTaskData(context, operationId, taskKey, taskReportLevel);
break;
case ABookKeys.CMD_LOCAL_SAVE_TASK_REPORT:
case ABookKeys.CMD_LOCAL_SAVE_TASK_REPORT: // 一時保存
insertOrUpdateTaskReport(taskKey, enableReportHistory, operationId, contentId, param, contentPath, reportType, taskReportLevel, true);
copyTaskAttachedMovie(operationId, contentId, taskKey, taskReportLevel);
ABVToastUtil.showMakeText(context, R.string.msg_temp_save_result, Toast.LENGTH_SHORT);
mFinishCallback.callback(true);
mFinishCallback.callback(false);
break;
case ABookKeys.CMD_DELETE_TASK_REPORT:
int taskReportId = 0;
......@@ -295,7 +295,7 @@ public class ABookCheckWebViewHelper extends ABookHelper {
TaskReportDto taskReportDto = mOperationLogic.getRoutineTaskReportUtc(taskKey, taskReportId, reportStartDate);
taskReportDto.jsonData = taskReport;
mOperationLogic.updateRoutineTaskReport(operationId, contentId, taskReportDto, attachedChangeFlag, true, true, localSavedFlg);
mOperationLogic.updateRoutineTaskReport(operationId, contentId, taskReportDto, attachedChangeFlag, true, localSavedFlg);
mOperationLogic.createJsonForOperationContent(operationId, contentPath, true);
copyRoutineTaskReportAttachedMovie(operationId, contentId, taskKey, taskReportId, reportStartDate);
......@@ -303,8 +303,13 @@ public class ABookCheckWebViewHelper extends ABookHelper {
String hotSpotInfo = param.containsKey(ABookKeys.HOT_SPOT) ? param.get(ABookKeys.HOT_SPOT) : null;
Integer taskStatus = taskReportJson.has(ABookKeys.TASK_STATUS) ? taskReportJson.getInt(ABookKeys.TASK_STATUS) : null;
// 報告情報のjson取得後、登録・更新時に使用
JSONObject taskJson = null;
if (taskReportJson.has("task")) {
taskJson = taskReportJson.getJSONObject("task");
}
// task登録・更新処理
mOperationLogic.registTaskData(taskKey, operationId, hotSpotInfo, taskStatus);
mOperationLogic.registTaskData(taskKey, operationId, hotSpotInfo, taskStatus, taskJson);
TaskReportDto taskReportDto = mOperationLogic.getTaskReport(taskKey, taskReportLevel);
if (taskReportDto != null) {
......@@ -440,12 +445,8 @@ public class ABookCheckWebViewHelper extends ABookHelper {
File taskAttachedFiles = new File(taskAttachedPath);
if (taskAttachedFiles.exists()) {
String taskReportSendPath;
if (routineTaskReportFlg) {
taskReportSendPath = ABVEnvironment.getInstance().getRoutineTaskReportSendDirFilePath(operationId, taskKey, taskReportId, sReportStartDate, taskReportSendId);
} else {
taskReportSendPath = ABVEnvironment.getInstance().getOperationTaskReportSendDirFilePath(operationId, taskKey, taskReportLevel, taskReportSendId);
}
String taskReportSendPath = ABVEnvironment.getInstance().getOperationTaskReportSendDirFilePath(operationId, taskKey, taskReportSendId);
FileUtil.delete(taskReportSendPath);
FileUtil.createNewDirectory(taskReportSendPath);
......@@ -469,7 +470,7 @@ public class ABookCheckWebViewHelper extends ABookHelper {
@Override
protected Void doInBackground(Void... params) {
try {
String taskReportSendPath = ABVEnvironment.getInstance().getOperationTaskReportSendDirFilePath(operationId, taskKey, taskReportLevel, taskReportSendId);
String taskReportSendPath = ABVEnvironment.getInstance().getOperationTaskReportSendDirFilePath(operationId, taskKey, taskReportSendId);
FileUtil.delete(taskReportSendPath);
} catch (Exception ex) {
Logger.e(String.format("%s.deleteReportTaskSendFiles(%d, %s)", TAG, operationId, taskKey), ex);
......
......@@ -4955,6 +4955,7 @@ public class ContentViewActivity extends ABVContentViewActivity {
case ABookKeys.CMD_INSERT_TASK_REPORT: // 作業報告の登録
case ABookKeys.CMD_UPDATE_TASK_REPORT: // 作業報告の更新
case ABookKeys.CMD_DELETE_TASK_REPORT: // 作業報告の削除
case ABookKeys.CMD_LOCAL_SAVE_TASK_REPORT: // 一時保存
getTaskHotspotJSON();
case ABookKeys.CMD_CANCEL_TASK_REPORT: // 作業報告のキャンセル
if(operationTaskDto != null) {
......@@ -5182,6 +5183,7 @@ public class ContentViewActivity extends ABVContentViewActivity {
// #32782 指示者テーブル関連削除 start
case ABookKeys.CMD_INSERT_TASK_REPORT:
case ABookKeys.CMD_UPDATE_TASK_REPORT:
case ABookKeys.CMD_LOCAL_SAVE_TASK_REPORT: // 一時保存
if (taskReportLevel == Constant.TaskReportLevel.ReportType) {
JSONObject hotspot = new JSONObject(checkParam.get(ABookKeys.HOT_SPOT));
......
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