Commit be91422e by Lee Jaebin

#32825 作業一覧画面改善

parent c77c8c57
......@@ -505,8 +505,8 @@ public class AcmsClient implements AcmsClientResponseListener {
}
//作業者グループ取得
public WorkerGroupJSON getWorkerGroupList(AcmsParameters param) throws NetworkDisconnectedException, AcmsException {
HttpResponse response = send(AcmsApis.ApiWorkerGroupList, param);
public WorkerGroupJSON getWorkingGroupList(AcmsParameters param) throws NetworkDisconnectedException, AcmsException {
HttpResponse response = send(AcmsApis.ApiWorkingGroupList, param);
WorkerGroupJSON json = new WorkerGroupJSON(response.httpResponseBody);
return json;
......@@ -518,7 +518,7 @@ public class AcmsClient implements AcmsClientResponseListener {
* @param operationId
* @param taskKey
* @param delFlag
* @param taskType
* @param taskReportLevel
* @param taskHotspotInfo
* @param taskReportInfo
* @param formFile
......@@ -527,7 +527,7 @@ public class AcmsClient implements AcmsClientResponseListener {
* @throws NetworkDisconnectedException
* @throws IOException
*/
public AcmsMessageJSON sendTaskData(String sid, String operationId, String taskKey, String delFlag, String taskType, String taskHotspotInfo, String taskReportInfo, File formFile, boolean attachedFileSendFlg, Date taskReportSendSaveDate) throws ABVException, NetworkDisconnectedException, IOException {
public AcmsMessageJSON sendTaskData(String sid, String operationId, String taskKey, String delFlag, String taskReportLevel, String taskHotspotInfo, String taskReportInfo, File formFile, boolean attachedFileSendFlg, Date taskReportSendSaveDate) throws ABVException, NetworkDisconnectedException, IOException {
if (networkAdapter != null && !networkAdapter.isNetworkConnected()) { // NWのチェック
throw new NetworkDisconnectedException();
}
......@@ -538,7 +538,7 @@ public class AcmsClient implements AcmsClientResponseListener {
HttpMultipartList.add(new HttpMultipart(ABookKeys.OPERATION_ID, operationId));
HttpMultipartList.add(new HttpMultipart(ABookKeys.TASK_KEY, taskKey));
HttpMultipartList.add(new HttpMultipart(ABookKeys.DEL_FLAG, delFlag));
HttpMultipartList.add(new HttpMultipart(ABookKeys.TASK_TYPE, taskType));
HttpMultipartList.add(new HttpMultipart(ABookKeys.TASK_REPORT_LEVEL, taskReportLevel));
HttpMultipartList.add(new HttpMultipart(ABookKeys.TASK_HOT_SPOT_INFO, taskHotspotInfo));
HttpMultipartList.add(new HttpMultipart(ABookKeys.TASK_REPORT_INFO, taskReportInfo));
HttpMultipartList.add(new HttpMultipart(ABookKeys.ATTACHED_CHANGE_FLAG, attachedFileSendFlg ? "1" : "0"));
......@@ -552,7 +552,7 @@ public class AcmsClient implements AcmsClientResponseListener {
}
result = HttpRequestSender.post(apiUrl, HttpMultipartList.toArray(new HttpMultipart[HttpMultipartList.size()]));
Logger.d(TAG, "[sendTaskData]: operationId=%s, taskKey=%s, delFlag=%s, task_type=%s, taskHopspotInfo=%s, taskReportInfo=%s, attachedFileSendFlg=%s", operationId, taskKey, delFlag, taskType, taskHotspotInfo, taskReportInfo, attachedFileSendFlg);
Logger.d(TAG, "[sendTaskData]: operationId=%s, taskKey=%s, delFlag=%s, taskReportLevel=%s, taskHopspotInfo=%s, taskReportInfo=%s, attachedFileSendFlg=%s", operationId, taskKey, delFlag, taskReportLevel, taskHotspotInfo, taskReportInfo, attachedFileSendFlg);
AcmsMessageJSON json = new AcmsMessageJSON(result.httpResponseBody);
Logger.d(TAG, "sendTaskData res: %s", json);
......@@ -836,7 +836,7 @@ public class AcmsClient implements AcmsClientResponseListener {
HttpTaskWorker<HttpParameterObject> httpTaskThread = new HttpTaskWorker<HttpParameterObject>(methodName, apiUrl, param);
try{
try {
httpTaskThread.start();
httpTaskThread.join(HttpRequestSender.DefaultConnectionTimeout);
} catch (Exception e) {
......
......@@ -67,12 +67,6 @@ public class OperationDataJSON extends AcmsCommonJSON {
for (int i = 0; i < taskList.length(); i++) {
JSONObject taskJson = taskList.getJSONObject(i);
TaskDto dto = new TaskDto();
// #32782 指示者テーブル関連削除 start
// TODO change
// dto.taskDirectionsDto = new TaskReportDto();
dto.taskDirectionsDto = new TaskDirectionsDto();
// #32782 指示者テーブル関連削除 end
dto.taskReportDto = new TaskReportDto();
dto.operationId = taskJson.getLong(OperationId);
dto.taskId = taskJson.getLong(TaskId);
......@@ -82,26 +76,6 @@ public class OperationDataJSON extends AcmsCommonJSON {
dto.taskHotSpotInfo = taskJson.getJSONObject(TaskHotspotInfo).toString();
// if(taskJson.has(TaskDirectionsInfo)) {
// dto.taskDirectionsDto.jsonData = taskJson.getJSONObject(TaskDirectionsInfo).toString();
// }
// if(taskJson.has(TaskDirectionsKey)) {
// dto.taskDirectionsDto.attachedFileName = taskJson.getString(TaskDirectionsKey);
// }
//
// if (taskJson.has(TaskReportInfo)) {
// Object object = taskJson.get(TaskReportInfo);
// if (object instanceof String) {
// dto.taskReportDto.jsonData = null;
// } else {
// dto.taskReportDto.jsonData = taskJson.getJSONObject(TaskReportInfo).toString();
// }
// }
// if (taskJson.has(TaskReportKey)) {
// dto.taskReportDto.attachedFileName = taskJson.getString(TaskReportKey);
// }
// 作業報告詳細リスト
JSONArray taskReportList = taskJson.getJSONArray(TaskReportList);
for (int j = 0; j < taskReportList.length(); j++) {
......@@ -120,9 +94,9 @@ public class OperationDataJSON extends AcmsCommonJSON {
if (taskReportJson.has(TaskReportInfo)) {
Object object = taskJson.get(TaskReportInfo);
if (object instanceof String) {
dto.taskReportDto.jsonData = null;
taskReportDto.jsonData = null;
} else {
dto.taskReportDto.jsonData = taskJson.getJSONObject(TaskReportInfo).toString();
taskReportDto.jsonData = taskJson.getJSONObject(TaskReportInfo).toString();
}
}
dto.taskReportDtoList.add(taskReportDto);
......
......@@ -21,30 +21,17 @@ import jp.agentec.adf.util.DateTimeUtil;
public class OperationListJSON extends AcmsCommonJSON {
// TODO
// サーバ作業後、対応必要「project」→「operation」
public static final String OperationList = "projectList";
public static final String OperationId = "projectId";
public static final String OperationType = "projectType";
public static final String OperationName = "projectName";
public static final String OperationDescriptions = "projectDescriptions";
public static final String OperationStartDate = "projectStartDate";
public static final String OperationEndDate = "projectEndDate";
public static final String OperationStatus = "projectStatus";
public static final String OperationLastEditDate = "projectLastEditDate";
public static final String OperationList = "operationList";
public static final String OperationId = "operationId";
public static final String OperationType = "operationType";
public static final String ReportType = "reportType";
public static final String OperationName = "operationName";
public static final String OperationDescriptions = "operationDescriptions";
public static final String OperationStartDate = "operationStartDate";
public static final String OperationEndDate = "operationEndDate";
public static final String OperationStatus = "operationStatus";
public static final String OperationLastEditDate = "operationLastEditDate";
public static final String ContentId = "contentId";
public static final String RelatedContentList = "relatedContentList";
public static final String PushMessageList = "pushMessageList";
public static final String PushMessageId = "pushMessageId";
public static final String PushSendLoginId = "pushSendLoginId";
public static final String PushSendDate = "pushSendDate";
public static final String PushMessage = "pushMessage";
// TODO 削除予定
public static final String OperationReportType = "projectReportType";
public static final String ReportUpdateType = "reportUpdateType";
//定期点検用
public static final String ReportCycle = "reportCycle";
public static final String EnableReportUpdate = "enableReportUpdate";
......@@ -54,10 +41,17 @@ public class OperationListJSON extends AcmsCommonJSON {
// 作業担当グループリスト
public static final String WorkingGroupList = "workingGroupList";
public static final String ReportLevel = "reportLevel"; // 報告階層
public static final String GroupList = "groupList"; // グループリスト
public static final String GroupId = "groupId"; // グループID
public static final String GroupList = "groupList"; // グループリスト
public static final String ReportType = "reportType";
public static final String RelatedContentList = "relatedContentList";
public static final String PushMessageList = "pushMessageList";
public static final String PushMessageId = "pushMessageId";
public static final String PushSendLoginId = "pushSendLoginId";
public static final String PushSendDate = "pushSendDate";
public static final String PushMessage = "pushMessage";
public List<OperationDto> operationList;
......@@ -82,19 +76,16 @@ public class OperationListJSON extends AcmsCommonJSON {
dto.operationDescriptions = operationJson.getString(OperationDescriptions);
dto.operationStartDate = DateTimeUtil.toDate(operationJson.getString(OperationStartDate), "UTC", DateTimeFormat.yyyyMMdd_hyphen);
dto.operationEndDate = DateTimeUtil.toDate(operationJson.getString(OperationEndDate), "UTC", DateTimeFormat.yyyyMMdd_hyphen);
dto.reportUpdateType = operationJson.has(ReportUpdateType) ? operationJson.getInt(ReportUpdateType) : 0;
// 1.0.1で追加
dto.operationStatus = operationJson.getInt(OperationStatus); // 作業状況
dto.reportType = operationJson.getInt(ReportType); // 作業報告タイプ
dto.enableReportHistory = operationJson.getInt(EnableReportHistory); // 報告履歴管理
// 作業終了更新日
if (operationJson.has(OperationLastEditDate)) {
dto.lastEditDate = DateTimeUtil.toDate(operationJson.getString(OperationLastEditDate), "UTC", DateTimeFormat.yyyyMMddHHmmss_hyphen);
}
if (operationJson.has(OperationReportType)) {
dto.operationReportType = operationJson.getInt(OperationReportType);
}
if (operationJson.has(ReportCycle)) {
dto.reportCycle = operationJson.getInt(ReportCycle);
......
......@@ -44,9 +44,9 @@ public class RoutineTaskDataJSON extends OperationDataJSON {
// #32782 指示者テーブル関連削除 start
// TODO change
// dto.taskDirectionsDto = new TaskReportDto();
dto.taskDirectionsDto = new TaskDirectionsDto();
// #32782 指示者テーブル関連削除 end
dto.taskReportDto = new TaskReportDto();
// dto.taskDirectionsDto = new TaskDirectionsDto();
// // #32782 指示者テーブル関連削除 end
// dto.taskReportDto = new TaskReportDto();
dto.operationId = taskJson.getLong(OperationId);
dto.taskId = taskJson.getLong(TaskId);
......
......@@ -133,9 +133,9 @@ public class AcmsApis {
// デバイストークン更新
public static final String ApiUrlUpdateDeviceToken = "updateDeviceToken";
// プロジェクト一覧取得
public static final String ApiOperationList = "projectList";
public static final String ApiOperationList = "operationList";
// 作業者グループ取得
public static final String ApiWorkerGroupList = "workerGroupList";
public static final String ApiWorkingGroupList = "workingGroupList";
// 作業データ送信
public static final String ApiSendTaskData = "taskData";
// 作業データ取得
......@@ -196,7 +196,7 @@ public class AcmsApis {
if (methodName.equals(ApiUrlNewAppStoreLogin) || methodName.equals(ApiUrlAppStoreNewLogin) || methodName.equals(ApiUrlServerTime) || methodName.equals(ApiUrlServerTimeZone)) {
apiValue = Constant.ApiValue.nuapi;
} else if (methodName.equals(ApiOperationList) || methodName.equals(ApiWorkerGroupList) || methodName.equals(ApiSendTaskData) || methodName.equals(ApiGetOperationData) ||
} else if (methodName.equals(ApiOperationList) || methodName.equals(ApiWorkingGroupList) || methodName.equals(ApiSendTaskData) || methodName.equals(ApiGetOperationData) ||
methodName.equals(ApiGetTaskFile) || methodName.equals(ApiSceneEntry) || methodName.equals(ApiTaskContentEntry) ||
methodName.equals(ApiSendPushMessage) || methodName.equals(ApiGetPushMessages) || methodName.equals(ApiGetRoutineTaskData) || methodName.equals(ApiSendRoutineTaskData)) {
apiValue = Constant.ApiValue.checkapi;
......
......@@ -77,7 +77,7 @@ public class ABookKeys {
public static final String SID = "sid";
public static final String FORM_FILE = "formFile";
public static final String DEL_FLAG = "delFlag";
public static final String TASK_TYPE = "taskType";
public static final String TASK_REPORT_LEVEL = "taskReportLevel";
public static final String TASK_HOT_SPOT_INFO = "taskHotspotInfo";
public static final String TASK_REPORT_INFO = "taskReportInfo";
public static final String TASK_REPORT_SAVE_DATE = "saveDate";
......
......@@ -275,10 +275,12 @@ public class OperationDao extends AbstractDao {
}
if (operationReportTypeStr != null) {
sql.append(" AND top.operation_report_type in ("+ operationReportTypeStr +")");
// sql.append(" AND top.operation_report_type in ("+ operationReportTypeStr +")");
sql.append(" AND top.report_type in ("+ operationReportTypeStr +")");
}
sql.append(" ORDER BY top.operation_report_type DESC, top.operation_start_date DESC, top.operation_id DESC");
// sql.append(" ORDER BY top.operation_report_type DESC, top.operation_start_date DESC, top.operation_id DESC");
sql.append(" ORDER BY top.report_type DESC, top.operation_start_date DESC, top.operation_id DESC");
Logger.v(TAG, "sql=%s", sql);
......
......@@ -160,8 +160,14 @@ public class TaskReportDao extends AbstractDao {
// #32782 指示者テーブル関連削除 end
}
public String getTaskReportAttachedFileName(String taskKey) {
return rawQueryGetString("select local_attached_file_name from t_task_report where task_key=?", new String[]{"" + taskKey});
/**
* 作業キー、作業
* @param taskKey
* @param taskReportLevel
* @return
*/
public String getTaskReportAttachedFileName(String taskKey, int taskReportLevel) {
return rawQueryGetString("select local_attached_file_name from t_task_report where task_key=? AND task_report_level=?", new String[]{"" + taskKey, "" + taskReportLevel});
}
public List<TaskReportDto> selectByTaskKey(String taskKey) {
......
......@@ -17,13 +17,6 @@ public class TaskDto extends AbstractDto {
public List<TaskReportDto> taskReportDtoList;
public boolean delFlg;
// #32782 指示者テーブル関連削除 start
// TODO TaskDirectionDto から TaskReportDto に変更、taskDirectionsDto 名を変更必要
// public TaskReportDto taskDirectionsDto;
public TaskDirectionsDto taskDirectionsDto;
// #32782 指示者テーブル関連削除 end
public TaskReportDto taskReportDto;
public int taskReportId;
public List<RoutineTaskReportDto> RoutineTaskReportList;
......
......@@ -23,7 +23,6 @@ import jp.agentec.abook.abv.bl.acms.client.json.SceneEntryJSON;
import jp.agentec.abook.abv.bl.acms.client.json.WorkerGroupJSON;
import jp.agentec.abook.abv.bl.acms.client.parameters.AcmsParameters;
import jp.agentec.abook.abv.bl.acms.client.parameters.GetTaskFileParameters;
import jp.agentec.abook.abv.bl.acms.type.OperationAuthLevel;
import jp.agentec.abook.abv.bl.common.ABVEnvironment;
import jp.agentec.abook.abv.bl.common.Constant;
import jp.agentec.abook.abv.bl.common.Callback;
......@@ -94,7 +93,7 @@ public class OperationLogic extends AbstractLogic {
// プロジェクト一覧取得し、登録・更新・削除する
retrieveServerOperation();
// 作業者グループリスト取得
setWorkerGroupList();
setWorkingGroupList();
}
/**
......@@ -207,9 +206,9 @@ public class OperationLogic extends AbstractLogic {
* @throws NetworkDisconnectedException
* @throws AcmsException
*/
private void setWorkerGroupList() throws NetworkDisconnectedException, AcmsException {
private void setWorkingGroupList() throws NetworkDisconnectedException, AcmsException {
AcmsParameters param = new AcmsParameters(cache.getMemberInfo().sid);
WorkerGroupJSON json = AcmsClient.getInstance(cache.getUrlPath(), networkAdapter).getWorkerGroupList(param);
WorkerGroupJSON json = AcmsClient.getInstance(cache.getUrlPath(), networkAdapter).getWorkingGroupList(param);
mWorkerGroupDao.deleteAll();
for (WorkerGroupDto dto : json.workerGroupList) {
mWorkerGroupDao.insert(dto);
......@@ -1785,43 +1784,43 @@ public class OperationLogic extends AbstractLogic {
}
if (taskDirectionsDtoList != null && taskDirectionsDtoList.size() > 0) {
//プログレスを40%進行させるための計算
int progress = maxProgress / taskDirectionsDtoList.size();
for (TaskDirectionsDto dto : taskDirectionsDtoList) {
File zipFile = null;
if (dto.attachedFileSendFlg) {
String fileName = null;
zipFile = createAttachedFile(operationId, dto.taskKey, true);
if (zipFile != null) {
fileName = FileUtil.getFilenameWithoutExt(zipFile.getName());
}
dto.localAttachedFileName = fileName != null ? SecurityUtil.getMd5Hash(fileName) : null;
}
AcmsClient.getInstance(cache.getUrlPath(), networkAdapter).sendTaskData
(cache.getMemberInfo().sid, String.valueOf(operationId), dto.taskKey, dto.delFlg ? "1" : "0", String.valueOf(0), dto.taskHotSpotInfo, dto.jsonData, zipFile, dto.attachedFileSendFlg, null);
if (zipFile != null) {
zipFile.delete();
}
if (dto.delFlg) {
// 物理削除
mTaskDao.deleteTaskData(dto.taskKey, true);
} else {
dto.dataSendFlg = false;
dto.attachedFileSendFlg = false;
mTaskDirectionsDao.update(dto);
}
progressCallback.callback(new Integer(progress));
}
}
// if (taskDirectionsDtoList != null && taskDirectionsDtoList.size() > 0) {
// //プログレスを40%進行させるための計算
// int progress = maxProgress / taskDirectionsDtoList.size();
//
// for (TaskDirectionsDto dto : taskDirectionsDtoList) {
// File zipFile = null;
// if (dto.attachedFileSendFlg) {
// String fileName = null;
// zipFile = createAttachedFile(operationId, dto.taskKey, true);
// if (zipFile != null) {
// fileName = FileUtil.getFilenameWithoutExt(zipFile.getName());
// }
// dto.localAttachedFileName = fileName != null ? SecurityUtil.getMd5Hash(fileName) : null;
// }
//
// AcmsClient.getInstance(cache.getUrlPath(), networkAdapter).sendTaskData
// (cache.getMemberInfo().sid, String.valueOf(operationId), dto.taskKey, dto.delFlg ? "1" : "0", String.valueOf(0), dto.taskHotSpotInfo, dto.jsonData, zipFile, dto.attachedFileSendFlg, null);
//
// if (zipFile != null) {
// zipFile.delete();
// }
// if (dto.delFlg) {
// // 物理削除
// mTaskDao.deleteTaskData(dto.taskKey, true);
// } else {
// dto.dataSendFlg = false;
// dto.attachedFileSendFlg = false;
// mTaskDirectionsDao.update(dto);
// }
// progressCallback.callback(new Integer(progress));
// }
// }
//
//
//
//
//
if (taskReportDtoList != null && taskReportDtoList.size() > 0) {
OperationDto operationDto = mOperationDao.getOperation(operationId);
......@@ -1856,7 +1855,8 @@ public class OperationLogic extends AbstractLogic {
cache.getMemberInfo().sid,
String.valueOf(operationId),
taskReportDto.taskKey,
taskReportDto.delFlg ? "1" : "0", String.valueOf(1),
taskReportDto.delFlg ? "1" : "0",
String.valueOf(taskReportDto.taskReportLevel),
taskReportDto.taskHotSpotInfo,
taskReportSendDto.jsonData,
zipFile,
......
......@@ -663,7 +663,7 @@ public class OperationListActivity extends ABVUIActivity {
if (operationContentDto != null) {
if (notification.downloadStatus == DownloadStatusType.Succeeded) {
OperationDto operationDto = mOperationLogic.getOperation(operationContentDto.operationId);
syncOperation(operationContentDto.operationId, operationDto.operationReportType, true);
syncOperation(operationContentDto.operationId, operationDto.reportType, true);
} else if (notification.downloadStatus == DownloadStatusType.Failed || notification.downloadStatus == DownloadStatusType.Canceled || notification.downloadStatus == DownloadStatusType.Paused) {
Logger.i(TAG, "syncOperation update is failed downloadStatus : " + notification.downloadStatus);
closeProgressPopup();
......@@ -683,10 +683,10 @@ public class OperationListActivity extends ABVUIActivity {
/**
* プロジェクト同期処理
* @param operationId
* @param operationReportType
* @param reportType
* @param buttonEventFlag
*/
public void syncOperation(final long operationId, int operationReportType, boolean buttonEventFlag) {
public void syncOperation(final long operationId, int reportType, boolean buttonEventFlag) {
Logger.i(TAG, "---sync start");
// ネットワーク通信チェック
if (!ABVEnvironment.getInstance().networkAdapter.isNetworkConnected()) {
......@@ -716,24 +716,22 @@ public class OperationListActivity extends ABVUIActivity {
return null;
}
};
if (mOperationAuthLevel == OperationAuthLevel.OPERATION_INSTRUCTOR) {
mOperationLogic.sendTaskDirectionsData(operationId, null, progressCallback);
} else {
// 作業報告
if (operationReportType == Constant.OperationReportType.ROUTINE_TASK) {
if (mOperationLogic.sendRoutineTaskReportSendData(operationId, null, progressCallback) > 0) {
handleErrorMessageToast(R.string.P005);
}
} else {
mOperationLogic.sendTaskReportSendData(operationId, null, progressCallback);
if (reportType == OperationReportType.ROUTINE_TASK) {
// 定期点検
if (mOperationLogic.sendRoutineTaskReportSendData(operationId, null, progressCallback) > 0) {
handleErrorMessageToast(R.string.P005);
}
} else {
// 報告送信
mOperationLogic.sendTaskReportSendData(operationId, null, progressCallback);
}
mOperationLogic.
progressDialogHorizontal.setProgress(60);
// 報告受信
mOperationLastEditDate = receptionTaskData(operationId, progressCallback, buttonEventFlag);
if (operationReportType == Constant.OperationReportType.ROUTINE_TASK) {
if (reportType == Constant.OperationReportType.ROUTINE_TASK) {
if (buttonEventFlag) {
String dialogMsg = null;
// 定期点検プロジェクトの利用可能日付を取得
......@@ -917,7 +915,6 @@ public class OperationListActivity extends ABVUIActivity {
}
lastEditDate = json.lastEditDate;
} else {
// TODO
OperationDataJSON json = AcmsClient.getInstance(ABVDataCache.getInstance().getUrlPath(), ABVEnvironment.getInstance().networkAdapter).getOpereationData(param);
//プログレスを40%進行させるための計算
......@@ -926,68 +923,16 @@ public class OperationListActivity extends ABVUIActivity {
progress = 40 / json.taskDtoList.size();
}
// #32782 指示者テーブル関連削除 start
// TODO change
/*
// JSONObject taskDirectionJson;
JSONObject taskReportJson;
for (TaskDto taskDto : json.taskDtoList) {
String directionsAttachedFileName = taskDto.taskDirectionsDto.attachedFileName;
String reportAttachedFileName = taskDto.taskReportDto.attachedFileName;
// 0305 start
taskReportJson = new JSONObject(taskDto.taskDirectionsDto.jsonData);
taskReportJson.put(ABookKeys.TASK_STATUS, taskDto.taskStatus);
// 0305 end
int localTaskIndex = localTaskList.indexOf(taskDto);
if (localTaskIndex >= 0) {
// 添付ファイルが存在する場合、取得して解凍する。
refreshTaskFile(operationId, operationContentDto.contentId, taskDto.taskId, taskDto.taskKey, directionsAttachedFileName, reportAttachedFileName);
if (isSyncGetTaskFileError) {
return null;
for (TaskReportDto taskReportDto : taskDto.taskReportDtoList) {
String reportAttachedFileName = taskReportDto.attachedFileName;
if (taskReportDto.taskReportLevel == Constant.TaskReportLevel.ReportType) {
taskReportJson = new JSONObject(taskReportDto.jsonData);
taskReportJson.put(ABookKeys.TASK_STATUS, taskDto.taskStatus);
}
// #32782 指示者テーブル関連削除 start
// 作業更新
mOperationLogic.updateTaskReport(taskDto.taskKey, taskDto.operationId, operationContentDto.contentId,
taskReportJson, directionsAttachedFileName, false, false, taskDto.taskHotSpotInfo);
localTaskList.remove(taskDto);
// 報告データが存在すると作業報告を更新する
if (taskDto.taskReportDto.jsonData != null) {
mOperationLogic.updateTaskReport(taskDto.taskKey, taskDto.operationId, operationContentDto.contentId,
taskReportJson, reportAttachedFileName, false, false, taskDto.taskHotSpotInfo);
}
// #32782 指示者テーブル関連削除 end
} else {
// 添付ファイルが存在する場合、取得して解凍する。
refreshTaskFile(operationId, operationContentDto.contentId, taskDto.taskId, taskDto.taskKey, directionsAttachedFileName, reportAttachedFileName);
if (isSyncGetTaskFileError) {
return null;
}
// #32782 指示者テーブル関連削除 start
// 作業登録
mOperationLogic.insertTaskReport(taskDto.taskKey, operationContentDto.operationId, operationContentDto.contentId,
taskReportJson, directionsAttachedFileName, false, false, taskDto.taskHotSpotInfo);
if (taskDto.taskReportDto.jsonData != null) {
mOperationLogic.insertTaskReport(taskDto.taskKey, operationContentDto.operationId, operationContentDto.contentId,
taskReportJson, reportAttachedFileName, false, false, taskDto.taskHotSpotInfo);
}
// #32782 指示者テーブル関連削除 end
}
progressCallback.callback(new Integer(progress));
}
*/
JSONObject taskDirectionJson;
for (TaskDto taskDto : json.taskDtoList) {
String directionsAttachedFileName = taskDto.taskDirectionsDto.attachedFileName;
String reportAttachedFileName = taskDto.taskReportDto.attachedFileName;
taskDirectionJson = new JSONObject(taskDto.taskDirectionsDto.jsonData);
taskDirectionJson.put(ABookKeys.TASK_STATUS, taskDto.taskStatus);
int localTaskIndex = localTaskList.indexOf(taskDto);
if (localTaskIndex >= 0) {
......@@ -1057,7 +1002,7 @@ public class OperationListActivity extends ABVUIActivity {
mTaskDao.delete(taskDto);
}
String reportAttachedFileName = serverTaskDto.taskReportDto.attachedFileName;
// String reportAttachedFileName = serverTaskDto.taskReportDto.attachedFileName;
}
......@@ -1066,14 +1011,10 @@ public class OperationListActivity extends ABVUIActivity {
return lastEditDate;
}
public void refreshTaskFile(final long operationId, final long contentId, final long taskId, final String taskKey, final String directionsAttachedFileName, final String reportAttachedFileName) throws ABVException, InterruptedException, ZipException, NoSuchAlgorithmException, IOException {
public void refreshTaskFile(final long operationId, final long contentId, final long taskId, final String taskKey, final String attachedFileName) throws ABVException, InterruptedException, ZipException, NoSuchAlgorithmException, IOException {
// 既存の添付ディレクトリ削除
FileUtil.delete(ABVEnvironment.getInstance().getTempTaskDirPath(contentId, taskKey));
// #32782 指示者テーブル関連削除 start
// TODO change
String directionsLocalAttachedFileName = mTaskDirectionsDao.getTaskDirectionsAttachedFileName(taskKey);
// String directionsLocalAttachedFileName = mTaskReportDao.getTaskReportAttachedFileName(taskKey);
// #32782 指示者テーブル関連削除 end
String reportLocalAttachedFileName = mTaskReportDao.getTaskReportAttachedFileName(taskKey);
int count = 0;
......
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