Commit fc60ecba by Jeong Gilmo

Merge branch 'feature/1.0.1' into feature/1.0.1_33006

# Conflicts:
#	ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/home/helper/ABookCheckWebViewHelper.java
parents c751c115 4da293d2
......@@ -192,7 +192,6 @@ public class AcmsClient implements AcmsClientResponseListener {
dto.memberName = json.userName;
dto.requiredPasswordChange = json.requirePasswordChange;
dto.userId = json.userId;
dto.operationAuthLevel = json.operationAuthLevel;
dto.workerCode = json.workerCode;
if (json.result) {
......@@ -540,10 +539,10 @@ public class AcmsClient implements AcmsClientResponseListener {
HttpMultipartList.add(new HttpMultipart(ABookKeys.TASK_HOT_SPOT_INFO, taskReportDto.taskHotSpotInfo));
HttpMultipartList.add(new HttpMultipart(ABookKeys.TASK_REPORT_INFO, taskReportDto.jsonData));
HttpMultipartList.add(new HttpMultipart(ABookKeys.ATTACHED_CHANGE_FLAG, taskReportDto.attachedFileSendFlg ? "1" : "0"));
HttpMultipartList.add(new HttpMultipart(ABookKeys.ROUTINE_TASK_FLAG, reportType == Constant.ReportType.Routine ? "1" : "0"));
HttpMultipartList.add(new HttpMultipart(ABookKeys.ROUTINE_TASK_FLAG, reportType == Constant.ReportType.RoutineTask ? "1" : "0"));
// 定期点検用
if (reportType == Constant.ReportType.Routine) {
if (reportType == Constant.ReportType.RoutineTask) {
HttpMultipartList.add(new HttpMultipart(ABookKeys.TASK_REPORT_ID, StringUtil.toString(taskReportDto.taskReportId)));
HttpMultipartList.add(new HttpMultipart(ABookKeys.TASK_REPORT_INFO_ID, StringUtil.toString(taskReportDto.taskReportInfoId)));
HttpMultipartList.add(new HttpMultipart(ABookKeys.REPORT_START_DATE, DateTimeUtil.toStringForCmsGMT(taskReportDto.reportStartDate)));
......
......@@ -11,14 +11,12 @@ public class NewAppStoreLoginJSON extends AcmsBooleanResultJSON {
public static final String Sid = "sid";
public static final String UserName = "userName";
public static final String UserId = "userId";
public static final String OperationAuthLevel = "projectAuthLevel";
public static final String WorkerCode = "workerCode";
public String sid;
public RequirePasswordChangeCode requirePasswordChange;
public String userName;
public int userId;
public Integer operationAuthLevel;
public String workerCode;
public NewAppStoreLoginJSON(String jsonString) throws AcmsException {
......@@ -35,9 +33,6 @@ public class NewAppStoreLoginJSON extends AcmsBooleanResultJSON {
if (json.has(UserId)) {
userId = getInt(json,UserId);
}
if (json.has(OperationAuthLevel)) {
operationAuthLevel = getInt(json, OperationAuthLevel);
}
if (json.has(WorkerCode)) {
workerCode = getString(json, WorkerCode, StringUtil.Empty);
}
......
......@@ -59,8 +59,12 @@ public class OperationDataJSON extends AcmsCommonJSON {
dto.operationId = taskJson.getLong(OperationId);
dto.taskId = taskJson.getLong(TaskId);
dto.taskKey = taskJson.getString(TaskKey);
if (taskJson.has(TaskCode)) {
dto.taskCode = taskJson.getString(TaskCode);
}
if (taskJson.has(TaskStatus)) {
dto.taskStatus = taskJson.getInt(TaskStatus);
}
dto.taskHotSpotInfo = taskJson.getJSONObject(TaskHotspotInfo).toString();
......@@ -73,7 +77,16 @@ public class OperationDataJSON extends AcmsCommonJSON {
JSONObject taskReportJson = taskReportList.getJSONObject(j);
taskReportDto.taskKey = dto.taskKey;
taskReportDto.taskReportLevel = taskReportJson.getInt(TaskReportLevel);
// 報告可能区分
if (taskReportJson.has(EnableReport)) {
taskReportDto.enableReport = taskReportJson.getInt(EnableReport);
}
if (taskJson.has(TaskReportId)) {
// taskListの中にtaskReportIdキーが存在
taskReportDto.taskReportId = taskJson.getInt(TaskReportId);
}
if (taskReportJson.has(TaskReportInfoId)) {
// 定期点検の場合
......@@ -93,10 +106,14 @@ public class OperationDataJSON extends AcmsCommonJSON {
if (taskReportJson.has(TaskReportInfo)) {
Object object = taskReportJson.get(TaskReportInfo);
if (object instanceof String) {
taskReportDto.jsonData = null;
taskReportDto.jsonData = (String)object;
} else if (object instanceof JSONObject) {
taskReportDto.jsonData = object.toString();
} else {
taskReportDto.jsonData = taskReportJson.getJSONObject(TaskReportInfo).toString();
taskReportDto.jsonData = "";
}
} else {
taskReportDto.jsonData = "";
}
dto.taskReportDtoList.add(taskReportDto);
}
......
......@@ -36,7 +36,6 @@ public class TaskHotspotJSON extends AbstractJSON {
taskHotspot = new OperationTaskDto();
taskHotspot.pageNum = obj.getInt(PAGE_NUM);
taskHotspot.seqId = obj.getInt(SEQ_ID);
//taskHotspot.taskKey = obj.getLong(TASK_ID);
taskHotspot.taskKey = obj.getString(TASK_KEY);
taskHotspot.taskCode = obj.getString(TASK_CODE);
taskHotspot.pdfX = (float) obj.getDouble(VIEW_X);
......
......@@ -140,8 +140,6 @@ public class AcmsApis {
public static final String ApiSendTaskData = "taskData";
// 作業データ取得
public static final String ApiGetOperationData = "getOperationData";
// 定期点検データ取得
public static final String ApiGetRoutineTaskData = "getProjectInspectData";
// 作業ファイル取得
public static final String ApiGetTaskFile = "getTaskFile";
// コンテンツ登録
......@@ -198,7 +196,7 @@ public class AcmsApis {
apiValue = Constant.ApiValue.nuapi;
} else if (methodName.equals(ApiOperationList) || methodName.equals(ApiWorkingGroupList) || methodName.equals(ApiSendTaskData) || methodName.equals(ApiGetOperationData) ||
methodName.equals(ApiGetTaskFile) || methodName.equals(ApiSceneEntry) || methodName.equals(ApiTaskContentEntry) ||
methodName.equals(ApiSendPushMessage) || methodName.equals(ApiGetPushMessages) || methodName.equals(ApiGetRoutineTaskData) || methodName.equals(ApiSendRoutineTaskData)) {
methodName.equals(ApiSendPushMessage) || methodName.equals(ApiGetPushMessages) || methodName.equals(ApiSendRoutineTaskData)) {
apiValue = Constant.ApiValue.checkapi;
}
......
......@@ -109,8 +109,8 @@ public class ABVEnvironment {
public static final String CommonDirectoryFormat = "%s/ABook/common";
public static final String OperationDirFormat = "%s/ABook/projects/%d";
public static final String OperationTaskKeyDirFormat = "%s/ABook/projects/%d/%s";
public static final String OperationDirFormat = "%s/ABook/operation/%d";
public static final String OperationTaskKeyDirFormat = "%s/ABook/operation/%d/%s";
public static final String PanoImageDirFormat = "%s/panoImage";
public static final String PanoImageFileFormat = "%s/panoImage.zip";
public static final String TaskPdfDirFormat = "%s/taskPdf";
......@@ -128,7 +128,7 @@ public class ABVEnvironment {
public static final String TempTaskFileFormat = TempTaskKeyDirFormat + "/%s";
public static final String AttachedMoviesDirFormat = "%s/%d/attachedMovie";
public static final String AttachedMoviesTaskTypeDir = AttachedMoviesDirFormat + "/%s/%s";
public static final String AttachedMoviesRoutineTaskTypeDir = AttachedMoviesDirFormat + "/%s/report/%d/%s";
public static final String AttachedMoviesRoutineTaskTypeDir = AttachedMoviesDirFormat + "/%s/%s/%d/%s";
public static final String CacheTempAttachedImageFormat = "%s/temp/attachedImage";
......@@ -137,10 +137,8 @@ public class ABVEnvironment {
public static final String TaskReportLevelDir = "/%s";
public static final String SavedOzFileFormat = OperationDirectionOrReportDirFormat + TaskReportLevelDir;
public static final String RoutineTaskSavedOzFileFormat = OperationDirectionOrReportDirFormat + TaskReportLevelDir + "/%d/%s/%s";
public static final String OperationTaskKeyReportSendDirFormat = OperationTaskKeyDirFormat + TaskReportLevelDir + "/reportSend/%d";
public static final String OperationTaskKeyRoutineTaskReportSendDirFormat = OperationTaskKeyDirFormat + "/reportSend/%d/%s/%d";
public static final String OperationTaskKeyRoutineTaskReportSendDirFormatForDelete = OperationTaskKeyDirFormat + "/reportSend/%d/%s";
public static final String OperationTaskKeyRoutineTaskReportDirFormat = OperationTaskKeyDirFormat + "/report/%d/%s";
public static final String OperationTaskKeyReportSendDirFormat = OperationTaskKeyDirFormat + "/reportSend/%d";
public static final String OperationTaskKeyRoutineTaskReportDirFormat = OperationTaskKeyDirFormat + "/%d/%s/%s";
// #32926 作業報告画面改善 end
/**
......@@ -667,7 +665,7 @@ public class ABVEnvironment {
/**
* プロジェクトの作業ディレクトリパス
* 例)root/files/ABook/projects/[project_id]/[task_key]
* 例)root/files/ABook/operation/[operation_id]/[task_key]
* @param operationId
* @param taskKey
* @return
......@@ -677,30 +675,48 @@ public class ABVEnvironment {
}
/**
* 報告送信ディレクトリパス
* 例)root/files/ABook/operation/[operation_id]/[task_key]/reportSend/{taskReportSendId}
* @param operationId
* @param taskKey
* @param taskReportSendId
* @return
*/
// taskReportLevelの値によってディレクトリを構成
public String getOperationTaskReportSendDirFilePath(long operationId, String taskKey, int taskReportLevel, int taskReportSendId) {
return String.format(OperationTaskKeyReportSendDirFormat, rootDirectory, operationId, taskKey, taskReportLevel, taskReportSendId);
public String getOperationTaskReportSendDirFilePath(long operationId, String taskKey, int taskReportSendId) {
return String.format(OperationTaskKeyReportSendDirFormat, rootDirectory, operationId, taskKey, taskReportSendId);
}
public String getRoutineTaskReportSendDirFilePath(long operationId, String taskKey, int taskReportId, String reportStartDate) {
return String.format(OperationTaskKeyRoutineTaskReportSendDirFormatForDelete, rootDirectory, operationId, taskKey, taskReportId, getReportDate(reportStartDate));
}
public String getRoutineTaskReportSendDirFilePath(long operationId, String taskKey, int taskReportId, String reportStartDate, int taskReportSendId) {
return String.format(OperationTaskKeyRoutineTaskReportSendDirFormat, rootDirectory, operationId, taskKey, taskReportId, getReportDate(reportStartDate), taskReportSendId);
}
/**
* 定期点検で添付ファイルのパス
* 例)root/files/ABook/operation/[operation_id]/[task_key]/0/{taskReportId}/{reportStartDate}
* @param operationId
* @param taskKey
* @param taskReportId
* @param reportStartDate
* @return
*/
public String getRoutineTaskReportDirFilePath(long operationId, String taskKey, int taskReportId, String reportStartDate) {
return String.format(OperationTaskKeyRoutineTaskReportDirFormat, rootDirectory, operationId, taskKey, taskReportId, getReportDate(reportStartDate));
return String.format(OperationTaskKeyRoutineTaskReportDirFormat, rootDirectory, operationId, taskKey, Constant.TaskReportLevel.ReportType, taskReportId, getReportDate(reportStartDate));
}
/**
* 添付ファイル管理パス
* 例)root/files/ABook/operation/[operation_id]/[task_key]/{task_report_level}
* @param operationId
* @param taskKey
* @param taskReportLevel
* @return
*/
public String getOperationDirectionOrReportDirPath(long operationId, String taskKey, int taskReportLevel) {
return String.format(OperationDirectionOrReportDirFormat, rootDirectory, operationId, taskKey, String.valueOf(taskReportLevel));
}
/**
* 作業報告レベルのディレクトリパス
* 例)root/files/ABook/projects/[project_id]/[task_key]/[taskReportLevel]
* 例)root/files/ABook/operation/[operation_id]/[task_key]/[taskReportLevel]
* @param operationId
* @param taskKey
* @param taskReportLevel
......@@ -710,14 +726,12 @@ public class ABVEnvironment {
return String.format(OperationDirectionOrReportDirFormat, rootDirectory, operationId, taskKey, String.valueOf(taskReportLevel));
}
public String getOperationTaskReportDirPath(long operationId, String taskKey) {
return String.format(OperationDirectionOrReportDirFormat, rootDirectory, operationId, taskKey);
}
public String getOperationReportSendDirPath(long operationId, String taskKey) {
return String.format(OperationDirectionOrReportDirFormat, rootDirectory, operationId, taskKey, REPORT_SEND);
}
/**
* 添付動画の臨時保存パス
* 例)root/cache/{contentId}/attachedMovie
* @param contentId
* @return
*/
public String getAttachedMoviesFilePath(long contentId) {
Logger.d(TAG, "cacheDirectory : " + cacheDirectory);
return String.format(AttachedMoviesDirFormat, cacheDirectory, contentId);
......@@ -730,12 +744,16 @@ public class ABVEnvironment {
}
// #32926 作業報告画面改善 end
/**
* 例)root/cache/{contentId}/attachedMovie/[task_key]/{task_report_level}/{task_report_id}/{report_start_date}
* @param contentId
* @param taskKey
* @param taskReportId
* @param reportStartDate
* @return
*/
public String getAttachedRoutineTaskReportDirPath(long contentId, String taskKey, int taskReportId, String reportStartDate) {
return String.format(AttachedMoviesRoutineTaskTypeDir, cacheDirectory, contentId, taskKey, taskReportId, getReportDate(reportStartDate));
}
public String getCacheTempDirPath() {
return String.format(CacheTempFormat, cacheDirectory);
return String.format(AttachedMoviesRoutineTaskTypeDir, cacheDirectory, contentId, taskKey, Constant.TaskReportLevel.ReportType, taskReportId, getReportDate(reportStartDate));
}
public String getCacheTempAttachedImageDirPath() {
......
......@@ -88,12 +88,6 @@ public class Constant {
String REPORT_GPS = "reportGps";
}
public interface OperationReportType {
int REPORT_TYPE = 0;
int ROUTINE_TASK = 1;
int REPORT_RESPONSE_TYPE = 2;
}
public interface PushMessageSendType {
int InGroup = 0;
int AllOperation = 1;
......@@ -141,7 +135,7 @@ public class Constant {
public interface ReportType {
int Report = 0; // 報告
int Routine = 1; // 定期点検
int RoutineTask = 1; // 定期点検
int ReportReply = 2; // 報告(回答)
}
......
......@@ -117,4 +117,5 @@ public class ABookKeys {
// #32926 作業報告画面改善 start
public static final String HAS_AUTHORITY = "hasAuthority";
// #32926 作業報告画面改善 end
public static final String CLOSE_TASK_REPORT = "closeTaskReport";
}
......@@ -257,6 +257,36 @@ public class AbstractDao {
}
/**
* クエリを実行し、最初の行の最初の列の値をlong型で返します。
*
* stmt.simpleQueryForLong()と同じ
*
* @param sql
* @param bindArgs
* @return
* @throws Exception
*/
public long rawQueryGetLong(String sql, String[] bindArgs) {
SQLiteDatabase db = dbConn.getDatabase();
Cursor cursor = null;
try {
if (Logger.isVerboseEnabled()) {
Logger.v(TAG, "%s [%s]", sql, join(bindArgs));
}
cursor = db.rawQuery(sql, bindArgs);
if (cursor.moveToNext()) {
return cursor.getLong(0);
}
return 0;
}
finally {
if (cursor != null) {
cursor.close();
}
}
}
/**
* クエリを実行し、最初の行の最初の列の値をInteger型リストで返します。
*
* @param sql
......
......@@ -72,10 +72,6 @@ public class MemberInfoDao extends AbstractDao {
if (column != -1) {
dto.lastUpdateInfor = cursor.getString(column);
}
column = cursor.getColumnIndex("operation_auth_level");
if (column != -1) {
dto.operationAuthLevel = cursor.getInt(column);
}
column = cursor.getColumnIndex("worker_code");
if (column != -1) {
dto.workerCode = cursor.getString(column);
......@@ -108,11 +104,11 @@ public class MemberInfoDao extends AbstractDao {
}
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, operation_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, worker_code) values (?,?,?,?,?,?,?,?,?,?,?,?)", dto.getInsertValues());
}
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 = ?, operation_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 = ?, worker_code = ? where login_id=?", dto.getUpdateValues());
return count > 0;
}
......
......@@ -243,6 +243,7 @@ public class OperationDao extends AbstractDao {
sql.append(" top.report_type, ");
sql.append(" top.report_cycle, ");
sql.append(" top.enable_report_update, ");
sql.append(" top.enable_report_edit, ");
sql.append(" CASE ");
sql.append(" WHEN report_type = 1 THEN ( ");
sql.append(" SELECT strftime('%Y/%m/%d %H:%M', datetime(ttr.report_start_date, 'localtime')) || ' ~ ' || strftime('%Y/%m/%d %H:%M', datetime(ttr.report_end_date, 'localtime')) ");
......
......@@ -105,6 +105,7 @@ public class TaskDao extends AbstractDao {
delete("t_task", "task_key=?", keyValues);
delete("t_task_report", "task_key=?", keyValues);
delete("t_task_report_items", "task_key=?", keyValues);
delete("t_task_report_send", "task_key=?", keyValues);
}
/**
......@@ -115,5 +116,6 @@ public class TaskDao extends AbstractDao {
delete("t_task", "task_key=?", dto.getKeyValues());
delete("t_task_report", "task_key=?", dto.getKeyValues());
delete("t_task_report_items", "task_key=?", dto.getKeyValues());
delete("t_task_report_send", "task_key=?", dto.getKeyValues());
}
}
\ No newline at end of file
......@@ -56,10 +56,6 @@ public class TaskReportDao extends AbstractDao {
if (column != -1) {
dto.delFlg = toBool(cursor.getInt(column));
}
column = cursor.getColumnIndex("reported_flag");
if (column != -1) {
dto.reportedFlag = toBool(cursor.getInt(column));
}
column = cursor.getColumnIndex("enable_report");
if (column != -1) {
......@@ -70,10 +66,39 @@ public class TaskReportDao extends AbstractDao {
if (column != -1) {
dto.taskReportLevel = cursor.getInt(column);
}
return dto;
column = cursor.getColumnIndex("task_report_id");
if (column != -1) {
dto.taskReportId = cursor.getInt(column);
}
column = cursor.getColumnIndex("task_report_info_id");
if (column != -1) {
dto.taskReportInfoId = cursor.getInt(column);
}
column = cursor.getColumnIndex("report_start_date");
if (column != -1) {
dto.reportStartDate = DateTimeUtil.toDate(cursor.getString(column), "UTC", DateTimeFormat.yyyyMMddHHmmss_hyphen);
}
column = cursor.getColumnIndex("report_end_date");
if (column != -1) {
dto.reportEndDate = DateTimeUtil.toDate(cursor.getString(column), "UTC", DateTimeFormat.yyyyMMddHHmmss_hyphen);
}
column = cursor.getColumnIndex("local_saved_flg");
if (column != -1) {
dto.localSavedFlg = toBool(cursor.getInt(column));
}
return dto;
}
/**
* 報告登録処理
* @param dto
*/
public void insert(TaskReportDto dto) {
insert("insert into t_task_report "
+ "(task_key, "
......@@ -87,14 +112,45 @@ public class TaskReportDao extends AbstractDao {
+ "report_start_date, "
+ "report_end_date, "
+ "enable_report, "
+ "reported_flg, "
+ "task_report_level) "
+ "task_report_level, "
+ "local_saved_flg ) "
+ "values "
+ "(?,?,?,?,?,?,?,?,?,?,?,?,?)",
dto.getInsertValues());
}
/**
* 報告更新処理
* @param dto
* @return
*/
public boolean update(TaskReportDto dto) {
Object[] objects;
StringBuffer sql = new StringBuffer();
sql.append("UPDATE t_task_report SET ");
sql.append("json_data=?, ");
sql.append("attached_file_name=?, ");
sql.append("local_attached_file_name=?, ");
sql.append("attached_file_send_flg=?, ");
sql.append("data_send_flg=?, ");
sql.append("report_end_date=?, ");
sql.append("enable_report=?, ");
sql.append("task_report_level=?, ");
sql.append("local_saved_flg=? ");
sql.append("WHERE task_key=? AND task_report_level=?");
if (dto.reportStartDate != null) {
sql.append(" AND datetime(report_start_date)=datetime(?)");
objects = new Object[]{dto.jsonData, dto.attachedFileName, dto.localAttachedFileName, dto.attachedFileSendFlg, dto.dataSendFlg,
dto.reportEndDate, dto.enableReport, dto.taskReportLevel, dto.localSavedFlg, dto.taskKey, dto.taskReportLevel, dto.reportStartDate};
} else {
objects = new Object[]{dto.jsonData, dto.attachedFileName, dto.localAttachedFileName, dto.attachedFileSendFlg, dto.dataSendFlg,
dto.reportEndDate, dto.enableReport, dto.taskReportLevel, dto.localSavedFlg, dto.taskKey, dto.taskReportLevel};
}
return update(sql.toString(), objects) > 0;
}
/**
* 作業IDで報告取得
* (作業報告タイプ 昇順、作業報告ID 昇順、報告開始日 昇順)
* @param operationId
......@@ -113,7 +169,6 @@ public class TaskReportDao extends AbstractDao {
return rawQueryGetDtoList(sb.toString(), new String[]{"" + operationId}, TaskReportDto.class);
}
/**
* 作業キーと作業報告タイプで作業報告データ取得
* @param taskKey
......@@ -133,26 +188,6 @@ public class TaskReportDao extends AbstractDao {
return rawQueryGetDtoList("select * from t_task_report where task_key=? ORDER BY task_report_id, report_start_date", new String[]{ "" + taskKey }, TaskReportDto.class);
}
public boolean update(TaskReportDto dto) {
long count = update("update t_task_report "
+ "set "
+ "json_data=?, "
+ "attached_file_name=?, "
+ "local_attached_file_name=?, "
+ "attached_file_send_flg=?, "
+ "data_send_flg=?, "
+ "task_report_id=?, "
+ "task_report_info_id=?, "
+ "report_start_date=?, "
+ "report_end_date=?, "
+ "enable_report=?, "
+ "reported_flg=?, "
+ "task_report_level=? "
+ "where task_key=? AND task_report_level=?",
dto.getUpdateValues());
return count > 0;
}
/**
* 送信フラグのあるデータが存在するか
*
......@@ -208,8 +243,14 @@ public class TaskReportDao extends AbstractDao {
return rawQueryGetString("select local_attached_file_name from t_task_report where task_key=? AND task_report_level=?", new String[]{"" + taskKey, "" + taskReportLevel});
}
public List<TaskReportDto> selectByTaskKey(String taskKey, int taskReportLevel) {
return rawQueryGetDtoList("select * from t_task_report where task_key=? and task_report_level=?", new String[]{ "" + taskKey, "" + taskReportLevel }, TaskReportDto.class);
/**
* 報告キー、報告担当レベルでt_task_Reportデータ取得
* @param taskKey
* @param taskReportLevel
* @return
*/
public TaskReportDto selectByTaskKey(String taskKey, int taskReportLevel) {
return rawQueryGetDto("select * from t_task_report where task_key=? and task_report_level=?", new String[]{ "" + taskKey, "" + taskReportLevel }, TaskReportDto.class);
}
public List<TaskReportDto> selectAll() {
......@@ -227,26 +268,6 @@ public class TaskReportDao extends AbstractDao {
}
/**
* 定期点検用の報告更新
* @param dto
* @return
*/
public boolean updateRoutineTask(TaskReportDto dto) {
long count = update("update t_task_report "
+ "set "
+ "report_end_date=?, "
+ "attached_file_name=?, "
+ "local_attached_file_name=?, "
+ "json_data=?, "
+ "data_send_flag=?, "
+ "attached_file_send_flag=? "
+ "reported_flag=? "
+ "where task_key=? and task_report_id=? and datetime(report_start_date)=datetime(?)",
new Object[]{dto.reportEndDate, dto.attachedFileName, dto.localAttachedFileName, dto.jsonData, dto.dataSendFlg, dto.attachedFileSendFlg, dto.reportedFlag, dto.taskKey, dto.taskReportId, dto.reportStartDate});
return count > 0;
}
/**
* テーブル物理削除
* @param dto
*/
......@@ -259,7 +280,7 @@ public class TaskReportDao extends AbstractDao {
* @param dto
*/
public void deleteRoutineTaskReport(TaskReportDto dto) {
delete("t_task_report", "task_key=? and task_report_level=? task_report_id=? and datetime(report_start_date)=datetime(?, 'utc')", new String[] { dto.taskKey, "" + dto.taskReportLevel, "" + dto.taskReportId, DateTimeUtil.toString(dto.reportStartDate, DateTimeFormat.yyyyMMddHHmmss_hyphen) });
delete("t_task_report", "task_key=? AND task_report_level=? AND task_report_id=? AND datetime(report_start_date)=datetime(?, 'utc')", new String[] { dto.taskKey, "" + dto.taskReportLevel, "" + dto.taskReportId, DateTimeUtil.toString(dto.reportStartDate, DateTimeFormat.yyyyMMddHHmmss_hyphen) });
}
/**
......@@ -329,11 +350,13 @@ public class TaskReportDao extends AbstractDao {
}
/**
* 作業キーで作業時間が存在する作業報告データ取得(定期点検)
* 定期点検報告のデータ取得
* @param taskKey
* @param taskReportId
* @param reportStartDate
* @return
*/
public List<TaskReportDto> getNotNullStartDateTaskReportByTaskKey(String taskKey) {
return rawQueryGetDtoList("select * from t_task_report where task_key=? AND report_start_date IS NOT NULL", new String[]{ taskKey }, TaskReportDto.class);
public TaskReportDto getRoutineTaskReport(String taskKey, int taskReportId, String reportStartDate) {
return rawQueryGetDto("select * from t_task_report where task_key=? and task_report_id=? and datetime(report_start_date)=datetime(?)", new String[]{ taskKey, "" + taskReportId, reportStartDate }, TaskReportDto.class);
}
}
......@@ -48,6 +48,17 @@ public class TaskReportItemsDao extends AbstractDao {
return rawQueryGetDtoList("select * from t_task_report_items where task_key=? and task_report_level=?", new String[]{"" + taskKey, "" + taskReportLevel}, TaskReportItemsDto.class);
}
/**
* 報告キー、報告担当レベル、itemKeyでデータ取得
* @param taskKey
* @param taskReportLevel
* @param itemKey
* @return
*/
public TaskReportItemsDto getTaskReportItem(String taskKey, int taskReportLevel, String itemKey) {
return rawQueryGetDto("SELECT * FROM t_task_report_items WHERE task_key=? AND task_report_level=? AND item_key=?", new String[]{"" + taskKey, "" + taskReportLevel, "" + itemKey}, TaskReportItemsDto.class);
}
public List<TaskReportItemsDto> getTaskReportItemByOperationId(Long operationId) {
StringBuilder sb = new StringBuilder();
sb.append(" select distinct ttri.* ");
......
......@@ -32,7 +32,6 @@ public class MMemberInfo extends SQLiteTableScript {
sql.append(" , password_expiry_date DATETIME ");
sql.append(" , user_id INTEGER");
sql.append(" , last_update_infor VARCHAR(64)");
sql.append(" , operation_auth_level INTEGER");
sql.append(" , worker_code TEXT");
sql.append(" , PRIMARY KEY (login_id) ");
sql.append(" ) ");
......
......@@ -23,7 +23,7 @@ public class TTaskReport extends SQLiteTableScript {
sql.append(" CREATE TABLE t_task_report ( ");
sql.append(" task_key TEXT NOT NULL ");
sql.append(" , json_data TEXT NOT NULL ");
sql.append(" , json_data TEXT NOT NULL");
sql.append(" , attached_file_name TEXT ");
sql.append(" , local_attached_file_name TEXT ");
sql.append(" , attached_file_send_flg BOOLEAN DEFAULT 0 ");
......@@ -34,7 +34,7 @@ public class TTaskReport extends SQLiteTableScript {
sql.append(" , task_report_info_id INTEGER NOT NULL DEFAULT 0 ");
sql.append(" , enable_report SMALLINT NOT NULL DEFAULT 0 ");
sql.append(" , task_report_level SMALLINT NOT NULL DEFAULT 0 ");
sql.append(" , reported_flg BOOLEAN DEFAULT 0 ");
sql.append(" , local_saved_flg BOOLEAN DEFAULT 0 ");
sql.append(" ) ");
ddl.add(sql.toString());
......
......@@ -24,6 +24,7 @@ public class TTaskReportItems extends SQLiteTableScript {
sql.append(" CREATE TABLE t_task_report_items ( ");
sql.append(" task_key TEXT NOT NULL ");
sql.append(" , task_report_level INTEGER default 0 ");
sql.append(" , item_key VARCHAR(64) ");
sql.append(" , input_value VARCHAR(64) ");
sql.append(" ) ");
......
......@@ -25,19 +25,18 @@ public class MemberInfoDto extends AbstractDto {
public Date lastCMSAccessDate;
public Date passwordExpiryDate;
public String lastUpdateInfor; //ABookSee 1.8.1
public Integer operationAuthLevel;
public String workerCode;
public RequirePasswordChangeCode requiredPasswordChange;
@Override
public Object[] getInsertValues() {
return new Object[]{loginId, password, memberName, sid, loginStatus, invalidPasswordCount, lastLoginDate, lastChangePasswordDate, lastCMSAccessDate, userId, lastUpdateInfor, operationAuthLevel, workerCode};
return new Object[]{loginId, password, memberName, sid, loginStatus, invalidPasswordCount, lastLoginDate, lastChangePasswordDate, lastCMSAccessDate, userId, lastUpdateInfor, workerCode};
}
@Override
public Object[] getUpdateValues() {
return new Object[]{password, memberName, sid, loginStatus, invalidPasswordCount, lastLoginDate, lastChangePasswordDate, lastCMSAccessDate, lastUpdateInfor, operationAuthLevel, workerCode, loginId};
return new Object[]{password, memberName, sid, loginStatus, invalidPasswordCount, lastLoginDate, lastChangePasswordDate, lastCMSAccessDate, lastUpdateInfor, workerCode, loginId};
}
@Override
......
......@@ -23,7 +23,7 @@ public class OperationDto extends AbstractDto {
public List<OperationContentDto> operationContentDtoList;
public List<TaskDto> taskDtoList;
public List<PushMessageDto> pushMessageList;
public int reportType; //0:通常 1:定期点検
public int reportType; // 報告タイプ 0 : 報告 1 : 定期点検 2 : 報告(回答)
public int reportCycle; //0:日次 1:月次 2:年次
public int enableReportUpdate; //0:不可 1:可
public String reportPeriod; //定期点検、2018/12/20 08:10:00 ~ 2018/12/21 18:10:00
......
......@@ -24,17 +24,16 @@ public class TaskReportDto extends AbstractDto {
public Date reportEndDate; // 作業終了日
public int enableReport; // 報告可能区分
public String attachedFileName;
public String taskReportInfo;
public boolean reportedFlag; // 定期点検用
public boolean localSavedFlg; // 一時保存用
@Override
public Object[] getInsertValues() {
return new Object[] { taskKey, jsonData, attachedFileName, localAttachedFileName, attachedFileSendFlg, dataSendFlg, taskReportId, taskReportInfoId, reportStartDate, reportEndDate, enableReport, reportedFlag, taskReportLevel};
return new Object[] { taskKey, jsonData, attachedFileName, localAttachedFileName, attachedFileSendFlg, dataSendFlg, taskReportId, taskReportInfoId, reportStartDate, reportEndDate, enableReport, taskReportLevel, localSavedFlg};
}
@Override
public Object[] getUpdateValues() {
return new Object[] { jsonData, attachedFileName, localAttachedFileName, attachedFileSendFlg, dataSendFlg, taskReportId, taskReportInfoId, reportStartDate, reportEndDate, enableReport, reportedFlag, taskReportLevel, taskKey, taskReportLevel };
return new Object[] { jsonData, attachedFileName, localAttachedFileName, attachedFileSendFlg, dataSendFlg, reportEndDate, enableReport, taskReportLevel, localSavedFlg, taskKey, taskReportLevel , reportStartDate };
}
@Override
......
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@drawable/icon_infomation_update_on" android:state_enabled="true" />
<item android:drawable="@drawable/icon_infomation_update_off" android:state_enabled="false" />
</selector>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@drawable/icon_pano_edit_on" android:state_enabled="true"/>
<item android:drawable="@drawable/icon_pano_edit_off" android:state_enabled="false" />
</selector>
\ No newline at end of file
......@@ -82,10 +82,10 @@
<color name="operation_date">#37648C</color>
<color name="operation_color">#095395</color>
<color name="operation_disable_color">#CCCCCC</color>
<color name="operation_search_background">#FFFFFF</color>
<color name="operation_search_header">#CCCCCC</color>
<color name="operation_search_button_color">#0068CB</color>
<color name="operation_search_label_color">#555555</color>
<color name="operation_related_content_new_mark">#ff0000</color>
<color name="operation_bg">#FFFFFF</color>
</resources>
\ No newline at end of file
......@@ -68,6 +68,9 @@
<style name="content_list_bg">
<item name="android:background">@color/background</item>
</style>
<style name="operation_list_bg">
<item name="android:background">@color/operation_bg</item>
</style>
<style name="Theme.MyTheme.ModalDialog" parent="@android:style/Theme.Dialog">
<item name="android:windowCloseOnTouchOutside">false</item>
......
......@@ -120,7 +120,7 @@
<FrameLayout
android:id="@+id/operation_list_layout"
style="@style/content_list_bg"
style="@style/operation_list_bg"
android:layout_width="match_parent"
android:layout_height="match_parent" />
......
......@@ -4,31 +4,45 @@
android:layout_height="wrap_content"
android:background="@drawable/list_selector_holo_light"
android:descendantFocusability="blocksDescendants"
android:orientation="vertical">
android:padding="10dp"
android:orientation="horizontal">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:layout_marginLeft="30dp"
android:orientation="vertical">
android:orientation="horizontal">
<TextView
android:id="@+id/operation_date"
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:gravity="left"
android:orientation="horizontal">
<ImageView
android:id="@+id/report_type"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:ellipsize="end"
android:maxLines="1"
android:text="@string/dummy_date"
android:textColor="@color/operation_date"
android:textSize="@dimen/operation_normal_text_size" />
android:layout_marginRight="10dp"/>
<ImageView
android:id="@+id/operation_type"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="15dp"
android:layout_weight="1"
android:orientation="vertical">
<TextView
android:id="@+id/operation_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="5dp"
android:ellipsize="end"
android:maxLines="1"
android:text="@string/dummy_str"
......@@ -37,78 +51,47 @@
android:textStyle="bold"
android:visibility="visible" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:layout_marginLeft="30dp"
android:orientation="horizontal">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:orientation="horizontal"
android:layout_gravity="bottom">
<TextView
android:id="@+id/description"
android:id="@+id/operation_date"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@color/operation_description"
android:textSize="@dimen/operation_normal_text_size"/>
</LinearLayout>
android:layout_marginTop="10dp"
android:ellipsize="end"
android:maxLines="1"
android:text="@string/dummy_date"
android:textColor="@color/operation_date"
android:textSize="@dimen/operation_normal_text_size" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="right"
android:layout_margin="3dp"
android:orientation="horizontal">
</LinearLayout>
<LinearLayout
android:id="@+id/layout_pano_edit"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="10dp"
android:orientation="vertical"
android:visibility="invisible">
android:orientation="horizontal">
<ImageView
<ImageButton
android:id="@+id/btn_pano_edit"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/btn_pano_edit" />
<TextView
android:id="@+id/txt_pano_edit"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
style="@style/ProjectIconText"
android:text="@string/pano_edit" />
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="10dp"
android:orientation="vertical">
android:background="@drawable/ic_edit_list"
android:visibility="invisible" />
<ImageButton
android:id="@+id/btn_information_update"
android:id="@+id/btn_sync"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/btn_information_update"/>
android:layout_marginLeft="10dp"
android:background="@drawable/ic_reload_list" />
</LinearLayout>
<TextView
android:id="@+id/txt_information_update"
<ImageView
android:id="@+id/item_nextLevel"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
style="@style/ProjectIconText"
android:text="@string/information_update" />
</LinearLayout>
</LinearLayout>
android:layout_gravity="center"
android:layout_alignParentRight="true"
android:src="@drawable/ic_navigation_next_item"
android:visibility="visible" />
</LinearLayout>
</LinearLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_height="match_parent"
android:background="@drawable/list_selector_holo_light"
android:descendantFocusability="blocksDescendants"
android:orientation="vertical">
......@@ -10,24 +10,34 @@
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="30dp"
android:layout_marginTop="10dp"
android:orientation="vertical">
android:orientation="horizontal">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical">
android:layout_height="match_parent"
android:layout_marginTop="10dp"
android:gravity="left"
android:orientation="horizontal">
<TextView
android:id="@+id/operation_date"
<ImageButton
android:id="@+id/operation_type"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:ellipsize="end"
android:maxLines="2"
android:text="@string/dummy_date"
android:textColor="@color/operation_date"
android:textSize="@dimen/operation_normal_text_size" />
android:layout_marginRight="10dp" />
<ImageButton
android:id="@+id/report_type"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_weight="1"
android:orientation="vertical">
<TextView
android:id="@+id/operation_name"
......@@ -42,74 +52,46 @@
android:textStyle="bold"
android:visibility="visible" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="bottom"
android:layout_weight="1"
android:orientation="horizontal">
<TextView
android:id="@+id/description"
android:id="@+id/operation_date"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:ellipsize="end"
android:maxLines="4"
android:textColor="@color/operation_description"
android:maxLines="2"
android:text="@string/dummy_date"
android:textColor="@color/operation_date"
android:textSize="@dimen/operation_normal_text_size" />
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="right"
android:layout_margin="3dp"
android:orientation="horizontal">
<LinearLayout
android:id="@+id/layout_pano_edit"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="10dp"
android:orientation="vertical"
android:visibility="invisible">
<ImageView
android:id="@+id/btn_pano_edit"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/btn_pano_edit" />
<TextView
android:id="@+id/txt_pano_edit"
style="@style/ProjectIconText"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/pano_edit" />
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="10dp"
android:orientation="vertical">
android:layout_weight="1"
android:background="@drawable/ic_edit_list" />
<ImageButton
android:id="@+id/btn_information_update"
android:id="@+id/btn_sync"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/btn_information_update" />
android:layout_weight="1"
android:background="@drawable/ic_reload_list" />
</LinearLayout>
<TextView
android:id="@+id/txt_information_update"
style="@style/ProjectIconText"
<ImageView
android:id="@+id/item_nextLevel"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/information_update" />
</LinearLayout>
</LinearLayout>
android:layout_alignParentRight="true"
android:layout_gravity="center"
android:src="@drawable/ic_navigation_next_item"
android:visibility="visible" />
</LinearLayout>
</LinearLayout>
\ No newline at end of file
......@@ -3,7 +3,7 @@
android:layout_width="match_parent"
android:layout_height="300dp"
android:minHeight="200dp"
android:background="@color/operation_search_background"
android:background="@color/operation_bg"
android:orientation="vertical">
<RelativeLayout
......
......@@ -5,162 +5,97 @@
android:layout_height="wrap_content"
android:background="@drawable/list_selector_holo_light"
android:descendantFocusability="blocksDescendants"
android:padding="10dp"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:layout_marginBottom="10dp"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:layout_height="200dp"
android:background="@drawable/panel_frame"
android:orientation="vertical"
android:paddingLeft="10dp"
android:paddingRight="10dp"
android:paddingTop="10dp">
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center_vertical"
android:orientation="horizontal">
<TextView
android:id="@+id/operation_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="5dp"
android:ellipsize="end"
android:maxLines="1"
android:text="@string/dummy_str"
android:textColor="@color/operation_name"
android:textSize="@dimen/app_large_text_size"
android:textStyle="bold" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:padding="5dp">
<RelativeLayout
android:id="@+id/content_thumbnail_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="2"
android:layout_gravity="center">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="match_parent">
<ImageButton
android:id="@+id/btn_information_update1"
<ImageView
android:id="@+id/report_type"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_centerHorizontal="true"
android:background="@drawable/btn_information_update" />
</RelativeLayout>
android:layout_marginLeft="5dp"
android:layout_marginRight="10dp" />
<LinearLayout
android:id="@+id/operation_date_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_centerInParent="true"
android:layout_weight="1"
android:layout_marginBottom="10dp"
android:layout_marginTop="10dp"
android:layout_toRightOf="@+id/content_thumbnail_layout"
android:background="#dce6e6"
android:orientation="vertical"
android:padding="3dp"
android:paddingBottom="10dp">
<TextView
android:id="@+id/operation_date"
<ImageView
android:id="@+id/operation_type"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:ellipsize="end"
android:maxLines="1"
android:text="@string/dummy_date"
android:textColor="@color/operation_date"
android:textSize="@dimen/operation_normal_text_size" />
android:layout_height="wrap_content" />
</LinearLayout>
</LinearLayout>
<LinearLayout
android:id="@+id/button_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/operation_border"
android:orientation="horizontal"
android:padding="5dp"
android:visibility="visible">
<LinearLayout
android:id="@+id/edit_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center"
android:orientation="horizontal"
android:padding="5dp"
android:visibility="visible">
<LinearLayout
android:id="@+id/layout_pano_edit"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="10dp"
android:orientation="vertical"
android:visibility="visible">
android:gravity="right"
android:orientation="horizontal">
<ImageView
<ImageButton
android:id="@+id/btn_pano_edit"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/btn_pano_edit" />
android:background="@drawable/ic_edit_panel"
android:visibility="invisible" />
<TextView
android:id="@+id/txt_pano_edit"
style="@style/ProjectIconText"
<ImageButton
android:id="@+id/btn_sync"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/pano_edit" />
android:layout_marginLeft="10dp"
android:background="@drawable/ic_reload_panel" />
</LinearLayout>
</LinearLayout>
<LinearLayout
android:id="@+id/update_layout"
<View
android:id="@+id/view3"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center"
android:orientation="horizontal"
android:padding="5dp"
android:visibility="visible">
android:layout_height="1dp"
android:background="@color/line_side" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginRight="10dp"
android:gravity="center_vertical"
android:orientation="vertical">
<ImageButton
android:id="@+id/btn_information_update"
<TextView
android:id="@+id/operation_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/btn_information_update" />
android:layout_marginTop="5dp"
android:ellipsize="end"
android:maxLines="2"
android:text="@string/dummy_str"
android:textColor="@color/operation_name"
android:textSize="@dimen/app_large_text_size"
android:textStyle="bold" />
<TextView
android:id="@+id/txt_information_update"
style="@style/ProjectIconText"
android:id="@+id/operation_date"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/information_update" />
</LinearLayout>
</LinearLayout>
android:layout_marginTop="5dp"
android:layout_weight="1"
android:ellipsize="end"
android:maxLines="1"
android:text="@string/dummy_date"
android:textColor="@color/operation_date"
android:textSize="@dimen/operation_normal_text_size" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
\ No newline at end of file
......@@ -4,7 +4,7 @@
android:id="@+id/root_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/operation_search_background"
android:background="@color/operation_bg"
android:orientation="vertical"
android:weightSum="1">
......
......@@ -3,7 +3,7 @@
android:id="@+id/root_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/operation_search_background"
android:background="@color/operation_bg"
android:minWidth="500dp"
android:orientation="vertical">
......
......@@ -3,7 +3,7 @@
android:layout_width="match_parent"
android:layout_height="420dp"
android:minHeight="300dp"
android:background="@color/operation_search_background"
android:background="@color/operation_bg"
android:orientation="vertical">
<RelativeLayout
......
......@@ -3,7 +3,7 @@
android:layout_width="match_parent"
android:layout_height="420dp"
android:minHeight="300dp"
android:background="@color/operation_search_background"
android:background="@color/operation_bg"
android:orientation="vertical">
<RelativeLayout
......
......@@ -3,7 +3,7 @@
android:id="@+id/root_layout"
android:layout_width="match_parent"
android:layout_height="420dp"
android:background="@color/operation_search_background"
android:background="@color/operation_bg"
android:minWidth="500dp"
android:orientation="vertical">
......
......@@ -2,7 +2,7 @@ package jp.agentec.abook.abv.launcher.android;
import java.util.ArrayList;
import jp.agentec.abook.abv.bl.common.Constant.OperationReportType;
import jp.agentec.abook.abv.bl.common.Constant.ReportType;
import jp.agentec.abook.abv.bl.common.log.Logger;
import jp.agentec.abook.abv.cl.util.PreferenceUtil;
import jp.agentec.abook.abv.ui.common.appinfo.AppDefType;
......@@ -22,7 +22,7 @@ public class ABVUIDataCache {
// ホーム画面項目
private int viewMode; // パンネル、リスト形式
private ArrayList<Integer> mOperationReportTypes;
private ArrayList<Integer> mReportTypes;
public long lastUpdateTime = -1;
public String searchText;
......@@ -112,7 +112,7 @@ public class ABVUIDataCache {
}
public void setOperationReportTypes(ArrayList<Integer> operationReportTypes) {
this.mOperationReportTypes = operationReportTypes;
this.mReportTypes = operationReportTypes;
String val = null;
if (operationReportTypes.size() > 0) {
// カンマ区切りで保存
......@@ -137,14 +137,14 @@ public class ABVUIDataCache {
operationReportTypes.add(Integer.parseInt(contentType));
}
}
mOperationReportTypes = operationReportTypes;
mReportTypes = operationReportTypes;
} else {
mOperationReportTypes = new ArrayList<Integer>();
mOperationReportTypes.add(OperationReportType.REPORT_TYPE);
mOperationReportTypes.add(OperationReportType.ROUTINE_TASK);
mOperationReportTypes.add(OperationReportType.REPORT_RESPONSE_TYPE);
mReportTypes = new ArrayList<Integer>();
mReportTypes.add(ReportType.Report);
mReportTypes.add(ReportType.RoutineTask);
mReportTypes.add(ReportType.ReportReply);
}
return mOperationReportTypes;
return mReportTypes;
}
}
......@@ -137,7 +137,6 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
public int mButtonStatus; // 保存ボタンチェック
protected boolean mAddReport; // 作業追加区分
protected int mTaskReportLevel; // 作業報告レベル
@Override
protected void onCreate(Bundle savedInstanceState) {
......@@ -801,7 +800,7 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
helpViewType = Constant.HelpViewType.ListOperationDirector;
break;
case Constant.XWalkOpenType.TASK_REPORT:
if (operationDto.reportType == Constant.OperationReportType.ROUTINE_TASK) {
if (operationDto.reportType == Constant.ReportType.RoutineTask) {
helpViewType = Constant.HelpViewType.RoutineTaskOperation;
} else {
helpViewType = Constant.HelpViewType.ListOperationReporter;
......@@ -838,7 +837,7 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
if (mXWalkOpenType == Constant.XWalkOpenType.TASK_DERECTION) {
helpViewType = Constant.HelpViewType.DirectorTask;
} else if (mXWalkOpenType == Constant.XWalkOpenType.TASK_REPORT) {
if (operationDto.reportType == Constant.OperationReportType.ROUTINE_TASK) {
if (operationDto.reportType == Constant.ReportType.RoutineTask) {
helpViewType = Constant.HelpViewType.RoutineTaskOperationReport;
} else {
helpViewType = Constant.HelpViewType.ReportTask;
......@@ -869,20 +868,22 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
mCmd = abookCheckParam.get(ABookKeys.CMD);
mTaskKey = abookCheckParam.get(ABookKeys.TASK_KEY);
mTaskReportLevel = 0; // 作業報告レベル(0:報告、1:報告(回答)、2:報告(回答))
int taskReportLevel = 0; // 作業報告レベル(0:報告、1:報告(回答)、2:報告(回答))
if (abookCheckParam.containsKey(ABookKeys.TASK_REPORT_LEVEL)) {
mTaskReportLevel = Integer.parseInt(abookCheckParam.get(ABookKeys.TASK_REPORT_LEVEL)); // 作業報告レベル
taskReportLevel = Integer.parseInt(abookCheckParam.get(ABookKeys.TASK_REPORT_LEVEL)); // 作業報告レベル
}
int taskReportId = 0;
String reportStartDate = "";
// 作業追加区分の値を取得する
mAddReport = true;
if (abookCheckParam.containsKey(ABookKeys.ADD_REPORT)) {
// 定期点検の場合、以下のフラグを変更しない(mAddReport trueのみ)
if (abookCheckParam.containsKey(ABookKeys.ADD_REPORT) && operationDto.reportType != Constant.ReportType.RoutineTask) {
mAddReport = Integer.parseInt(abookCheckParam.get(ABookKeys.ADD_REPORT)) > 0 ? true : false;
}
if (operationDto.reportType == Constant.OperationReportType.ROUTINE_TASK && abookCheckParam.get(ABookKeys.TASK_REPORT_ID) != null && abookCheckParam.get(ABookKeys.REPORT_START_DATE) != null) {
int taskReportId = 0;
String reportStartDate = "";
if (operationDto.reportType == Constant.ReportType.RoutineTask && abookCheckParam.get(ABookKeys.TASK_REPORT_ID) != null && abookCheckParam.get(ABookKeys.REPORT_START_DATE) != null) {
taskReportId = Integer.parseInt(abookCheckParam.get(ABookKeys.TASK_REPORT_ID));
reportStartDate = abookCheckParam.get(ABookKeys.REPORT_START_DATE);
}
......@@ -955,15 +956,13 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
// 画面遷移処理
closeCurrentScreen(mOperationType);
}
return null;
}
};
ABookCheckWebViewHelper.getInstance().doABookCheckParam(ABVContentViewActivity.this,
mCmd, mTaskKey, mEnableReportHistory, abookCheckParam, mOperationId, mContentPath, getContentId(),
operationDto.reportType, finishCallback,
mTaskReportLevel);
operationDto.reportType, finishCallback, taskReportLevel);
} catch(Exception e) {
Logger.e(TAG, "doABookCheckParam error", e);
......@@ -988,18 +987,16 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
ActivityHandlingHelper.getInstance().startOZViewerActivity(this, mOperationId, getContentId(), mTaskKey, true, true, mReportFileName);
} else if (mCmd.equals(ABookKeys.CMD_SHOW_REPORT_OZD)) {
mReportFileName = abookCheckParam.get(ABookKeys.REPORT_FILE_NAME);
// #32926 作業報告画面改善 start
// 作業報告画面改善
boolean mLocalSave = false; // 一時保存情報
if (abookCheckParam.containsKey(ABookKeys.LOCAL_SAVE)) {
mLocalSave = Integer.parseInt(abookCheckParam.get(ABookKeys.LOCAL_SAVE)) > 0 ? true : false;
}
ActivityHandlingHelper.getInstance().startOZViewerActivity(this, mOperationId, getContentId(), mTaskKey, false, taskReportId, reportStartDate, mReportFileName, mLocalSave, mAddReport, mTaskReportLevel);
// #32926 作業報告画面改善 end
ActivityHandlingHelper.getInstance().startOZViewerActivity(this, mOperationId, getContentId(), mTaskKey, false, taskReportId, reportStartDate, mReportFileName, mLocalSave, mAddReport, taskReportLevel);
} else if (mCmd.equals(ABookKeys.CMD_PREVIEW_REPORT_OZD)) {
mReportFileName = abookCheckParam.get(ABookKeys.REPORT_FILE_NAME);
// #32926 作業報告画面改善 start
ActivityHandlingHelper.getInstance().startOZViewerActivity(this, mOperationId, getContentId(), mTaskKey, true, taskReportId, reportStartDate, mReportFileName, false, false, mTaskReportLevel);
// #32926 作業報告画面改善 end
// 作業報告画面改善
ActivityHandlingHelper.getInstance().startOZViewerActivity(this, mOperationId, getContentId(), mTaskKey, true, taskReportId, reportStartDate, mReportFileName, false, false, taskReportLevel);
} else if (mCmd.equals(ABookKeys.CMD_CONTENT_EDIT_CLOSE)) {
showProgressPopup();
handler.postDelayed(new Runnable() {
......@@ -1011,7 +1008,7 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
}, 5000);
} else if (mCmd.equals(ABookKeys.CMD_GET_GPS_INFO)) {
// #32926 作業報告画面改善 start
setLocation((Integer.valueOf(abookCheckParam.get(ABookKeys.GPS_TYPE)) != 1), mTaskReportLevel);
setLocation((Integer.valueOf(abookCheckParam.get(ABookKeys.GPS_TYPE)) != 1), taskReportLevel);
// #32926 作業報告画面改善 end
} else if (mCmd.equals(ABookKeys.CMD_SCENE_REGIST)) {
String successFlg = abookCheckParam.get(ABookKeys.SUCCESS_FLG);
......
......@@ -133,9 +133,7 @@ public interface AppDefType {
interface PushMessageKey {
String message = "message";
String data = "data";
// TODO
// サーバ作業後、対応必要「project」→「operation」
String operationId = "projectId";
String operationId = "operationId";
}
interface UrlPattern {
......
......@@ -21,7 +21,6 @@ import jp.agentec.abook.abv.launcher.android.R;
public abstract class AbstractOperationAdapter extends BaseAdapter {
protected AbstractOperationListAdapterListener listener;
protected List<OperationDto> listItem = new ArrayList<>(); // NullPointException防止
protected Integer mOperationAuthLevel = ABVDataCache.getInstance().getMemberInfo().operationAuthLevel;
protected ContentDao mContentDao = AbstractDao.getDao(ContentDao.class);
public interface AbstractOperationListAdapterListener {
......
......@@ -585,7 +585,7 @@ public class CheckOZDViewActivity extends ABVContentViewActivity {
param.append("export.mode=silent#");
param.append("export.filename=" + FileUtil.getFilenameWithoutExt(mSaveOzdTempFileName) + "#");
// #32926 作業報告画面改善 start
param.append("export.path=" + OzdFileHelper.getTempTaskDirPath(contentId, mTaskKey) + "#"); //OzdFileHelper.getTempTaskDirPath(contentId, mTaskKey) + "/" + mTaskReportLevel + "#");
param.append("export.path=" + OzdFileHelper.getTempTaskDirPath(contentId, mTaskKey) + "#");
// #32926 作業報告画面改善 end
param.append("export.confirmsave=false#");
param.append("export.format=ozd");
......
......@@ -4985,6 +4985,7 @@ public class ContentViewActivity extends ABVContentViewActivity {
case ABookKeys.CMD_INSERT_TASK_REPORT: // 作業報告の登録
case ABookKeys.CMD_UPDATE_TASK_REPORT: // 作業報告の更新
case ABookKeys.CMD_DELETE_TASK_REPORT: // 作業報告の削除
case ABookKeys.CMD_LOCAL_SAVE_TASK_REPORT: // 一時保存
getTaskHotspotJSON();
case ABookKeys.CMD_CANCEL_TASK_REPORT: // 作業報告のキャンセル
if(operationTaskDto != null) {
......@@ -5212,6 +5213,7 @@ public class ContentViewActivity extends ABVContentViewActivity {
// #32782 指示者テーブル関連削除 start
case ABookKeys.CMD_INSERT_TASK_REPORT:
case ABookKeys.CMD_UPDATE_TASK_REPORT:
case ABookKeys.CMD_LOCAL_SAVE_TASK_REPORT: // 一時保存
if (taskReportLevel == Constant.TaskReportLevel.ReportType) {
JSONObject hotspot = new JSONObject(checkParam.get(ABookKeys.HOT_SPOT));
......
......@@ -97,7 +97,7 @@ public class HTMLXWalkWebViewActivity extends ParentWebViewActivity {
boolean isUpdate = intent.getBooleanExtra("isUpdate", false);
final String url = intent.getStringExtra("LINKURL"); // LinkURL
mOperationId = intent.getLongExtra(ABookKeys.OPERATION_ID, -1); // ProjectId
mOperationId = intent.getLongExtra(ABookKeys.OPERATION_ID, -1); // OperationId
// ***** WebViewセット
......
......@@ -260,7 +260,7 @@ public class ParentWebViewActivity extends ABVContentViewActivity {
runOnUiThread(new Runnable() {
@Override
public void run() {
progressDialog.setProgress(20);
progressDialogHorizontal.setProgress(20);
webViewLoadUrl(String.format("javascript:CHK_E.checkResourceEntry('%s')", resourceId));
}
});
......@@ -268,21 +268,21 @@ public class ParentWebViewActivity extends ABVContentViewActivity {
handler.post(new Runnable() {
@Override
public void run() {
int progress = progressDialog.getProgress();
int progress = progressDialogHorizontal.getProgress();
if (progress == 0) {
return;
} else if (progress == 100) {
progressDialog.setProgress(0);
progressDialogHorizontal.setProgress(0);
closeProgressPopup();
} else if (progress < 100 && progress > 80) {
progressDialog.setProgress(progress + 1);
progressDialogHorizontal.setProgress(progress + 1);
handler.postDelayed(this, 2000);
} else if (progress <= 80 && progress >= 60) {
progressDialog.setProgress(progress + 2);
progressDialogHorizontal.setProgress(progress + 2);
handler.postDelayed(this, 1000);
} else if (progress < 60) {
progressDialog.setProgress(progress + 4);
progressDialogHorizontal.setProgress(progress + 4);
handler.postDelayed(this, 1000);
}
}
......
......@@ -44,8 +44,7 @@ public class OperationTaskLayout extends RelativeLayout {
private static final String TAG = "OperationTaskLayout";
private static final String TEMP_TASK_KEY = "00000000-0000-0000-0000-000000000000";
private static final String SCRIPT_SHOW_TASK_LIST = "javascript:CHK_P.updateTaskListForApp(%d)";//CHK.updateTaskListForApp(pageNum)
private static final String SCRIPT_SHOW_TASK_DIRECT = "javascript:CHK.showTaskForm('%s')";//CHK.showTaskForm(taskKey)
private static final String SCRIPT_SHOW_TASK_REPORT = "javascript:CHK.showTaskReportForm('%s')";//CHK.showTaskReportForm(name, taskKey, lookto)
private static final String SCRIPT_SHOW_TASK_REPORT = "javascript:CHK.showReportForm('%s')";//CHK.showTaskReportForm(name, taskKey, lookto)
private static final int ICON_WIDTH = 32;
private static final int ICON_HEIGHT = 32;
......@@ -279,15 +278,15 @@ public class OperationTaskLayout extends RelativeLayout {
final String script = String.format(SCRIPT_SHOW_TASK_LIST, pageNum + 1);
RelativeLayout.LayoutParams params;
if (isNormalSize) {
// if (isNormalSize) {
params = createParam(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT);
} else {
DisplayMetrics displayMetrics = getResources().getDisplayMetrics();
int halfWidth = (int) (displayMetrics.density * OperationTaskLayout.HALF_WIDTH);
int screenWidth = displayMetrics.widthPixels;
params = createParam(halfWidth, ViewGroup.LayoutParams.WRAP_CONTENT);
params.addRule(RelativeLayout.ALIGN_PARENT_RIGHT);
}
// } else {
// DisplayMetrics displayMetrics = getResources().getDisplayMetrics();
// int halfWidth = (int) (displayMetrics.density * OperationTaskLayout.HALF_WIDTH);
// int screenWidth = displayMetrics.widthPixels;
// params = createParam(halfWidth, ViewGroup.LayoutParams.WRAP_CONTENT);
// params.addRule(RelativeLayout.ALIGN_PARENT_RIGHT);
// }
setLayoutParams(params);
......@@ -309,11 +308,7 @@ public class OperationTaskLayout extends RelativeLayout {
final String script;
if (mXWalkOpenType == Constant.XWalkOpenType.TASK_DERECTION) {
script = String.format(SCRIPT_SHOW_TASK_DIRECT, operationTaskDto.taskKey.equals(TEMP_TASK_KEY) ? "" : operationTaskDto.taskKey);
} else {
script = String.format(SCRIPT_SHOW_TASK_REPORT, operationTaskDto.taskKey.equals(TEMP_TASK_KEY) ? "" : operationTaskDto.taskKey);
}
runOnUiThread(new Runnable() {
@Override
......@@ -340,20 +335,20 @@ public class OperationTaskLayout extends RelativeLayout {
public void setTaskFormPosition(float screenX, boolean isNormalSize) {
RelativeLayout.LayoutParams params;
if (isNormalSize) {
// if (isNormalSize) {
params = createParam(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT);
} else {
DisplayMetrics displayMetrics = getResources().getDisplayMetrics();
int halfWidth = (int) (displayMetrics.density * OperationTaskLayout.HALF_WIDTH);
int screenWidth = displayMetrics.widthPixels;
params = createParam(halfWidth, ViewGroup.LayoutParams.WRAP_CONTENT);
if (screenX < screenWidth / 2) {
params.addRule(RelativeLayout.ALIGN_PARENT_RIGHT);
} else {
params.addRule(RelativeLayout.ALIGN_PARENT_LEFT);
}
}
// } else {
// DisplayMetrics displayMetrics = getResources().getDisplayMetrics();
// int halfWidth = (int) (displayMetrics.density * OperationTaskLayout.HALF_WIDTH);
// int screenWidth = displayMetrics.widthPixels;
// params = createParam(halfWidth, ViewGroup.LayoutParams.WRAP_CONTENT);
//
// if (screenX < screenWidth / 2) {
// params.addRule(RelativeLayout.ALIGN_PARENT_RIGHT);
// } else {
// params.addRule(RelativeLayout.ALIGN_PARENT_LEFT);
// }
// }
setLayoutParams(params);
}
......
......@@ -51,13 +51,13 @@ public class PageView extends ImageView {
protected GestureDetector mGestureDetector;
protected ScaleGestureDetector mScaleDetector = null;
private boolean isProjectPdf;
private boolean isOperationPdf;
public PageView(Context context) {
super(context);
}
public PageView(Context context, Size pageSize, int pageNumber, int displayWidth, int displayHeight, RelativeLayout pageLayout, boolean isProjectPdf) {
public PageView(Context context, Size pageSize, int pageNumber, int displayWidth, int displayHeight, RelativeLayout pageLayout, boolean isOperationPdf) {
super(context);
Logger.i(TAG, "[PageView]: page=" + pageNumber);
......@@ -71,9 +71,9 @@ public class PageView extends ImageView {
mGestureDetector = new GestureDetector(context, mGestureListener);
this.isProjectPdf = isProjectPdf;
this.isOperationPdf = isOperationPdf;
// ABook Check : doubletap = 新作業指示
if (!isProjectPdf) {
if (!isOperationPdf) {
mGestureDetector.setOnDoubleTapListener(mDoubleTapListener);
}
mScaleDetector = new ScaleGestureDetector(context, onScaleGestureListener);
......
......@@ -38,8 +38,8 @@ app_versioncode=1
# abvEnvironments.xml
#cms server
acms_address=https://abook188-1.abook.bz/acms
download_server_address=https://abook188-1.abook.bz/acms
acms_address=https://abook189.abook.bz/acms
download_server_address=https://abook189.abook.bz/acms
#syncview server
websocket_server_http_url=https://abookplus.agentec.jp/v1
......
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