Commit 50f36bc8 by Kim Jinsung

Merge branch 'feature/1.0.1_32782' into 'feature/1.0.1'

Feature/1.0.1 32782

See merge request !4
parents 8fb0a434 d415ca5e
...@@ -28,9 +28,17 @@ public class OperationDataJSON extends AcmsCommonJSON { ...@@ -28,9 +28,17 @@ public class OperationDataJSON extends AcmsCommonJSON {
public static final String TaskCode = "taskCode"; public static final String TaskCode = "taskCode";
public static final String TaskStatus = "taskStatus"; public static final String TaskStatus = "taskStatus";
public static final String TaskHotspotInfo = "taskHotspotInfo"; public static final String TaskHotspotInfo = "taskHotspotInfo";
// #32782 指示者テーブル関連削除 start
// TODO change&delete TaskDirections
// public static final String TaskDirectionsInfo = "taskReportInfo";
public static final String TaskDirectionsInfo = "taskDirectionsInfo"; public static final String TaskDirectionsInfo = "taskDirectionsInfo";
// #32782 指示者テーブル関連削除 end
public static final String TaskReportInfo = "taskReportInfo"; public static final String TaskReportInfo = "taskReportInfo";
// #32782 指示者テーブル関連削除 start
// TODO change&Delete TaskDirections
// public static final String TaskDirectionsKey = "taskReportKey";
public static final String TaskDirectionsKey = "taskDirectionsKey"; public static final String TaskDirectionsKey = "taskDirectionsKey";
// #32782 指示者テーブル関連削除 end
public static final String TaskReportKey = "taskReportKey"; public static final String TaskReportKey = "taskReportKey";
public static final String Task = "task"; public static final String Task = "task";
...@@ -50,7 +58,11 @@ public class OperationDataJSON extends AcmsCommonJSON { ...@@ -50,7 +58,11 @@ public class OperationDataJSON extends AcmsCommonJSON {
for (int i = 0; i < taskList.length(); i++) { for (int i = 0; i < taskList.length(); i++) {
JSONObject taskJson = taskList.getJSONObject(i); JSONObject taskJson = taskList.getJSONObject(i);
TaskDto dto = new TaskDto(); TaskDto dto = new TaskDto();
// #32782 指示者テーブル関連削除 start
// TODO change
// dto.taskDirectionsDto = new TaskReportDto();
dto.taskDirectionsDto = new TaskDirectionsDto(); dto.taskDirectionsDto = new TaskDirectionsDto();
// #32782 指示者テーブル関連削除 end
dto.taskReportDto = new TaskReportDto(); dto.taskReportDto = new TaskReportDto();
dto.operationId = taskJson.getLong(OperationId); dto.operationId = taskJson.getLong(OperationId);
......
...@@ -41,7 +41,11 @@ public class RoutineTaskDataJSON extends OperationDataJSON { ...@@ -41,7 +41,11 @@ public class RoutineTaskDataJSON extends OperationDataJSON {
for (int i = 0; i < taskList.length(); i++) { for (int i = 0; i < taskList.length(); i++) {
JSONObject taskJson = taskList.getJSONObject(i); JSONObject taskJson = taskList.getJSONObject(i);
TaskDto dto = new TaskDto(); TaskDto dto = new TaskDto();
// #32782 指示者テーブル関連削除 start
// TODO change
// dto.taskDirectionsDto = new TaskReportDto();
dto.taskDirectionsDto = new TaskDirectionsDto(); dto.taskDirectionsDto = new TaskDirectionsDto();
// #32782 指示者テーブル関連削除 end
dto.taskReportDto = new TaskReportDto(); dto.taskReportDto = new TaskReportDto();
dto.operationId = taskJson.getLong(OperationId); dto.operationId = taskJson.getLong(OperationId);
......
...@@ -17,10 +17,13 @@ public class ABookKeys { ...@@ -17,10 +17,13 @@ public class ABookKeys {
// ABOOKCHECK SCHEME // ABOOKCHECK SCHEME
public static final String ABOOK_CHECK_API = "abookcheck-api"; public static final String ABOOK_CHECK_API = "abookcheck-api";
// #32782 指示者テーブル関連削除 start
// TODO TaskDirections 削除処理が必要
public static final String CMD_INSERT_TASK_DIRECTIONS = "insertTaskDirections"; public static final String CMD_INSERT_TASK_DIRECTIONS = "insertTaskDirections";
public static final String CMD_UPDATE_TASK_DIRECTIONS = "updateTaskDirections"; public static final String CMD_UPDATE_TASK_DIRECTIONS = "updateTaskDirections";
public static final String CMD_DELETE_TASK_DIRECTIONS = "deleteTaskDirections"; public static final String CMD_DELETE_TASK_DIRECTIONS = "deleteTaskDirections";
public static final String CMD_CANCEL_TASK_DIRECTIONS = "cancelTaskDirections"; public static final String CMD_CANCEL_TASK_DIRECTIONS = "cancelTaskDirections";
// #32782 指示者テーブル関連削除 end
public static final String CMD_MOVE_HOT_SPOT = "moveHotspot"; public static final String CMD_MOVE_HOT_SPOT = "moveHotspot";
public static final String CMD_SHOW_DIRECTION_OZD = "showDirectionOzd"; public static final String CMD_SHOW_DIRECTION_OZD = "showDirectionOzd";
public static final String CMD_PREVIEW_DIRECTION_OZD = "previewDirectionOzd"; public static final String CMD_PREVIEW_DIRECTION_OZD = "previewDirectionOzd";
...@@ -47,8 +50,13 @@ public class ABookKeys { ...@@ -47,8 +50,13 @@ public class ABookKeys {
public static final String READ_ONLY_FLG = "readOnlyFlg"; public static final String READ_ONLY_FLG = "readOnlyFlg";
public static final String DIRECTION_FLG = "directionFlg"; public static final String DIRECTION_FLG = "directionFlg";
public static final String ATTACHED_CHANGE_FLAG = "attachedChangeFlag"; public static final String ATTACHED_CHANGE_FLAG = "attachedChangeFlag";
// #32782 指示者テーブル関連削除 start
// TODO change TASK_DIRECTIONS 削除が必要
// public static final String TASK_DIRECTIONS = "taskReport";
// public static final String TASK_DIRECTIONS_SUGGEST = "taskReportSuggest";
public static final String TASK_DIRECTIONS = "taskDirections"; public static final String TASK_DIRECTIONS = "taskDirections";
public static final String TASK_DIRECTIONS_SUGGEST = "taskDirectionsSuggest"; public static final String TASK_DIRECTIONS_SUGGEST = "taskDirectionsSuggest";
// #32782 指示者テーブル関連削除 end
public static final String TASK_HOTSPOT = "taskHotspot"; public static final String TASK_HOTSPOT = "taskHotspot";
public static final String TASK_REPORT = "taskReport"; public static final String TASK_REPORT = "taskReport";
public static final String TASK_REPORT_SUGGEST = "taskReportSuggest"; public static final String TASK_REPORT_SUGGEST = "taskReportSuggest";
......
...@@ -91,8 +91,11 @@ public class ABVDataOpenHelper { ...@@ -91,8 +91,11 @@ public class ABVDataOpenHelper {
iTableScripts.add(new TOperation()); iTableScripts.add(new TOperation());
iTableScripts.add(new ROperationContent()); iTableScripts.add(new ROperationContent());
iTableScripts.add(new TTask()); iTableScripts.add(new TTask());
// #32782 指示者テーブル関連削除 start
// TODO delete
iTableScripts.add(new TTaskDirections()); iTableScripts.add(new TTaskDirections());
iTableScripts.add(new TTaskDirectionsItems()); iTableScripts.add(new TTaskDirectionsItems());
// #32782 指示者テーブル関連削除 end
iTableScripts.add(new TTaskReport()); iTableScripts.add(new TTaskReport());
iTableScripts.add(new TTaskReportSend()); iTableScripts.add(new TTaskReportSend());
iTableScripts.add(new TTaskReportItems()); iTableScripts.add(new TTaskReportItems());
......
...@@ -436,7 +436,7 @@ public class ContentDao extends AbstractDao { ...@@ -436,7 +436,7 @@ public class ContentDao extends AbstractDao {
if (physicalDelete) { if (physicalDelete) {
delete("r_content_category", "content_id=?", keyValues); delete("r_content_category", "content_id=?", keyValues);
delete("r_content_group", "content_id=?", keyValues); delete("r_content_group", "content_id=?", keyValues);
delete("r_project_content", "content_id=?", keyValues); delete("r_operation_content", "content_id=?", keyValues);
delete("t_content", "content_id=?", keyValues); delete("t_content", "content_id=?", keyValues);
} else { } else {
// 削除したコンテンツは自動ダウンロード禁止フラグをtrueにする // 削除したコンテンツは自動ダウンロード禁止フラグをtrueにする
...@@ -637,21 +637,21 @@ public class ContentDao extends AbstractDao { ...@@ -637,21 +637,21 @@ public class ContentDao extends AbstractDao {
sql.append(" tc.status, "); sql.append(" tc.status, ");
sql.append(" tc.last_delivery_date "); sql.append(" tc.last_delivery_date ");
sql.append(" FROM t_content AS tc "); sql.append(" FROM t_content AS tc ");
sql.append(" INNER JOIN r_project_content AS rpc "); sql.append(" INNER JOIN r_operation_content AS rpc ");
sql.append(" ON tc.content_id = rpc.content_id "); sql.append(" ON tc.content_id = rpc.content_id ");
sql.append(" INNER JOIN r_content_category AS rcc "); sql.append(" INNER JOIN r_content_category AS rcc ");
sql.append(" ON rpc.content_id = rcc.content_id "); sql.append(" ON rpc.content_id = rcc.content_id ");
sql.append(" INNER JOIN m_category AS mc "); sql.append(" INNER JOIN m_category AS mc ");
sql.append(" ON rcc.category_relation_id = mc.category_relation_id "); sql.append(" ON rcc.category_relation_id = mc.category_relation_id ");
sql.append(" WHERE rpc.project_id = ? "); sql.append(" WHERE rpc.operation_id = ? ");
sql.append(" AND rpc.project_content_flg = 0"); sql.append(" AND rpc.operation_content_flg = 0");
sql.append(" ORDER BY mc.category_id, tc.content_id DESC "); sql.append(" ORDER BY mc.category_id, tc.content_id DESC ");
return rawQueryGetDtoList(sql.toString(), new String[]{"" + operationId}, ContentDto.class); return rawQueryGetDtoList(sql.toString(), new String[]{"" + operationId}, ContentDto.class);
} }
public boolean isOperationRelatedContent(long contentId, long operationId) { public boolean isOperationRelatedContent(long contentId, long operationId) {
return rawQueryGetInt("select count(tc.content_id) from t_content as tc inner join r_project_content as rpc on tc.content_id = rpc.content_id where rpc.project_id = ? and rpc.project_content_flg = 0 and tc.content_id = ?", new String[]{"" + operationId, "" + contentId}) > 0; return rawQueryGetInt("select count(tc.content_id) from t_content as tc inner join r_operation_content as rpc on tc.content_id = rpc.content_id where rpc.operation_id = ? and rpc.operation_content_flg = 0 and tc.content_id = ?", new String[]{"" + operationId, "" + contentId}) > 0;
} }
public List<ContentDto> getCommonContent() { public List<ContentDto> getCommonContent() {
......
...@@ -72,7 +72,7 @@ public class MemberInfoDao extends AbstractDao { ...@@ -72,7 +72,7 @@ public class MemberInfoDao extends AbstractDao {
if (column != -1) { if (column != -1) {
dto.lastUpdateInfor = cursor.getString(column); dto.lastUpdateInfor = cursor.getString(column);
} }
column = cursor.getColumnIndex("project_auth_level"); column = cursor.getColumnIndex("operation_auth_level");
if (column != -1) { if (column != -1) {
dto.operationAuthLevel = cursor.getInt(column); dto.operationAuthLevel = cursor.getInt(column);
} }
...@@ -108,11 +108,11 @@ public class MemberInfoDao extends AbstractDao { ...@@ -108,11 +108,11 @@ public class MemberInfoDao extends AbstractDao {
} }
public void insertMemberInfo(MemberInfoDto dto) { public void insertMemberInfo(MemberInfoDto dto) {
insert("insert into m_member_info (login_id, password, member_name, sid, login_status, invalid_password_count, last_login_date, last_change_password_date, last_cms_access_date, user_id, last_update_infor, project_auth_level, worker_code) values (?,?,?,?,?,?,?,?,?,?,?,?,?)", dto.getInsertValues()); insert("insert into m_member_info (login_id, password, member_name, sid, login_status, invalid_password_count, last_login_date, last_change_password_date, last_cms_access_date, user_id, last_update_infor, operation_auth_level, worker_code) values (?,?,?,?,?,?,?,?,?,?,?,?,?)", dto.getInsertValues());
} }
public boolean updateMemberInfo(MemberInfoDto dto) { public boolean updateMemberInfo(MemberInfoDto dto) {
long count = update("update m_member_info set password=?, member_name=?, sid=?, login_status=?, invalid_password_count=?, last_login_date=?, last_change_password_date=?, last_cms_access_date=?, last_update_infor = ?, project_auth_level = ?, worker_code = ? where login_id=?", dto.getUpdateValues()); long count = update("update m_member_info set password=?, member_name=?, sid=?, login_status=?, invalid_password_count=?, last_login_date=?, last_change_password_date=?, last_cms_access_date=?, last_update_infor = ?, operation_auth_level = ?, worker_code = ? where login_id=?", dto.getUpdateValues());
return count > 0; return count > 0;
} }
......
...@@ -23,7 +23,7 @@ public class OperationContentDao extends AbstractDao { ...@@ -23,7 +23,7 @@ public class OperationContentDao extends AbstractDao {
public OperationContentDto convert(Cursor cursor) { public OperationContentDto convert(Cursor cursor) {
OperationContentDto dto = new OperationContentDto(); OperationContentDto dto = new OperationContentDto();
int colnum = cursor.getColumnIndex("project_id"); int colnum = cursor.getColumnIndex("operation_id");
if (colnum != -1) { if (colnum != -1) {
dto.operationId = cursor.getLong(colnum); dto.operationId = cursor.getLong(colnum);
} }
...@@ -31,7 +31,7 @@ public class OperationContentDao extends AbstractDao { ...@@ -31,7 +31,7 @@ public class OperationContentDao extends AbstractDao {
if (colnum != -1) { if (colnum != -1) {
dto.contentId = cursor.getLong(colnum); dto.contentId = cursor.getLong(colnum);
} }
colnum = cursor.getColumnIndex("project_content_flg"); colnum = cursor.getColumnIndex("operation_content_flg");
if (colnum != -1) { if (colnum != -1) {
dto.operationContentFlg = toBool(cursor.getInt(colnum)); dto.operationContentFlg = toBool(cursor.getInt(colnum));
} }
...@@ -39,19 +39,19 @@ public class OperationContentDao extends AbstractDao { ...@@ -39,19 +39,19 @@ public class OperationContentDao extends AbstractDao {
return dto; return dto;
} }
public List<OperationContentDto> getOperationContent(Long operationId) { public List<OperationContentDto> getOperationContent(Long operationId) {
return rawQueryGetDtoList("select * from r_project_content where project_id=?", new String[]{""+ operationId}, OperationContentDto.class); return rawQueryGetDtoList("select * from r_operation_content where operation_id=?", new String[]{""+ operationId}, OperationContentDto.class);
} }
public OperationContentDto getOperationMainContent(Long operationId) { public OperationContentDto getOperationMainContent(Long operationId) {
return rawQueryGetDto("select * from r_project_content where project_content_flg = 1 AND project_id=?", new String[]{""+ operationId}, OperationContentDto.class); return rawQueryGetDto("select * from r_operation_content where operation_content_flg = 1 AND operation_id=?", new String[]{""+ operationId}, OperationContentDto.class);
} }
public List<ContentDto> getOperationRelatedContent(Long operationId) { public List<ContentDto> getOperationRelatedContent(Long operationId) {
return rawQueryGetDtoList("select * from r_project_content where project_content_flg = 0 AND project_id=?", new String[]{""+ operationId}, ContentDto.class); return rawQueryGetDtoList("select * from r_operation_content where operation_content_flg = 0 AND operation_id=?", new String[]{""+ operationId}, ContentDto.class);
} }
public OperationContentDto getOperationContentForContentId(Long contentId) { public OperationContentDto getOperationContentForContentId(Long contentId) {
return rawQueryGetDto("select * from r_project_content where project_content_flg = 1 AND content_id=?", new String[]{""+ contentId}, OperationContentDto.class); return rawQueryGetDto("select * from r_operation_content where operation_content_flg = 1 AND content_id=?", new String[]{""+ contentId}, OperationContentDto.class);
} }
public boolean isExistMainOperationContent(Long operationId) { public boolean isExistMainOperationContent(Long operationId) {
...@@ -59,24 +59,24 @@ public class OperationContentDao extends AbstractDao { ...@@ -59,24 +59,24 @@ public class OperationContentDao extends AbstractDao {
} }
public List<Long> getContentIds(Long operationId) { public List<Long> getContentIds(Long operationId) {
return rawQueryGetLongList("select content_id from r_project_content where project_id=?", new String[]{""+ operationId}); return rawQueryGetLongList("select content_id from r_operation_content where operation_id=?", new String[]{""+ operationId});
} }
public boolean insertOperationContent(OperationContentDto dto) { public boolean insertOperationContent(OperationContentDto dto) {
StringBuffer sql = new StringBuffer(); StringBuffer sql = new StringBuffer();
sql.append(" INSERT OR IGNORE INTO r_project_content "); sql.append(" INSERT OR IGNORE INTO r_operation_content ");
sql.append(" SELECT " + dto.operationId); sql.append(" SELECT " + dto.operationId);
sql.append(" , " + dto.contentId); sql.append(" , " + dto.contentId);
sql.append(" , " + (dto.operationContentFlg ? 1 : 0)); sql.append(" , " + (dto.operationContentFlg ? 1 : 0));
sql.append(" FROM t_content AS tc "); sql.append(" FROM t_content AS tc ");
sql.append(" LEFT OUTER JOIN r_project_content AS rpc "); sql.append(" LEFT OUTER JOIN r_operation_content AS rpc ");
sql.append(" ON rpc.project_id = ? "); sql.append(" ON rpc.operation_id = ? ");
sql.append(" AND rpc.project_content_flg = " + (dto.operationContentFlg ? 1 : 0)); sql.append(" AND rpc.operation_content_flg = " + (dto.operationContentFlg ? 1 : 0));
sql.append(" AND tc.content_id <> rpc.content_id "); sql.append(" AND tc.content_id <> rpc.content_id ");
sql.append(" WHERE tc.content_id = ? "); sql.append(" WHERE tc.content_id = ? ");
sql.append(" GROUP BY rpc.project_id "); sql.append(" GROUP BY rpc.operation_id ");
SQLiteStatement stmt = null; SQLiteStatement stmt = null;
...@@ -101,6 +101,6 @@ public class OperationContentDao extends AbstractDao { ...@@ -101,6 +101,6 @@ public class OperationContentDao extends AbstractDao {
* @param contentId * @param contentId
*/ */
public void deleteOperationContent(Long operationId, Long contentId) { public void deleteOperationContent(Long operationId, Long contentId) {
delete("r_project_content", "project_id=? and content_id=?", new String[] { ""+operationId, "" + contentId }); delete("r_operation_content", "operation_id=? and content_id=?", new String[] { ""+operationId, "" + contentId });
} }
} }
...@@ -22,28 +22,28 @@ public class OperationDao extends AbstractDao { ...@@ -22,28 +22,28 @@ public class OperationDao extends AbstractDao {
protected OperationDto convert(Cursor cursor) { protected OperationDto convert(Cursor cursor) {
OperationDto dto = new OperationDto(); OperationDto dto = new OperationDto();
int column = cursor.getColumnIndex("project_id"); int column = cursor.getColumnIndex("operation_id");
if (column != -1) { if (column != -1) {
dto.operationId = cursor.getLong(column); dto.operationId = cursor.getLong(column);
} }
column = cursor.getColumnIndex("project_name"); column = cursor.getColumnIndex("operation_name");
if (column != -1) { if (column != -1) {
dto.operationName = cursor.getString(column); dto.operationName = cursor.getString(column);
} }
column = cursor.getColumnIndex("project_descriptions"); column = cursor.getColumnIndex("operation_descriptions");
if (column != -1) { if (column != -1) {
dto.operationDescriptions = cursor.getString(column); dto.operationDescriptions = cursor.getString(column);
} }
column = cursor.getColumnIndex("project_start_date"); column = cursor.getColumnIndex("operation_start_date");
if (column != -1) { if (column != -1) {
dto.operationStartDate = DateTimeUtil.toDate(cursor.getString(column), "UTC", DateTimeFormat.yyyyMMdd_hyphen); dto.operationStartDate = DateTimeUtil.toDate(cursor.getString(column), "UTC", DateTimeFormat.yyyyMMdd_hyphen);
} }
column = cursor.getColumnIndex("project_end_date"); column = cursor.getColumnIndex("operation_end_date");
if (column != -1) { if (column != -1) {
dto.operationEndDate = DateTimeUtil.toDate(cursor.getString(column), "UTC", DateTimeFormat.yyyyMMdd_hyphen); dto.operationEndDate = DateTimeUtil.toDate(cursor.getString(column), "UTC", DateTimeFormat.yyyyMMdd_hyphen);
} }
column = cursor.getColumnIndex("project_type"); column = cursor.getColumnIndex("operation_type");
if (column != -1) { if (column != -1) {
dto.operationType = cursor.getInt(column); dto.operationType = cursor.getInt(column);
} }
...@@ -74,7 +74,7 @@ public class OperationDao extends AbstractDao { ...@@ -74,7 +74,7 @@ public class OperationDao extends AbstractDao {
dto.reportUpdateType = cursor.getInt(column); dto.reportUpdateType = cursor.getInt(column);
} }
column = cursor.getColumnIndex("project_report_type"); column = cursor.getColumnIndex("operation_report_type");
if (column != -1) { if (column != -1) {
dto.operationReportType = cursor.getInt(column); dto.operationReportType = cursor.getInt(column);
} }
...@@ -103,11 +103,11 @@ public class OperationDao extends AbstractDao { ...@@ -103,11 +103,11 @@ public class OperationDao extends AbstractDao {
} }
public List<OperationDto> getAllOperation() { public List<OperationDto> getAllOperation() {
return rawQueryGetDtoList("select tp.*, rpc.content_id from t_project AS tp left outer join r_project_content AS rpc on tp.project_id = rpc.project_id", null, OperationDto.class); return rawQueryGetDtoList("select tp.*, rpc.content_id from t_project AS tp left outer join r_operation_content AS rpc on tp.operation_id = rpc.operation_id", null, OperationDto.class);
} }
public List<OperationDto> getLatestOperations() { public List<OperationDto> getLatestOperations() {
return rawQueryGetDtoList("select * from t_project where project_start_date <= ? order by project_start_date DESC " , new String[]{DateTimeUtil.toStringInTimeZone(DateTimeUtil.getCurrentDate(), DateTimeFormat.yyyyMMddHHmmss_hyphen, "GMT")}, OperationDto.class); return rawQueryGetDtoList("select * from t_project where operation_start_date <= ? order by operation_start_date DESC " , new String[]{DateTimeUtil.toStringInTimeZone(DateTimeUtil.getCurrentDate(), DateTimeFormat.yyyyMMddHHmmss_hyphen, "GMT")}, OperationDto.class);
} }
public OperationDto getOperation(long operationId) { public OperationDto getOperation(long operationId) {
...@@ -115,7 +115,7 @@ public class OperationDao extends AbstractDao { ...@@ -115,7 +115,7 @@ public class OperationDao extends AbstractDao {
String[] args = new String[] { "" + operationId }; String[] args = new String[] { "" + operationId };
sql.append(" SELECT * "); sql.append(" SELECT * ");
sql.append(" FROM t_project "); sql.append(" FROM t_project ");
sql.append(" WHERE project_id = ?"); sql.append(" WHERE operation_id = ?");
return rawQueryGetDto(sql.toString(), args, OperationDto.class); return rawQueryGetDto(sql.toString(), args, OperationDto.class);
} }
...@@ -124,10 +124,10 @@ public class OperationDao extends AbstractDao { ...@@ -124,10 +124,10 @@ public class OperationDao extends AbstractDao {
String[] args = new String[] { "" + operationId }; String[] args = new String[] { "" + operationId };
sql.append(" SELECT * "); sql.append(" SELECT * ");
sql.append(" FROM t_project AS tp "); sql.append(" FROM t_project AS tp ");
sql.append(" LEFT OUTER JOIN r_project_content AS rpc "); sql.append(" LEFT OUTER JOIN r_operation_content AS rpc ");
sql.append(" ON tp.project_id = rpc.project_id "); sql.append(" ON tp.operation_id = rpc.operation_id ");
sql.append(" AND rpc.project_content_flg = 1 "); sql.append(" AND rpc.operation_content_flg = 1 ");
sql.append(" WHERE tp.project_id = ?"); sql.append(" WHERE tp.operation_id = ?");
return rawQueryGetDto(sql.toString(), args, OperationDto.class); return rawQueryGetDto(sql.toString(), args, OperationDto.class);
} }
...@@ -136,10 +136,10 @@ public class OperationDao extends AbstractDao { ...@@ -136,10 +136,10 @@ public class OperationDao extends AbstractDao {
String[] args = new String[] { "" + contentId }; String[] args = new String[] { "" + contentId };
sql.append(" SELECT * "); sql.append(" SELECT * ");
sql.append(" FROM t_project AS tp "); sql.append(" FROM t_project AS tp ");
sql.append(" LEFT OUTER JOIN r_project_content AS rpc "); sql.append(" LEFT OUTER JOIN r_operation_content AS rpc ");
sql.append(" ON tp.project_id = rpc.project_id "); sql.append(" ON tp.operation_id = rpc.operation_id ");
sql.append(" AND rpc.project_content_flg = 1 "); sql.append(" AND rpc.operation_content_flg = 1 ");
sql.append(" WHERE tp.project_id = ?"); sql.append(" WHERE tp.operation_id = ?");
return rawQueryGetDto(sql.toString(), args, OperationDto.class); return rawQueryGetDto(sql.toString(), args, OperationDto.class);
} }
...@@ -154,18 +154,18 @@ public class OperationDao extends AbstractDao { ...@@ -154,18 +154,18 @@ public class OperationDao extends AbstractDao {
public void insert(OperationDto dto) { public void insert(OperationDto dto) {
insert("insert into t_project " insert("insert into t_project "
+ "(project_id, " + "(operation_id, "
+ "project_name, " + "operation_name, "
+ "project_descriptions, " + "operation_descriptions, "
+ "project_start_date, " + "operation_start_date, "
+ "project_end_date, " + "operation_end_date, "
+ "project_type, " + "operation_type, "
+ "last_edit_date, " + "last_edit_date, "
+ "content_creating_flg, " + "content_creating_flg, "
+ "edit_lock_flg, " + "edit_lock_flg, "
+ "need_sync_flg, " + "need_sync_flg, "
+ "report_update_type, " + "report_update_type, "
+ "project_report_type, " + "operation_report_type, "
+ "report_cycle, " + "report_cycle, "
+ "enable_report_update) " + "enable_report_update) "
+ "values " + "values "
...@@ -176,36 +176,39 @@ public class OperationDao extends AbstractDao { ...@@ -176,36 +176,39 @@ public class OperationDao extends AbstractDao {
public boolean update(OperationDto dto) { public boolean update(OperationDto dto) {
long count = update("update t_project " long count = update("update t_project "
+ "set " + "set "
+ "project_name=?, " + "operation_name=?, "
+ "project_descriptions=?, " + "operation_descriptions=?, "
+ "project_start_date=?, " + "operation_start_date=?, "
+ "project_end_date=?, " + "operation_end_date=?, "
+ "project_type=?, " + "operation_type=?, "
+ "last_edit_date=?, " + "last_edit_date=?, "
+ "content_creating_flg=?, " + "content_creating_flg=?, "
+ "edit_lock_flg=?, " + "edit_lock_flg=?, "
+ "need_sync_flg=?, " + "need_sync_flg=?, "
+ "report_update_type=?, " + "report_update_type=?, "
+ "project_report_type=?, " + "operation_report_type=?, "
+ "report_cycle=?, " + "report_cycle=?, "
+ "enable_report_update=? " + "enable_report_update=? "
+ "where project_id=?", + "where operation_id=?",
dto.getUpdateValues()); dto.getUpdateValues());
return count > 0; return count > 0;
} }
public void delete(OperationDto dto) { public void delete(OperationDto dto) {
delete("r_project_content", "project_id=?", dto.getKeyValues()); delete("r_operation_content", "operation_id=?", dto.getKeyValues());
delete("t_project", "project_id=?", dto.getKeyValues()); delete("t_project", "operation_id=?", dto.getKeyValues());
} }
public void deleteAll() { public void deleteAll() {
delete("t_push_message", null, null); delete("t_push_message", null, null);
delete("r_project_content", null, null); delete("r_operation_content", null, null);
delete("t_project", null, null); delete("t_project", null, null);
delete("t_task", null, null); delete("t_task", null, null);
// #32782 指示者テーブル関連削除 start
// TODO delete
delete("t_task_directions", null, null); delete("t_task_directions", null, null);
delete("t_task_directions_items", null, null); delete("t_task_directions_items", null, null);
// #32782 指示者テーブル関連削除 end
delete("t_task_report", null, null); delete("t_task_report", null, null);
delete("t_task_report_send", null, null); delete("t_task_report_send", null, null);
delete("t_task_report_items", null, null); delete("t_task_report_items", null, null);
...@@ -223,22 +226,22 @@ public class OperationDao extends AbstractDao { ...@@ -223,22 +226,22 @@ public class OperationDao extends AbstractDao {
StringBuffer sql = new StringBuffer(); StringBuffer sql = new StringBuffer();
sql.append(" SELECT tp.project_id, "); sql.append(" SELECT tp.operation_id, ");
sql.append(" tp.project_name, "); sql.append(" tp.operation_name, ");
sql.append(" tp.project_type, "); sql.append(" tp.operation_type, ");
sql.append(" tp.project_descriptions, "); sql.append(" tp.operation_descriptions, ");
sql.append(" tp.project_start_date, "); sql.append(" tp.operation_start_date, ");
sql.append(" tp.project_end_date, "); sql.append(" tp.operation_end_date, ");
sql.append(" tp.last_edit_date, "); sql.append(" tp.last_edit_date, ");
sql.append(" tp.edit_lock_flg, "); sql.append(" tp.edit_lock_flg, ");
sql.append(" tp.need_sync_flg, "); sql.append(" tp.need_sync_flg, ");
sql.append(" tp.content_creating_flg, "); sql.append(" tp.content_creating_flg, ");
sql.append(" tp.report_update_type, "); sql.append(" tp.report_update_type, ");
sql.append(" tp.project_report_type, "); sql.append(" tp.operation_report_type, ");
sql.append(" tp.report_cycle, "); sql.append(" tp.report_cycle, ");
sql.append(" tp.enable_report_update, "); sql.append(" tp.enable_report_update, ");
sql.append(" CASE "); sql.append(" CASE ");
sql.append(" WHEN project_report_type = 1 THEN ( "); sql.append(" WHEN operation_report_type = 1 THEN ( ");
sql.append(" SELECT strftime('%Y/%m/%d %H:%M', datetime(ti.report_start_date, 'localtime')) || ' ~ ' || strftime('%Y/%m/%d %H:%M', datetime(ti.report_end_date, 'localtime')) "); sql.append(" SELECT strftime('%Y/%m/%d %H:%M', datetime(ti.report_start_date, 'localtime')) || ' ~ ' || strftime('%Y/%m/%d %H:%M', datetime(ti.report_end_date, 'localtime')) ");
sql.append(" FROM t_task tt "); sql.append(" FROM t_task tt ");
sql.append(" INNER JOIN t_inspect_task_report ti "); sql.append(" INNER JOIN t_inspect_task_report ti ");
...@@ -246,42 +249,42 @@ public class OperationDao extends AbstractDao { ...@@ -246,42 +249,42 @@ public class OperationDao extends AbstractDao {
sql.append(" AND tt.del_flg = 0 "); sql.append(" AND tt.del_flg = 0 ");
//sql.append(" AND datetime(ti.report_start_date) <= datetime('" + curDate + "') "); //sql.append(" AND datetime(ti.report_start_date) <= datetime('" + curDate + "') ");
sql.append(" AND datetime(ti.report_end_date) >= datetime('" + curDate + "') "); sql.append(" AND datetime(ti.report_end_date) >= datetime('" + curDate + "') ");
sql.append(" WHERE tt.project_id = tp.project_id "); sql.append(" WHERE tt.operation_id = tp.operation_id ");
sql.append(" ORDER BY ti.report_start_date ASC LIMIT 1 ) "); sql.append(" ORDER BY ti.report_start_date ASC LIMIT 1 ) ");
sql.append(" ELSE '' "); sql.append(" ELSE '' ");
sql.append(" END AS report_period, "); sql.append(" END AS report_period, ");
sql.append(" CASE "); sql.append(" CASE ");
sql.append(" WHEN project_report_type = 1 THEN ( "); sql.append(" WHEN operation_report_type = 1 THEN ( ");
sql.append(" SELECT count(*) "); sql.append(" SELECT count(*) ");
sql.append(" FROM t_inspect_task_report "); sql.append(" FROM t_inspect_task_report ");
sql.append(" WHERE task_key = (SELECT task_key FROM t_task WHERE project_id = tp.project_id LIMIT 1) ) "); sql.append(" WHERE task_key = (SELECT task_key FROM t_task WHERE operation_id = tp.operation_id LIMIT 1) ) ");
sql.append(" ELSE 0 "); sql.append(" ELSE 0 ");
sql.append(" END AS report_count, "); sql.append(" END AS report_count, ");
sql.append(" rpc.content_id "); sql.append(" rpc.content_id ");
sql.append(" FROM t_project AS tp "); sql.append(" FROM t_project AS tp ");
sql.append(" LEFT OUTER JOIN r_project_content AS rpc "); sql.append(" LEFT OUTER JOIN r_operation_content AS rpc ");
sql.append(" ON tp.project_id = rpc.project_id "); sql.append(" ON tp.operation_id = rpc.operation_id ");
sql.append(" AND rpc.project_content_flg = 1 "); sql.append(" AND rpc.operation_content_flg = 1 ");
sql.append(" WHERE tp.project_id IS NOT NULL "); sql.append(" WHERE tp.operation_id IS NOT NULL ");
if (!StringUtil.isNullOrEmpty(searchOperationName)) { if (!StringUtil.isNullOrEmpty(searchOperationName)) {
sql.append(" AND tp.project_name GLOB " + "'*" + searchOperationName + "*'"); sql.append(" AND tp.operation_name GLOB " + "'*" + searchOperationName + "*'");
} }
if (!StringUtil.isNullOrEmpty(searchStartDateStr)) { if (!StringUtil.isNullOrEmpty(searchStartDateStr)) {
Date startDate = DateTimeUtil.toDate(searchStartDateStr, "UTC", DateTimeFormat.yyyyMMdd_hyphen); Date startDate = DateTimeUtil.toDate(searchStartDateStr, "UTC", DateTimeFormat.yyyyMMdd_hyphen);
sql.append(" AND tp.project_end_date >= '" + DateTimeUtil.toString(startDate, DateTimeFormat.yyyyMMdd_hyphen) + "'"); sql.append(" AND tp.operation_end_date >= '" + DateTimeUtil.toString(startDate, DateTimeFormat.yyyyMMdd_hyphen) + "'");
} }
if (!StringUtil.isNullOrEmpty(searchEndDateStr)) { if (!StringUtil.isNullOrEmpty(searchEndDateStr)) {
Date endDate = DateTimeUtil.toDate(searchEndDateStr, "UTC", DateTimeFormat.yyyyMMdd_hyphen); Date endDate = DateTimeUtil.toDate(searchEndDateStr, "UTC", DateTimeFormat.yyyyMMdd_hyphen);
sql.append(" AND tp.project_start_date <= '" + DateTimeUtil.toString(endDate, DateTimeFormat.yyyyMMdd_hyphen) + "'"); sql.append(" AND tp.operation_start_date <= '" + DateTimeUtil.toString(endDate, DateTimeFormat.yyyyMMdd_hyphen) + "'");
} }
if (operationReportType > -1) { if (operationReportType > -1) {
sql.append(" AND tp.project_report_type = " + operationReportType); sql.append(" AND tp.operation_report_type = " + operationReportType);
} }
sql.append(" ORDER BY tp.project_report_type DESC, tp.project_start_date DESC, tp.project_id DESC"); sql.append(" ORDER BY tp.operation_report_type DESC, tp.operation_start_date DESC, tp.operation_id DESC");
Logger.v(TAG, "sql=%s", sql); Logger.v(TAG, "sql=%s", sql);
......
...@@ -24,7 +24,7 @@ public class PushMessageDao extends AbstractDao { ...@@ -24,7 +24,7 @@ public class PushMessageDao extends AbstractDao {
dto.pushMessageId = cursor.getLong(column); dto.pushMessageId = cursor.getLong(column);
} }
column = cursor.getColumnIndex("project_id"); column = cursor.getColumnIndex("operation_id");
if (column != -1) { if (column != -1) {
dto.operationId = cursor.getLong(column); dto.operationId = cursor.getLong(column);
} }
...@@ -46,7 +46,7 @@ public class PushMessageDao extends AbstractDao { ...@@ -46,7 +46,7 @@ public class PushMessageDao extends AbstractDao {
if (column != -1) { if (column != -1) {
dto.readingFlg = toBool(cursor.getInt(column)); dto.readingFlg = toBool(cursor.getInt(column));
} }
column = cursor.getColumnIndex("project_name"); column = cursor.getColumnIndex("operation_name");
if (column != -1) { if (column != -1) {
dto.operationName = cursor.getString(column); dto.operationName = cursor.getString(column);
} }
...@@ -55,7 +55,7 @@ public class PushMessageDao extends AbstractDao { ...@@ -55,7 +55,7 @@ public class PushMessageDao extends AbstractDao {
public void insert(PushMessageDto dto) { public void insert(PushMessageDto dto) {
StringBuffer sql = new StringBuffer(); StringBuffer sql = new StringBuffer();
sql.append(" INSERT OR IGNORE INTO t_push_message "); sql.append(" INSERT OR IGNORE INTO t_push_message ");
sql.append(" (push_message_id, project_id, push_send_login_id, push_send_date, push_message, reading_flg) "); sql.append(" (push_message_id, operation_id, push_send_login_id, push_send_date, push_message, reading_flg) ");
sql.append(" VALUES (?,?,?,?,?,?) "); sql.append(" VALUES (?,?,?,?,?,?) ");
try { try {
beginTransaction(); beginTransaction();
...@@ -89,15 +89,15 @@ public class PushMessageDao extends AbstractDao { ...@@ -89,15 +89,15 @@ public class PushMessageDao extends AbstractDao {
} }
public void delete(long operationId) { public void delete(long operationId) {
String[] args = new String[] { "" + operationId }; String[] args = new String[] { "" + operationId };
delete("t_push_message", "project_id=?", args); delete("t_push_message", "operation_id=?", args);
} }
public List<PushMessageDto> selectAll() { public List<PushMessageDto> selectAll() {
StringBuffer sql = new StringBuffer(); StringBuffer sql = new StringBuffer();
sql.append(" SELECT tpm.push_message_id, tpm.project_id, tpm.push_send_login_id, tpm.push_send_date, tpm.push_message, tpm.reading_flg, tp.project_name "); sql.append(" SELECT tpm.push_message_id, tpm.operation_id, tpm.push_send_login_id, tpm.push_send_date, tpm.push_message, tpm.reading_flg, tp.operation_name ");
sql.append(" FROM t_push_message AS tpm "); sql.append(" FROM t_push_message AS tpm ");
sql.append(" INNER JOIN t_project AS tp "); sql.append(" INNER JOIN t_project AS tp ");
sql.append(" ON tpm.project_id = tp.project_id "); sql.append(" ON tpm.operation_id = tp.operation_id ");
sql.append(" ORDER BY tpm.push_message_id DESC "); sql.append(" ORDER BY tpm.push_message_id DESC ");
Logger.v(TAG, "sql=%s", sql); Logger.v(TAG, "sql=%s", sql);
return rawQueryGetDtoList(sql.toString(), null, PushMessageDto.class); return rawQueryGetDtoList(sql.toString(), null, PushMessageDto.class);
...@@ -106,10 +106,10 @@ public class PushMessageDao extends AbstractDao { ...@@ -106,10 +106,10 @@ public class PushMessageDao extends AbstractDao {
public PushMessageDto select(long pushMessageId) { public PushMessageDto select(long pushMessageId) {
String[] args = new String[] { "" + pushMessageId }; String[] args = new String[] { "" + pushMessageId };
StringBuffer sql = new StringBuffer(); StringBuffer sql = new StringBuffer();
sql.append(" SELECT tpm.push_message_id, tpm.project_id, tpm.push_send_login_id, tpm.push_send_date, tpm.push_message, tpm.reading_flg, tp.project_name "); sql.append(" SELECT tpm.push_message_id, tpm.operation_id, tpm.push_send_login_id, tpm.push_send_date, tpm.push_message, tpm.reading_flg, tp.operation_name ");
sql.append(" FROM t_push_message AS tpm "); sql.append(" FROM t_push_message AS tpm ");
sql.append(" INNER JOIN t_project AS tp "); sql.append(" INNER JOIN t_project AS tp ");
sql.append(" ON tpm.project_id = tp.project_id "); sql.append(" ON tpm.operation_id = tp.operation_id ");
sql.append(" WHERE tpm.push_message_id = ? "); sql.append(" WHERE tpm.push_message_id = ? ");
Logger.v(TAG, "sql=%s", sql); Logger.v(TAG, "sql=%s", sql);
return rawQueryGetDto(sql.toString(), args, PushMessageDto.class); return rawQueryGetDto(sql.toString(), args, PushMessageDto.class);
......
...@@ -136,7 +136,7 @@ public class RoutineTaskReportDao extends AbstractDao { ...@@ -136,7 +136,7 @@ public class RoutineTaskReportDao extends AbstractDao {
sb.append(" inner join "); sb.append(" inner join ");
sb.append(" t_task tt "); sb.append(" t_task tt ");
sb.append(" ON tr.task_key == tt.task_key"); sb.append(" ON tr.task_key == tt.task_key");
sb.append(" WHERE tt.project_id = ? ORDER BY tr.report_start_date DESC LIMIT 1"); sb.append(" WHERE tt.operation_id = ? ORDER BY tr.report_start_date DESC LIMIT 1");
List<RoutineTaskReportDto> dtoList = rawQueryGetDtoList(sb.toString(), new String[]{ "" + operationId }, RoutineTaskReportDto.class); List<RoutineTaskReportDto> dtoList = rawQueryGetDtoList(sb.toString(), new String[]{ "" + operationId }, RoutineTaskReportDto.class);
if (dtoList != null && dtoList.size() > 0) { if (dtoList != null && dtoList.size() > 0) {
...@@ -164,7 +164,7 @@ public class RoutineTaskReportDao extends AbstractDao { ...@@ -164,7 +164,7 @@ public class RoutineTaskReportDao extends AbstractDao {
sb.append(" t_task tt "); sb.append(" t_task tt ");
sb.append(" ON tt.task_key == tr.task_key "); sb.append(" ON tt.task_key == tr.task_key ");
sb.append(" WHERE tt.del_flg = 0"); sb.append(" WHERE tt.del_flg = 0");
sb.append(" AND tt.project_id = ?"); sb.append(" AND tt.operation_id = ?");
sb.append(" ORDER BY task_report_id ASC, report_start_date ASC"); sb.append(" ORDER BY task_report_id ASC, report_start_date ASC");
return rawQueryGetDtoList(sb.toString(), new String[]{"" + operationId}, RoutineTaskReportDto.class); return rawQueryGetDtoList(sb.toString(), new String[]{"" + operationId}, RoutineTaskReportDto.class);
} }
...@@ -177,7 +177,7 @@ public class RoutineTaskReportDao extends AbstractDao { ...@@ -177,7 +177,7 @@ public class RoutineTaskReportDao extends AbstractDao {
sb.append(" t_task tt "); sb.append(" t_task tt ");
sb.append(" ON tr.task_key == tt.task_key"); sb.append(" ON tr.task_key == tt.task_key");
sb.append(" WHERE tr.data_send_flag = 1"); sb.append(" WHERE tr.data_send_flag = 1");
sb.append(" AND tt.project_id = ?"); sb.append(" AND tt.operation_id = ?");
return rawQueryGetDtoList(sb.toString(), new String[]{ "" + operationId }, RoutineTaskReportDto.class); return rawQueryGetDtoList(sb.toString(), new String[]{ "" + operationId }, RoutineTaskReportDto.class);
} }
...@@ -189,7 +189,7 @@ public class RoutineTaskReportDao extends AbstractDao { ...@@ -189,7 +189,7 @@ public class RoutineTaskReportDao extends AbstractDao {
sb.append(" t_task tt "); sb.append(" t_task tt ");
sb.append(" ON tr.task_key == tt.task_key"); sb.append(" ON tr.task_key == tt.task_key");
sb.append(" WHERE tr.data_send_flag = 1"); sb.append(" WHERE tr.data_send_flag = 1");
sb.append(" AND tt.project_id = ?"); sb.append(" AND tt.operation_id = ?");
sb.append(" AND tt.task_key = ?"); sb.append(" AND tt.task_key = ?");
return rawQueryGetDtoList(sb.toString(), new String[]{ "" + operationId, "" + taskKey }, RoutineTaskReportDto.class); return rawQueryGetDtoList(sb.toString(), new String[]{ "" + operationId, "" + taskKey }, RoutineTaskReportDto.class);
} }
...@@ -205,7 +205,7 @@ public class RoutineTaskReportDao extends AbstractDao { ...@@ -205,7 +205,7 @@ public class RoutineTaskReportDao extends AbstractDao {
sb.append(" from t_inspect_task_report tr "); sb.append(" from t_inspect_task_report tr ");
sb.append(" inner join t_task tt ON tt.task_key == tr.task_key "); sb.append(" inner join t_task tt ON tt.task_key == tr.task_key ");
sb.append(" WHERE tt.del_flg = 0 "); sb.append(" WHERE tt.del_flg = 0 ");
sb.append(" AND tt.project_id = ? "); sb.append(" AND tt.operation_id = ? ");
sb.append(" AND datetime(report_end_date) >= datetime(?, 'utc') "); sb.append(" AND datetime(report_end_date) >= datetime(?, 'utc') ");
return rawQueryGetInt(sb.toString(), new String[]{ "" + operationId, currDate }) > 0; return rawQueryGetInt(sb.toString(), new String[]{ "" + operationId, currDate }) > 0;
} }
......
...@@ -28,7 +28,7 @@ public class TaskDao extends AbstractDao { ...@@ -28,7 +28,7 @@ public class TaskDao extends AbstractDao {
if (column != -1) { if (column != -1) {
dto.taskId = cursor.getLong(column); dto.taskId = cursor.getLong(column);
} }
column = cursor.getColumnIndex("project_id"); column = cursor.getColumnIndex("operation_id");
if (column != -1) { if (column != -1) {
dto.operationId = cursor.getLong(column); dto.operationId = cursor.getLong(column);
} }
...@@ -52,11 +52,11 @@ public class TaskDao extends AbstractDao { ...@@ -52,11 +52,11 @@ public class TaskDao extends AbstractDao {
} }
public List<TaskDto> selectTaskByOperationId(Long operationId) { public List<TaskDto> selectTaskByOperationId(Long operationId) {
return rawQueryGetDtoList("select * from t_task where project_id = ? and del_flg = 0 ", new String[]{"" + operationId}, TaskDto.class); return rawQueryGetDtoList("select * from t_task where operation_id = ? and del_flg = 0 ", new String[]{"" + operationId}, TaskDto.class);
} }
public List<TaskDto> selectAllTaskByOperationId(Long operationId) { public List<TaskDto> selectAllTaskByOperationId(Long operationId) {
return rawQueryGetDtoList("select * from t_task where project_id = ? ", new String[]{"" + operationId}, TaskDto.class); return rawQueryGetDtoList("select * from t_task where operation_id = ? ", new String[]{"" + operationId}, TaskDto.class);
} }
public TaskDto getTaskByTaskKey(String taskKey) { public TaskDto getTaskByTaskKey(String taskKey) {
...@@ -67,7 +67,7 @@ public class TaskDao extends AbstractDao { ...@@ -67,7 +67,7 @@ public class TaskDao extends AbstractDao {
insert("insert into t_task " insert("insert into t_task "
+ "(task_key, " + "(task_key, "
+ "task_id, " + "task_id, "
+ "project_id, " + "operation_id, "
+ "task_code, " + "task_code, "
+ "task_status, " + "task_status, "
+ "task_hotspot_info) " + "task_hotspot_info) "
...@@ -80,7 +80,7 @@ public class TaskDao extends AbstractDao { ...@@ -80,7 +80,7 @@ public class TaskDao extends AbstractDao {
long count = update("update t_task " long count = update("update t_task "
+ "set " + "set "
+ "task_id=?, " + "task_id=?, "
+ "project_id=?, " + "operation_id=?, "
+ "task_code=?, " + "task_code=?, "
+ "task_status=?, " + "task_status=?, "
+ "task_hotspot_info=?, " + "task_hotspot_info=?, "
...@@ -100,8 +100,13 @@ public class TaskDao extends AbstractDao { ...@@ -100,8 +100,13 @@ public class TaskDao extends AbstractDao {
if (directionFlg) { if (directionFlg) {
delete("t_task", "task_key=?", keyValues); delete("t_task", "task_key=?", keyValues);
// #32782 指示者テーブル関連削除 start
// TODO delete
delete("t_task_directions", "task_key=?", keyValues); delete("t_task_directions", "task_key=?", keyValues);
delete("t_task_directions_items", "task_key=?", keyValues); delete("t_task_directions_items", "task_key=?", keyValues);
// #32782 指示者テーブル関連削除 end
delete("t_task_report", "task_key=?", keyValues);
delete("t_task_report_items", "task_key=?", keyValues);
} else { } else {
delete("t_task_report", "task_key=?", keyValues); delete("t_task_report", "task_key=?", keyValues);
delete("t_task_report_items", "task_key=?", keyValues); delete("t_task_report_items", "task_key=?", keyValues);
...@@ -114,8 +119,11 @@ public class TaskDao extends AbstractDao { ...@@ -114,8 +119,11 @@ public class TaskDao extends AbstractDao {
*/ */
public void delete(TaskDto dto) { public void delete(TaskDto dto) {
delete("t_task", "task_key=?", dto.getKeyValues()); delete("t_task", "task_key=?", dto.getKeyValues());
// #32782 指示者テーブル関連削除 start
// TODO delete
delete("t_task_directions", "task_key=?", dto.getKeyValues()); delete("t_task_directions", "task_key=?", dto.getKeyValues());
delete("t_task_directions_items", "task_key=?", dto.getKeyValues()); delete("t_task_directions_items", "task_key=?", dto.getKeyValues());
// #32782 指示者テーブル関連削除 end
delete("t_task_report", "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_items", "task_key=?", dto.getKeyValues());
delete("t_inspect_task_report", "task_key=?", new String[] { dto.taskKey }); delete("t_inspect_task_report", "task_key=?", new String[] { dto.taskKey });
......
...@@ -78,7 +78,7 @@ public class TaskDirectionsDao extends AbstractDao { ...@@ -78,7 +78,7 @@ public class TaskDirectionsDao extends AbstractDao {
sb.append(" t_task tt "); sb.append(" t_task tt ");
sb.append(" ON tt.task_key == ttd.task_key "); sb.append(" ON tt.task_key == ttd.task_key ");
sb.append(" WHERE tt.del_flg = 0"); sb.append(" WHERE tt.del_flg = 0");
sb.append(" AND tt.project_id = ?"); sb.append(" AND tt.operation_id = ?");
return rawQueryGetDtoList(sb.toString(), new String[]{"" + operationId}, TaskDirectionsDto.class); return rawQueryGetDtoList(sb.toString(), new String[]{"" + operationId}, TaskDirectionsDto.class);
} }
...@@ -115,7 +115,7 @@ public class TaskDirectionsDao extends AbstractDao { ...@@ -115,7 +115,7 @@ public class TaskDirectionsDao extends AbstractDao {
sb.append(" t_task tt "); sb.append(" t_task tt ");
sb.append(" ON tt.task_key == ttd.task_key "); sb.append(" ON tt.task_key == ttd.task_key ");
sb.append(" WHERE ttd.data_send_flg = 1"); sb.append(" WHERE ttd.data_send_flg = 1");
sb.append(" AND tt.project_id = ?"); sb.append(" AND tt.operation_id = ?");
return rawQueryGetDtoList(sb.toString(), new String[]{"" + operationId}, TaskDirectionsDto.class); return rawQueryGetDtoList(sb.toString(), new String[]{"" + operationId}, TaskDirectionsDto.class);
} }
...@@ -127,7 +127,7 @@ public class TaskDirectionsDao extends AbstractDao { ...@@ -127,7 +127,7 @@ public class TaskDirectionsDao extends AbstractDao {
sb.append(" t_task tt "); sb.append(" t_task tt ");
sb.append(" ON tt.task_key == ttd.task_key "); sb.append(" ON tt.task_key == ttd.task_key ");
sb.append(" WHERE ttd.data_send_flg = 1"); sb.append(" WHERE ttd.data_send_flg = 1");
sb.append(" AND tt.project_id = ?"); sb.append(" AND tt.operation_id = ?");
sb.append(" AND tt.task_key = ?"); sb.append(" AND tt.task_key = ?");
return rawQueryGetDtoList(sb.toString(), new String[]{"" + operationId, "" + taskKey}, TaskDirectionsDto.class); return rawQueryGetDtoList(sb.toString(), new String[]{"" + operationId, "" + taskKey}, TaskDirectionsDto.class);
} }
......
...@@ -50,7 +50,7 @@ public class TaskDirectionsItemsDao extends AbstractDao { ...@@ -50,7 +50,7 @@ public class TaskDirectionsItemsDao extends AbstractDao {
sb.append(" t_task tt "); sb.append(" t_task tt ");
sb.append(" ON tt.task_key == ttdi.task_key "); sb.append(" ON tt.task_key == ttdi.task_key ");
sb.append(" WHERE tt.del_flg = 0"); sb.append(" WHERE tt.del_flg = 0");
sb.append(" AND tt.project_id = ?"); sb.append(" AND tt.operation_id = ?");
return rawQueryGetDtoList(sb.toString(), new String[]{"" + operationId}, TaskDirectionsItemsDto.class); return rawQueryGetDtoList(sb.toString(), new String[]{"" + operationId}, TaskDirectionsItemsDto.class);
} }
......
...@@ -53,6 +53,13 @@ public class TaskReportDao extends AbstractDao { ...@@ -53,6 +53,13 @@ public class TaskReportDao extends AbstractDao {
if (column != -1) { if (column != -1) {
dto.delFlg = toBool(cursor.getInt(column)); dto.delFlg = toBool(cursor.getInt(column));
} }
// #32782 指示者テーブル関連削除 start
// TODO append
// column = cursor.getColumnIndex("reportor_flag");
// if (column != -1) {
// dto.reporterFlag = toBool(cursor.getInt(column));
// }
// #32782 指示者テーブル関連削除 end
return dto; return dto;
} }
...@@ -65,8 +72,13 @@ public class TaskReportDao extends AbstractDao { ...@@ -65,8 +72,13 @@ public class TaskReportDao extends AbstractDao {
+ "local_attached_file_name, " + "local_attached_file_name, "
+ "attached_file_send_flg, " + "attached_file_send_flg, "
+ "data_send_flg) " + "data_send_flg) "
// #32782 指示者テーブル関連削除 start
// TODO append
// + "reporter_flag) "
+ "values " + "values "
// + "(?,?,?,?,?,?,?)",
+ "(?,?,?,?,?,?)", + "(?,?,?,?,?,?)",
// #32782 指示者テーブル関連削除 end
dto.getInsertValues()); dto.getInsertValues());
} }
...@@ -78,7 +90,7 @@ public class TaskReportDao extends AbstractDao { ...@@ -78,7 +90,7 @@ public class TaskReportDao extends AbstractDao {
sb.append(" t_task tt "); sb.append(" t_task tt ");
sb.append(" ON tt.task_key == ttr.task_key "); sb.append(" ON tt.task_key == ttr.task_key ");
sb.append(" WHERE tt.del_flg = 0"); sb.append(" WHERE tt.del_flg = 0");
sb.append(" AND tt.project_id = ?"); sb.append(" AND tt.operation_id = ?");
return rawQueryGetDtoList(sb.toString(), new String[]{"" + operationId}, TaskReportDto.class); return rawQueryGetDtoList(sb.toString(), new String[]{"" + operationId}, TaskReportDto.class);
} }
...@@ -93,7 +105,11 @@ public class TaskReportDao extends AbstractDao { ...@@ -93,7 +105,11 @@ public class TaskReportDao extends AbstractDao {
+ "attached_file_name=?, " + "attached_file_name=?, "
+ "local_attached_file_name=?, " + "local_attached_file_name=?, "
+ "attached_file_send_flg=?, " + "attached_file_send_flg=?, "
+ "data_send_flg=? " + "data_send_flg=?, "
// #32782 指示者テーブル関連削除 start
// TODO append
// + "reporter_flag=? "
// #32782 指示者テーブル関連削除 end
+ "where task_key=?", + "where task_key=?",
dto.getUpdateValues()); dto.getUpdateValues());
return count > 0; return count > 0;
...@@ -117,11 +133,15 @@ public class TaskReportDao extends AbstractDao { ...@@ -117,11 +133,15 @@ public class TaskReportDao extends AbstractDao {
sb.append(" t_task tt "); sb.append(" t_task tt ");
sb.append(" ON tt.task_key == ttr.task_key "); sb.append(" ON tt.task_key == ttr.task_key ");
sb.append(" WHERE ttr.data_send_flg = 1"); sb.append(" WHERE ttr.data_send_flg = 1");
sb.append(" AND tt.project_id = ?"); sb.append(" AND tt.operation_id = ?");
return rawQueryGetDtoList(sb.toString(), new String[]{"" + operationId}, TaskReportDto.class); return rawQueryGetDtoList(sb.toString(), new String[]{"" + operationId}, TaskReportDto.class);
} }
// #32782 指示者テーブル関連削除 start
// TODO append
// public List<TaskReportDto> getSendableTaskData(Long operationId, String taskKey, boolean reporterFlag) {
public List<TaskReportDto> getSendableTaskData(Long operationId, String taskKey) { public List<TaskReportDto> getSendableTaskData(Long operationId, String taskKey) {
// #32782 指示者テーブル関連削除 end
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();
sb.append(" select * "); sb.append(" select * ");
sb.append(" from t_task_report ttr "); sb.append(" from t_task_report ttr ");
...@@ -129,9 +149,14 @@ public class TaskReportDao extends AbstractDao { ...@@ -129,9 +149,14 @@ public class TaskReportDao extends AbstractDao {
sb.append(" t_task tt "); sb.append(" t_task tt ");
sb.append(" ON tt.task_key == ttr.task_key "); sb.append(" ON tt.task_key == ttr.task_key ");
sb.append(" WHERE ttr.data_send_flg = 1"); sb.append(" WHERE ttr.data_send_flg = 1");
sb.append(" AND tt.project_id = ?"); sb.append(" AND tt.operation_id = ?");
sb.append(" AND tt.task_key = ?"); sb.append(" AND tt.task_key = ?");
// #32782 指示者テーブル関連削除 start
// TODO append
// sb.append(" AND ttr.repertor_flag = ?");
// return rawQueryGetDtoList(sb.toString(), new String[]{"" + operationId, "" + taskKey, "" + reporterFlag}, TaskReportDto.class);
return rawQueryGetDtoList(sb.toString(), new String[]{"" + operationId, "" + taskKey}, TaskReportDto.class); return rawQueryGetDtoList(sb.toString(), new String[]{"" + operationId, "" + taskKey}, TaskReportDto.class);
// #32782 指示者テーブル関連削除 end
} }
public String getTaskReportAttachedFileName(String taskKey) { public String getTaskReportAttachedFileName(String taskKey) {
......
...@@ -50,7 +50,7 @@ public class TaskReportItemsDao extends AbstractDao { ...@@ -50,7 +50,7 @@ public class TaskReportItemsDao extends AbstractDao {
sb.append(" t_task tt "); sb.append(" t_task tt ");
sb.append(" ON tt.task_key == ttri.task_key "); sb.append(" ON tt.task_key == ttri.task_key ");
sb.append(" WHERE tt.del_flg = 0"); sb.append(" WHERE tt.del_flg = 0");
sb.append(" AND tt.project_id = ?"); sb.append(" AND tt.operation_id = ?");
return rawQueryGetDtoList(sb.toString(), new String[]{"" + operationId}, TaskReportItemsDto.class); return rawQueryGetDtoList(sb.toString(), new String[]{"" + operationId}, TaskReportItemsDto.class);
} }
......
...@@ -144,7 +144,7 @@ public class TaskReportSendDao extends AbstractDao { ...@@ -144,7 +144,7 @@ public class TaskReportSendDao extends AbstractDao {
sb.append(" inner join "); sb.append(" inner join ");
sb.append(" t_task tt "); sb.append(" t_task tt ");
sb.append(" ON tt.task_key == ttrs.task_key "); sb.append(" ON tt.task_key == ttrs.task_key ");
sb.append(" AND tt.project_id = ?"); sb.append(" AND tt.operation_id = ?");
if (taskKey != null) { if (taskKey != null) {
sb.append(" AND ttrs.task_key = ?"); sb.append(" AND ttrs.task_key = ?");
return rawQueryGetInt(sb.toString(), new String[]{ "" + operationId, "" + taskKey }); return rawQueryGetInt(sb.toString(), new String[]{ "" + operationId, "" + taskKey });
...@@ -159,7 +159,7 @@ public class TaskReportSendDao extends AbstractDao { ...@@ -159,7 +159,7 @@ public class TaskReportSendDao extends AbstractDao {
sb.append(" inner join "); sb.append(" inner join ");
sb.append(" t_task tt "); sb.append(" t_task tt ");
sb.append(" ON tt.task_key == ttrs.task_key "); sb.append(" ON tt.task_key == ttrs.task_key ");
sb.append(" AND tt.project_id = ?"); sb.append(" AND tt.operation_id = ?");
if (!StringUtil.isNullOrEmpty(taskKey) && taskReportId > 0 && !StringUtil.isNullOrEmpty(reportStartDate)) { if (!StringUtil.isNullOrEmpty(taskKey) && taskReportId > 0 && !StringUtil.isNullOrEmpty(reportStartDate)) {
sb.append(" AND ttrs.task_key = ? and task_report_id = ? and report_start_date = ?"); sb.append(" AND ttrs.task_key = ? and task_report_id = ? and report_start_date = ?");
return rawQueryGetInt(sb.toString(), new String[]{ "" + operationId, taskKey, "" + taskReportId, reportStartDate }); return rawQueryGetInt(sb.toString(), new String[]{ "" + operationId, taskKey, "" + taskReportId, reportStartDate });
......
...@@ -32,7 +32,7 @@ public class MMemberInfo extends SQLiteTableScript { ...@@ -32,7 +32,7 @@ public class MMemberInfo extends SQLiteTableScript {
sql.append(" , password_expiry_date DATETIME "); sql.append(" , password_expiry_date DATETIME ");
sql.append(" , user_id INTEGER"); sql.append(" , user_id INTEGER");
sql.append(" , last_update_infor VARCHAR(64)"); sql.append(" , last_update_infor VARCHAR(64)");
sql.append(" , project_auth_level INTEGER"); sql.append(" , operation_auth_level INTEGER");
sql.append(" , worker_code TEXT"); sql.append(" , worker_code TEXT");
sql.append(" , PRIMARY KEY (login_id) "); sql.append(" , PRIMARY KEY (login_id) ");
sql.append(" ) "); sql.append(" ) ");
......
...@@ -20,12 +20,12 @@ public class ROperationContent extends SQLiteTableScript { ...@@ -20,12 +20,12 @@ public class ROperationContent extends SQLiteTableScript {
List<String> ddl = new ArrayList<String>(); List<String> ddl = new ArrayList<String>();
StringBuffer sql = new StringBuffer(); StringBuffer sql = new StringBuffer();
sql.append(" CREATE TABLE r_project_content ( "); sql.append(" CREATE TABLE r_operation_content ( ");
sql.append(" project_id BIGINT NOT NULL "); sql.append(" operation_id BIGINT NOT NULL ");
sql.append(" , content_id BIGINT NOT NULL "); sql.append(" , content_id BIGINT NOT NULL ");
sql.append(" , project_content_flg BOOLEAN NOT NULL DEFAULT 0 "); sql.append(" , operation_content_flg BOOLEAN NOT NULL DEFAULT 0 ");
sql.append(" , PRIMARY KEY (project_id, content_id) "); sql.append(" , PRIMARY KEY (operation_id, content_id) ");
sql.append(" , FOREIGN KEY (project_id) REFERENCES t_project (project_id) "); sql.append(" , FOREIGN KEY (operation_id) REFERENCES t_project (operation_id) ");
sql.append(" , FOREIGN KEY (content_id) REFERENCES t_content (content_id)"); sql.append(" , FOREIGN KEY (content_id) REFERENCES t_content (content_id)");
sql.append(" ) "); sql.append(" ) ");
......
...@@ -66,7 +66,7 @@ public class TContent extends SQLiteTableScript { ...@@ -66,7 +66,7 @@ public class TContent extends SQLiteTableScript {
sql.append(" , log_sended_flg BOOLEAN default 0"); // since ABook+1.6.3 (from t_content_download_queue) sql.append(" , log_sended_flg BOOLEAN default 0"); // since ABook+1.6.3 (from t_content_download_queue)
sql.append(" , status VARCHAR(2) "); // since ABook+1.6.3 (from t_content_download_queue) sql.append(" , status VARCHAR(2) "); // since ABook+1.6.3 (from t_content_download_queue)
sql.append(" , unauthorized_content_flg BOOLEAN default 0"); //since ABook See 1.7.2 sql.append(" , unauthorized_content_flg BOOLEAN default 0"); //since ABook See 1.7.2
sql.append(" , project_content_flg BOOLEAN default 0"); //since ABook Check 1.9.3 sql.append(" , operation_content_flg BOOLEAN default 0"); //since ABook Check 1.9.3
sql.append(" , common_content_flg BOOLEAN default 0"); //since ABook Check 1.9.4 sql.append(" , common_content_flg BOOLEAN default 0"); //since ABook Check 1.9.4
sql.append(" , PRIMARY KEY (content_id) "); sql.append(" , PRIMARY KEY (content_id) ");
sql.append(" ) "); sql.append(" ) ");
......
...@@ -22,21 +22,21 @@ public class TOperation extends SQLiteTableScript { ...@@ -22,21 +22,21 @@ public class TOperation extends SQLiteTableScript {
StringBuffer sql = new StringBuffer(); StringBuffer sql = new StringBuffer();
sql.append(" CREATE TABLE t_project ( "); sql.append(" CREATE TABLE t_project ( ");
sql.append(" project_id BIGINT NOT NULL "); sql.append(" operation_id BIGINT NOT NULL ");
sql.append(" , project_name VARCHAR(128) "); sql.append(" , operation_name VARCHAR(128) ");
sql.append(" , project_type INTEGER NOT NULL "); sql.append(" , operation_type INTEGER NOT NULL ");
sql.append(" , project_descriptions TEXT "); sql.append(" , operation_descriptions TEXT ");
sql.append(" , project_start_date DATE NOT NULL "); sql.append(" , operation_start_date DATE NOT NULL ");
sql.append(" , project_end_date DATE NOT NULL "); sql.append(" , operation_end_date DATE NOT NULL ");
sql.append(" , last_edit_date DATE NOT NULL "); sql.append(" , last_edit_date DATE NOT NULL ");
sql.append(" , content_creating_flg INTEGER NOT NULL "); sql.append(" , content_creating_flg INTEGER NOT NULL ");
sql.append(" , edit_lock_flg BOOLEAN NOT NULL DEFAULT 0 "); sql.append(" , edit_lock_flg BOOLEAN NOT NULL DEFAULT 0 ");
sql.append(" , need_sync_flg BOOLEAN NOT NULL DEFAULT 0 "); sql.append(" , need_sync_flg BOOLEAN NOT NULL DEFAULT 0 ");
sql.append(" , report_update_type INTEGER NOT NULL DEFAULT 0 "); sql.append(" , report_update_type INTEGER NOT NULL DEFAULT 0 ");
sql.append(" , project_report_type INTEGER NOT NULL DEFAULT 0 "); sql.append(" , operation_report_type INTEGER NOT NULL DEFAULT 0 ");
sql.append(" , report_cycle INTEGER NOT NULL DEFAULT 0 "); sql.append(" , report_cycle INTEGER NOT NULL DEFAULT 0 ");
sql.append(" , enable_report_update INTEGER NOT NULL DEFAULT 0 "); sql.append(" , enable_report_update INTEGER NOT NULL DEFAULT 0 ");
sql.append(" , PRIMARY KEY (project_id) "); sql.append(" , PRIMARY KEY (operation_id) ");
sql.append(" ) "); sql.append(" ) ");
ddl.add(sql.toString()); ddl.add(sql.toString());
......
...@@ -21,13 +21,13 @@ public class TPushMessage extends SQLiteTableScript { ...@@ -21,13 +21,13 @@ public class TPushMessage extends SQLiteTableScript {
sql.append(" CREATE TABLE t_push_message ( "); sql.append(" CREATE TABLE t_push_message ( ");
sql.append(" push_message_id BIGINT NOT NULL "); sql.append(" push_message_id BIGINT NOT NULL ");
sql.append(" , project_id BIGINT NOT NULL "); sql.append(" , operation_id BIGINT NOT NULL ");
sql.append(" , push_send_login_id VARCHAR(128) "); sql.append(" , push_send_login_id VARCHAR(128) ");
sql.append(" , push_send_date DATE NOT NULL "); sql.append(" , push_send_date DATE NOT NULL ");
sql.append(" , push_message TEXT "); sql.append(" , push_message TEXT ");
sql.append(" , reading_flg BOOLEAN NOT NULL DEFAULT 0 "); sql.append(" , reading_flg BOOLEAN NOT NULL DEFAULT 0 ");
sql.append(" , PRIMARY KEY (push_message_id) "); sql.append(" , PRIMARY KEY (push_message_id) ");
sql.append(" , FOREIGN KEY (project_id) REFERENCES t_project (project_id) "); sql.append(" , FOREIGN KEY (operation_id) REFERENCES t_project (operation_id) ");
sql.append(" ) "); sql.append(" ) ");
ddl.add(sql.toString()); ddl.add(sql.toString());
......
...@@ -24,7 +24,7 @@ public class TTask extends SQLiteTableScript { ...@@ -24,7 +24,7 @@ public class TTask extends SQLiteTableScript {
sql.append(" CREATE TABLE t_task ( "); sql.append(" CREATE TABLE t_task ( ");
sql.append(" task_key TEXT NOT NULL "); sql.append(" task_key TEXT NOT NULL ");
sql.append(" , task_id BIGINT "); sql.append(" , task_id BIGINT ");
sql.append(" , project_id BIGINT NOT NULL "); sql.append(" , operation_id BIGINT NOT NULL ");
sql.append(" , task_code VARCHAR(64) "); sql.append(" , task_code VARCHAR(64) ");
sql.append(" , task_status INTEGER "); sql.append(" , task_status INTEGER ");
sql.append(" , task_hotspot_info TEXT "); sql.append(" , task_hotspot_info TEXT ");
......
...@@ -28,6 +28,10 @@ public class TTaskReport extends SQLiteTableScript { ...@@ -28,6 +28,10 @@ public class TTaskReport extends SQLiteTableScript {
sql.append(" , local_attached_file_name TEXT "); sql.append(" , local_attached_file_name TEXT ");
sql.append(" , attached_file_send_flg BOOLEAN DEFAULT 0 "); sql.append(" , attached_file_send_flg BOOLEAN DEFAULT 0 ");
sql.append(" , data_send_flg BOOLEAN DEFAULT 0 "); sql.append(" , data_send_flg BOOLEAN DEFAULT 0 ");
// #32782 指示者テーブル関連削除 start
// TODO append
// sql.append(" , reporter_flag BOOLEAN DEFAULT 0 ");
// #32782 指示者テーブル関連削除 end
sql.append(" ) "); sql.append(" ) ");
ddl.add(sql.toString()); ddl.add(sql.toString());
......
...@@ -16,7 +16,11 @@ public class TaskDto extends AbstractDto { ...@@ -16,7 +16,11 @@ public class TaskDto extends AbstractDto {
public String taskHotSpotInfo; public String taskHotSpotInfo;
public boolean delFlg; public boolean delFlg;
// #32782 指示者テーブル関連削除 start
// TODO TaskDirectionDto から TaskReportDto に変更、taskDirectionsDto 名を変更必要
// public TaskReportDto taskDirectionsDto;
public TaskDirectionsDto taskDirectionsDto; public TaskDirectionsDto taskDirectionsDto;
// #32782 指示者テーブル関連削除 end
public TaskReportDto taskReportDto; public TaskReportDto taskReportDto;
public int taskReportId; public int taskReportId;
......
...@@ -15,14 +15,26 @@ public class TaskReportDto extends AbstractDto { ...@@ -15,14 +15,26 @@ public class TaskReportDto extends AbstractDto {
public String taskHotSpotInfo; public String taskHotSpotInfo;
public boolean delFlg; public boolean delFlg;
// #32782 指示者テーブル関連削除 start
public boolean reporterFlag;
// #32782 指示者テーブル関連削除 end
@Override @Override
public Object[] getInsertValues() { public Object[] getInsertValues() {
return new Object[] { taskKey, jsonData, attachedFileName, localAttachedFileName, attachedFileSendFlg, dataSendFlg }; // #32782 指示者テーブル関連削除 start
// TODO change
// return new Object[] { taskKey, jsonData, attachedFileName, localAttachedFileName, attachedFileSendFlg, dataSendFlg, reporterFlag };
return new Object[] { taskKey, jsonData, attachedFileName, localAttachedFileName, attachedFileSendFlg, dataSendFlg};
// #32782 指示者テーブル関連削除 end
} }
@Override @Override
public Object[] getUpdateValues() { public Object[] getUpdateValues() {
return new Object[] { jsonData, attachedFileName, localAttachedFileName, attachedFileSendFlg, dataSendFlg, taskKey }; // #32782 指示者テーブル関連削除 start
// TODO change
// return new Object[] { jsonData, attachedFileName, localAttachedFileName, attachedFileSendFlg, dataSendFlg, reporterFlag, taskKey };
return new Object[] { jsonData, attachedFileName, localAttachedFileName, attachedFileSendFlg, dataSendFlg, taskKey };
// #32782 指示者テーブル関連削除 end
} }
@Override @Override
......
...@@ -78,8 +78,11 @@ public class OperationLogic extends AbstractLogic { ...@@ -78,8 +78,11 @@ public class OperationLogic extends AbstractLogic {
private WorkerGroupDao mWorkerGroupDao = AbstractDao.getDao(WorkerGroupDao.class); private WorkerGroupDao mWorkerGroupDao = AbstractDao.getDao(WorkerGroupDao.class);
private TaskDao mTaskDao = AbstractDao.getDao(TaskDao.class); private TaskDao mTaskDao = AbstractDao.getDao(TaskDao.class);
// #32782 指示者テーブル関連削除 start
// TODO delete
private TaskDirectionsDao mTaskDirectionsDao = AbstractDao.getDao(TaskDirectionsDao.class); private TaskDirectionsDao mTaskDirectionsDao = AbstractDao.getDao(TaskDirectionsDao.class);
private TaskDirectionsItemsDao mTaskDirectionsItemsDao = AbstractDao.getDao(TaskDirectionsItemsDao.class); private TaskDirectionsItemsDao mTaskDirectionsItemsDao = AbstractDao.getDao(TaskDirectionsItemsDao.class);
// #32782 指示者テーブル関連削除 end
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);
...@@ -226,6 +229,9 @@ public class OperationLogic extends AbstractLogic { ...@@ -226,6 +229,9 @@ public class OperationLogic extends AbstractLogic {
* @throws IOException * @throws IOException
*/ */
public void insertTaskDirections( String taskKey, long operationId, long contentId, JSONObject taskDirectionsJson, String hotSpotInfo, String localAttachedFileName, boolean attachedChangeFlag, boolean dataSendFlg) throws IOException { public void insertTaskDirections( String taskKey, long operationId, long contentId, JSONObject taskDirectionsJson, String hotSpotInfo, String localAttachedFileName, boolean attachedChangeFlag, boolean dataSendFlg) throws IOException {
// #32782 指示者テーブル関連削除 start
// TODO Delete
TaskDto taskDto = new TaskDto(); TaskDto taskDto = new TaskDto();
TaskDirectionsDto taskDirectionsDto = new TaskDirectionsDto(); TaskDirectionsDto taskDirectionsDto = new TaskDirectionsDto();
JSONObject taskJson = taskDirectionsJson.getJSONObject("task"); JSONObject taskJson = taskDirectionsJson.getJSONObject("task");
...@@ -281,6 +287,7 @@ public class OperationLogic extends AbstractLogic { ...@@ -281,6 +287,7 @@ public class OperationLogic extends AbstractLogic {
if (result) { if (result) {
FileUtil.delete(tempDirPath); FileUtil.delete(tempDirPath);
} }
// #32782 指示者テーブル関連削除 end
} }
/** /**
...@@ -297,6 +304,8 @@ public class OperationLogic extends AbstractLogic { ...@@ -297,6 +304,8 @@ public class OperationLogic extends AbstractLogic {
* @throws IOException * @throws IOException
*/ */
public void updateTaskDirections(String taskKey, long operationId, long contentId, JSONObject taskDirectionsJson, String hotSpotInfo, String localAttachedFileName, boolean attachedChangeFlag, boolean dataSendFlg) throws IOException { public void updateTaskDirections(String taskKey, long operationId, long contentId, JSONObject taskDirectionsJson, String hotSpotInfo, String localAttachedFileName, boolean attachedChangeFlag, boolean dataSendFlg) throws IOException {
// #32782 指示者テーブル関連削除 start
// TODO Delete method
TaskDto taskDto = mTaskDao.getTaskByTaskKey(taskKey); TaskDto taskDto = mTaskDao.getTaskByTaskKey(taskKey);
if (taskDto == null) { if (taskDto == null) {
// ignore // ignore
...@@ -362,8 +371,11 @@ public class OperationLogic extends AbstractLogic { ...@@ -362,8 +371,11 @@ public class OperationLogic extends AbstractLogic {
FileUtil.delete(tempDirPath); FileUtil.delete(tempDirPath);
} }
} }
// #32782 指示者テーブル関連削除 end
} }
// TODO
// 削除対象
/** /**
* 作業指示の削除 * 作業指示の削除
* *
...@@ -372,6 +384,8 @@ public class OperationLogic extends AbstractLogic { ...@@ -372,6 +384,8 @@ public class OperationLogic extends AbstractLogic {
* @param taskKey * @param taskKey
*/ */
public void deleteTaskDirections(long operationId, long contentId, String taskKey) { public void deleteTaskDirections(long operationId, long contentId, String taskKey) {
// #32782 指示者テーブル関連削除 start
// TODO Delete method
TaskDto taskDto = mTaskDao.getTaskByTaskKey(taskKey); TaskDto taskDto = mTaskDao.getTaskByTaskKey(taskKey);
if (taskDto == null) { if (taskDto == null) {
return; return;
...@@ -386,6 +400,8 @@ public class OperationLogic extends AbstractLogic { ...@@ -386,6 +400,8 @@ public class OperationLogic extends AbstractLogic {
// プロジェクトの作業データディレクトリ削除 // プロジェクトの作業データディレクトリ削除
deleteTaskFileData(operationId, contentId, taskKey); deleteTaskFileData(operationId, contentId, taskKey);
// #32782 指示者テーブル関連削除 end
} }
/** /**
...@@ -394,10 +410,109 @@ public class OperationLogic extends AbstractLogic { ...@@ -394,10 +410,109 @@ public class OperationLogic extends AbstractLogic {
* @param taskKey * @param taskKey
* @param operationId * @param operationId
* @param contentId * @param contentId
* @param taskReportJson
* @param localAttachedFileName
* @param attachedChangeFlag * @param attachedChangeFlag
* @param dataSendFlg * @param dataSendFlg
* @param hotSpotInfo
* @throws IOException * @throws IOException
*/ */
// #32782 指示者テーブル関連削除 start
// TODO change
/*
public void insertTaskReport(String taskKey, long operationId, long contentId, JSONObject taskReportJson, String localAttachedFileName, boolean attachedChangeFlag, boolean dataSendFlg, String hotSpotInfo) throws IOException {
TaskDto taskDto = mTaskDao.getTaskByTaskKey(taskKey);
int mOperationAuthLevel = ABVDataCache.getInstance().getMemberInfo().operationAuthLevel;
if (taskDto == null) {
taskDto = new TaskDto();
// 指示者と報告者判断する
String taskHotSpotInfo = null;
if (mOperationAuthLevel == OperationAuthLevel.OPERATION_INSTRUCTOR) {
taskDto.taskKey = taskKey;
taskDto.operationId = operationId;
taskDto.taskHotSpotInfo = hotSpotInfo;
} else {
//TODO error
return;
}
}
TaskReportDto taskReportDto = new TaskReportDto();
JSONObject taskJson = taskReportJson.getJSONObject("task");
Iterator taskKeys = taskJson.keys();
while (taskKeys.hasNext()) {
TaskReportItemsDto taskReportItemsDto = new TaskReportItemsDto();
String itemKey = (String) taskKeys.next();
// 指示者の場合
if (mOperationAuthLevel == OperationAuthLevel.OPERATION_INSTRUCTOR) {
if (itemKey.startsWith("q_1_")) {
taskDto.taskStatus = taskJson.getInt(itemKey);
}
} else {
if (itemKey.startsWith("q_2_")) {
taskDto.taskStatus = taskJson.getInt(itemKey);
}
}
taskReportItemsDto.taskKey = taskKey;
taskReportItemsDto.itemKey = itemKey;
try {
taskReportItemsDto.inputValue = taskJson.getString(itemKey);
} catch (JSONException e) {
// 値がStringではない場合、無視する
continue;
}
mTaskReportItemsDao.insertTaskReportItems(taskReportItemsDto);
}
taskReportDto.taskKey = taskKey;
taskReportDto.jsonData = taskReportJson.toString();
taskReportDto.dataSendFlg = dataSendFlg;
taskReportDto.attachedFileSendFlg = attachedChangeFlag;
// #32782 指示者テーブル関連削除 start
// 報告者の場合
taskReportDto.reporterFlag = true;
// #32782 指示者テーブル関連削除 end
if (localAttachedFileName != null) {
taskReportDto.localAttachedFileName = localAttachedFileName;
}
if (taskReportJson.has(ABookKeys.TASK_STATUS)) {
taskDto.taskStatus = taskReportJson.getInt(ABookKeys.TASK_STATUS);
}
// 削除の時、deleteではなく、jsonDataを空にして、データが残っているので、updateする
List<TaskReportDto> taskReport = mTaskReportDao.selectByTaskKey(taskReportDto.taskKey);
if (taskReport.size() > 0) {
mTaskReportDao.update(taskReportDto);
} else {
mTaskReportDao.insert(taskReportDto);
}
if (mOperationAuthLevel == OperationAuthLevel.OPERATION_INSTRUCTOR) {
mTaskDao.insert(taskDto);
} else {
mTaskDao.update(taskDto);
}
//添付ファイル変更の場合、以下の処理を行う
String tempDirPath = ABVEnvironment.getInstance().getTempTaskDirPath(contentId, taskKey);
String operationDrectionOrReportDirPath = ABVEnvironment.getInstance().getOperationDirectionOrReportDirPath(operationId, taskKey, false);
JSONObject attachedListJson = taskReportJson.getJSONObject("attached");
List<String> attachedFileNames = JSONObject.getValues(attachedListJson);
// コピー元のファイルで、添付ファイルとして使用しないファイル削除
deleteDifferentialFile(tempDirPath, attachedFileNames);
// 添付ディレクトリの移動
boolean result = FileUtil.copy(tempDirPath, operationDrectionOrReportDirPath, true);
if(result) {
FileUtil.delete(tempDirPath);
}
}
*/
public void insertTaskReport(String taskKey, long operationId, long contentId, JSONObject taskReportJson, String localAttachedFileName, boolean attachedChangeFlag, boolean dataSendFlg) throws IOException { public void insertTaskReport(String taskKey, long operationId, long contentId, JSONObject taskReportJson, String localAttachedFileName, boolean attachedChangeFlag, boolean dataSendFlg) throws IOException {
TaskDto taskDto = mTaskDao.getTaskByTaskKey(taskKey); TaskDto taskDto = mTaskDao.getTaskByTaskKey(taskKey);
if (taskDto == null) { if (taskDto == null) {
...@@ -453,6 +568,7 @@ public class OperationLogic extends AbstractLogic { ...@@ -453,6 +568,7 @@ public class OperationLogic extends AbstractLogic {
FileUtil.delete(tempDirPath); FileUtil.delete(tempDirPath);
} }
} }
// #32782 指示者テーブル関連削除 end
/** /**
* 定期点検データ新規 * 定期点検データ新規
...@@ -514,8 +630,101 @@ public class OperationLogic extends AbstractLogic { ...@@ -514,8 +630,101 @@ public class OperationLogic extends AbstractLogic {
* @param taskReport * @param taskReport
* @param attachedChangeFlag * @param attachedChangeFlag
* @param dataSendFlg * @param dataSendFlg
* @param hotSpotInfo
* @throws IOException * @throws IOException
*/ */
// #32782 指示者テーブル関連削除 satrt
// TODO change
/*
public void updateTaskReport(String taskKey, long operationId, long contentId, JSONObject taskReport, String localAttachedFileName, boolean attachedChangeFlag, boolean dataSendFlg, String hotSpotInfo) throws IOException {
TaskReportDto taskReportDto = mTaskReportDao.getTaskReport(taskKey);
// 指示者か報告者か判断
int mOperationAuthLevel = ABVDataCache.getInstance().getMemberInfo().operationAuthLevel;
if (taskReportDto == null) {
Logger.w(TAG, "taskReportDto is null");
// 指示者の場合
if (mOperationAuthLevel == OperationAuthLevel.OPERATION_INSTRUCTOR) {
insertTaskReport(taskKey, operationId, contentId, taskReport, localAttachedFileName, attachedChangeFlag, dataSendFlg, hotSpotInfo);
}
return;
}
JSONObject taskJson = taskReport.getJSONObject("task");
TaskDto taskDto = mTaskDao.getTaskByTaskKey(taskKey);
// 指示者の場合
if (mOperationAuthLevel == OperationAuthLevel.OPERATION_INSTRUCTOR) {
taskDto.operationId = operationId;
taskDto.taskHotSpotInfo = hotSpotInfo;
}
List<TaskReportItemsDto> taskReportItemsDaoList = mTaskReportItemsDao.getTaskReportItemByTaskKey(taskKey);
for (TaskReportItemsDto taskReportItemsDto : taskReportItemsDaoList) {
try {
String newValue = taskJson.getString(taskReportItemsDto.itemKey);
if (!newValue.equals(taskReportItemsDto.inputValue)) {
// 値が異なる場合のみ、更新する
taskReportItemsDto.inputValue = newValue;
mTaskReportItemsDao.updateTaskReportItems(taskReportItemsDto);
}
// 指示者の場合
if (mOperationAuthLevel == OperationAuthLevel.OPERATION_INSTRUCTOR) {
if (taskReportItemsDto.inputValue.startsWith("q_1_")) {
// 値が異なるため、作業コードの入力値を変更する
taskDto.taskCode = taskReportItemsDto.inputValue;
}
} else {
if (taskReportItemsDto.itemKey.startsWith("q_2_")) {
// 値が異なるため、作業コードの入力値を変更する
taskDto.taskStatus = Integer.parseInt(taskReportItemsDto.inputValue);
}
}
} catch (JSONException e) {
// 値がStringではない場合、無視する
continue;
}
}
taskReportDto.jsonData = taskReport.toString();
taskReportDto.dataSendFlg = dataSendFlg;
// attachedFileSendFlgがtrueの場合は、更新しない
if (!taskReportDto.attachedFileSendFlg) {
taskReportDto.attachedFileSendFlg = attachedChangeFlag;
}
// #32782 指示者テーブル関連削除 start
taskReportDto.reporterFlag = true;
// #32782 指示者テーブル関連削除 end
// 指示者の場合
if (mOperationAuthLevel == OperationAuthLevel.OPERATION_INSTRUCTOR) {
if (localAttachedFileName != null) {
taskReportDto.localAttachedFileName = localAttachedFileName;
}
if (taskReport.has(ABookKeys.TASK_STATUS)) {
taskDto.taskStatus = taskReport.getInt(ABookKeys.TASK_STATUS);
}
}
mTaskReportDao.update(taskReportDto);
mTaskDao.update(taskDto);
String tempDirPath = ABVEnvironment.getInstance().getTempTaskDirPath(contentId, taskKey);
String operationDrectionOrReportDirPath = ABVEnvironment.getInstance().getOperationDirectionOrReportDirPath(operationId, taskKey, false);
if (taskReportDto.attachedFileSendFlg) {
//添付ファイル変更の場合、以下の処理を行う
JSONObject attachedListJson = taskReport.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);
}
}
}
*/
public void updateTaskReport(String taskKey, long operationId, long contentId, JSONObject taskReport, String localAttachedFileName, boolean attachedChangeFlag, boolean dataSendFlg) throws IOException { public void updateTaskReport(String taskKey, long operationId, long contentId, JSONObject taskReport, String localAttachedFileName, boolean attachedChangeFlag, boolean dataSendFlg) throws IOException {
TaskReportDto taskReportDto = mTaskReportDao.getTaskReport(taskKey); TaskReportDto taskReportDto = mTaskReportDao.getTaskReport(taskKey);
if (taskReportDto == null) { if (taskReportDto == null) {
...@@ -570,6 +779,7 @@ public class OperationLogic extends AbstractLogic { ...@@ -570,6 +779,7 @@ public class OperationLogic extends AbstractLogic {
} }
} }
} }
// #32782 指示者テーブル関連削除 end
/** /**
* 定期点検データ更新 * 定期点検データ更新
...@@ -745,6 +955,45 @@ public class OperationLogic extends AbstractLogic { ...@@ -745,6 +955,45 @@ public class OperationLogic extends AbstractLogic {
* @param contentId * @param contentId
* @param taskKey * @param taskKey
*/ */
// #32782 指示者テーブル関連削除 start
// TODO change
/*
public void deleteTaskReport(long operationId, long contentId, String taskKey) {
// #32782 指示者テーブル関連削除 start
TaskDto taskDto = mTaskDao.getTaskByTaskKey(taskKey);
if (taskDto == null) {
return;
} else {
taskDto.taskStatus = 0;
mTaskDao.update(taskDto);
}
TaskReportDto taskReportDto = mTaskReportDao.getTaskReport(taskKey);
if (ABVDataCache.getInstance().getMemberInfo().operationAuthLevel == OperationAuthLevel.OPERATION_INSTRUCTOR) {
taskReportDto.dataSendFlg = true;
taskReportDto.attachedFileSendFlg = false;
taskDto.delFlg = true;
mTaskReportDao.update(taskReportDto);
mTaskDao.update(taskDto);
// プロジェクトの作業データディレクトリ削除
deleteTaskFileData(operationId, contentId, taskKey);
} else {
if(taskReportDto != null) {
taskReportDto.dataSendFlg = true;
taskReportDto.attachedFileSendFlg = false;
taskReportDto.jsonData = "";
mTaskReportDao.update(taskReportDto);
}
// 作業報告のディレクトリ削除
FileUtil.delete(ABVEnvironment.getInstance().getTempTaskDirPath(contentId, taskKey));
FileUtil.delete(ABVEnvironment.getInstance().getOperationDirectionOrReportDirPath(operationId, taskKey, false));
}
// #32782 指示者テーブル関連削除 end
}
*/
public void deleteTaskReport(long operationId, long contentId, String taskKey) { public void deleteTaskReport(long operationId, long contentId, String taskKey) {
TaskReportDto taskReportDto = mTaskReportDao.getTaskReport(taskKey); TaskReportDto taskReportDto = mTaskReportDao.getTaskReport(taskKey);
if(taskReportDto != null) { if(taskReportDto != null) {
...@@ -764,6 +1013,7 @@ public class OperationLogic extends AbstractLogic { ...@@ -764,6 +1013,7 @@ public class OperationLogic extends AbstractLogic {
FileUtil.delete(ABVEnvironment.getInstance().getTempTaskDirPath(contentId, taskKey)); FileUtil.delete(ABVEnvironment.getInstance().getTempTaskDirPath(contentId, taskKey));
FileUtil.delete(ABVEnvironment.getInstance().getOperationDirectionOrReportDirPath(operationId, taskKey, false)); FileUtil.delete(ABVEnvironment.getInstance().getOperationDirectionOrReportDirPath(operationId, taskKey, false));
} }
// #32782 指示者テーブル関連削除 end
/** /**
* 定期点検用、作業削除 * 定期点検用、作業削除
...@@ -871,6 +1121,20 @@ public class OperationLogic extends AbstractLogic { ...@@ -871,6 +1121,20 @@ public class OperationLogic extends AbstractLogic {
* @param taskKey * @param taskKey
* @param param * @param param
*/ */
// #32782 指示者テーブル関連削除 start
// TODO change
/*
public void updateTaskHotspot(String taskKey, Map<String, String> param) {
TaskDto taskDto = mTaskDao.getTaskByTaskKey(taskKey);
// #32782 指示者テーブル関連削除 start
TaskReportDto taskReportDao = mTaskReportDao.getTaskReport(taskKey);
taskReportDao.dataSendFlg = true;
taskDto.taskHotSpotInfo = param.get(ABookKeys.HOT_SPOT);
mTaskReportDao.update(taskReportDao);
// #32782 指示者テーブル関連削除 end
mTaskDao.update(taskDto);
}
*/
public void updateTaskHotspot(String taskKey, Map<String, String> param) { public void updateTaskHotspot(String taskKey, Map<String, String> param) {
TaskDto taskDto = mTaskDao.getTaskByTaskKey(taskKey); TaskDto taskDto = mTaskDao.getTaskByTaskKey(taskKey);
TaskDirectionsDto taskDirectionsDto = mTaskDirectionsDao.getTaskDirections(taskKey); TaskDirectionsDto taskDirectionsDto = mTaskDirectionsDao.getTaskDirections(taskKey);
...@@ -879,6 +1143,8 @@ public class OperationLogic extends AbstractLogic { ...@@ -879,6 +1143,8 @@ public class OperationLogic extends AbstractLogic {
mTaskDirectionsDao.update(taskDirectionsDto); mTaskDirectionsDao.update(taskDirectionsDto);
mTaskDao.update(taskDto); mTaskDao.update(taskDto);
} }
// #32782 指示者テーブル関連削除 end
/** /**
* ホットスポットの位置更新 * ホットスポットの位置更新
...@@ -887,6 +1153,23 @@ public class OperationLogic extends AbstractLogic { ...@@ -887,6 +1153,23 @@ public class OperationLogic extends AbstractLogic {
* @param newX * @param newX
* @param newY * @param newY
*/ */
// #32782 指示者テーブル関連削除 start
// TODO change
/*
public void updateTaskHotspot(String taskKey, float newX, float newY) {
TaskDto taskDto = mTaskDao.getTaskByTaskKey(taskKey);
// #32782 指示者テーブル関連削除 start
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();
mTaskReportDao.update(taskReportDto);
// #32782 指示者テーブル関連削除 end
mTaskDao.update(taskDto);
}
*/
public void updateTaskHotspot(String taskKey, float newX, float newY) { public void updateTaskHotspot(String taskKey, float newX, float newY) {
TaskDto taskDto = mTaskDao.getTaskByTaskKey(taskKey); TaskDto taskDto = mTaskDao.getTaskByTaskKey(taskKey);
TaskDirectionsDto taskDirectionsDto = mTaskDirectionsDao.getTaskDirections(taskKey); TaskDirectionsDto taskDirectionsDto = mTaskDirectionsDao.getTaskDirections(taskKey);
...@@ -898,10 +1181,11 @@ public class OperationLogic extends AbstractLogic { ...@@ -898,10 +1181,11 @@ public class OperationLogic extends AbstractLogic {
mTaskDirectionsDao.update(taskDirectionsDto); mTaskDirectionsDao.update(taskDirectionsDto);
mTaskDao.update(taskDto); mTaskDao.update(taskDto);
} }
// #32782 指示者テーブル関連削除 end
/** /**
* 作業指示、作業報告用のjsonファイル * 作業指示、作業報告用のjsonファイル
* taskDirections.jsonとtaskDirectionsSuggest.jsonとhotspot.jsonを作成 * taskReport.jsonとtaskReportSuggest.jsonとhotspot.jsonを作成
* *
* @param operationId * @param operationId
* @param reportUpdateType * @param reportUpdateType
...@@ -915,7 +1199,7 @@ public class OperationLogic extends AbstractLogic { ...@@ -915,7 +1199,7 @@ public class OperationLogic extends AbstractLogic {
/** /**
* 作業指示、作業報告用のjsonファイル * 作業指示、作業報告用のjsonファイル
* taskDirections.jsonとtaskDirectionsSuggest.jsonとhotspot.jsonを作成 * taskReport.jsonとtaskReportSuggest.jsonとhotspot.jsonを作成
* *
* @param operationId * @param operationId
* @param reportUpdateType * @param reportUpdateType
...@@ -924,6 +1208,28 @@ public class OperationLogic extends AbstractLogic { ...@@ -924,6 +1208,28 @@ public class OperationLogic extends AbstractLogic {
* @param routineTaskReportFlg * @param routineTaskReportFlg
* @throws IOException * @throws IOException
*/ */
// #32782 指示者テーブル関連削除 start
// TODO change
/*
public void createJsonForOperationContent(Long operationId, int reportUpdateType, String contentPath, boolean directionsFlg, boolean routineTaskReportFlg) throws IOException {
try {
// #32782 指示者テーブル関連削除 start
createTaskReportJson(operationId, contentPath);
createTaskReportSuggestJson(operationId, contentPath);
if (!directionsFlg) {
if (routineTaskReportFlg) {
createRoutineTaskReportJson(operationId, contentPath);
}
}
// #32782 指示者テーブル関連削除 end
createHopSpotJson(operationId, contentPath);
} catch (IOException e) {
Logger.e(TAG, "createJsonForOperationContent error : ", e);
throw e;
}
}
*/
public void createJsonForOperationContent(Long operationId, int reportUpdateType, String contentPath, boolean directionsFlg, boolean routineTaskReportFlg) throws IOException { public void createJsonForOperationContent(Long operationId, int reportUpdateType, String contentPath, boolean directionsFlg, boolean routineTaskReportFlg) throws IOException {
try { try {
createTaskDirectionsJson(operationId, contentPath); createTaskDirectionsJson(operationId, contentPath);
...@@ -1038,6 +1344,8 @@ public class OperationLogic extends AbstractLogic { ...@@ -1038,6 +1344,8 @@ public class OperationLogic extends AbstractLogic {
FileUtil.createFile(contentPath + "/taskHotspot.json", hotspotJson.toString()); FileUtil.createFile(contentPath + "/taskHotspot.json", hotspotJson.toString());
} }
// TODO
// 削除対象
/** /**
* taskDirections.jsonファイル作成 * taskDirections.jsonファイル作成
* *
...@@ -1046,6 +1354,8 @@ public class OperationLogic extends AbstractLogic { ...@@ -1046,6 +1354,8 @@ public class OperationLogic extends AbstractLogic {
* @throws IOException * @throws IOException
*/ */
private void createTaskDirectionsJson(Long operationId, String contentPath) throws IOException { private void createTaskDirectionsJson(Long operationId, String contentPath) throws IOException {
// #32782 指示者テーブル関連削除 start
// TODO Delete method
List<JSONObject> taskDirectionsJsonList = new ArrayList<JSONObject>(); List<JSONObject> taskDirectionsJsonList = new ArrayList<JSONObject>();
JSONObject taskDirectionsJson = new JSONObject(); JSONObject taskDirectionsJson = new JSONObject();
List<TaskDirectionsDto> taskDirectionsDtoList = mTaskDirectionsDao.getTaskDirectionsByOperationId(operationId); List<TaskDirectionsDto> taskDirectionsDtoList = mTaskDirectionsDao.getTaskDirectionsByOperationId(operationId);
...@@ -1055,6 +1365,7 @@ public class OperationLogic extends AbstractLogic { ...@@ -1055,6 +1365,7 @@ public class OperationLogic extends AbstractLogic {
taskDirectionsJson.put(ABookKeys.TASK_DIRECTIONS, taskDirectionsJsonList); taskDirectionsJson.put(ABookKeys.TASK_DIRECTIONS, taskDirectionsJsonList);
Logger.d(TAG, "createTaskDirectionsJson : " + taskDirectionsJson.toString()); Logger.d(TAG, "createTaskDirectionsJson : " + taskDirectionsJson.toString());
FileUtil.createFile(contentPath + "/" + ABookKeys.TASK_DIRECTIONS + ".json", taskDirectionsJson.toString()); FileUtil.createFile(contentPath + "/" + ABookKeys.TASK_DIRECTIONS + ".json", taskDirectionsJson.toString());
// #32782 指示者テーブル関連削除 end
} }
/** /**
...@@ -1065,6 +1376,8 @@ public class OperationLogic extends AbstractLogic { ...@@ -1065,6 +1376,8 @@ public class OperationLogic extends AbstractLogic {
* @throws IOException * @throws IOException
*/ */
private void createTaskDirectionsSuggestJson(Long operationId, String contentPath) throws IOException { private void createTaskDirectionsSuggestJson(Long operationId, String contentPath) throws IOException {
// #32782 指示者テーブル関連削除 start
// TODO Delete mothod
JSONObject itemJson = new JSONObject(); JSONObject itemJson = new JSONObject();
JSONObject taskDirectionsSuggestJson = new JSONObject(); JSONObject taskDirectionsSuggestJson = new JSONObject();
List<TaskDirectionsItemsDto> taskDirectionsItemsDtoList = mTaskDirectionsItemsDao.getTaskDirectionsItemByOperationId(operationId); List<TaskDirectionsItemsDto> taskDirectionsItemsDtoList = mTaskDirectionsItemsDao.getTaskDirectionsItemByOperationId(operationId);
...@@ -1090,8 +1403,11 @@ public class OperationLogic extends AbstractLogic { ...@@ -1090,8 +1403,11 @@ public class OperationLogic extends AbstractLogic {
} }
taskDirectionsSuggestJson.put(ABookKeys.TASK_DIRECTIONS_SUGGEST, itemJson); taskDirectionsSuggestJson.put(ABookKeys.TASK_DIRECTIONS_SUGGEST, itemJson);
FileUtil.createFile(contentPath + "/" + ABookKeys.TASK_DIRECTIONS_SUGGEST + ".json", taskDirectionsSuggestJson.toString()); FileUtil.createFile(contentPath + "/" + ABookKeys.TASK_DIRECTIONS_SUGGEST + ".json", taskDirectionsSuggestJson.toString());
// #32782 指示者テーブル関連削除 end
} }
public void createTaskReportJson(Long operationId, String contentPath) throws IOException { public void createTaskReportJson(Long operationId, String contentPath) throws IOException {
List<JSONObject> taskReportJsonList = new ArrayList<JSONObject>(); List<JSONObject> taskReportJsonList = new ArrayList<JSONObject>();
JSONObject taskReportJson = new JSONObject(); JSONObject taskReportJson = new JSONObject();
...@@ -1195,7 +1511,11 @@ public class OperationLogic extends AbstractLogic { ...@@ -1195,7 +1511,11 @@ public class OperationLogic extends AbstractLogic {
// プロジェクト毎に作業の送信フラグがあるかチェックし、存在する場合プロジェクトのデータ同期必要区分をtrueにセット // プロジェクト毎に作業の送信フラグがあるかチェックし、存在する場合プロジェクトのデータ同期必要区分をtrueにセット
if (ABVDataCache.getInstance().getMemberInfo().operationAuthLevel == OperationAuthLevel.OPERATION_INSTRUCTOR) { if (ABVDataCache.getInstance().getMemberInfo().operationAuthLevel == OperationAuthLevel.OPERATION_INSTRUCTOR) {
// 作業指示者 // 作業指示者
// #32782 指示者テーブル関連削除 start
// TODO change
// if (mTaskReportDao.isExistSendTaskData(operationDto.operationId)) {
if (mTaskDirectionsDao.isExistSendTaskData(operationDto.operationId)) { if (mTaskDirectionsDao.isExistSendTaskData(operationDto.operationId)) {
// #32782 指示者テーブル関連削除 end
mOperationDao.updateNeedSyncFlg(operationDto.operationId, true); mOperationDao.updateNeedSyncFlg(operationDto.operationId, true);
} }
} else { } else {
...@@ -1312,7 +1632,57 @@ public class OperationLogic extends AbstractLogic { ...@@ -1312,7 +1632,57 @@ public class OperationLogic extends AbstractLogic {
* @return * @return
* @throws Exception * @throws Exception
*/ */
// TODO sendTaskDirectionsData 名を変更必要
public void sendTaskDirectionsData(long operationId, String taskKey, Callback progressCallback) throws ABVException, NetworkDisconnectedException, IOException, ZipException, NoSuchAlgorithmException { public void sendTaskDirectionsData(long operationId, String taskKey, Callback progressCallback) throws ABVException, NetworkDisconnectedException, IOException, ZipException, NoSuchAlgorithmException {
// #32782 指示者テーブル関連削除 start
// TODO change
/*
List<TaskReportDto> taskReportDtoList = null;
int maxProgress = 0;
if (taskKey == null) {
taskReportDtoList = mTaskReportDao.getSendableTaskData(operationId);
maxProgress = 40;
} else {
taskReportDtoList = mTaskReportDao.getSendableTaskData(operationId, taskKey, false);
maxProgress = 100;
}
if (taskReportDtoList != null && taskReportDtoList.size() > 0) {
//プログレスを40%進行させるための計算
int progress = maxProgress / taskReportDtoList.size();
for (TaskReportDto dto : taskReportDtoList) {
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;
// #32782 指示者テーブル関連削除 start
dto.reporterFlag = false;
// #32782 指示者テーブル関連削除 end
mTaskReportDao.update(dto);
}
progressCallback.callback(new Integer(progress));
}
}
*/
List<TaskDirectionsDto> taskDirectionsDtoList = null; List<TaskDirectionsDto> taskDirectionsDtoList = null;
int maxProgress = 0; int maxProgress = 0;
if (taskKey == null) { if (taskKey == null) {
...@@ -1355,6 +1725,7 @@ public class OperationLogic extends AbstractLogic { ...@@ -1355,6 +1725,7 @@ public class OperationLogic extends AbstractLogic {
progressCallback.callback(new Integer(progress)); progressCallback.callback(new Integer(progress));
} }
} }
// #32782 指示者テーブル関連削除 end
} }
/** /**
...@@ -1364,6 +1735,125 @@ public class OperationLogic extends AbstractLogic { ...@@ -1364,6 +1735,125 @@ public class OperationLogic extends AbstractLogic {
* @throws Exception * @throws Exception
*/ */
public void sendTaskReportSendData(long operationId, String taskKey, Callback progressCallback) throws Exception { public void sendTaskReportSendData(long operationId, String taskKey, Callback progressCallback) throws Exception {
// #32782 指示者テーブル関連削除 start
// TODO change
/*
List<TaskReportDto> taskReportDtoList = null;
int maxProgress = 0;
if (taskKey == null) {
taskReportDtoList = mTaskReportDao.getSendableTaskData(operationId);
maxProgress = 40;
} else {
taskReportDtoList = mTaskReportDao.getSendableTaskData(operationId, taskKey, true);
maxProgress = 100;
}
if (taskReportDtoList != null && taskReportDtoList.size() > 0) {
// #32782 指示者テーブル関連削除 start
// 指示者の場合
if (ABVDataCache.getInstance().getMemberInfo().operationAuthLevel == OperationAuthLevel.OPERATION_INSTRUCTOR) {
//プログレスを40%進行させるための計算
int progress = maxProgress / taskReportDtoList.size();
for (TaskReportDto dto : taskReportDtoList) {
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;
mTaskReportDao.update(dto);
}
progressCallback.callback(new Integer(progress));
}
} else {
OperationDto operationDto = mOperationDao.getOperation(operationId);
int allSendCount = mTaskReportSendDao.getSendableTaskReportSendDataCount(operationId, taskKey);
int progress = maxProgress / allSendCount;
for (TaskReportDto taskReportDto : taskReportDtoList) {
List<TaskReportSendDto> taskReportSendDtoList = mTaskReportSendDao.getSendableTaskReportSendData(taskReportDto.taskKey);
int lastTaskReportSendId = mTaskReportSendDao.getLastTaskReportSendId(taskReportDto.taskKey);
for (TaskReportSendDto taskReportSendDto : taskReportSendDtoList) {
// 履歴なし:元のattachedFileSendFlg
// 履歴追加:古い履歴はtrue
// 履歴更新:true、ファイルに変更が無くてもzipファイル作成
if (taskReportSendDto.taskReportSendId < lastTaskReportSendId || operationDto.reportUpdateType == Constant.OperationUpdateType.HISTORY_UPDATE) {
taskReportDto.attachedFileSendFlg = true;
}
File zipFile = null;
if (taskReportDto.attachedFileSendFlg) {
String fileName = null;
zipFile = createAttachedFileForSend(operationId, taskReportDto.taskKey, taskReportSendDto.taskReportSendId, false, 0, "");
if (zipFile != null) {
fileName = FileUtil.getFilenameWithoutExt(zipFile.getName());
}
taskReportDto.localAttachedFileName = fileName != null ? SecurityUtil.getMd5Hash(fileName) : null;
}
try {
AcmsClient.getInstance(cache.getUrlPath(), networkAdapter).sendTaskData(
cache.getMemberInfo().sid,
String.valueOf(operationId),
taskReportDto.taskKey,
taskReportDto.delFlg ? "1" : "0", String.valueOf(1),
taskReportDto.taskHotSpotInfo,
taskReportSendDto.jsonData,
zipFile,
taskReportDto.attachedFileSendFlg,
taskReportSendDto.saveDate
);
progressCallback.callback(new Integer(progress));
mTaskReportSendDao.deleteBySendId(taskReportSendDto.taskReportSendId);
FileUtil.delete(ABVEnvironment.getInstance().getOperationTaskReportSendDirFilePath(operationId, taskReportSendDto.taskKey, taskReportSendDto.taskReportSendId));
} catch (Exception ex) {
throw ex;
} finally {
if (zipFile != null) {
zipFile.delete();
}
}
}
if (taskReportDto.delFlg) {
// 物理削除
mTaskDao.deleteTaskData(taskReportDto.taskKey, false);
} else {
if (operationDto.reportUpdateType == Constant.OperationUpdateType.HISTORY_ADD) {
taskReportDto.jsonData = "";
}
taskReportDto.dataSendFlg = false;
taskReportDto.attachedFileSendFlg = false;
// #32782 指示者テーブル関連削除 start
taskReportDto.reporterFlag = true;
// #32782 指示者テーブル関連削除 end
mTaskReportDao.update(taskReportDto);
}
}
}
// #32782 指示者テーブル関連削除 end
}
*/
List<TaskReportDto> taskReportDtoList = null; List<TaskReportDto> taskReportDtoList = null;
int maxProgress = 0; int maxProgress = 0;
if (taskKey == null) { if (taskKey == null) {
...@@ -1440,6 +1930,7 @@ public class OperationLogic extends AbstractLogic { ...@@ -1440,6 +1930,7 @@ public class OperationLogic extends AbstractLogic {
} }
} }
} }
// #32782 指示者テーブル関連削除 end
} }
/** /**
......
...@@ -143,7 +143,10 @@ public class OperationListActivity extends ABVUIActivity { ...@@ -143,7 +143,10 @@ public class OperationListActivity extends ABVUIActivity {
private Dialog mPanoEntryDialog; private Dialog mPanoEntryDialog;
private OperationContentDao mOperationContentDao = AbstractDao.getDao(OperationContentDao.class); private OperationContentDao mOperationContentDao = AbstractDao.getDao(OperationContentDao.class);
// #32782 指示者テーブル関連削除 start
// TODO delete
private TaskDirectionsDao mTaskDirectionsDao = AbstractDao.getDao(TaskDirectionsDao.class); private TaskDirectionsDao mTaskDirectionsDao = AbstractDao.getDao(TaskDirectionsDao.class);
// #32782 指示者テーブル関連削除 end
private TaskReportDao mTaskReportDao = AbstractDao.getDao(TaskReportDao.class); private TaskReportDao mTaskReportDao = AbstractDao.getDao(TaskReportDao.class);
private RoutineTaskReportDao mRoutineTaskReportDao = AbstractDao.getDao(RoutineTaskReportDao.class); private RoutineTaskReportDao mRoutineTaskReportDao = AbstractDao.getDao(RoutineTaskReportDao.class);
private OperationLogic mOperationLogic = AbstractLogic.getLogic(OperationLogic.class); private OperationLogic mOperationLogic = AbstractLogic.getLogic(OperationLogic.class);
...@@ -1033,6 +1036,7 @@ public class OperationListActivity extends ABVUIActivity { ...@@ -1033,6 +1036,7 @@ public class OperationListActivity extends ABVUIActivity {
} }
lastEditDate = json.lastEditDate; lastEditDate = json.lastEditDate;
} else { } else {
// TODO
OperationDataJSON json = AcmsClient.getInstance(ABVDataCache.getInstance().getUrlPath(), ABVEnvironment.getInstance().networkAdapter).getOpereationData(param); OperationDataJSON json = AcmsClient.getInstance(ABVDataCache.getInstance().getUrlPath(), ABVEnvironment.getInstance().networkAdapter).getOpereationData(param);
//プログレスを40%進行させるための計算 //プログレスを40%進行させるための計算
...@@ -1041,6 +1045,60 @@ public class OperationListActivity extends ABVUIActivity { ...@@ -1041,6 +1045,60 @@ public class OperationListActivity extends ABVUIActivity {
progress = 40 / json.taskDtoList.size(); 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;
}
// #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; JSONObject taskDirectionJson;
for (TaskDto taskDto : json.taskDtoList) { for (TaskDto taskDto : json.taskDtoList) {
String directionsAttachedFileName = taskDto.taskDirectionsDto.attachedFileName; String directionsAttachedFileName = taskDto.taskDirectionsDto.attachedFileName;
...@@ -1084,6 +1142,7 @@ public class OperationListActivity extends ABVUIActivity { ...@@ -1084,6 +1142,7 @@ public class OperationListActivity extends ABVUIActivity {
} }
progressCallback.callback(new Integer(progress)); progressCallback.callback(new Integer(progress));
} }
// #32782 指示者テーブル関連削除 end
// サーバーから取得した作業情報がローカルに存在しないので削除する // サーバーから取得した作業情報がローカルに存在しないので削除する
for (TaskDto taskDto : localTaskList) { for (TaskDto taskDto : localTaskList) {
...@@ -1103,7 +1162,11 @@ public class OperationListActivity extends ABVUIActivity { ...@@ -1103,7 +1162,11 @@ public class OperationListActivity extends ABVUIActivity {
// 既存の添付ディレクトリ削除 // 既存の添付ディレクトリ削除
FileUtil.delete(ABVEnvironment.getInstance().getTempTaskDirPath(contentId, taskKey)); FileUtil.delete(ABVEnvironment.getInstance().getTempTaskDirPath(contentId, taskKey));
// #32782 指示者テーブル関連削除 start
// TODO change
String directionsLocalAttachedFileName = mTaskDirectionsDao.getTaskDirectionsAttachedFileName(taskKey); String directionsLocalAttachedFileName = mTaskDirectionsDao.getTaskDirectionsAttachedFileName(taskKey);
// String directionsLocalAttachedFileName = mTaskReportDao.getTaskReportAttachedFileName(taskKey);
// #32782 指示者テーブル関連削除 end
String reportLocalAttachedFileName = mTaskReportDao.getTaskReportAttachedFileName(taskKey); String reportLocalAttachedFileName = mTaskReportDao.getTaskReportAttachedFileName(taskKey);
int count = 0; int count = 0;
boolean getDirectionsFileFlg = directionsAttachedFileName != null && !directionsAttachedFileName.equals(directionsLocalAttachedFileName); boolean getDirectionsFileFlg = directionsAttachedFileName != null && !directionsAttachedFileName.equals(directionsLocalAttachedFileName);
......
...@@ -66,6 +66,105 @@ public class ABookCheckWebViewHelper extends ABookHelper { ...@@ -66,6 +66,105 @@ public class ABookCheckWebViewHelper extends ABookHelper {
public void doABookCheckParam(ABVContentViewActivity context, String cmd, String taskKey, int reportUpdateType, Map<String, String> param, long operationId, String contentPath, long contentId, boolean routineTaskReportFlg, Callback finishCallback) throws IOException { public void doABookCheckParam(ABVContentViewActivity context, String cmd, String taskKey, int reportUpdateType, Map<String, String> param, long operationId, String contentPath, long contentId, boolean routineTaskReportFlg, Callback finishCallback) throws IOException {
int taskReportSendId = 0; int taskReportSendId = 0;
mFinishCallback = finishCallback; mFinishCallback = finishCallback;
// #32782 指示者テーブル関連削除 start
// TODO append
// int mOperationAuthLevel = ABVDataCache.getInstance().getMemberInfo().operationAuthLevel;
// #32782 指示者テーブル関連削除 end
// #32782 指示者テーブル関連削除 start
// TODO change
/*
switch (cmd) {
case ABookKeys.CMD_INSERT_TASK_DIRECTIONS:
// #32782 指示者テーブル関連削除 start
// TODO TASK_DIRECTIONS の削除
case ABookKeys.CMD_INSERT_TASK_REPORT:
insertOrUpdateTaskReport(taskKey, reportUpdateType, operationId, contentId, param, contentPath, true, routineTaskReportFlg);
if (mOperationAuthLevel == OperationAuthLevel.OPERATION_INSTRUCTOR) {
copyTaskAttachedMovie(operationId, contentId, taskKey);
sendTaskReportData(context, operationId, taskKey, -1, true);
} else {
sendTaskReportData(context, operationId, taskKey, reportUpdateType, false);
}
// #32782 指示者テーブル関連削除 end
break;
// TODO TASK_DIRECTIONS の削除
case ABookKeys.CMD_UPDATE_TASK_DIRECTIONS:
case ABookKeys.CMD_UPDATE_TASK_REPORT:
insertOrUpdateTaskReport(taskKey, reportUpdateType, operationId, contentId, param, contentPath, false, routineTaskReportFlg);
if (mOperationAuthLevel == OperationAuthLevel.OPERATION_INSTRUCTOR) {
copyTaskAttachedMovie(operationId, contentId, taskKey);
sendTaskReportData(context, operationId, taskKey, -1, true);
} else {
sendTaskReportData(context, operationId, taskKey, reportUpdateType, false);
}
break;
// #32782 指示者テーブル関連削除 start
case ABookKeys.CMD_DELETE_TASK_DIRECTIONS:
// TODO TASK_DIRECTIONS の削除
case ABookKeys.CMD_DELETE_TASK_REPORT:
int taskReportId = 0;
String reportStartDate = "";
boolean sendTaskReportDataFlg = false;
if (mOperationAuthLevel == OperationAuthLevel.OPERATION_INSTRUCTOR) {
mOperationLogic.deleteTaskReport(operationId, contentId, taskKey);
mOperationLogic.createJsonForOperationContent(operationId, reportUpdateType, contentPath, false);
copyTaskAttachedMovie(operationId, contentId, taskKey);
sendTaskReportData(context, operationId, taskKey, -1, true);
} else {
if (routineTaskReportFlg) {
taskReportId = Integer.valueOf(param.get(ABookKeys.TASK_REPORT_ID));
reportStartDate = param.get(ABookKeys.REPORT_START_DATE);
reportStartDate = reportStartDate.replace("T", " ");
mOperationLogic.deleteRoutineTaskReport(operationId, contentId, taskKey, taskReportId, reportStartDate);
mOperationLogic.createJsonForOperationContent(operationId, reportUpdateType, contentPath, false);
copyRoutineTaskReportAttachedMovie(operationId, contentId, taskKey, taskReportId, reportStartDate);
RoutineTaskReportDto routineTaskTaskReportDto = mOperationLogic.getRoutineTaskReportUtc(taskKey, taskReportId, reportStartDate);
if (routineTaskTaskReportDto != null && reportUpdateType != Constant.OperationUpdateType.HISTORY_ADD) {
sendTaskReportDataFlg = true;
}
} else {
mOperationLogic.deleteTaskReport(operationId, contentId, taskKey);
mOperationLogic.createJsonForOperationContent(operationId, reportUpdateType, contentPath, false);
copyTaskAttachedMovie(operationId, contentId, taskKey);
TaskReportDto taskReportDto = mOperationLogic.getTaskReport(taskKey);
if (taskReportDto != null && reportUpdateType != Constant.OperationUpdateType.HISTORY_ADD) {
sendTaskReportDataFlg = true;
}
}
if (sendTaskReportDataFlg) {
if (reportUpdateType == Constant.OperationUpdateType.HISTORY_NO) {
taskReportSendId = mOperationLogic.getLastTaskReportSendId(taskKey);
mOperationLogic.updateTaskReportSend(taskKey, taskReportId, reportStartDate, null, true);
deleteReportTaskSendFiles(operationId, taskKey, taskReportSendId);
} else if (reportUpdateType == Constant.OperationUpdateType.HISTORY_UPDATE) {
mOperationLogic.insertTaskReportSend(taskKey, taskReportId, reportStartDate, null, true);
}
sendTaskReportData(context, operationId, taskKey, reportUpdateType, false);
} else {
mFinishCallback.callback(false);
}
}
break;
// #32782 指示者テーブル関連削除 end
case ABookKeys.CMD_MOVE_HOT_SPOT:
mOperationLogic.updateTaskHotspot(taskKey, param);
mOperationLogic.createHopSpotJson(operationId, contentPath);
break;
case ABookKeys.CMD_CANCEL_TASK_DIRECTIONS:
case ABookKeys.CMD_CANCEL_TASK_REPORT:
FileUtil.delete(ABVEnvironment.getInstance().getTempTaskDirPath(contentId, taskKey));
mFinishCallback.callback(false);
break;
}
*/
switch (cmd) { switch (cmd) {
case ABookKeys.CMD_INSERT_TASK_DIRECTIONS: case ABookKeys.CMD_INSERT_TASK_DIRECTIONS:
insertOrUpdateTaskDirections(taskKey, operationId, contentId, param, contentPath, true); insertOrUpdateTaskDirections(taskKey, operationId, contentId, param, contentPath, true);
...@@ -110,7 +209,7 @@ public class ABookCheckWebViewHelper extends ABookHelper { ...@@ -110,7 +209,7 @@ public class ABookCheckWebViewHelper extends ABookHelper {
copyRoutineTaskReportAttachedMovie(operationId, contentId, taskKey, taskReportId, reportStartDate); copyRoutineTaskReportAttachedMovie(operationId, contentId, taskKey, taskReportId, reportStartDate);
RoutineTaskReportDto routineTaskTaskReportDto = mOperationLogic.getRoutineTaskReportUtc(taskKey, taskReportId, reportStartDate); RoutineTaskReportDto routineTaskTaskReportDto = mOperationLogic.getRoutineTaskReportUtc(taskKey, taskReportId, reportStartDate);
if(routineTaskTaskReportDto != null && reportUpdateType != Constant.OperationUpdateType.HISTORY_ADD) { if (routineTaskTaskReportDto != null && reportUpdateType != Constant.OperationUpdateType.HISTORY_ADD) {
sendTaskReportDataFlg = true; sendTaskReportDataFlg = true;
} }
} else { } else {
...@@ -119,12 +218,12 @@ public class ABookCheckWebViewHelper extends ABookHelper { ...@@ -119,12 +218,12 @@ public class ABookCheckWebViewHelper extends ABookHelper {
copyTaskAttachedMovie(operationId, contentId, taskKey); copyTaskAttachedMovie(operationId, contentId, taskKey);
TaskReportDto taskReportDto = mOperationLogic.getTaskReport(taskKey); TaskReportDto taskReportDto = mOperationLogic.getTaskReport(taskKey);
if(taskReportDto != null && reportUpdateType != Constant.OperationUpdateType.HISTORY_ADD) { if (taskReportDto != null && reportUpdateType != Constant.OperationUpdateType.HISTORY_ADD) {
sendTaskReportDataFlg = true; sendTaskReportDataFlg = true;
} }
} }
if(sendTaskReportDataFlg) { if (sendTaskReportDataFlg) {
if (reportUpdateType == Constant.OperationUpdateType.HISTORY_NO) { if (reportUpdateType == Constant.OperationUpdateType.HISTORY_NO) {
taskReportSendId = mOperationLogic.getLastTaskReportSendId(taskKey); taskReportSendId = mOperationLogic.getLastTaskReportSendId(taskKey);
mOperationLogic.updateTaskReportSend(taskKey, taskReportId, reportStartDate, null, true); mOperationLogic.updateTaskReportSend(taskKey, taskReportId, reportStartDate, null, true);
...@@ -144,6 +243,7 @@ public class ABookCheckWebViewHelper extends ABookHelper { ...@@ -144,6 +243,7 @@ public class ABookCheckWebViewHelper extends ABookHelper {
mFinishCallback.callback(false); mFinishCallback.callback(false);
break; break;
} }
// #32782 指示者テーブル関連削除 end
} }
/** /**
...@@ -154,9 +254,12 @@ public class ABookCheckWebViewHelper extends ABookHelper { ...@@ -154,9 +254,12 @@ public class ABookCheckWebViewHelper extends ABookHelper {
* @param taskKey タスクキー * @param taskKey タスクキー
*/ */
private void sendTaskDirectionsData(final ABVContentViewActivity context, final long operationId, final String taskKey) { private void sendTaskDirectionsData(final ABVContentViewActivity context, final long operationId, final String taskKey) {
// #32782 指示者テーブル関連削除 start
// TODO Delete mothod
Logger.d(TAG, "[sendTaskDirectionsData] operationId=%s, taskKey=%s", operationId, taskKey); Logger.d(TAG, "[sendTaskDirectionsData] operationId=%s, taskKey=%s", operationId, taskKey);
//作業指示送信時には「reportUpdateType」値が必要ではないので、「-1」に設定 //作業指示送信時には「reportUpdateType」値が必要ではないので、「-1」に設定
sendTaskData(context, operationId, taskKey, -1, true); sendTaskData(context, operationId, taskKey, -1, true);
// #32782 指示者テーブル関連削除 end
} }
/** /**
...@@ -166,10 +269,19 @@ public class ABookCheckWebViewHelper extends ABookHelper { ...@@ -166,10 +269,19 @@ public class ABookCheckWebViewHelper extends ABookHelper {
* @param taskKey タスクキー * @param taskKey タスクキー
* @param reportUpdateType 作業履歴タイプ * @param reportUpdateType 作業履歴タイプ
*/ */
// #32782 指示者テーブル関連削除 start
// TODO change
/*
private void sendTaskReportData(final ABVContentViewActivity context, final long operationId, final String taskKey, final int reportUpdateType, final boolean isDirection) {
Logger.d(TAG, "[sendTaskReportData] operationId=%s, taskKey=%s", operationId, taskKey);
sendTaskData(context, operationId, taskKey, reportUpdateType, isDirection);
}
*/
private void sendTaskReportData(final ABVContentViewActivity context, final long operationId, final String taskKey, final int reportUpdateType) { private void sendTaskReportData(final ABVContentViewActivity context, final long operationId, final String taskKey, final int reportUpdateType) {
Logger.d(TAG, "[sendTaskReportData] operationId=%s, taskKey=%s", operationId, taskKey); Logger.d(TAG, "[sendTaskReportData] operationId=%s, taskKey=%s", operationId, taskKey);
sendTaskData(context, operationId, taskKey, reportUpdateType, false); sendTaskData(context, operationId, taskKey, reportUpdateType, false);
} }
// #32782 指示者テーブル関連削除 end
/** /**
* 作業報告・指示データ送信処理(共通) * 作業報告・指示データ送信処理(共通)
...@@ -207,7 +319,11 @@ public class ABookCheckWebViewHelper extends ABookHelper { ...@@ -207,7 +319,11 @@ public class ABookCheckWebViewHelper extends ABookHelper {
boolean isError = false; boolean isError = false;
try { try {
if (isDirections) { if (isDirections) {
// #32782 指示者テーブル関連削除 start
// TODO change
// mOperationLogic.sendTaskReportSendData(operationId, taskKey, progressCallback);
mOperationLogic.sendTaskDirectionsData(operationId, taskKey, progressCallback); mOperationLogic.sendTaskDirectionsData(operationId, taskKey, progressCallback);
// #32782 指示者テーブル関連削除 end
mOperationLogic.updateSyncOperation(operationId, true); mOperationLogic.updateSyncOperation(operationId, true);
} else { } else {
OperationDto operationDto = mOperationLogic.getOperation(operationId); OperationDto operationDto = mOperationLogic.getOperation(operationId);
...@@ -327,6 +443,8 @@ public class ABookCheckWebViewHelper extends ABookHelper { ...@@ -327,6 +443,8 @@ public class ABookCheckWebViewHelper extends ABookHelper {
* @throws IOException * @throws IOException
*/ */
private void insertOrUpdateTaskDirections(String taskKey, long operationId, long contentId, Map<String, String> param, String contentPath, boolean insertFlg) throws IOException { private void insertOrUpdateTaskDirections(String taskKey, long operationId, long contentId, Map<String, String> param, String contentPath, boolean insertFlg) throws IOException {
// #32782 指示者テーブル関連削除 start
// TODO Delete method
boolean attachedChangeFlag = param.get(ABookKeys.ATTACHED_CHANGE_FLAG).equals("1") ? true : false; boolean attachedChangeFlag = param.get(ABookKeys.ATTACHED_CHANGE_FLAG).equals("1") ? true : false;
String taskDirections = param.get(ABookKeys.TASK_DIRECTIONS); String taskDirections = param.get(ABookKeys.TASK_DIRECTIONS);
JSONObject taskDirectionsJson = new JSONObject(taskDirections); JSONObject taskDirectionsJson = new JSONObject(taskDirections);
...@@ -338,8 +456,97 @@ public class ABookCheckWebViewHelper extends ABookHelper { ...@@ -338,8 +456,97 @@ public class ABookCheckWebViewHelper extends ABookHelper {
mOperationLogic.updateTaskDirections(taskKey, operationId, contentId, taskDirectionsJson, taskHotSpotInfo, null, attachedChangeFlag, true); mOperationLogic.updateTaskDirections(taskKey, operationId, contentId, taskDirectionsJson, taskHotSpotInfo, null, attachedChangeFlag, true);
mOperationLogic.createJsonForOperationContent(operationId, 0, contentPath, true); mOperationLogic.createJsonForOperationContent(operationId, 0, contentPath, true);
} }
// #32782 指示者テーブル関連削除 end
} }
// #32782 指示者テーブル関連削除 start
// TODO change
/*
private void insertOrUpdateTaskReport(String taskKey, int reportUpdateType, long operationId, long contentId, Map<String, String> param, String contentPath, boolean insertFlg, boolean routineTaskReportFlg) throws IOException {
int taskReportSendId = 0;
// #32782 指示者テーブル関連削除 start
// 指示者か報告者か判断
int mOperationAuthLevel = ABVDataCache.getInstance().getMemberInfo().operationAuthLevel;
boolean attachedChangeFlag = param.get(ABookKeys.ATTACHED_CHANGE_FLAG).equals("1") ? true : false;
String taskReport = param.get(ABookKeys.TASK_REPORT);
// TODO この処理後、削除
if (mOperationAuthLevel == OperationAuthLevel.OPERATION_INSTRUCTOR) {
taskReport = param.get(ABookKeys.TASK_DIRECTIONS);
}
JSONObject taskReportJson = new JSONObject(taskReport);
String taskHotSpotInfo = null;
if (mOperationAuthLevel == OperationAuthLevel.OPERATION_INSTRUCTOR) {
taskHotSpotInfo = param.get(ABookKeys.HOT_SPOT);
}
// #32782 指示者テーブル関連削除 end
int taskReportId = 0;
String reportStartDate = "";
// 指示者の場合下記の処理を行わない
if (mOperationAuthLevel == OperationAuthLevel.OPERATION_INSTRUCTOR) {
if (insertFlg) {
mOperationLogic.insertTaskReport(taskKey, operationId, contentId, taskReportJson, null, attachedChangeFlag, true, taskHotSpotInfo);
mOperationLogic.createJsonForOperationContent(operationId, reportUpdateType, contentPath, false);
} else {
mOperationLogic.updateTaskReport(taskKey, operationId, contentId, taskReportJson, null, attachedChangeFlag, true, taskHotSpotInfo);
mOperationLogic.createJsonForOperationContent(operationId, reportUpdateType, contentPath, false);
}
} else {
if (routineTaskReportFlg) {
taskReportId = Integer.valueOf(param.get(ABookKeys.TASK_REPORT_ID));
reportStartDate = param.get(ABookKeys.REPORT_START_DATE);
reportStartDate = reportStartDate.replace("T", " ");
//reportStartDate = DateTimeUtil.toString(DateTimeUtil.toDate(reportStartDate, "UTC", DateTimeFormat.yyyyMMddHHmmss_hyphen), DateTimeFormat.yyyyMMddHHmmss_hyphen);
RoutineTaskReportDto routineTaskTaskReportDto = mOperationLogic.getRoutineTaskReportUtc(taskKey, taskReportId, reportStartDate);
routineTaskTaskReportDto.jsonData = taskReport;
mOperationLogic.updateRoutineTaskReport(operationId, contentId, routineTaskTaskReportDto, attachedChangeFlag, true, insertFlg, true);
} else {
if (insertFlg) {
mOperationLogic.insertTaskReport(taskKey, operationId, contentId, taskReportJson, null, attachedChangeFlag, true, taskHotSpotInfo);
} else {
mOperationLogic.updateTaskReport(taskKey, operationId, contentId, taskReportJson, null, attachedChangeFlag, true, taskHotSpotInfo);
}
}
if (routineTaskReportFlg) {
mOperationLogic.createJsonForOperationContent(operationId, reportUpdateType, contentPath, false);
copyRoutineTaskReportAttachedMovie(operationId, contentId, taskKey, taskReportId, reportStartDate);
} else {
mOperationLogic.createJsonForOperationContent(operationId, reportUpdateType, contentPath, false);
copyTaskAttachedMovie(operationId, contentId, taskKey);
}
if (reportUpdateType == Constant.OperationUpdateType.HISTORY_NO) {
//データ無い場合は中でinsertされる
taskReportSendId = mOperationLogic.updateTaskReportSend(taskKey, taskReportId, reportStartDate, taskReportJson, false);
} else {
taskReportSendId = mOperationLogic.insertTaskReportSend(taskKey, taskReportId, reportStartDate, taskReportJson, false);
}
if (reportUpdateType == Constant.OperationUpdateType.HISTORY_ADD) {
if (routineTaskReportFlg) {
mOperationLogic.initialRoutineTaskReport(operationId, contentId, taskKey, taskReportId, reportStartDate);
mOperationLogic.createRoutineTaskReportJson(operationId, contentPath);
} else {
mOperationLogic.initialTaskReport(operationId, contentId, taskKey);
mOperationLogic.createTaskReportJson(operationId, contentPath);
}
}
copyReportTaskSendFiles(operationId, taskKey, taskReportSendId, routineTaskReportFlg, taskReportId, reportStartDate);
if (reportUpdateType == Constant.OperationUpdateType.HISTORY_ADD) {
// 作業報告のディレクトリ削除
FileUtil.delete(ABVEnvironment.getInstance().getTempTaskDirPath(contentId, taskKey));
FileUtil.delete(ABVEnvironment.getInstance().getOperationDirectionOrReportDirPath(operationId, taskKey, false));
}
}
}
*/
private void insertOrUpdateTaskReport(String taskKey, int reportUpdateType, long operationId, long contentId, Map<String, String> param, String contentPath, boolean insertFlg, boolean routineTaskReportFlg) throws IOException { private void insertOrUpdateTaskReport(String taskKey, int reportUpdateType, long operationId, long contentId, Map<String, String> param, String contentPath, boolean insertFlg, boolean routineTaskReportFlg) throws IOException {
int taskReportSendId = 0; int taskReportSendId = 0;
boolean attachedChangeFlag = param.get(ABookKeys.ATTACHED_CHANGE_FLAG).equals("1") ? true : false; boolean attachedChangeFlag = param.get(ABookKeys.ATTACHED_CHANGE_FLAG).equals("1") ? true : false;
...@@ -399,6 +606,7 @@ public class ABookCheckWebViewHelper extends ABookHelper { ...@@ -399,6 +606,7 @@ public class ABookCheckWebViewHelper extends ABookHelper {
FileUtil.delete(ABVEnvironment.getInstance().getOperationDirectionOrReportDirPath(operationId, taskKey, false)); FileUtil.delete(ABVEnvironment.getInstance().getOperationDirectionOrReportDirPath(operationId, taskKey, false));
} }
} }
// #32782 指示者テーブル関連削除 end
// xwalkで動画ファイルにアクセスするため、../files/..の以下のパスのディレクトりを../cache/..以下のパスに変更 // xwalkで動画ファイルにアクセスするため、../files/..の以下のパスのディレクトりを../cache/..以下のパスに変更
public void allCopyTaskAttachedMovieFileToCache(long operationId, long contentId, OperationDto operationDto) { public void allCopyTaskAttachedMovieFileToCache(long operationId, long contentId, OperationDto operationDto) {
......
...@@ -89,6 +89,7 @@ import jp.agentec.abook.abv.bl.acms.client.json.content.PageInfoJSON; ...@@ -89,6 +89,7 @@ import jp.agentec.abook.abv.bl.acms.client.json.content.PageInfoJSON;
import jp.agentec.abook.abv.bl.acms.client.json.content.PageInfoJSON.PageInfoJSONData; import jp.agentec.abook.abv.bl.acms.client.json.content.PageInfoJSON.PageInfoJSONData;
import jp.agentec.abook.abv.bl.acms.client.json.content.PageObjectJSON; import jp.agentec.abook.abv.bl.acms.client.json.content.PageObjectJSON;
import jp.agentec.abook.abv.bl.acms.client.json.content.TaskHotspotJSON; import jp.agentec.abook.abv.bl.acms.client.json.content.TaskHotspotJSON;
import jp.agentec.abook.abv.bl.acms.type.OperationAuthLevel;
import jp.agentec.abook.abv.bl.acms.type.OperationType; import jp.agentec.abook.abv.bl.acms.type.OperationType;
import jp.agentec.abook.abv.bl.common.ABVEnvironment; import jp.agentec.abook.abv.bl.common.ABVEnvironment;
import jp.agentec.abook.abv.bl.common.CommonExecutor; import jp.agentec.abook.abv.bl.common.CommonExecutor;
...@@ -5184,25 +5185,30 @@ public class ContentViewActivity extends ABVContentViewActivity { ...@@ -5184,25 +5185,30 @@ public class ContentViewActivity extends ABVContentViewActivity {
switch(cmd){ switch(cmd){
case ABookKeys.CMD_INSERT_TASK_DIRECTIONS: case ABookKeys.CMD_INSERT_TASK_DIRECTIONS:
case ABookKeys.CMD_UPDATE_TASK_DIRECTIONS: case ABookKeys.CMD_UPDATE_TASK_DIRECTIONS:
JSONObject hotspot = new JSONObject(checkParam.get(ABookKeys.HOT_SPOT)); // #32782 指示者テーブル関連削除 start
taskCode = hotspot.getString(ABookKeys.TASK_CODE); case ABookKeys.CMD_INSERT_TASK_REPORT:
case ABookKeys.CMD_UPDATE_TASK_REPORT:
operationTaskLayout.setIconStatus(taskKey, true); case ABookKeys.CMD_DELETE_TASK_REPORT:
operationTaskLayout.currentTaskDto.taskKey = taskKey; if (ABVDataCache.getInstance().getMemberInfo().operationAuthLevel == OperationAuthLevel.OPERATION_INSTRUCTOR) {
operationTaskLayout.currentTaskDto.taskCode = taskCode; JSONObject hotspot = new JSONObject(checkParam.get(ABookKeys.HOT_SPOT));
operationTaskLayout.addOperationTaskIcon(operationTaskLayout.currentLayout, operationTaskLayout.currentTaskDto);
//hideOperationTaskLayout(); taskCode = hotspot.getString(ABookKeys.TASK_CODE);
operationTaskLayout.setIconStatus(taskKey, true);
operationTaskLayout.currentTaskDto.taskKey = taskKey;
operationTaskLayout.currentTaskDto.taskCode = taskCode;
operationTaskLayout.addOperationTaskIcon(operationTaskLayout.currentLayout, operationTaskLayout.currentTaskDto);
//hideOperationTaskLayout();
} else {
operationTaskLayout.setIconStatus(taskKey, false);
}
// #32782 指示者テーブル関連削除 end
break; break;
case ABookKeys.CMD_DELETE_TASK_DIRECTIONS: case ABookKeys.CMD_DELETE_TASK_DIRECTIONS:
operationTaskLayout.setIconStatus(taskKey, true); operationTaskLayout.setIconStatus(taskKey, true);
//hideOperationTaskLayout(); //hideOperationTaskLayout();
break; break;
case ABookKeys.CMD_INSERT_TASK_REPORT:
case ABookKeys.CMD_UPDATE_TASK_REPORT:
case ABookKeys.CMD_DELETE_TASK_REPORT:
operationTaskLayout.setIconStatus(taskKey, false);
//hideOperationTaskLayout();
break;
default: default:
operationTaskLayout.setIconStatus(taskKey, false); operationTaskLayout.setIconStatus(taskKey, false);
break; break;
......
...@@ -100,7 +100,7 @@ public class HTMLWebViewActivity extends ParentWebViewActivity { ...@@ -100,7 +100,7 @@ public class HTMLWebViewActivity extends ParentWebViewActivity {
webView = (WebView) findViewById(R.id.webView2); webView = (WebView) findViewById(R.id.webView2);
webView.setVisibility(View.VISIBLE); webView.setVisibility(View.VISIBLE);
webView.setVerticalScrollbarOverlay(true); // スクロールバー部分の隙間を消す webView.setVerticalScrollbarOverlay(true); // スクロールバー部分の隙間を消す
//webView.setWebContentsDebuggingEnabled(true); //デバッグモード(chromeからinspect可) webView.setWebContentsDebuggingEnabled(true); //デバッグモード(chromeからinspect可)
// webView.setWebViewClient(new WebViewClient()); // webView.setWebViewClient(new WebViewClient());
// //ブラウザの描画領域を対象としたイベントをフック // //ブラウザの描画領域を対象としたイベントをフック
WebSettings settings = webView.getSettings(); WebSettings settings = webView.getSettings();
......
...@@ -19,6 +19,7 @@ import android.widget.RelativeLayout; ...@@ -19,6 +19,7 @@ import android.widget.RelativeLayout;
import android.widget.Toast; import android.widget.Toast;
import org.xwalk.core.XWalkNavigationHistory; import org.xwalk.core.XWalkNavigationHistory;
import org.xwalk.core.XWalkPreferences;
import org.xwalk.core.XWalkResourceClient; import org.xwalk.core.XWalkResourceClient;
import org.xwalk.core.XWalkSettings; import org.xwalk.core.XWalkSettings;
import org.xwalk.core.XWalkUIClient; import org.xwalk.core.XWalkUIClient;
...@@ -118,7 +119,7 @@ public class HTMLXWalkWebViewActivity extends ParentWebViewActivity { ...@@ -118,7 +119,7 @@ public class HTMLXWalkWebViewActivity extends ParentWebViewActivity {
settings.setDomStorageEnabled(true); // WebStorage有効化 settings.setDomStorageEnabled(true); // WebStorage有効化
settings.setCacheMode(XWalkSettings.LOAD_NO_CACHE); settings.setCacheMode(XWalkSettings.LOAD_NO_CACHE);
//XWalkPreferences.setValue(XWalkPreferences.REMOTE_DEBUGGING, true); //デバッグモード(chromeからinspect可) XWalkPreferences.setValue(XWalkPreferences.REMOTE_DEBUGGING, true); //デバッグモード(chromeからinspect可)
final RelativeLayout fl = (RelativeLayout) findViewById(R.id.frameTopbar); final RelativeLayout fl = (RelativeLayout) findViewById(R.id.frameTopbar);
......
...@@ -90,7 +90,7 @@ public class OperationTaskLayout extends RelativeLayout { ...@@ -90,7 +90,7 @@ public class OperationTaskLayout extends RelativeLayout {
mWebView.setVerticalScrollbarOverlay(true); // スクロールバー部分の隙間を消す mWebView.setVerticalScrollbarOverlay(true); // スクロールバー部分の隙間を消す
// mWebView.setWebViewClient(new WebViewClient()); // mWebView.setWebViewClient(new WebViewClient());
//mWebView.setWebContentsDebuggingEnabled(true); //デバッグモード(chromeからinspect可) mWebView.setWebContentsDebuggingEnabled(true); //デバッグモード(chromeからinspect可)
mWebView.addJavascriptInterface(jsInf, "android"); mWebView.addJavascriptInterface(jsInf, "android");
// //ブラウザの描画領域を対象としたイベントをフック // //ブラウザの描画領域を対象としたイベントをフック
WebSettings settings = mWebView.getSettings(); WebSettings settings = mWebView.getSettings();
......
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