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 });
} }
} }
...@@ -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
......
...@@ -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);
......
...@@ -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