Commit 21004d02 by Jeong Gilmo

#32782 - 指示者テーブル関連削除(TaskDirections, TaskDirectionsItems)

parent 4dfce160
......@@ -50,7 +50,10 @@ public class OperationDataJSON extends AcmsCommonJSON {
for (int i = 0; i < taskList.length(); i++) {
JSONObject taskJson = taskList.getJSONObject(i);
TaskDto dto = new TaskDto();
dto.taskDirectionsDto = new TaskDirectionsDto();
// 0305 start
// dto.taskDirectionsDto = new TaskDirectionsDto();
dto.taskDirectionsDto = new TaskReportDto();
// 0305 end
dto.taskReportDto = new TaskReportDto();
dto.operationId = taskJson.getLong(OperationId);
......
......@@ -41,7 +41,10 @@ public class RoutineTaskDataJSON extends OperationDataJSON {
for (int i = 0; i < taskList.length(); i++) {
JSONObject taskJson = taskList.getJSONObject(i);
TaskDto dto = new TaskDto();
dto.taskDirectionsDto = new TaskDirectionsDto();
// 0305 start
// dto.taskDirectionsDto = new TaskDirectionsDto();
dto.taskDirectionsDto = new TaskReportDto();
// 0305 end
dto.taskReportDto = new TaskReportDto();
dto.operationId = taskJson.getLong(OperationId);
......
......@@ -91,8 +91,10 @@ public class ABVDataOpenHelper {
iTableScripts.add(new TOperation());
iTableScripts.add(new ROperationContent());
iTableScripts.add(new TTask());
iTableScripts.add(new TTaskDirections());
iTableScripts.add(new TTaskDirectionsItems());
// 0305 start
// iTableScripts.add(new TTaskDirections());
// iTableScripts.add(new TTaskDirectionsItems());
// 0305 end
iTableScripts.add(new TTaskReport());
iTableScripts.add(new TTaskReportSend());
iTableScripts.add(new TTaskReportItems());
......
......@@ -204,8 +204,10 @@ public class OperationDao extends AbstractDao {
delete("r_project_content", null, null);
delete("t_project", null, null);
delete("t_task", null, null);
delete("t_task_directions", null, null);
delete("t_task_directions_items", null, null);
// 0305 start
// delete("t_task_directions", null, null);
// delete("t_task_directions_items", null, null);
// 0305 end
delete("t_task_report", null, null);
delete("t_task_report_send", null, null);
delete("t_task_report_items", null, null);
......
......@@ -100,8 +100,12 @@ public class TaskDao extends AbstractDao {
if (directionFlg) {
delete("t_task", "task_key=?", keyValues);
delete("t_task_directions", "task_key=?", keyValues);
delete("t_task_directions_items", "task_key=?", keyValues);
// 0305 start
// delete("t_task_directions", "task_key=?", keyValues);
// delete("t_task_directions_items", "task_key=?", keyValues);
delete("t_task_report", "task_key=?", keyValues);
delete("t_task_report_items", "task_key=?", keyValues);
// 0305 end
} else {
delete("t_task_report", "task_key=?", keyValues);
delete("t_task_report_items", "task_key=?", keyValues);
......@@ -114,8 +118,10 @@ public class TaskDao extends AbstractDao {
*/
public void delete(TaskDto dto) {
delete("t_task", "task_key=?", dto.getKeyValues());
delete("t_task_directions", "task_key=?", dto.getKeyValues());
delete("t_task_directions_items", "task_key=?", dto.getKeyValues());
// 0305 start
// delete("t_task_directions", "task_key=?", dto.getKeyValues());
// delete("t_task_directions_items", "task_key=?", dto.getKeyValues());
// 0305 end
delete("t_task_report", "task_key=?", dto.getKeyValues());
delete("t_task_report_items", "task_key=?", dto.getKeyValues());
delete("t_inspect_task_report", "task_key=?", new String[] { dto.taskKey });
......
......@@ -11,7 +11,10 @@ import jp.agentec.abook.abv.bl.dto.TaskDirectionsDto;
public class TaskDirectionsDao extends AbstractDao {
private static final String TAG = "TaskDirectionsDao";
// 0305 start
// private static final String TAG = "TaskDirectionsDao";
private static final String TAG = "TaskReportDao";
// 0305 end
/*package*/ TaskDirectionsDao() {
}
......@@ -58,7 +61,10 @@ public class TaskDirectionsDao extends AbstractDao {
public void insert(TaskDirectionsDto dto) {
insert("insert into t_task_directions "
// 0305 start
// insert("insert into t_task_directions "
// 0305 end
insert("insert into t_task_report "
+ "(task_key, "
+ "json_data, "
+ "attached_file_name, "
......@@ -73,7 +79,10 @@ public class TaskDirectionsDao extends AbstractDao {
public List<TaskDirectionsDto> getTaskDirectionsByOperationId(Long operationId) {
StringBuilder sb = new StringBuilder();
sb.append(" select ttd.* ");
sb.append(" from t_task_directions ttd ");
// 0305 start
// sb.append(" from t_task_directions ttd ");
sb.append(" from t_task_report ttd ");
// 0305 end
sb.append(" inner join ");
sb.append(" t_task tt ");
sb.append(" ON tt.task_key == ttd.task_key ");
......@@ -83,15 +92,24 @@ public class TaskDirectionsDao extends AbstractDao {
}
public TaskDirectionsDto getTaskDirections(String taskKey) {
return rawQueryGetDto("select * from t_task_directions where task_key=?", new String[]{"" + taskKey}, TaskDirectionsDto.class);
// 0305 start
// return rawQueryGetDto("select * from t_task_directions where task_key=?", new String[]{"" + taskKey}, TaskDirectionsDto.class);
return rawQueryGetDto("select * from t_task_report where task_key=?", new String[]{"" + taskKey}, TaskDirectionsDto.class);
// 0305 end
}
public String getTaskDirectionsAttachedFileName(String taskKey) {
return rawQueryGetString("select local_attached_file_name from t_task_directions where task_key=?", new String[]{"" + taskKey});
// 0305 start
// return rawQueryGetString("select local_attached_file_name from t_task_directions where task_key=?", new String[]{"" + taskKey});
return rawQueryGetString("select local_attached_file_name from t_task_report where task_key=?", new String[]{"" + taskKey});
// 0305 end
}
public boolean update(TaskDirectionsDto dto) {
long count = update("update t_task_directions "
// 0305 start
// long count = update("update t_task_directions "
// 0305 end
long count = update("update t_task_report "
+ "set "
+ "json_data=?, "
+ "attached_file_name=?, "
......@@ -110,7 +128,10 @@ public class TaskDirectionsDao extends AbstractDao {
public List<TaskDirectionsDto> getSendableTaskData(Long operationId) {
StringBuilder sb = new StringBuilder();
sb.append(" select * ");
sb.append(" from t_task_directions ttd ");
// 0305 start
// sb.append(" from t_task_directions ttd ");
sb.append(" from t_task_report ttd ");
// 0305 end
sb.append(" inner join ");
sb.append(" t_task tt ");
sb.append(" ON tt.task_key == ttd.task_key ");
......@@ -122,7 +143,10 @@ public class TaskDirectionsDao extends AbstractDao {
public List<TaskDirectionsDto> getSendableTaskData(Long operationId, String taskKey) {
StringBuilder sb = new StringBuilder();
sb.append(" select * ");
sb.append(" from t_task_directions ttd ");
// 0305 start
// sb.append(" from t_task_directions ttd ");
sb.append(" from t_task_report ttd ");
// 0305 end
sb.append(" inner join ");
sb.append(" t_task tt ");
sb.append(" ON tt.task_key == ttd.task_key ");
......
......@@ -35,17 +35,26 @@ public class TaskDirectionsItemsDao extends AbstractDao {
}
public void insertTaskDirectionsItems(TaskDirectionsItemsDto dto) {
insert("insert into t_task_directions_items (task_key, item_key, input_value) values (?,?,?)", dto.getInsertValues());
// 0305 start
// insert("insert into t_task_directions_items (task_key, item_key, input_value) values (?,?,?)", dto.getInsertValues());
insert("insert into t_task_report_items (task_key, item_key, input_value) values (?,?,?)", dto.getInsertValues());
// 0305 end
}
public List<TaskDirectionsItemsDto> getTaskDirectionsItemByTaskKey(String taskKey) {
return rawQueryGetDtoList("select * from t_task_directions_items where task_key=?", new String[]{"" + taskKey}, TaskDirectionsItemsDto.class);
// 0305 start
// return rawQueryGetDtoList("select * from t_task_directions_items where task_key=?", new String[]{"" + taskKey}, TaskDirectionsItemsDto.class);
return rawQueryGetDtoList("select * from t_task_report_items where task_key=?", new String[]{"" + taskKey}, TaskDirectionsItemsDto.class);
// 0305 end
}
public List<TaskDirectionsItemsDto> getTaskDirectionsItemByOperationId(Long operationId) {
StringBuilder sb = new StringBuilder();
sb.append(" select distinct ttdi.* ");
sb.append(" from t_task_directions_items ttdi ");
// 0305 start
// sb.append(" from t_task_directions_items ttdi ");
sb.append(" from t_task_report_items ttdi ");
// 0305 end
sb.append(" inner join ");
sb.append(" t_task tt ");
sb.append(" ON tt.task_key == ttdi.task_key ");
......@@ -55,7 +64,10 @@ public class TaskDirectionsItemsDao extends AbstractDao {
}
public boolean updateTaskDirectionsItems(TaskDirectionsItemsDto dto) {
long count = update("update t_task_directions_items set input_value=? where item_key=? and task_key=? ", dto.getUpdateValues());
// 0305 start
// long count = update("update t_task_directions_items set input_value=? where item_key=? and task_key=? ", dto.getUpdateValues());
long count = update("update t_task_report_items set input_value=? where item_key=? and task_key=? ", dto.getUpdateValues());
// 0305 end
return (count > 0);
}
}
\ No newline at end of file
......@@ -53,6 +53,12 @@ public class TaskReportDao extends AbstractDao {
if (column != -1) {
dto.delFlg = toBool(cursor.getInt(column));
}
// 0305 start
column = cursor.getColumnIndex("reportor_flag");
if (column != -1) {
dto.reportorFlag = toBool(cursor.getInt(column));
}
// 0305 end
return dto;
}
......@@ -64,6 +70,9 @@ public class TaskReportDao extends AbstractDao {
+ "attached_file_name, "
+ "local_attached_file_name, "
+ "attached_file_send_flg, "
// 0301 start
+ "reportor_flag, "
// 0301 end
+ "data_send_flg) "
+ "values "
+ "(?,?,?,?,?,?,?)",
......@@ -93,7 +102,10 @@ public class TaskReportDao extends AbstractDao {
+ "attached_file_name=?, "
+ "local_attached_file_name=?, "
+ "attached_file_send_flg=?, "
+ "data_send_flg=? "
+ "data_send_flg=?, "
// 0301 start
+ "reportor_flag=? "
// 0301 end
+ "where task_key=?",
dto.getUpdateValues());
return count > 0;
......@@ -121,7 +133,7 @@ public class TaskReportDao extends AbstractDao {
return rawQueryGetDtoList(sb.toString(), new String[]{"" + operationId}, TaskReportDto.class);
}
public List<TaskReportDto> getSendableTaskData(Long operationId, String taskKey) {
public List<TaskReportDto> getSendableTaskData(Long operationId, String taskKey, boolean reportorFlag) {
StringBuilder sb = new StringBuilder();
sb.append(" select * ");
sb.append(" from t_task_report ttr ");
......@@ -131,7 +143,10 @@ public class TaskReportDao extends AbstractDao {
sb.append(" WHERE ttr.data_send_flg = 1");
sb.append(" AND tt.project_id = ?");
sb.append(" AND tt.task_key = ?");
return rawQueryGetDtoList(sb.toString(), new String[]{"" + operationId, "" + taskKey}, TaskReportDto.class);
// 0305 start
sb.append(" AND ttr.reportor_flag = ?");
return rawQueryGetDtoList(sb.toString(), new String[]{"" + operationId, "" + taskKey, "" + reportorFlag}, TaskReportDto.class);
// 0305 end
}
public String getTaskReportAttachedFileName(String taskKey) {
......
......@@ -21,7 +21,10 @@ public class TTaskDirections extends SQLiteTableScript {
List<String> ddl = new ArrayList<String>();
StringBuffer sql = new StringBuffer();
sql.append(" CREATE TABLE t_task_directions ( ");
// 0305 start
// sql.append(" CREATE TABLE t_task_directions ( ");
sql.append(" CREATE TABLE t_task_report ( ");
// 0305 end
sql.append(" task_key TEXT NOT NULL ");
sql.append(" , json_data TEXT NOT NULL ");
sql.append(" , attached_file_name TEXT ");
......
......@@ -21,7 +21,10 @@ public class TTaskDirectionsItems extends SQLiteTableScript {
List<String> ddl = new ArrayList<String>();
StringBuffer sql = new StringBuffer();
sql.append(" CREATE TABLE t_task_directions_items ( ");
// 0305 start
// sql.append(" CREATE TABLE t_task_directions_items ( ");
sql.append(" CREATE TABLE t_task_report_items ( ");
// 0305 end
sql.append(" task_key TEXT NOT NULL ");
sql.append(" , item_key VARCHAR(64) ");
sql.append(" , input_value VARCHAR(64) ");
......
......@@ -28,6 +28,9 @@ public class TTaskReport extends SQLiteTableScript {
sql.append(" , local_attached_file_name TEXT ");
sql.append(" , attached_file_send_flg BOOLEAN DEFAULT 0 ");
sql.append(" , data_send_flg BOOLEAN DEFAULT 0 ");
// 0305 start
sql.append(" , reportor_flag BOOLEAN DEFAULT 0 ");
// 0305 end
sql.append(" ) ");
ddl.add(sql.toString());
......
......@@ -16,8 +16,11 @@ public class TaskDto extends AbstractDto {
public String taskHotSpotInfo;
public boolean delFlg;
public TaskDirectionsDto taskDirectionsDto;
// 0305 start
// public TaskDirectionsDto taskDirectionsDto;
public TaskReportDto taskDirectionsDto;
public TaskReportDto taskReportDto;
// 0305 end
public int taskReportId;
public List<RoutineTaskReportDto> RoutineTaskReportList;
......
......@@ -15,14 +15,24 @@ public class TaskReportDto extends AbstractDto {
public String taskHotSpotInfo;
public boolean delFlg;
// 0301 start
public boolean reportorFlag;
// 0301 end
@Override
public Object[] getInsertValues() {
return new Object[] { taskKey, jsonData, attachedFileName, localAttachedFileName, attachedFileSendFlg, dataSendFlg };
// 0301 start
return new Object[] { taskKey, jsonData, attachedFileName, localAttachedFileName, attachedFileSendFlg, dataSendFlg, reportorFlag };
// return new Object[] { taskKey, jsonData, attachedFileName, localAttachedFileName, attachedFileSendFlg, dataSendFlg };
// 0301 end
}
@Override
public Object[] getUpdateValues() {
return new Object[] { jsonData, attachedFileName, localAttachedFileName, attachedFileSendFlg, dataSendFlg, taskKey };
// 0301 start
return new Object[] { jsonData, attachedFileName, localAttachedFileName, attachedFileSendFlg, dataSendFlg, reportorFlag, taskKey };
// return new Object[] { jsonData, attachedFileName, localAttachedFileName, attachedFileSendFlg, dataSendFlg, taskKey };
// 0301 end
}
@Override
......
......@@ -78,8 +78,10 @@ public class OperationLogic extends AbstractLogic {
private WorkerGroupDao mWorkerGroupDao = AbstractDao.getDao(WorkerGroupDao.class);
private TaskDao mTaskDao = AbstractDao.getDao(TaskDao.class);
private TaskDirectionsDao mTaskDirectionsDao = AbstractDao.getDao(TaskDirectionsDao.class);
private TaskDirectionsItemsDao mTaskDirectionsItemsDao = AbstractDao.getDao(TaskDirectionsItemsDao.class);
// 0301 start
// private TaskDirectionsDao mTaskDirectionsDao = AbstractDao.getDao(TaskDirectionsDao.class);
// private TaskDirectionsItemsDao mTaskDirectionsItemsDao = AbstractDao.getDao(TaskDirectionsItemsDao.class);
// 0301 end
private TaskReportDao mTaskReportDao = AbstractDao.getDao(TaskReportDao.class);
private TaskReportSendDao mTaskReportSendDao = AbstractDao.getDao(TaskReportSendDao.class);
private TaskReportItemsDao mTaskReportItemsDao = AbstractDao.getDao(TaskReportItemsDao.class);
......@@ -226,8 +228,65 @@ public class OperationLogic extends AbstractLogic {
* @throws IOException
*/
public void insertTaskDirections( String taskKey, long operationId, long contentId, JSONObject taskDirectionsJson, String hotSpotInfo, String localAttachedFileName, boolean attachedChangeFlag, boolean dataSendFlg) throws IOException {
// 0305 start
// TaskDto taskDto = new TaskDto();
// TaskDirectionsDto taskDirectionsDto = new TaskDirectionsDto();
// JSONObject taskJson = taskDirectionsJson.getJSONObject("task");
// taskDto.taskKey = taskKey;
// taskDto.operationId = operationId;
// taskDto.taskHotSpotInfo = hotSpotInfo;
//
//
// Iterator taskKeys = taskJson.keys();
// while (taskKeys.hasNext()) {
// TaskDirectionsItemsDto taskDirectionsItemsDto = new TaskDirectionsItemsDto();
// String itemKey = (String) taskKeys.next();
// if (itemKey.startsWith("q_1_")) {
// taskDto.taskCode = taskJson.getString(itemKey);
// }
// taskDirectionsItemsDto.taskKey = taskKey;
// taskDirectionsItemsDto.itemKey = itemKey;
// try {
// taskDirectionsItemsDto.inputValue = taskJson.getString(itemKey);
// } catch (JSONException e) {
// // 値がStringではない場合、無視する
// continue;
// }
// mTaskDirectionsItemsDao.insertTaskDirectionsItems(taskDirectionsItemsDto);
// }
// taskDirectionsDto.taskKey = taskKey;
// taskDirectionsDto.jsonData = taskDirectionsJson.toString();
// taskDirectionsDto.dataSendFlg = dataSendFlg;
// taskDirectionsDto.attachedFileSendFlg = attachedChangeFlag;
// if (localAttachedFileName != null) {
// taskDirectionsDto.localAttachedFileName = localAttachedFileName;
// }
//
// if (taskDirectionsJson.has(ABookKeys.TASK_STATUS)) {
// taskDto.taskStatus = taskDirectionsJson.getInt(ABookKeys.TASK_STATUS);
// }
//
// mTaskDirectionsDao.insert(taskDirectionsDto);
// mTaskDao.insert(taskDto);
//
// String tempDirPath = ABVEnvironment.getInstance().getTempTaskDirPath(contentId, taskKey);
//
// //添付ファイル変更の場合、以下の処理を行う
// JSONObject attachedListJson = taskDirectionsJson.getJSONObject("attached");
// List<String> attachedFileNames = JSONObject.getValues(attachedListJson);
// // コピー元のファイルで、添付ファイルとして使用しないファイル削除
// deleteDifferentialFile(tempDirPath, attachedFileNames);
//
// String operationDrectionOrReportDirPath = ABVEnvironment.getInstance().getOperationDirectionOrReportDirPath(operationId, taskKey, true);
//
// // 添付ディレクトリの移動
// boolean result = FileUtil.copy(tempDirPath, operationDrectionOrReportDirPath, true);
// if (result) {
// FileUtil.delete(tempDirPath);
// }
TaskDto taskDto = new TaskDto();
TaskDirectionsDto taskDirectionsDto = new TaskDirectionsDto();
TaskReportDto taskReportDto = new TaskReportDto();
JSONObject taskJson = taskDirectionsJson.getJSONObject("task");
taskDto.taskKey = taskKey;
taskDto.operationId = operationId;
......@@ -236,34 +295,39 @@ public class OperationLogic extends AbstractLogic {
Iterator taskKeys = taskJson.keys();
while (taskKeys.hasNext()) {
TaskDirectionsItemsDto taskDirectionsItemsDto = new TaskDirectionsItemsDto();
TaskReportItemsDto taskReportItemsDto = new TaskReportItemsDto();
String itemKey = (String) taskKeys.next();
if (itemKey.startsWith("q_1_")) {
taskDto.taskCode = taskJson.getString(itemKey);
}
taskDirectionsItemsDto.taskKey = taskKey;
taskDirectionsItemsDto.itemKey = itemKey;
taskReportItemsDto.taskKey = taskKey;
taskReportItemsDto.itemKey = itemKey;
try {
taskDirectionsItemsDto.inputValue = taskJson.getString(itemKey);
taskReportItemsDto.inputValue = taskJson.getString(itemKey);
} catch (JSONException e) {
// 値がStringではない場合、無視する
continue;
}
mTaskDirectionsItemsDao.insertTaskDirectionsItems(taskDirectionsItemsDto);
mTaskReportItemsDao.insertTaskReportItems(taskReportItemsDto);
}
taskDirectionsDto.taskKey = taskKey;
taskDirectionsDto.jsonData = taskDirectionsJson.toString();
taskDirectionsDto.dataSendFlg = dataSendFlg;
taskDirectionsDto.attachedFileSendFlg = attachedChangeFlag;
taskReportDto.taskKey = taskKey;
taskReportDto.jsonData = taskDirectionsJson.toString();
taskReportDto.dataSendFlg = dataSendFlg;
taskReportDto.attachedFileSendFlg = attachedChangeFlag;
if (localAttachedFileName != null) {
taskDirectionsDto.localAttachedFileName = localAttachedFileName;
taskReportDto.localAttachedFileName = localAttachedFileName;
}
if (taskDirectionsJson.has(ABookKeys.TASK_STATUS)) {
taskDto.taskStatus = taskDirectionsJson.getInt(ABookKeys.TASK_STATUS);
}
mTaskDirectionsDao.insert(taskDirectionsDto);
// 0305 start
// 指示の場合
taskReportDto.reportorFlag = false;
// 0305 end
mTaskReportDao.insert(taskReportDto);
mTaskDao.insert(taskDto);
String tempDirPath = ABVEnvironment.getInstance().getTempTaskDirPath(contentId, taskKey);
......@@ -281,6 +345,7 @@ public class OperationLogic extends AbstractLogic {
if (result) {
FileUtil.delete(tempDirPath);
}
// 0305 end
}
/**
......@@ -303,50 +368,115 @@ public class OperationLogic extends AbstractLogic {
Logger.w(TAG, "taskDto is null");
return;
}
TaskDirectionsDto taskDirectionsDto = mTaskDirectionsDao.getTaskDirections(taskKey);
// 0305 start
// TaskDirectionsDto taskDirectionsDto = mTaskDirectionsDao.getTaskDirections(taskKey);
// taskDto.operationId = operationId;
// taskDto.taskHotSpotInfo = hotSpotInfo;
// JSONObject taskJson = taskDirectionsJson.getJSONObject("task");
//
// Iterator taskKeys = taskJson.keys();
// List<TaskDirectionsItemsDto> taskDirectionsItemsDtoList = mTaskDirectionsItemsDao.getTaskDirectionsItemByTaskKey(taskKey);
// for (TaskDirectionsItemsDto taskDirectionsItemsDto : taskDirectionsItemsDtoList) {
// try {
// String newValue = taskJson.getString(taskDirectionsItemsDto.itemKey);
// if (!newValue.equals(taskDirectionsItemsDto.inputValue)) {
// // 値が異なる場合のみ、更新する
// taskDirectionsItemsDto.inputValue = newValue;
// if (taskDirectionsItemsDto.itemKey.startsWith("q_1_")) {
// // 値が異なるため、作業コードの入力値を変更する
// taskDto.taskCode = taskDirectionsItemsDto.inputValue;
// }
// mTaskDirectionsItemsDao.updateTaskDirectionsItems(taskDirectionsItemsDto);
// }
// } catch (JSONException e) {
// // 値がStringではない場合、無視する
// continue;
// }
// }
// taskDirectionsDto.jsonData = taskDirectionsJson.toString();
// taskDirectionsDto.dataSendFlg = dataSendFlg;
//
// // attachedFileSendFlgがtrueの場合は、更新しない
// if (!taskDirectionsDto.attachedFileSendFlg) {
// taskDirectionsDto.attachedFileSendFlg = attachedChangeFlag;
// }
// if (localAttachedFileName != null) {
// taskDirectionsDto.localAttachedFileName = localAttachedFileName;
// }
//
// if (taskDirectionsJson.has(ABookKeys.TASK_STATUS)) {
// taskDto.taskStatus = taskDirectionsJson.getInt(ABookKeys.TASK_STATUS);
// }
//
// mTaskDirectionsDao.update(taskDirectionsDto);
// mTaskDao.update(taskDto);
// String tempDirPath = ABVEnvironment.getInstance().getTempTaskDirPath(contentId, taskKey);
// String operationDrectionOrReportDirPath = ABVEnvironment.getInstance().getOperationDirectionOrReportDirPath(operationId, taskKey, true);
// if (taskDirectionsDto.attachedFileSendFlg) {
// //添付ファイル変更の場合、以下の処理を行う
// JSONObject attachedListJson = taskDirectionsJson.getJSONObject("attached");
// List<String> attachedFileNames = JSONObject.getValues(attachedListJson);
//
// // コピー元のファイルで、添付ファイルとして使用しないファイル削除
// deleteDifferentialFile(tempDirPath, attachedFileNames);
// // 同じファイル名が存在すれば、コピー先ファイルを削除
// deleteDifferentialFile(operationDrectionOrReportDirPath, attachedFileNames);
//
// // 添付ディレクトリの移動
// boolean result = FileUtil.copy(tempDirPath, operationDrectionOrReportDirPath, true);
// if(result) {
// FileUtil.delete(tempDirPath);
// }
// }
TaskReportDto taskReportDto = mTaskReportDao.getTaskReport(taskKey);
taskDto.operationId = operationId;
taskDto.taskHotSpotInfo = hotSpotInfo;
JSONObject taskJson = taskDirectionsJson.getJSONObject("task");
Iterator taskKeys = taskJson.keys();
List<TaskDirectionsItemsDto> taskDirectionsItemsDtoList = mTaskDirectionsItemsDao.getTaskDirectionsItemByTaskKey(taskKey);
for (TaskDirectionsItemsDto taskDirectionsItemsDto : taskDirectionsItemsDtoList) {
List<TaskReportItemsDto> taskReportItemsDtoList = mTaskReportItemsDao.getTaskReportItemByTaskKey(taskKey);
for (TaskReportItemsDto taskReportItemsDto : taskReportItemsDtoList) {
try {
String newValue = taskJson.getString(taskDirectionsItemsDto.itemKey);
if (!newValue.equals(taskDirectionsItemsDto.inputValue)) {
String newValue = taskJson.getString(taskReportItemsDto.itemKey);
if (!newValue.equals(taskReportItemsDto.inputValue)) {
// 値が異なる場合のみ、更新する
taskDirectionsItemsDto.inputValue = newValue;
if (taskDirectionsItemsDto.itemKey.startsWith("q_1_")) {
taskReportItemsDto.inputValue = newValue;
if (taskReportItemsDto.itemKey.startsWith("q_1_")) {
// 値が異なるため、作業コードの入力値を変更する
taskDto.taskCode = taskDirectionsItemsDto.inputValue;
taskDto.taskCode = taskReportItemsDto.inputValue;
}
mTaskDirectionsItemsDao.updateTaskDirectionsItems(taskDirectionsItemsDto);
mTaskReportItemsDao.updateTaskReportItems(taskReportItemsDto);
}
} catch (JSONException e) {
// 値がStringではない場合、無視する
continue;
}
}
taskDirectionsDto.jsonData = taskDirectionsJson.toString();
taskDirectionsDto.dataSendFlg = dataSendFlg;
taskReportDto.jsonData = taskDirectionsJson.toString();
taskReportDto.dataSendFlg = dataSendFlg;
// attachedFileSendFlgがtrueの場合は、更新しない
if (!taskDirectionsDto.attachedFileSendFlg) {
taskDirectionsDto.attachedFileSendFlg = attachedChangeFlag;
if (!taskReportDto.attachedFileSendFlg) {
taskReportDto.attachedFileSendFlg = attachedChangeFlag;
}
if (localAttachedFileName != null) {
taskDirectionsDto.localAttachedFileName = localAttachedFileName;
taskReportDto.localAttachedFileName = localAttachedFileName;
}
if (taskDirectionsJson.has(ABookKeys.TASK_STATUS)) {
taskDto.taskStatus = taskDirectionsJson.getInt(ABookKeys.TASK_STATUS);
}
mTaskDirectionsDao.update(taskDirectionsDto);
// 0305 start
taskReportDto.reportorFlag = false;
// 0305 end
mTaskReportDao.update(taskReportDto);
mTaskDao.update(taskDto);
String tempDirPath = ABVEnvironment.getInstance().getTempTaskDirPath(contentId, taskKey);
String operationDrectionOrReportDirPath = ABVEnvironment.getInstance().getOperationDirectionOrReportDirPath(operationId, taskKey, true);
if (taskDirectionsDto.attachedFileSendFlg) {
if (taskReportDto.attachedFileSendFlg) {
//添付ファイル変更の場合、以下の処理を行う
JSONObject attachedListJson = taskDirectionsJson.getJSONObject("attached");
List<String> attachedFileNames = JSONObject.getValues(attachedListJson);
......@@ -362,8 +492,11 @@ public class OperationLogic extends AbstractLogic {
FileUtil.delete(tempDirPath);
}
}
// 0305 end
}
// TODO
// 削除対象
/**
* 作業指示の削除
*
......@@ -377,15 +510,28 @@ public class OperationLogic extends AbstractLogic {
return;
}
TaskDirectionsDto taskDirectionsDto = mTaskDirectionsDao.getTaskDirections(taskKey);
taskDirectionsDto.dataSendFlg = true;
taskDirectionsDto.attachedFileSendFlg = false;
// 0305 start
// TaskDirectionsDto taskDirectionsDto = mTaskDirectionsDao.getTaskDirections(taskKey);
// taskDirectionsDto.dataSendFlg = true;
// taskDirectionsDto.attachedFileSendFlg = false;
// taskDto.delFlg = true;
// mTaskDirectionsDao.update(taskDirectionsDto);
// mTaskDao.update(taskDto);
TaskReportDto taskReportDto = mTaskReportDao.getTaskReport(taskKey);
taskReportDto.dataSendFlg = true;
taskReportDto.attachedFileSendFlg = false;
taskDto.delFlg = true;
mTaskDirectionsDao.update(taskDirectionsDto);
// 0305 start
taskReportDto.reportorFlag = false;
// 0305 end
mTaskReportDao.update(taskReportDto);
mTaskDao.update(taskDto);
// プロジェクトの作業データディレクトリ削除
deleteTaskFileData(operationId, contentId, taskKey);
// 0305 end
}
/**
......@@ -429,6 +575,11 @@ public class OperationLogic extends AbstractLogic {
taskReportDto.dataSendFlg = dataSendFlg;
taskReportDto.attachedFileSendFlg = attachedChangeFlag;
// 0305 start
// 報告者の場合
taskReportDto.reportorFlag = true;
// 0305 end
// 削除の時、deleteではなく、jsonDataを空にして、データが残っているので、updateする
List<TaskReportDto> taskReport = mTaskReportDao.selectByTaskKey(taskReportDto.taskKey);
if (taskReport.size() > 0) {
......@@ -550,6 +701,10 @@ public class OperationLogic extends AbstractLogic {
taskReportDto.attachedFileSendFlg = attachedChangeFlag;
}
// 0305 start
taskReportDto.reportorFlag = true;
// 0305 end
mTaskReportDao.update(taskReportDto);
mTaskDao.update(taskDto);
String tempDirPath = ABVEnvironment.getInstance().getTempTaskDirPath(contentId, taskKey);
......@@ -873,10 +1028,17 @@ public class OperationLogic extends AbstractLogic {
*/
public void updateTaskHotspot(String taskKey, Map<String, String> param) {
TaskDto taskDto = mTaskDao.getTaskByTaskKey(taskKey);
TaskDirectionsDto taskDirectionsDto = mTaskDirectionsDao.getTaskDirections(taskKey);
taskDirectionsDto.dataSendFlg = true;
// 0305 start
// TaskDirectionsDto taskDirectionsDto = mTaskDirectionsDao.getTaskDirections(taskKey);
// taskDirectionsDto.dataSendFlg = true;
// taskDto.taskHotSpotInfo = param.get(ABookKeys.HOT_SPOT);
// mTaskDirectionsDao.update(taskDirectionsDto);
TaskReportDto taskReportDao = mTaskReportDao.getTaskReport(taskKey);
taskReportDao.dataSendFlg = true;
taskDto.taskHotSpotInfo = param.get(ABookKeys.HOT_SPOT);
mTaskDirectionsDao.update(taskDirectionsDto);
mTaskReportDao.update(taskReportDao);
// 0305 end
mTaskDao.update(taskDto);
}
......@@ -889,13 +1051,23 @@ public class OperationLogic extends AbstractLogic {
*/
public void updateTaskHotspot(String taskKey, float newX, float newY) {
TaskDto taskDto = mTaskDao.getTaskByTaskKey(taskKey);
TaskDirectionsDto taskDirectionsDto = mTaskDirectionsDao.getTaskDirections(taskKey);
taskDirectionsDto.dataSendFlg = true;
// 0305 start
// TaskDirectionsDto taskDirectionsDto = mTaskDirectionsDao.getTaskDirections(taskKey);
// taskDirectionsDto.dataSendFlg = true;
// JSONObject hotSpot = new JSONObject(taskDto.taskHotSpotInfo);
// hotSpot.put("x", newX);
// hotSpot.put("y", newY);
// taskDto.taskHotSpotInfo = hotSpot.toString();
// mTaskDirectionsDao.update(taskDirectionsDto);
TaskReportDto taskReportDto = mTaskReportDao.getTaskReport(taskKey);
taskReportDto.dataSendFlg = true;
JSONObject hotSpot = new JSONObject(taskDto.taskHotSpotInfo);
hotSpot.put("x", newX);
hotSpot.put("y", newY);
taskDto.taskHotSpotInfo = hotSpot.toString();
mTaskDirectionsDao.update(taskDirectionsDto);
mTaskReportDao.update(taskReportDto);
// 0305 end
mTaskDao.update(taskDto);
}
......@@ -926,6 +1098,7 @@ public class OperationLogic extends AbstractLogic {
*/
public void createJsonForOperationContent(Long operationId, int reportUpdateType, String contentPath, boolean directionsFlg, boolean routineTaskReportFlg) throws IOException {
try {
// 0305 start
createTaskDirectionsJson(operationId, contentPath);
createTaskDirectionsSuggestJson(operationId, contentPath);
if (!directionsFlg) {
......@@ -940,6 +1113,8 @@ public class OperationLogic extends AbstractLogic {
createTaskReportSuggestJson(operationId, contentPath);
}
// 0305 end
createHopSpotJson(operationId, contentPath);
} catch (IOException e) {
Logger.e(TAG, "createJsonForOperationContent error : ", e);
......@@ -1038,6 +1213,8 @@ public class OperationLogic extends AbstractLogic {
FileUtil.createFile(contentPath + "/taskHotspot.json", hotspotJson.toString());
}
// TODO
// 削除対象
/**
* taskDirections.jsonファイル作成
*
......@@ -1046,15 +1223,27 @@ public class OperationLogic extends AbstractLogic {
* @throws IOException
*/
private void createTaskDirectionsJson(Long operationId, String contentPath) throws IOException {
List<JSONObject> taskDirectionsJsonList = new ArrayList<JSONObject>();
JSONObject taskDirectionsJson = new JSONObject();
List<TaskDirectionsDto> taskDirectionsDtoList = mTaskDirectionsDao.getTaskDirectionsByOperationId(operationId);
for (TaskDirectionsDto dto : taskDirectionsDtoList) {
taskDirectionsJsonList.add(new JSONObject(dto.jsonData));
}
taskDirectionsJson.put(ABookKeys.TASK_DIRECTIONS, taskDirectionsJsonList);
Logger.d(TAG, "createTaskDirectionsJson : " + taskDirectionsJson.toString());
FileUtil.createFile(contentPath + "/" + ABookKeys.TASK_DIRECTIONS + ".json", taskDirectionsJson.toString());
// 0305 start
// List<JSONObject> taskDirectionsJsonList = new ArrayList<JSONObject>();
// JSONObject taskDirectionsJson = new JSONObject();
// List<TaskDirectionsDto> taskDirectionsDtoList = mTaskDirectionsDao.getTaskDirectionsByOperationId(operationId);
// for (TaskDirectionsDto dto : taskDirectionsDtoList) {
// taskDirectionsJsonList.add(new JSONObject(dto.jsonData));
// }
// taskDirectionsJson.put(ABookKeys.TASK_DIRECTIONS, taskDirectionsJsonList);
// Logger.d(TAG, "createTaskDirectionsJson : " + taskDirectionsJson.toString());
// FileUtil.createFile(contentPath + "/" + ABookKeys.TASK_DIRECTIONS + ".json", taskDirectionsJson.toString());
List<JSONObject> taskReportJsonList = new ArrayList<JSONObject>();
JSONObject taskReportJson = new JSONObject();
List<TaskReportDto> taskReportDtoList = mTaskReportDao.getTaskReportByOperationId(operationId);
for (TaskReportDto dto : taskReportDtoList) {
taskReportJsonList.add(new JSONObject(dto.jsonData));
}
taskReportJson.put(ABookKeys.TASK_DIRECTIONS, taskReportJsonList);
Logger.d(TAG, "createTaskDirectionsJson : " + taskReportJson.toString());
FileUtil.createFile(contentPath + "/" + ABookKeys.TASK_DIRECTIONS + ".json", taskReportJson.toString());
// 0305 end
}
/**
......@@ -1065,10 +1254,37 @@ public class OperationLogic extends AbstractLogic {
* @throws IOException
*/
private void createTaskDirectionsSuggestJson(Long operationId, String contentPath) throws IOException {
// 0305 start
// JSONObject itemJson = new JSONObject();
// JSONObject taskDirectionsSuggestJson = new JSONObject();
// List<TaskDirectionsItemsDto> taskDirectionsItemsDtoList = mTaskDirectionsItemsDao.getTaskDirectionsItemByOperationId(operationId);
// for (TaskDirectionsItemsDto dto : taskDirectionsItemsDtoList) {
// JSONArray jsonArray = new JSONArray();
// if (itemJson.has(dto.itemKey)) {
// boolean result = false;
// jsonArray = itemJson.getJSONArray(dto.itemKey);
// for (int i = 0; i < jsonArray.length(); i++) {
// if (jsonArray.get(i).equals(dto.inputValue)) {
// result = true;
// break;
// }
// }
// if (!result) {
// jsonArray.put(dto.inputValue);
// itemJson.put(dto.itemKey, jsonArray);
// }
// } else {
// jsonArray.put(dto.inputValue);
// itemJson.put(dto.itemKey, jsonArray);
// }
// }
// taskDirectionsSuggestJson.put(ABookKeys.TASK_DIRECTIONS_SUGGEST, itemJson);
// FileUtil.createFile(contentPath + "/" + ABookKeys.TASK_DIRECTIONS_SUGGEST + ".json", taskDirectionsSuggestJson.toString());
JSONObject itemJson = new JSONObject();
JSONObject taskDirectionsSuggestJson = new JSONObject();
List<TaskDirectionsItemsDto> taskDirectionsItemsDtoList = mTaskDirectionsItemsDao.getTaskDirectionsItemByOperationId(operationId);
for (TaskDirectionsItemsDto dto : taskDirectionsItemsDtoList) {
JSONObject taskReportSuggestJson = new JSONObject();
List<TaskReportItemsDto> taskReportItemsDtoList = mTaskReportItemsDao.getTaskReportItemByOperationId(operationId);
for (TaskReportItemsDto dto : taskReportItemsDtoList) {
JSONArray jsonArray = new JSONArray();
if (itemJson.has(dto.itemKey)) {
boolean result = false;
......@@ -1088,10 +1304,13 @@ public class OperationLogic extends AbstractLogic {
itemJson.put(dto.itemKey, jsonArray);
}
}
taskDirectionsSuggestJson.put(ABookKeys.TASK_DIRECTIONS_SUGGEST, itemJson);
FileUtil.createFile(contentPath + "/" + ABookKeys.TASK_DIRECTIONS_SUGGEST + ".json", taskDirectionsSuggestJson.toString());
taskReportSuggestJson.put(ABookKeys.TASK_DIRECTIONS_SUGGEST, itemJson);
FileUtil.createFile(contentPath + "/" + ABookKeys.TASK_DIRECTIONS_SUGGEST + ".json", taskReportSuggestJson.toString());
// 0305 end
}
public void createTaskReportJson(Long operationId, String contentPath) throws IOException {
List<JSONObject> taskReportJsonList = new ArrayList<JSONObject>();
JSONObject taskReportJson = new JSONObject();
......@@ -1195,7 +1414,10 @@ public class OperationLogic extends AbstractLogic {
// プロジェクト毎に作業の送信フラグがあるかチェックし、存在する場合プロジェクトのデータ同期必要区分をtrueにセット
if (ABVDataCache.getInstance().getMemberInfo().operationAuthLevel == OperationAuthLevel.OPERATION_INSTRUCTOR) {
// 作業指示者
if (mTaskDirectionsDao.isExistSendTaskData(operationDto.operationId)) {
// 0305 start
// if (mTaskDirectionsDao.isExistSendTaskData(operationDto.operationId)) {
if (mTaskReportDao.isExistSendTaskData(operationDto.operationId)) {
// 0305 end
mOperationDao.updateNeedSyncFlg(operationDto.operationId, true);
}
} else {
......@@ -1313,21 +1535,66 @@ public class OperationLogic extends AbstractLogic {
* @throws Exception
*/
public void sendTaskDirectionsData(long operationId, String taskKey, Callback progressCallback) throws ABVException, NetworkDisconnectedException, IOException, ZipException, NoSuchAlgorithmException {
List<TaskDirectionsDto> taskDirectionsDtoList = null;
// 0305 start
// List<TaskDirectionsDto> taskDirectionsDtoList = null;
// int maxProgress = 0;
// if (taskKey == null) {
// taskDirectionsDtoList = mTaskDirectionsDao.getSendableTaskData(operationId);
// maxProgress = 40;
// } else {
// taskDirectionsDtoList = mTaskDirectionsDao.getSendableTaskData(operationId, taskKey);
// maxProgress = 100;
// }
//
// 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));
// }
// }
List<TaskReportDto> taskReportDtoList = null;
int maxProgress = 0;
if (taskKey == null) {
taskDirectionsDtoList = mTaskDirectionsDao.getSendableTaskData(operationId);
taskReportDtoList = mTaskReportDao.getSendableTaskData(operationId);
maxProgress = 40;
} else {
taskDirectionsDtoList = mTaskDirectionsDao.getSendableTaskData(operationId, taskKey);
taskReportDtoList = mTaskReportDao.getSendableTaskData(operationId, taskKey, false);
maxProgress = 100;
}
if (taskDirectionsDtoList != null && taskDirectionsDtoList.size() > 0) {
if (taskReportDtoList != null && taskReportDtoList.size() > 0) {
//プログレスを40%進行させるための計算
int progress = maxProgress / taskDirectionsDtoList.size();
int progress = maxProgress / taskReportDtoList.size();
for (TaskDirectionsDto dto : taskDirectionsDtoList) {
for (TaskReportDto dto : taskReportDtoList) {
File zipFile = null;
if (dto.attachedFileSendFlg) {
String fileName = null;
......@@ -1350,11 +1617,15 @@ public class OperationLogic extends AbstractLogic {
} else {
dto.dataSendFlg = false;
dto.attachedFileSendFlg = false;
mTaskDirectionsDao.update(dto);
// 0305 start
dto.reportorFlag = false;
// 0305 end
mTaskReportDao.update(dto);
}
progressCallback.callback(new Integer(progress));
}
}
// 0305 end
}
/**
......@@ -1370,7 +1641,7 @@ public class OperationLogic extends AbstractLogic {
taskReportDtoList = mTaskReportDao.getSendableTaskData(operationId);
maxProgress = 40;
} else {
taskReportDtoList = mTaskReportDao.getSendableTaskData(operationId, taskKey);
taskReportDtoList = mTaskReportDao.getSendableTaskData(operationId, taskKey, true);
maxProgress = 100;
}
if (taskReportDtoList != null && taskReportDtoList.size() > 0) {
......@@ -1436,6 +1707,9 @@ public class OperationLogic extends AbstractLogic {
taskReportDto.dataSendFlg = false;
taskReportDto.attachedFileSendFlg = false;
// 0305 start
taskReportDto.reportorFlag = true;
// 0305 end
mTaskReportDao.update(taskReportDto);
}
}
......
......@@ -143,7 +143,9 @@ public class OperationListActivity extends ABVUIActivity {
private Dialog mPanoEntryDialog;
private OperationContentDao mOperationContentDao = AbstractDao.getDao(OperationContentDao.class);
private TaskDirectionsDao mTaskDirectionsDao = AbstractDao.getDao(TaskDirectionsDao.class);
// 0301 start
// private TaskDirectionsDao mTaskDirectionsDao = AbstractDao.getDao(TaskDirectionsDao.class);
// 0301 end
private TaskReportDao mTaskReportDao = AbstractDao.getDao(TaskReportDao.class);
private RoutineTaskReportDao mRoutineTaskReportDao = AbstractDao.getDao(RoutineTaskReportDao.class);
private OperationLogic mOperationLogic = AbstractLogic.getLogic(OperationLogic.class);
......@@ -1033,6 +1035,7 @@ public class OperationListActivity extends ABVUIActivity {
}
lastEditDate = json.lastEditDate;
} else {
// TODO
OperationDataJSON json = AcmsClient.getInstance(ABVDataCache.getInstance().getUrlPath(), ABVEnvironment.getInstance().networkAdapter).getOpereationData(param);
//プログレスを40%進行させるための計算
......@@ -1041,13 +1044,17 @@ public class OperationListActivity extends ABVUIActivity {
progress = 40 / json.taskDtoList.size();
}
JSONObject taskDirectionJson;
// 0305 start
// JSONObject taskDirectionJson;
JSONObject taskReportJson;
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);
// 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) {
......@@ -1058,9 +1065,11 @@ public class OperationListActivity extends ABVUIActivity {
return null;
}
// 0305 start
// 作業更新
mOperationLogic.updateTaskDirections(taskDto.taskKey, taskDto.operationId, operationContentDto.contentId,
taskDirectionJson, taskDto.taskHotSpotInfo, directionsAttachedFileName, false, false);
taskReportJson, taskDto.taskHotSpotInfo, directionsAttachedFileName, false, false);
// 0305 end
localTaskList.remove(taskDto);
// 報告データが存在すると作業報告を更新する
if (taskDto.taskReportDto.jsonData != null) {
......@@ -1074,9 +1083,11 @@ public class OperationListActivity extends ABVUIActivity {
return null;
}
// 0301 start
// 作業登録
mOperationLogic.insertTaskDirections(taskDto.taskKey, operationContentDto.operationId, operationContentDto.contentId,
taskDirectionJson, taskDto.taskHotSpotInfo, directionsAttachedFileName, false, false);
taskReportJson, taskDto.taskHotSpotInfo, directionsAttachedFileName, false, false);
// 0305 end
if (taskDto.taskReportDto.jsonData != null) {
mOperationLogic.insertTaskReport(taskDto.taskKey, operationContentDto.operationId, operationContentDto.contentId,
new JSONObject(taskDto.taskReportDto.jsonData), reportAttachedFileName, false, false);
......@@ -1084,6 +1095,7 @@ public class OperationListActivity extends ABVUIActivity {
}
progressCallback.callback(new Integer(progress));
}
// 0305 end
// サーバーから取得した作業情報がローカルに存在しないので削除する
for (TaskDto taskDto : localTaskList) {
......@@ -1103,7 +1115,10 @@ public class OperationListActivity extends ABVUIActivity {
// 既存の添付ディレクトリ削除
FileUtil.delete(ABVEnvironment.getInstance().getTempTaskDirPath(contentId, taskKey));
String directionsLocalAttachedFileName = mTaskDirectionsDao.getTaskDirectionsAttachedFileName(taskKey);
// 0305 start
// String directionsLocalAttachedFileName = mTaskDirectionsDao.getTaskDirectionsAttachedFileName(taskKey);
String directionsLocalAttachedFileName = mTaskReportDao.getTaskReportAttachedFileName(taskKey);
// 0305 end
String reportLocalAttachedFileName = mTaskReportDao.getTaskReportAttachedFileName(taskKey);
int count = 0;
boolean getDirectionsFileFlg = directionsAttachedFileName != null && !directionsAttachedFileName.equals(directionsLocalAttachedFileName);
......
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