Commit 6c803151 by Kim Eunchul

Merge branch 'communication/develop' into 'communication/develop_kim-ec'

Communication/develop

See merge request !218
parents 691a442a 731b6188
[submodule "ABookCommunication_WebView"]
path = ABVJE_Launcher_Android/assets/chat
url = git@gitlab.agentec.jp:abookCommunication/chat_webview.git
[submodule "ABVJE_Launcher_Android/assets/check"]
path = ABVJE_Launcher_Android/assets/check
url = https://gitlab.agentec.jp/abookCheck/design.git
......@@ -48,9 +48,6 @@ public class ChatPushDataJSON extends AcmsCommonJSON {
}
PushMessageDto pushMessageDto = new PushMessageDto();
String tempDate = DateTimeUtil.toString(DateTimeUtil.toDate(pushMessagetJsonArray.getJSONObject(k).getString(PushSendDate), DateTimeFormat.yyyyMMddHHmmss_hyphen), DateTimeFormat.yyyyMMddHHmmssSSS_none);
Logger.d("messageId","messageId : " + pushMessagetJsonArray.getJSONObject(k).getString(PushSendDate));
Logger.d("oerationId","oerationId : " + pushMessagetJsonArray.getJSONObject(k).getString(PushSendDate)+1);
Logger.d("date","date : " + tempDate);
pushMessageDto.pushMessageId = Long.valueOf(tempDate);
pushMessageDto.operationId = Long.valueOf(tempDate+1);
pushMessageDto.pushSendLoginId = pushMessagetJsonArray.getJSONObject(k).getString(PushSendLoginId);
......
......@@ -61,6 +61,9 @@ public class OperationListJSON extends AcmsCommonJSON {
public static final String OperationGroupMasterIdList = "operationGroupMasterIdList";
public static final String QuickReport = "quickReport";
public static final String PermitCode = "permitCode";
public static final String PermitCodeRequiredFlg = "permitCodeRequiredFlg";
public static final String DisplayPermissionFlg = "displayPermissionFlg";
public List<OperationDto> operationList;
......@@ -92,6 +95,9 @@ public class OperationListJSON extends AcmsCommonJSON {
dto.enableReportEdit = operationJson.has(EnableReportEdit) ? operationJson.getInt(EnableReportEdit) : 0; // 作業編集区分
dto.enableAddReport = operationJson.has(EnableAddReport) ? operationJson.getInt(EnableAddReport) : 0; // 作業追加区分
dto.quickReport = operationJson.has(QuickReport) ? operationJson.getInt(QuickReport) : 0;
dto.permitCode = operationJson.has(PermitCode) ? operationJson.getString(PermitCode) : "";
dto.permitCodeRequiredFlg = operationJson.has(PermitCodeRequiredFlg) ? operationJson.getInt(PermitCodeRequiredFlg) : 0;
dto.displayPermissionFlg = operationJson.has(DisplayPermissionFlg) ? operationJson.getInt(DisplayPermissionFlg) : 0;
// 作業終了更新日
if (operationJson.has(OperationLastEditDate)) {
......
......@@ -51,6 +51,7 @@ public class ContentJSON extends AbstractJSON {
public static final String KEY_WIDTH = "width";
public static final String KEY_BACKGROUND_COLOR = "backgroundColor";
public static final String KEY_BACKGROUND_ALPHA = "backgroundAlpha";
public static final String KEY_LIST_TYPE = "list";
private JSONArray mPages;
......
......@@ -168,5 +168,11 @@ public interface ServiceOption {
* 利用しない:N(通常)、利用する:Y
*/
int UsableIOReport = 186;
/**
* RFID・バーコード使用
* 利用しない:N(通常)、利用する:Y
*/
int UsableRFIDBarcodeScan = 190;
}
}
\ No newline at end of file
......@@ -164,8 +164,23 @@ public interface ABookCommConstants {
String NETWORK_ERROR_PLACE_HOLDER = "file:///android_asset/chat/public_new/chat.html";
String CHAT_PAGE_URL = "file:///android_asset/chat/public_new/chat.html";
String CHAT_ROOM_PAGE_URL = "file:///android_asset/chat/public_new/chat_room.html";
String ARCHIVE_URL = "file:///android_asset/chat/public_new/archive.html";
String ARCHIVE_DETAIL_URL = "file:///android_asset/chat/public_new/archive_detail.html";
String CONTACT_URL = "file:///android_asset/chat/public_new/contact.html";
String COLLABORATION_PAGE_URL = "file:///android_asset/chat/public_new/collaboration.html";
String DEFAULT_CHECKSUM = "0000000000";
String PLATFORM_NAME = "android";
String CHAT_MESSAGE_SEPERATOR = "<::split>";
String INVITE_COLLABORATION = "inviteCollaboration" + CHAT_MESSAGE_SEPERATOR;
int PUSH_MESSAGE_DLG_REQUEST_CODE = 200;
interface PUSH_MESSAGE_DLG_RESULT {
int OK = 0;
int CANCEL = 1;
}
// ABookCheckで、onActivityResultのリクエストコードとして使用されている
int ABOOK_CHECK_TASK_IMAGE = 103;
int ABOOK_CHECK_TASK_VIDEO = 104;
int ABOOK_CHECK_SELECT_SCENE = 105;
}
......@@ -15,6 +15,43 @@ public class ABookKeys {
public static final String OPERATION_ID = "operationId";
public static final String OPERATION_NAME = "operationName";
public static final String OPERATION_LIST = "operationList";
public static final String OPERATION_DESCRIPTIONS = "operationDescriptions";
public static final String OPERATION_TYPE = "operationType";
public static final String OPERATION_START_DATE = "operationStartDate";
public static final String OPERATION_END_DATE = "operationEndDate";
public static final String OPERATION_OPEN_DATE = "operationOpenDate";
public static final String LAST_EDIT_DATE = "lastEditDate";
public static final String NEED_SYNC_FLG = "needSyncFlg";
public static final String REPORT_TYPE = "reportType";
public static final String ENABLE_REPORT_HISTORY = "enableReportHistory";
public static final String ENABLE_ADD_REPORT = "enableAddReport";
public static final String QUICK_REPORT = "quickReport";
public static final String PERMIT_CODE_REQUIRED_FLG = "permitCodeRequiredFlg";
public static final String PERMIT_CODE = "permitCode";
public static final String DISPLAY_PERMISSION_FLG = "displayPermissionFlg";
public static final String OPERATION_GROUPMASTER_LIST = "operationGroupMasterList";
public static final String OPERATION_GROUPMASTER_ID = "operationGroupMasterId";
public static final String OPERATION_GROUPMASTER_NAME = "operationGroupMasterName";
public static final String OPERATION_GROUPMASTER_LEVEL = "operationGroupMasterLevel";
public static final String OPERATION_GROUPMASTER_PARENTID = "parentOperationGroupMasterId";
public static final String OPERATION_GROUPMASTER_TREEPATH = "treePath";
public static final String OPERATION_GROUPMASTER_COUNTOPERATION = "countOperation";
public static final String OPERATION_GROUPMASTER_RELATION_LIST = "operationGroupMasterRelationList";
public static final String OPERATION_GROUPMASTER_RELATION_MASTERID = "operationGroupMasterId";
public static final String OPERATION_GROUPMASTER_RELATION_OPERATIONID = "operationId";
public static final String OPERATION_PUSHMESSAGE_LIST = "pushMessageList";
public static final String OPERATION_PUSHMESSAGEID = "pushMessageId";
public static final String OPERATION_OPERATIONID = "operationId";
public static final String OPERATION_OPERATIONNAME = "operationName";
public static final String OPERATION_PUSHSENDLOGINID = "pushSendLoginId";
public static final String OPERATION_PUSHSENDDATE = "pushSendDate";
public static final String OPERATION_PUSHMESSAGE = "pushMessage";
public static final String OPERATION_READINGFLG = "readingFlg";
// ABOOKCHECK SCHEME
public static final String ABOOK_CHECK_API = "abookcheck-api";
public static final String CMD_MOVE_HOT_SPOT = "moveHotspot";
......@@ -36,6 +73,7 @@ public class ABookKeys {
public static final String CMD_SHOW_RELATED_CONTENT = "showRelatedContent";
public static final String CMD_PAGE_NUM = "pageNum";
public static final String CMD_GET_GROUP_TREE_INFO = "getGroupTreeInfo";
public static final String CMD_CLOSE_TASK_LIST = "closeTaskList";
public static final String GPS_TYPE = "gpsType";
public static final String STATUS_CODE = "statusCode";
......@@ -48,7 +86,22 @@ public class ABookKeys {
public static final String ATTACHED_CHANGE_FLAG = "attachedChangeFlag";
public static final String ROUTINE_TASK_FLAG = "routineTaskFlag";
public static final String UPDATE_HOTSPOT_ONLY_FLAG = "updateHotSpotOnlyFlag";
// #32782 指示者テーブル関連削除 start
//Webviewから呼び出すApiキー
public static final class CMD_KEY{
public static final String GO_SETTING = "goSetting";
public static final String GO_RELATION_CONTENT = "goRelationContent";
public static final String GO_PRINT_TARGET = "goPrintTarget";
public static final String GO_OPERATION = "goOperation";
public static final String GO_COMMUNICATION = "goCommunication";
public static final String GO_PANORAMA_EDIT = "goPanoramaEdit";
public static final String REFRESH_CONTENT = "refreshContent";
public static final String RESET_SEARCH = "resetSearch";
public static final String CHANGE_OPERATION_GROUP_MASTER = "changeOperationGroupMaster";
}
// #32782 指示者テーブル関連削除 startbtn_pano_edit
// TODO change TASK_DIRECTIONS 削除が必要
// public static final String TASK_DIRECTIONS = "taskReport";
// public static final String TASK_DIRECTIONS_SUGGEST = "taskReportSuggest";
......@@ -158,4 +211,16 @@ public class ABookKeys {
public static final String PROCESS_LIST = "processList";
public static final String MAIL_TO_URL = "mailto";
public static class SCAN_TYPE_VALUE {
public static final Integer BARCODE = 0;
public static final Integer RFID = 1;
}
public static class SCAN_TYPE_KEY {
public static final String BARCODE = "BARCODE";
public static final String RFID = "RFID";
}
public static final String SCAN_TYPE = "scanType";
}
......@@ -343,6 +343,10 @@ public class ABVDataCache {
return isServiceOptionEnable(ServiceOptionId.UsableIOReport);
}
public boolean isUsableRFIDBarcodeScan() {
return isServiceOptionEnable(ServiceOptionId.UsableRFIDBarcodeScan);
}
/**
* @version 1.2.300
* サービスオプション(ユーザパスワードソルト付加)返す
......
......@@ -19,7 +19,7 @@ import jp.agentec.abook.abv.bl.common.db.SQLiteDatabase;
public class DBConnector {
private static volatile DBConnector dbConnector = null;
public static final String DatabaseName = "ABVJE";
public static final int DatabaseVersion = DatabaseVersions.Ver1_2_362;
public static final int DatabaseVersion = DatabaseVersions.Ver1_4_0;
protected SQLiteDatabase db = null;
......
......@@ -6,6 +6,7 @@ public class DatabaseVersions {
public static final int Ver1_1_0 = 11;
public static final int Ver1_2_0 = 21;
public static final int Ver1_2_3 = 22;
public static final int Ver1_4_0 = 42;
//連続作業機能追加
public static final int Ver1_2_360 = 23;
//チャット機能追加(1.2.360障害対応。)
......
......@@ -45,6 +45,10 @@ public class OperationDao extends AbstractDao {
if (column != -1) {
dto.operationEndDate = DateTimeUtil.toDate(cursor.getString(column), "UTC", DateTimeFormat.yyyyMMdd_hyphen);
}
column = cursor.getColumnIndex("operation_open_date");
if (column != -1) {
dto.operationOpenDate = DateTimeUtil.toDate(cursor.getString(column), "UTC", DateTimeFormat.yyyyMMddHHmmss_hyphen);
}
column = cursor.getColumnIndex("operation_type");
if (column != -1) {
dto.operationType = cursor.getInt(column);
......@@ -116,6 +120,21 @@ public class OperationDao extends AbstractDao {
dto.quickReport = cursor.getInt(column);
}
column = cursor.getColumnIndex("permit_code");
if (column != -1) {
dto.permitCode = cursor.getString(column);
}
column = cursor.getColumnIndex("permit_code_required_flg");
if (column != -1) {
dto.permitCodeRequiredFlg = cursor.getInt(column);
}
column = cursor.getColumnIndex("display_permission_flg ");
if (column != -1) {
dto.displayPermissionFlg = cursor.getInt(column);
}
return dto;
}
......@@ -191,15 +210,18 @@ public class OperationDao extends AbstractDao {
+ "enable_report_history, "
+ "enable_report_edit,"
+ "enable_add_report,"
+ "quick_report) "
+ "quick_report,"
+ "permit_code,"
+ "permit_code_required_flg, "
+ "display_permission_flg) "
+ "values "
+ "(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)",
+ "(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)",
dto.getInsertValues());
}
public boolean update(OperationDto dto) {
long count = update("update t_operation "
+ "set "
long count = update("UPDATE t_operation "
+ "SET "
+ "operation_name=?, "
+ "operation_descriptions=?, "
+ "operation_start_date=?, "
......@@ -215,8 +237,11 @@ public class OperationDao extends AbstractDao {
+ "enable_report_history=?, "
+ "enable_report_edit=?, "
+ "enable_add_report=?, "
+ "quick_report=? "
+ "where operation_id=?",
+ "quick_report=?, "
+ "permit_code=?, "
+ "permit_code_required_flg=?, "
+ "display_permission_flg=? "
+ "WHERE operation_id=?",
dto.getUpdateValues());
return count > 0;
}
......@@ -265,8 +290,8 @@ public class OperationDao extends AbstractDao {
* @param operationSortType
* @return
*/
public List<OperationDto> getOperations(String searchOperationName, String searchStartDateStr, String searchEndDateStr, OperationSortingType operationSortType) {
String sql = generateGetOperationQuery(searchOperationName, searchStartDateStr, searchEndDateStr, operationSortType, null);
public List<OperationDto> getOperations(String searchOperationName, String searchStartDateStr, String searchEndDateStr, OperationSortingType operationSortType, int operationGroupMasterId) {
String sql = generateGetOperationQuery(searchOperationName, searchStartDateStr, searchEndDateStr, operationSortType, Integer.valueOf(operationGroupMasterId) == 0 ? null : Integer.valueOf(operationGroupMasterId));
return rawQueryGetDtoList(sql, null, OperationDto.class);
}
......@@ -301,6 +326,7 @@ public class OperationDao extends AbstractDao {
sql.append(" top.operation_descriptions, ");
sql.append(" top.operation_start_date, ");
sql.append(" top.operation_end_date, ");
sql.append(" top.operation_open_date, ");
sql.append(" top.last_edit_date, ");
sql.append(" top.edit_lock_flg, ");
sql.append(" top.need_sync_flg, ");
......@@ -310,6 +336,8 @@ public class OperationDao extends AbstractDao {
sql.append(" top.enable_report_update, ");
sql.append(" top.enable_report_edit, ");
sql.append(" top.enable_add_report, ");
sql.append(" top.permit_code, ");
sql.append(" top.permit_code_required_flg, ");
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')) ");
......
......@@ -10,6 +10,7 @@ import jp.agentec.abook.abv.bl.common.db.SQLiteDatabase;
import jp.agentec.abook.abv.bl.common.log.Logger;
import jp.agentec.abook.abv.bl.dto.GroupDto;
import jp.agentec.abook.abv.bl.dto.OperationGroupMasterDto;
import jp.agentec.abook.abv.bl.dto.OperationGroupMasterRelationDto;
import jp.agentec.adf.util.DateTimeFormat;
import jp.agentec.adf.util.DateTimeUtil;
import jp.agentec.adf.util.NumericUtil;
......@@ -51,7 +52,10 @@ public class OperationGroupMasterDao extends AbstractDao {
if (column != -1) {
dto.operationCount = cursor.getInt(column);
}
column = cursor.getColumnIndex("tree_path");
if (column != -1) {
dto.treePath = cursor.getString(column);
}
return dto;
}
......@@ -185,4 +189,25 @@ public class OperationGroupMasterDao extends AbstractDao {
public Integer getLastGroupLevel() {
return rawQueryGetInt("SELECT MAX(operation_group_master_level) FROM m_operation_group_master", null);
}
public List<OperationGroupMasterDto> getOperationGroupMasterTreeData() {
return rawQueryGetDtoList("WITH RECURSIVE paths(operation_group_master_id, tree_path) AS (\n" +
" SELECT operation_group_master_id, operation_group_master_id\n" +
" FROM m_operation_group_master AS nodes\n" +
" WHERE parent_operation_group_master_id = 0\n" +
" UNION\n" +
" SELECT nodes.operation_group_master_id, paths.tree_path || '/' || nodes.operation_group_master_id\n" +
" FROM m_operation_group_master AS nodes\n" +
" JOIN paths\n" +
" WHERE nodes.parent_operation_group_master_id = paths.operation_group_master_id\n" +
")\n" +
"SELECT m.*, paths.tree_path, COUNT(r.operation_id) count_operation\n" +
"FROM paths\n" +
" JOIN m_operation_group_master AS m\n" +
" ON paths.operation_group_master_id = m.operation_group_master_id\n" +
" LEFT JOIN r_operation_group_master_relation r\n" +
" ON paths.operation_group_master_id = r.operation_group_master_id\n" +
"GROUP BY m.operation_group_master_id\n" +
"ORDER By m.operation_group_master_name ASC", null, OperationGroupMasterDto.class);
}
}
\ No newline at end of file
......@@ -86,4 +86,8 @@ public class OperationGroupMasterOperationDao extends AbstractDao {
public List<Integer> getOperationGroupMasterIds(Long operationId) {
return rawQueryGetIntegerList("select operation_group_master_id from r_operation_group_master_relation where operation_id=?", new String[]{""+ operationId});
}
public List<OperationGroupMasterRelationDto> getAllGroupMasterRelation() {
return rawQueryGetDtoList("select * from r_operation_group_master_relation", null, OperationGroupMasterRelationDto.class);
}
}
\ No newline at end of file
......@@ -137,4 +137,6 @@ public class PushMessageDao extends AbstractDao {
Logger.v(TAG, "sql=%s", sql);
return rawQueryGetDto(sql.toString(), args, PushMessageDto.class);
}
}
......@@ -40,6 +40,9 @@ public class TOperation extends SQLiteTableScript {
sql.append(" , enable_add_report SMALLINT NOT NULL DEFAULT 0 ");
sql.append(" , operation_open_date DATETIME ");
sql.append(" , quick_report SMALLINT NOT NULL DEFAULT 0 ");
sql.append(" , permit_code TEXT ");
sql.append(" , display_permission_flg SMALLINT");
sql.append(" , permit_code_required_flg SMALLINT");
sql.append(" , PRIMARY KEY (operation_id) ");
sql.append(" ) ");
ddl.add(sql.toString());
......@@ -58,6 +61,11 @@ public class TOperation extends SQLiteTableScript {
if (oldVersion < DatabaseVersions.Ver1_2_3) {
ddl.add("ALTER TABLE t_operation ADD COLUMN quick_report SMALLINT NOT NULL DEFAULT 0 ");
}
if (oldVersion < DatabaseVersions.Ver1_4_0) {
ddl.add("ALTER TABLE t_operation ADD COLUMN permit_code TEXT ");
ddl.add("ALTER TABLE t_operation ADD COLUMN permit_code_required_flg SMALLINT ");
ddl.add("ALTER TABLE t_operation ADD COLUMN display_permission_flg SMALLINT ");
}
return ddl;
}
......
......@@ -15,6 +15,7 @@ public class OperationDto extends AbstractDto {
public String operationDescriptions;
public Date operationStartDate;
public Date operationEndDate;
public Date operationOpenDate;
public Date lastEditDate;
public boolean editLockFlg;
public boolean needSyncFlg;
......@@ -32,6 +33,9 @@ public class OperationDto extends AbstractDto {
public int enableReportEdit; // 作業編集可能区分
public int enableAddReport; // 作業追加区分
public int quickReport; // 簡易帳票区分
public String permitCode; // 許可スキャンコード
public int permitCodeRequiredFlg; // 許可スキャン必須フラグ
public int displayPermissionFlg;
public List<OperationGroupMasterRelationDto> operationGroupMasterRelationDtoList; // 作業種別に紐づく作業Dto
......@@ -49,12 +53,12 @@ public class OperationDto extends AbstractDto {
@Override
public Object[] getInsertValues() {
return new Object[] { operationId, operationName, operationDescriptions, operationStartDate, operationEndDate, operationType, reportType, lastEditDate, contentCreatingFlg, editLockFlg, needSyncFlg, reportCycle, enableReportUpdate, enableReportHistory, enableReportEdit, enableAddReport, quickReport };
return new Object[] { operationId, operationName, operationDescriptions, operationStartDate, operationEndDate, operationType, reportType, lastEditDate, contentCreatingFlg, editLockFlg, needSyncFlg, reportCycle, enableReportUpdate, enableReportHistory, enableReportEdit, enableAddReport, quickReport, permitCode, permitCodeRequiredFlg, displayPermissionFlg};
}
@Override
public Object[] getUpdateValues() {
return new Object[] { operationName, operationDescriptions, operationStartDate, operationEndDate, operationType, reportType, lastEditDate, contentCreatingFlg, editLockFlg, needSyncFlg, reportCycle, enableReportUpdate, enableReportHistory, enableReportEdit, enableAddReport, quickReport, operationId };
return new Object[] { operationName, operationDescriptions, operationStartDate, operationEndDate, operationType, reportType, lastEditDate, contentCreatingFlg, editLockFlg, needSyncFlg, reportCycle, enableReportUpdate, enableReportHistory, enableReportEdit, enableAddReport, quickReport, permitCode, permitCodeRequiredFlg, displayPermissionFlg, operationId };
}
@Override
......
......@@ -12,6 +12,7 @@ public class OperationGroupMasterDto extends AbstractDto {
public int parentOperationGroupMasterId; // 作業種別の親階層ID
public int operationGroupMasterLevel; // 作業種別の階層レベル
public int operationCount = 0; // 作業種別に紐づく作業数
public String treePath ; // 作業種別のTreeデータ
public OperationGroupMasterDto() {
}
......
package jp.agentec.abook.abv.bl.logic;
import org.json.adf.JSONArray;
import org.json.adf.JSONObject;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
......@@ -10,15 +13,19 @@ import jp.agentec.abook.abv.bl.acms.client.json.OperationGroupMasterJSON;
import jp.agentec.abook.abv.bl.acms.client.parameters.AcmsParameters;
import jp.agentec.abook.abv.bl.acms.type.OperationSortingType;
import jp.agentec.abook.abv.bl.common.ABVEnvironment;
import jp.agentec.abook.abv.bl.common.constant.ABookKeys;
import jp.agentec.abook.abv.bl.common.exception.AcmsException;
import jp.agentec.abook.abv.bl.common.exception.NetworkDisconnectedException;
import jp.agentec.abook.abv.bl.common.log.Logger;
import jp.agentec.abook.abv.bl.data.dao.AbstractDao;
import jp.agentec.abook.abv.bl.data.dao.OperationDao;
import jp.agentec.abook.abv.bl.data.dao.OperationGroupMasterDao;
import jp.agentec.abook.abv.bl.data.dao.OperationGroupMasterOperationDao;
import jp.agentec.abook.abv.bl.dto.OperationDto;
import jp.agentec.abook.abv.bl.dto.OperationGroupMasterDto;
import jp.agentec.abook.abv.bl.dto.OperationGroupMasterRelationDto;
import jp.agentec.abook.abv.bl.dto.comparator.OperationGroupMasterLevelComparator;
import jp.agentec.adf.util.FileUtil;
/**
* Created by leej on 2019/06/26.
......@@ -28,6 +35,7 @@ public class OperationGroupMasterLogic extends AbstractLogic {
private static final String TAG = "OperationGroupMasterLogic";
private OperationGroupMasterDao mOperationGroupMasterDao = AbstractDao.getDao(OperationGroupMasterDao.class);
private OperationGroupMasterOperationDao mOperationGroupMasterOperationDao = AbstractDao.getDao(OperationGroupMasterOperationDao.class);
private OperationDao mOperationDao = AbstractDao.getDao(OperationDao.class);
/**
......@@ -168,4 +176,46 @@ public class OperationGroupMasterLogic extends AbstractLogic {
public List<OperationDto> getOperationByOperationGroupMasterId(Integer operationGroupMasterId, OperationSortingType operationSortingType) {
return mOperationDao.getOperationsByGroupMasterId(operationGroupMasterId, operationSortingType);
}
public void createOperationGroupMasterListJson(String filePath) {
List<OperationGroupMasterDto> localOperationGroupMasterDtos = mOperationGroupMasterDao.getOperationGroupMasterTreeData();
JSONObject operationListJsonObject = new JSONObject();
try {
JSONArray operationJsonArray = new JSONArray();
for (int i = 0; i < localOperationGroupMasterDtos.size(); i++) {
JSONObject operationJson = new JSONObject();
operationJson.put(ABookKeys.OPERATION_GROUPMASTER_ID, localOperationGroupMasterDtos.get(i).operationGroupMasterId);
operationJson.put(ABookKeys.OPERATION_GROUPMASTER_NAME, localOperationGroupMasterDtos.get(i).operationGroupMasterName);
operationJson.put(ABookKeys.OPERATION_GROUPMASTER_LEVEL, localOperationGroupMasterDtos.get(i).operationGroupMasterLevel);
operationJson.put(ABookKeys.OPERATION_GROUPMASTER_PARENTID, localOperationGroupMasterDtos.get(i).parentOperationGroupMasterId);
operationJson.put(ABookKeys.OPERATION_GROUPMASTER_TREEPATH, localOperationGroupMasterDtos.get(i).treePath);
operationJson.put(ABookKeys.OPERATION_GROUPMASTER_COUNTOPERATION, localOperationGroupMasterDtos.get(i).operationCount);
operationJsonArray.put(operationJson);
}
operationListJsonObject.put(ABookKeys.OPERATION_GROUPMASTER_LIST, operationJsonArray);
FileUtil.createFile(filePath + "/" + ABookKeys.OPERATION_GROUPMASTER_LIST + ".json", operationListJsonObject.toString());
} catch (Exception e) {
e.printStackTrace();
}
}
public void createOperationGroupMasterRelationListJson(String filePath) {
List<OperationGroupMasterRelationDto> operationList = mOperationGroupMasterOperationDao.getAllGroupMasterRelation();
JSONObject operationListJsonObject = new JSONObject();
try {
JSONArray operationJsonArray = new JSONArray();
for (int i = 0; i < operationList.size(); i++) {
JSONObject operationJson = new JSONObject();
operationJson.put(ABookKeys.OPERATION_GROUPMASTER_RELATION_MASTERID, operationList.get(i).operationGroupMasterId);
operationJson.put(ABookKeys.OPERATION_GROUPMASTER_RELATION_OPERATIONID, operationList.get(i).operationId);
operationJsonArray.put(operationJson);
}
operationListJsonObject.put(ABookKeys.OPERATION_GROUPMASTER_RELATION_LIST, operationJsonArray);
FileUtil.createFile(filePath + "/" + ABookKeys.OPERATION_GROUPMASTER_RELATION_LIST + ".json", operationListJsonObject.toString());
} catch (Exception e) {
e.printStackTrace();
}
}
}
......@@ -58,6 +58,7 @@ import jp.agentec.abook.abv.bl.dto.CategoryContentDto;
import jp.agentec.abook.abv.bl.dto.ContentDto;
import jp.agentec.abook.abv.bl.dto.OperationContentDto;
import jp.agentec.abook.abv.bl.dto.OperationDto;
import jp.agentec.abook.abv.bl.dto.OperationGroupMasterDto;
import jp.agentec.abook.abv.bl.dto.OperationGroupMasterRelationDto;
import jp.agentec.abook.abv.bl.dto.PushMessageDto;
import jp.agentec.abook.abv.bl.dto.TaskDto;
......@@ -132,9 +133,6 @@ public class OperationLogic extends AbstractLogic {
}
}
for (OperationDto serverOperationDto : serverOperations) {
// 登録フラグ
boolean insertFlg = true;
......@@ -1328,9 +1326,9 @@ public class OperationLogic extends AbstractLogic {
* @param operationSortingType ソート順
* @return 作業リスト
*/
public List<OperationDto> getRefreshOperation(String searchWord, String searchStartDateStr, String searchEndDateStr, OperationSortingType operationSortingType) {
public List<OperationDto> getRefreshOperation(String searchWord, String searchStartDateStr, String searchEndDateStr, OperationSortingType operationSortingType, int operationGroupMasterId) {
List<OperationDto> operationDtoList;
operationDtoList = mOperationDao.getOperations(searchWord, searchStartDateStr, searchEndDateStr, operationSortingType);
operationDtoList = mOperationDao.getOperations(searchWord, searchStartDateStr, searchEndDateStr, operationSortingType, operationGroupMasterId);
for (OperationDto operationDto : operationDtoList) {
// 作業送信フラグが存在する場合またはホットスポット更新フラグが存在する場合、needSyncFlgをtrueにセット
if (mTaskReportDao.isExistSendTaskData(operationDto.operationId) || mTaskReportDao.isExistUpdateTargetHotSpotTaskData(operationDto.operationId)) {
......@@ -1997,4 +1995,42 @@ public class OperationLogic extends AbstractLogic {
}
return isSuccess;
}
public String createOperationListJson(List<OperationDto> operationList, String filePath) {
JSONObject operationListJsonObject = new JSONObject();
try {
JSONArray operationJsonArray = new JSONArray();
for (int i = 0; i < operationList.size(); i++) {
JSONObject operationJson = new JSONObject();
operationJson.put(ABookKeys.OPERATION_ID, operationList.get(i).operationId);
operationJson.put(ABookKeys.OPERATION_NAME, operationList.get(i).operationName);
operationJson.put(ABookKeys.OPERATION_DESCRIPTIONS, operationList.get(i).operationDescriptions);
operationJson.put(ABookKeys.OPERATION_TYPE, operationList.get(i).operationType);
operationJson.put(ABookKeys.OPERATION_START_DATE, DateTimeUtil.toString(operationList.get(i).operationStartDate, DateTimeFormat.yyyyMMdd_slash));
operationJson.put(ABookKeys.OPERATION_END_DATE, DateTimeUtil.toString(operationList.get(i).operationEndDate, DateTimeFormat.yyyyMMdd_slash));
operationJson.put(ABookKeys.LAST_EDIT_DATE, DateTimeUtil.toString(operationList.get(i).lastEditDate, DateTimeFormat.yyyyMMdd_slash));
operationJson.put(ABookKeys.NEED_SYNC_FLG, operationList.get(i).needSyncFlg);
operationJson.put(ABookKeys.REPORT_TYPE, operationList.get(i).reportType);
operationJson.put(ABookKeys.REPORT_CYCLE, operationList.get(i).reportCycle);
operationJson.put(ABookKeys.ENABLE_REPORT_UPDATE, operationList.get(i).enableReportUpdate);
operationJson.put(ABookKeys.ENABLE_REPORT_HISTORY, operationList.get(i).enableReportHistory);
operationJson.put(ABookKeys.ENABLE_ADD_REPORT, operationList.get(i).enableAddReport);
operationJson.put(ABookKeys.QUICK_REPORT, operationList.get(i).quickReport);
operationJson.put(ABookKeys.PERMIT_CODE, operationList.get(i).permitCode);
operationJson.put(ABookKeys.PERMIT_CODE_REQUIRED_FLG, operationList.get(i).permitCodeRequiredFlg);
operationJson.put(ABookKeys.OPERATION_OPEN_DATE, DateTimeUtil.toString(operationList.get(i).operationOpenDate, DateTimeFormat.yyyyMMddHHmmss_hyphen));
operationJson.put(ABookKeys.DISPLAY_PERMISSION_FLG, operationList.get(i).displayPermissionFlg);
operationJson.put(ABookKeys.CONTENT_ID, operationList.get(i).contentId);
operationJsonArray.put(operationJson);
}
operationListJsonObject.put(ABookKeys.OPERATION_LIST, operationJsonArray);
if (!StringUtil.isNullOrEmpty(filePath)) {
FileUtil.createFile(filePath + "/operationList.json", operationListJsonObject.toString());
}
} catch (Exception e) {
e.printStackTrace();
}
return operationListJsonObject.toString();
}
}
package jp.agentec.abook.abv.bl.logic;
import org.json.adf.JSONArray;
import org.json.adf.JSONObject;
import java.io.IOException;
import java.util.List;
......@@ -14,7 +17,9 @@ import jp.agentec.abook.abv.bl.common.log.Logger;
import jp.agentec.abook.abv.bl.data.dao.AbstractDao;
import jp.agentec.abook.abv.bl.data.dao.PushMessageDao;
import jp.agentec.abook.abv.bl.dto.FixPushMessageDto;
import jp.agentec.abook.abv.bl.dto.OperationDto;
import jp.agentec.abook.abv.bl.dto.PushMessageDto;
import jp.agentec.adf.util.FileUtil;
/**
* Created by kim jinsung on 2018/09/17.
......@@ -62,4 +67,32 @@ public class PushMessageLogic extends AbstractLogic {
public void updateReadingFlg(long pushMessageId) {
mPushMessageDao.updateReadingFlg(pushMessageId);
}
public List<PushMessageDto> getAllPushMessage() {
return mPushMessageDao.selectAll();
}
public void createOperationPushMessageListJson(String filePath) {
List<PushMessageDto> pushList = getAllPushMessage();
JSONObject pushListJsonObject = new JSONObject();
try {
JSONArray pushJsonArray = new JSONArray();
for (int i = 0; i < pushList.size(); i++) {
JSONObject pushJson = new JSONObject();
pushJson.put(ABookKeys.OPERATION_PUSHMESSAGEID, pushList.get(i).pushMessageId);
pushJson.put(ABookKeys.OPERATION_OPERATIONID, pushList.get(i).operationId);
pushJson.put(ABookKeys.OPERATION_OPERATIONNAME, pushList.get(i).operationName);
pushJson.put(ABookKeys.OPERATION_PUSHSENDLOGINID, pushList.get(i).pushSendLoginId);
pushJson.put(ABookKeys.OPERATION_PUSHSENDDATE, pushList.get(i).pushSendDate);
pushJson.put(ABookKeys.OPERATION_PUSHMESSAGE, pushList.get(i).pushMessage);
pushJson.put(ABookKeys.OPERATION_READINGFLG, pushList.get(i).readingFlg);
pushJsonArray.put(pushJson);
}
pushListJsonObject.put(ABookKeys.OPERATION_PUSHMESSAGE_LIST, pushJsonArray);
FileUtil.createFile(filePath + "/" + ABookKeys.OPERATION_PUSHMESSAGE_LIST + ".json", pushListJsonObject.toString());
} catch (Exception e) {
e.printStackTrace();
}
}
}
......@@ -235,7 +235,9 @@
<!-- ABookCheck対応 -->
<activity android:name="jp.agentec.abook.abv.ui.home.activity.OperationListActivity"
android:configChanges="keyboardHidden|orientation|screenSize"/>
android:configChanges="screenSize|smallestScreenSize|screenLayout|orientation"
android:resizeableActivity="true"
android:windowSoftInputMode="adjustPan"/>
<activity android:name="jp.agentec.abook.abv.ui.home.activity.OperationRelatedContentActivity"
android:configChanges="keyboardHidden|orientation|screenSize"/>
<activity android:name="jp.agentec.abook.abv.ui.home.activity.OperationMeetingListActivity"/>
......
Subproject commit 9ecee0d315a72826655fb964234d2271134482b2
Subproject commit 0ab4d25517492c845bcfceaceaf86797eff822cc
Subproject commit 5d0e71bd7ff6383baab4a0f7f333279b7307a27a
......@@ -238,6 +238,7 @@
<string name="L122">現在、この機能はAndroid版アプリでは\n対応しておりません。</string>
<string name="L123">この資料の表示は制限されています。\nパスワードの入力が必要です。</string>
<string name="L124">システムエラーが発生しました。アプリをリロードします。</string>
<string name="L125">その作業は非公開または削除されました。更新を行って下さい。</string>
<string name="C_E_SYSTEM_0001">予期せぬ問題が発生しました。</string>
<string name="C_E_SYSTEM_0002">ログインできませんでした。(暗号化失敗 0002)</string>
......@@ -1490,6 +1491,8 @@
<string name="msg_destroy_exist_collaboration">進行中の協業が存在します。既存協業を終了し、新しい協業を開始してもよろしいですか</string>
<string name="not_found_camera">利用可能なカメラを見つかりませんでした。</string>
<string name="error_fail_record">レコーディングに失敗しました。管理者にお問い合わせしてください。</string>
<string name="chat_open_fail_meeting_connected">遠隔支援中にはチャットルームは開けません。</string>
<string name="chat_open_fail_collaborattion_connected">協業中にはチャットルームは開けません。</string>
<!-- 連続作業 -->
<string name="msg_error_all_process_delete">全削除の送信に失敗しました。</string>
<string name="msg_ozd_file_could_not_opened">帳票ファイルを開くことができませんでした。</string>
......
......@@ -239,6 +239,7 @@
<string name="L122">현재 이 기능은 Android 버전 앱에서 \n 대응하고 있지 않습니다.</string>
<string name="L123">표시가 제한된 컨텐츠 입니다.\n로그인 패스워드를 입력해 주세요.</string>
<string name="L124">시스템에러가 발생하였습니다.앱을 리로드합니다.</string>
<string name="L125">해당 자료가 비공개 또는 삭제되었습니다. 갱신해 주세요.</string>
<string name="C_E_SYSTEM_0001">예기치 않은 오류가 발생하였습니다.</string>
<string name="C_E_SYSTEM_0002">로그인 할 수 없습니다.(암호화 실패 0002)</string>
......@@ -1498,6 +1499,8 @@
<string name="not_found_camera">사용 가능한 카메라 기기를 찾을수 없습니다.</string>
<string name="msg_destroy_exist_collaboration">진행중인 협업이 존재합니다. 기존 협업을 종료하고 새로운 협업을 시작 하시겠습니까?</string>
<string name="error_fail_record">레코드에 실패했습니다. 관리자에게 문의해주세요.</string>
<string name="chat_open_fail_meeting_connected">원격 지원 접속 중에는 채팅방을 열 수 없습니다.</string>
<string name="chat_open_fail_collaborattion_connected">문서협업 접속 중에는 채팅방을 열수 없습니다.</string>
<!-- Communication 会議室 -->
<string name="msg_error_favorites_100_over">즐겨찾기는 최대 100개까지 입니다.</string>
<string name="msg_eroor_network_offline">연결된 네트워크가 없습니다.</string>
......
......@@ -238,7 +238,7 @@
<string name="L122">Currently, this feature is not supported in the version of the App Android.</string>
<string name="L123">These content are limited.\nThe input of the password is necessary.</string>
<string name="L124">System error occurred. Will reload the application.</string>
<string name="L125">The working was closed or deleted.Please update the working.</string>
<string name="C_E_SYSTEM_0001">Contingency has occurred.</string>
<string name="C_E_SYSTEM_0002">App can not login.(Encryption failures 0002)</string>
<string name="C_E_SYSTEM_0003">App can not login.(Library initialization Failed)</string>
......@@ -1495,6 +1495,8 @@
<string name="not_found_camera">Not found camera device.</string>
<string name="msg_destroy_exist_collaboration">Ongoing collaboration exist. Do you want to terminate exist collaboration and start new?</string>
<string name="error_fail_record">Recording failed. Please contact the administrator.</string>
<string name="chat_open_fail_meeting_connected">Can’t open chat room during distance support. </string>
<string name="chat_open_fail_collaborattion_connected">Chat rooms cannot be opened while the document collaboration is connected.</string>
<!-- Communication 会議室 -->
<string name="msg_error_favorites_100_over">You can have up to 100 favorites.</string>
<string name="msg_eroor_network_offline">There is no network connected.</string>
......
......@@ -11,7 +11,7 @@
android:layout_height="0dp"
android:layout_weight="1"
android:orientation="vertical" >
<jp.agentec.abook.abv.ui.home.view.ChatWebView
<WebView
android:id="@+id/chatWebview"
android:layout_width="match_parent"
android:layout_height="match_parent" />
......
......@@ -142,6 +142,20 @@
android:background="@drawable/btn_view_sub_menu" />
<ImageButton
android:id="@+id/btn_operation_print"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/btn_operation_print_white"
android:layout_centerVertical="true"
android:layout_alignParentRight="true"
android:scaleX="0.6"
android:scaleY="0.6"
style="@style/ToolBarIcon"
android:layout_marginRight="50dp"
android:visibility="gone" />
<ImageButton
android:id="@+id/btn_show_task_list"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
......
......@@ -969,7 +969,7 @@ public abstract class PullToRefreshBase<T extends View> extends LinearLayout imp
*/
protected final void setHeaderScroll(int value) {
if (DEBUG) {
Log.d(LOG_TAG, "setHeaderScroll: " + value);
Log.v(LOG_TAG, "setHeaderScroll: " + value);
}
// Clamp value to with pull scroll range
......
package jp.agentec.abook.abv.cl.push;
import android.content.Intent;
import org.json.adf.JSONObject;
import jp.agentec.abook.abv.bl.common.constant.ABookCommConstants;
import jp.agentec.abook.abv.launcher.android.R;
import jp.agentec.abook.abv.ui.common.appinfo.AppDefType;
import jp.agentec.adf.util.StringUtil;
/**
* プッシュメッセージをJSONにしたクラス
* 既存のデータのキーは、AppDefType.PushMessageKey
* チャットで追加されたデータのキーは、AppDefType.ChatPushMessageKey
*/
public class PushMessageJSON {
private JSONObject jsonObject;
public PushMessageJSON(String jsonText) {
jsonObject = new JSONObject(jsonText);
}
// プッシュメッセージデータ
public String getMessage() {
return jsonObject.getString(AppDefType.PushMessageKey.message);
}
public String getData() {
try {
return jsonObject.getString(AppDefType.PushMessageKey.data);
} catch (Exception e) {
return "";
}
}
public String getOperationID() {
try {
return jsonObject.getString(AppDefType.PushMessageKey.operationId);
} catch (Exception e) {
return "";
}
}
// ここからチャットデータ
public String getRoomName() {
try {
return jsonObject.getString(AppDefType.ChatPushMessageKey.roomName);
} catch (Exception e){
return "";
}
}
public Long getRoomId() {
try {
return jsonObject.getLong(AppDefType.ChatPushMessageKey.roomId);
} catch (Exception e){
return new Long(0);
}
}
public String getRoomType() {
try {
int roomType = jsonObject.getInt(AppDefType.ChatPushMessageKey.roomType);
return Integer.toString(roomType);
} catch (Exception e){
return "";
}
}
public String getPushSendLoginId() {
try {
return jsonObject.getString(AppDefType.ChatPushMessageKey.pushSendLoginId);
} catch (Exception e) {
return "";
}
}
public long getPushSendDate() {
try {
return jsonObject.getLong(AppDefType.ChatPushMessageKey.pushSendDate);
} catch (Exception e) {
return 0;
}
}
public boolean isCollaboration() {
String message = getMessage();
if (message.contains(ABookCommConstants.INVITE_COLLABORATION)) {
return true;
}
return false;
}
public String getCollaborationType() {
try {
String message = getMessage();
if (message.contains(ABookCommConstants.INVITE_COLLABORATION)) {
String[] inviteMessage = message.split(ABookCommConstants.CHAT_MESSAGE_SEPERATOR);
return inviteMessage[1];
}
return jsonObject.getString(AppDefType.ChatPushMessageKey.collaborationType);
} catch (Exception e) {
return "";
}
}
}
......@@ -264,35 +264,39 @@ public class ChatData {
public void joinCollaboration(String collaborationType, String meetingId) throws NetworkDisconnectedException, AcmsException {
joinMeetingId = Integer.parseInt(meetingId);
collaborationJoinFlg = ABookCommConstants.FLAG.COLLABORATION_JOIN_FLG.JOIN;
AcmsClient.
getInstance(ABVEnvironment.getInstance().networkAdapter).
joinCollaboration(sid, roomId.intValue());
AcmsClient
.getInstance(ABVEnvironment.getInstance().networkAdapter)
.joinCollaboration(sid, roomId.intValue());
}
public void joinChangedCollaboration(String collaborationType, String meetingId) throws NetworkDisconnectedException, AcmsException {
joinMeetingId = Integer.parseInt(meetingId);
collaborationJoinFlg = ABookCommConstants.FLAG.COLLABORATION_JOIN_FLG.JOIN;
AcmsClient.
getInstance(ABVEnvironment.getInstance().networkAdapter).
joinCollaboration(sid, roomId.intValue());
AcmsClient
.getInstance(ABVEnvironment.getInstance().networkAdapter)
.joinCollaboration(sid, roomId.intValue());
}
public void inviteCollaboration(String inviteUserIds, String collaborationType) throws NetworkDisconnectedException, AcmsException {
AcmsClient.
getInstance(ABVEnvironment.getInstance().networkAdapter).
inviteCollaboration(sid, roomId.intValue(), roomName, inviteUserIds, collaborationType);
AcmsClient
.getInstance(ABVEnvironment.getInstance().networkAdapter)
.inviteCollaboration(sid, roomId.intValue(), roomName, inviteUserIds, collaborationType);
}
public void finishCollaboration() throws NetworkDisconnectedException, AcmsException {
AcmsClient.
getInstance(ABVEnvironment.getInstance().networkAdapter).
finishCollaboration(sid, roomId.intValue());
AcmsClient
.getInstance(ABVEnvironment.getInstance().networkAdapter)
.finishCollaboration(sid, roomId.intValue());
}
public void finishAllCollaboration() throws NetworkDisconnectedException, AcmsException {
AcmsClient.
getInstance(ABVEnvironment.getInstance().networkAdapter).
finishAllCollaboration(sid, roomId.intValue());
try {
AcmsClient
.getInstance(ABVEnvironment.getInstance().networkAdapter)
.finishAllCollaboration(sid, roomId.intValue());
} catch (AcmsException e) {
e.printStackTrace();
}
}
private void updateFavoriteUser() throws NetworkDisconnectedException, AcmsException {
GetFavoriteUserJSON resultJson = AcmsClient
......
......@@ -104,7 +104,7 @@ public abstract class ABVActivity extends Activity {
public static final String URL = "url";
public static final String MESSAGE = "message";
public static final String PASSWORD = "password";
public Runnable mCallBack;
protected static final int FP = android.view.ViewGroup.LayoutParams.MATCH_PARENT;
protected static final int WC = android.view.ViewGroup.LayoutParams.WRAP_CONTENT;
protected static final int R_FP = ViewGroup.LayoutParams.MATCH_PARENT;
......@@ -198,6 +198,10 @@ public abstract class ABVActivity extends Activity {
catch (Exception e) {
Logger.e(TAG, "_closeProgressPopup error. progressDialogHorizontal error = " +e.toString());
}
if (mCallBack != null) {
mCallBack.run();
mCallBack = null;
}
}
}
......
......@@ -17,7 +17,6 @@ import android.view.View;
import android.view.ViewGroup;
import android.widget.AdapterView;
import android.widget.AdapterView.OnItemClickListener;
import android.widget.Button;
import android.widget.ImageButton;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;
......@@ -71,7 +70,6 @@ import jp.agentec.abook.abv.ui.common.util.ABVToastUtil;
import jp.agentec.abook.abv.ui.common.util.AlertDialogUtil;
import jp.agentec.abook.abv.ui.common.util.PatternStringUtil;
import jp.agentec.abook.abv.ui.common.view.ABVPopupListWindow;
import jp.agentec.abook.abv.ui.home.activity.ChatWebViewActivity;
import jp.agentec.abook.abv.ui.home.helper.ABookCheckWebViewHelper;
import jp.agentec.abook.abv.ui.home.helper.ABookPermissionHelper;
import jp.agentec.abook.abv.ui.home.helper.ActivityHandlingHelper;
......@@ -80,6 +78,9 @@ import jp.agentec.abook.abv.ui.viewer.activity.HTMLXWalkWebViewActivity;
import jp.agentec.abook.abv.ui.viewer.activity.NoPdfViewActivity;
import jp.agentec.abook.abv.ui.viewer.activity.PhotoEditActivity;
import jp.agentec.abook.abv.ui.viewer.foxitPdf.FoxitPdfCore;
import jp.agentec.abook.abv.bl.acms.type.AcmsApis;
import jp.agentec.abook.abv.ui.viewer.activity.OnlineHTMLWebViewActivity;
import jp.agentec.abook.abv.ui.common.constant.NaviConsts;
import jp.agentec.adf.util.DateTimeUtil;
import jp.agentec.adf.util.FileUtil;
import jp.agentec.adf.util.StringUtil;
......@@ -89,9 +90,6 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
protected static GroupLogic groupLogic = AbstractLogic.getLogic(GroupLogic.class);
private static final String TAG ="ABVContentViewActivity";
public final static int ABOOK_CHECK_TASK_IMAGE = 103;
public final static int ABOOK_CHECK_TASK_VIDEO = 104;
protected final static int ABOOK_CHECK_SELECT_SCENE = 105;
protected long contentId;// 表示中のコンテンツID
protected long objectId; // オブジェクトID(オブジェクト用のActivityのときのみ使用)
......@@ -127,6 +125,7 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
protected TextView operationNameTitle;
protected ImageButton operationHomeButton;
protected ImageButton taskListButton;
protected ImageButton quickReportPrintButton;
// protected ImageButton helpButton;
protected boolean isPageFinished;
......@@ -164,6 +163,9 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
isLinkedContent = intent.getBooleanExtra("isLinkedContent", false);
mOperationId = intent.getLongExtra(ABookKeys.OPERATION_ID, -1);
// 戻り先のActivity名を保存しておく
baseActivityName = getIntent().getStringExtra(AppDefType.ChatPushMessageKey.baseActivityName);
if (!isLinkedContent) {
operationDto = AbstractLogic.getLogic(OperationLogic.class).getOperation(mOperationId);
mXWalkOpenType = intent.getIntExtra(Constant.ABookCheck.XWALK_OPEN_TYPE, Constant.XWalkOpenType.DEFAULT);
......@@ -665,6 +667,7 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
}
fl.setBackgroundColor(getResources().getColor(R.color.operation_color));
operationHomeButton = (ImageButton) findViewById(R.id.btn_operation_home);
quickReportPrintButton = (ImageButton) findViewById(R.id.btn_operation_print);
operationHomeButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
......@@ -679,6 +682,25 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
});
operationHomeButton.setVisibility(View.VISIBLE);
if(operationDto != null && operationDto.operationType == OperationType.PDF){
// 簡易帳票印刷ボタン
quickReportPrintButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
showPrintTargetSelect(operationDto);
}
});
if (ABVDataCache.getInstance().serviceOption.isUnableIOReport() && operationDto.quickReport == 1) {
quickReportPrintButton.setVisibility(View.VISIBLE);
} else {
if (findViewById(R.id.print_layout) != null) {
findViewById(R.id.print_layout).setVisibility(View.GONE);
quickReportPrintButton.setVisibility(View.GONE);
}
}
}
taskListButton = (ImageButton) findViewById(R.id.btn_show_task_list);
taskListButton.setOnClickListener(new View.OnClickListener() {
@Override
......@@ -721,6 +743,19 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
}
/**
* 簡易帳票印刷対象選択画面表示
*/
private void showPrintTargetSelect(OperationDto operationDto) {
Intent intent = new Intent();
intent.setClass(ABVContentViewActivity.this, OnlineHTMLWebViewActivity.class);
intent.setFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP);
intent.putExtra("LINKURL", AcmsApis.getApiUrl(ABVEnvironment.getInstance().acmsAddress, ABVDataCache.getInstance().getUrlPath(), AcmsApis.ApiQuickReportRevision) + "?isNative=1");
intent.putExtra("operationId", mOperationId);
startActivity(intent, NaviConsts.Right);
}
/**
* 360編集画面を閉じた時、呼び出す
*/
public void callUnloadAuth() {
......@@ -1125,6 +1160,14 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
} else if (mCmd.equals(ABookKeys.CMD_GET_GROUP_TREE_INFO)) {
List<JSONObject> groups = groupLogic.getAllGroupsJson();
afterABookCheckApi(mCmd, null, 0, "getAllGroups", groups.toString());
} else if (mCmd.equals(ABookKeys.CMD_CLOSE_TASK_LIST)) {
if (mXWalkOpenType == Constant.XWalkOpenType.PANO_EDIT) {
showConfirmSavePanoEdit();
} else {
// 作業終了する時、作業ID設定して作業一覧で使用するメソットを行う。
putUserPref(AppDefType.UserPrefKey.SYNC_TARGET_OPERATION_ID, mOperationId);
finishActivity(); // 開いてる画面を閉じる
}
}
}
......
......@@ -390,7 +390,9 @@ public abstract class ABVNoAuthenticatedActivity extends ABVActivity {
intent.putExtra(AppDefType.ChatPushMessageKey.roomId, extras.getLong(AppDefType.ChatPushMessageKey.roomId)); // Room Id
intent.putExtra(AppDefType.ChatPushMessageKey.roomName, extras.getString(AppDefType.ChatPushMessageKey.roomName)); // Room Name
intent.putExtra(AppDefType.ChatPushMessageKey.pushSendLoginId, extras.getString(AppDefType.ChatPushMessageKey.pushSendLoginId)); // sendLoginId
intent.putExtra(AppDefType.ChatPushMessageKey.pushSendDate, extras.getString(AppDefType.ChatPushMessageKey.pushSendDate));
intent.putExtra(AppDefType.ChatPushMessageKey.pushSendDate, extras.getLong(AppDefType.ChatPushMessageKey.pushSendDate));
intent.putExtra(AppDefType.ChatPushMessageKey.roomType, extras.getString(AppDefType.ChatPushMessageKey.roomType));
intent.putExtra(AppDefType.ChatPushMessageKey.collaborationType, extras.getString(AppDefType.ChatPushMessageKey.collaborationType));
}
}
intent.setClassName(getApplicationContext().getPackageName(), getMainActivityClassName()).setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
......
......@@ -216,6 +216,8 @@ public abstract class ABVUIActivity extends ABVAuthenticatedActivity {
stopUpdateAnimation();
Logger.e(TAG, "Exception DataRefresh", e);
handleErrorMessageToast(ErrorCode.E107);
} finally {
//closeProgressPopup();
}
return result;
......
......@@ -3,15 +3,12 @@ package jp.agentec.abook.abv.ui.common.activity;
import android.content.DialogInterface;
import android.os.Bundle;
import java.util.Date;
import java.util.List;
import jp.agentec.abook.abv.bl.common.constant.ABookCommConstants;
import jp.agentec.abook.abv.bl.common.log.Logger;
import jp.agentec.abook.abv.bl.dto.OperationDto;
import jp.agentec.abook.abv.bl.dto.PushMessageDto;
import jp.agentec.abook.abv.bl.logic.AbstractLogic;
import jp.agentec.abook.abv.bl.logic.OperationLogic;
import jp.agentec.abook.abv.bl.logic.PushMessageLogic;
import jp.agentec.abook.abv.bl.websocket.MeetingManager;
import jp.agentec.abook.abv.launcher.android.R;
import jp.agentec.abook.abv.ui.common.appinfo.AppDefType;
import jp.agentec.abook.abv.ui.common.appinfo.AppDefType.PushMessageKey;
......@@ -19,16 +16,17 @@ import jp.agentec.abook.abv.ui.common.constant.ErrorMessage;
import jp.agentec.abook.abv.ui.common.dialog.ABookAlertDialog;
import jp.agentec.abook.abv.ui.common.util.AlertDialogUtil;
import jp.agentec.abook.abv.ui.common.util.PatternStringUtil;
import jp.agentec.abook.abv.ui.home.activity.ChatWebViewActivity;
import jp.agentec.abook.abv.ui.home.activity.OperationListActivity;
import jp.agentec.abook.abv.ui.home.helper.ActivityHandlingHelper;
import jp.agentec.adf.util.DateTimeFormat;
import jp.agentec.adf.util.DateTimeUtil;
import jp.agentec.adf.util.StringUtil;
public class ShowPushMessageDailogActivity extends ABVUIActivity {
private static final String TAG = "ShowPushMessageDailogActivity";
OperationLogic mOperationLogic = AbstractLogic.getLogic(OperationLogic.class);
boolean isMeetingRoomConnected = false;
boolean isCollabration = false;
@Override
protected void onCreate(Bundle savedInstanceState) {
......@@ -112,7 +110,9 @@ public class ShowPushMessageDailogActivity extends ABVUIActivity {
alertDialog.show();
} else {
final ABookAlertDialog alertDialog = AlertDialogUtil.createAlertDialog(ShowPushMessageDailogActivity.this, getRString(R.string.app_name), getIntent().getExtras().getString(PushMessageKey.message));
final ABookAlertDialog alertDialog = AlertDialogUtil.createAlertDialog(ShowPushMessageDailogActivity.this,
getRString(R.string.app_name),
getIntent().getExtras().getString(PushMessageKey.message));
Bundle extras = getIntent().getExtras();
Long roomId = extras.getLong(AppDefType.ChatPushMessageKey.roomId, 0);
if (roomId == 0) {
......@@ -121,56 +121,84 @@ public class ShowPushMessageDailogActivity extends ABVUIActivity {
alertDialog.setPositiveButton(R.string.move, new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
// Check PushMessage
isMeetingRoomConnected = MeetingManager.getInstance().isConnected();
isCollabration = MeetingManager.getInstance().isCollaboration();
Bundle extras = getIntent().getExtras();
if (extras != null) {
Long roomId = extras.getLong(AppDefType.ChatPushMessageKey.roomId, 0);
String roomName = extras.getString(AppDefType.ChatPushMessageKey.roomName);
String pushSendLoginId = extras.getString(AppDefType.ChatPushMessageKey.pushSendLoginId);
long pushSendDate = extras.getLong(AppDefType.ChatPushMessageKey.pushSendDate);
String collaborationType = extras.getString(AppDefType.ChatPushMessageKey.collaborationType);
String roomType = extras.getString(AppDefType.ChatPushMessageKey.roomType);
if (roomId > 0 && !StringUtil.isNullOrEmpty(roomName)) {
List<PushMessageDto> pushMessageDtoList = AbstractLogic.getLogic(PushMessageLogic.class).getAllPushMessageList();
Logger.d("pushSendDate", "pushSendDate : " + pushSendDate);
String pushSendDateDate = DateTimeUtil.toString(new Date(pushSendDate), DateTimeFormat.yyyyMMddHHmmssSSS_none);
Logger.d("pushSendDate", "pushSendDateDate : " + pushSendDateDate);
String pushSendDateDate2 = DateTimeUtil.toString(DateTimeUtil.toDate(pushSendDateDate, DateTimeFormat.yyyyMMddHHmmssSSS_none), DateTimeFormat.yyyyMMddHHmmssSSS_none);
Logger.d("pushSendDate", "pushSendDateDate2 : " + pushSendDateDate2);
for (int i = 0; i < pushMessageDtoList.size() - 1; i++) {
String tempDate = DateTimeUtil.toString(pushMessageDtoList.get(i).pushSendDate, DateTimeFormat.yyyyMMddHHmmssSSS_none);
Logger.d("tempDate", "date : " + tempDate);
}
if (StringUtil.isNullOrEmpty(collaborationType)) {
ActivityHandlingHelper.getInstance().startChatWebViewActivity(roomId, roomName);
if (extras != null && !isMeetingRoomConnected) {
boolean isNewVersion = extras.getBoolean(AppDefType.ChatPushMessageKey.needsDisplayOperationOrOperationRelatedContentScreen);
if (isNewVersion) {
setResult(ABookCommConstants.PUSH_MESSAGE_DLG_RESULT.OK, getIntent());
} else {
ActivityHandlingHelper.getInstance().startChatWebViewActivityWithCollaboration(roomId, roomName, collaborationType, roomType);
moveChatRoom(extras);
}
finish();
}
if (isMeetingRoomConnected || isCollabration) {
showCannotMoveChatRoomDialog();
}
finish();
}
});
alertDialog.setNegativeButton(R.string.cancel, new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
setResult(ABookCommConstants.PUSH_MESSAGE_DLG_RESULT.CANCEL, getIntent());
finish();
}
});
}
alertDialog.setOnDismissListener(new DialogInterface.OnDismissListener() {
alertDialog.show();
}
}
}
/**
* チャットルームへ遷移するための処理
* @param extras
*/
private void moveChatRoom(Bundle extras) {
Long roomId = extras.getLong(AppDefType.ChatPushMessageKey.roomId, 0);
String roomName = extras.getString(AppDefType.ChatPushMessageKey.roomName);
String collaborationType = extras.getString(AppDefType.ChatPushMessageKey.collaborationType);
String roomType = extras.getString(AppDefType.ChatPushMessageKey.roomType);
if (roomId > 0 && !StringUtil.isNullOrEmpty(roomName)) {
if (StringUtil.isNullOrEmpty(collaborationType)) {
ActivityHandlingHelper.getInstance().startChatWebViewActivity(roomId, roomName, ChatWebViewActivity.class.getName(),"");
} else {
ActivityHandlingHelper.getInstance().startChatWebViewActivityWithCollaboration(roomId,
roomName,
collaborationType,
roomType,
ChatWebViewActivity.class.getName(),
"");
}
}
}
/**
* 遠隔支援中(会議室接続中)はチャットルームにはいけない。
*/
private void showCannotMoveChatRoomDialog() {
handler.post(new Runnable() {
@Override
public void onDismiss(DialogInterface dialog) {
public void run() {
String dialogMessage = null;
if (isCollabration) {
dialogMessage = getRString(R.string.chat_open_fail_collaborattion_connected);
} else if (isMeetingRoomConnected) {
dialogMessage = getRString(R.string.chat_open_fail_meeting_connected);
}
final ABookAlertDialog alertDialog = AlertDialogUtil.createAlertDialog(ShowPushMessageDailogActivity.this,
getRString(R.string.app_name),
dialogMessage);
alertDialog.setPositiveButton(R.string.ok, new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
setResult(ABookCommConstants.PUSH_MESSAGE_DLG_RESULT.CANCEL, getIntent());
finish();
}
});
alertDialog.show();
}
}
});
}
}
......@@ -145,5 +145,9 @@ public interface AppDefType {
String pushSendDate = "pushSendDate";
String collaborationType = "collaborationType";
String roomType = "roomType";
String shopName = "shopName";
String loginId = "loginId";
String baseActivityName = "baseActivityName";
String needsDisplayOperationOrOperationRelatedContentScreen = "needsDisplayOperationOrOperationRelatedContentScreen";
}
}
......@@ -11,7 +11,6 @@ import android.view.Display;
import android.view.Gravity;
import android.view.KeyEvent;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.ImageButton;
import android.widget.LinearLayout;
......@@ -21,11 +20,11 @@ import android.widget.Toast;
import java.util.ArrayList;
import java.util.List;
import java.util.Stack;
import jp.agentec.abook.abv.bl.acms.client.json.content.ContentJSON;
import jp.agentec.abook.abv.bl.acms.type.AcmsApis;
import jp.agentec.abook.abv.bl.common.ABVEnvironment;
import jp.agentec.abook.abv.bl.common.constant.ABookCommConstants;
import jp.agentec.abook.abv.bl.common.exception.ExceptionHandler;
import jp.agentec.abook.abv.bl.common.log.Logger;
import jp.agentec.abook.abv.bl.data.ABVDataCache;
......@@ -36,7 +35,6 @@ import jp.agentec.abook.abv.bl.logic.AbstractLogic;
import jp.agentec.abook.abv.bl.logic.OperationLogic;
import jp.agentec.abook.abv.bl.websocket.MeetingManager;
import jp.agentec.abook.abv.launcher.android.R;
import jp.agentec.abook.abv.ui.common.activity.ABVAuthenticatedActivity;
import jp.agentec.abook.abv.ui.common.activity.ABVUIActivity;
import jp.agentec.abook.abv.ui.common.appinfo.AppDefType;
import jp.agentec.abook.abv.ui.common.constant.ErrorCode;
......@@ -77,6 +75,7 @@ public class OperationRelatedContentActivity extends ABVUIActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
Logger.i(TAG,"onCreate");
super.onCreate(savedInstanceState);
updateCollaborationInfo();
setContentView(R.layout.ac_operation_related_content);
......@@ -121,11 +120,8 @@ public class OperationRelatedContentActivity extends ABVUIActivity {
showCommunicationMenuDialog();
}
});
if (ABVDataCache.getInstance().serviceOption.isUnableIOReport()) {
mQuickReportPrintButton.setVisibility(View.VISIBLE);
} else {
if (findViewById(R.id.print_layout) != null) {
findViewById(R.id.print_layout).setVisibility(View.GONE);
mQuickReportPrintButton.setVisibility(View.GONE);
}
}
......@@ -289,6 +285,7 @@ public class OperationRelatedContentActivity extends ABVUIActivity {
}
Intent intent = new Intent();
intent.putExtra(AppDefType.ChatPushMessageKey.baseActivityName, OperationRelatedContentActivity.class.getName());
ActivityHandlingHelper.getInstance().checkContentActivity(contentId, 0, intent);
}
} catch (Exception e) {
......@@ -408,9 +405,12 @@ public class OperationRelatedContentActivity extends ABVUIActivity {
* 作業一覧へ戻る
*/
private void backToHome() {
finish();
// 終了後、アニメーション追加(左へ移動)
overridePendingTransition(R.anim.viewin_left_to_right, R.anim.viewout_left_to_right);
Intent intent = new Intent();
intent.setClass(OperationRelatedContentActivity.this, OperationListActivity.class);
intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_SINGLE_TOP);
intent.putExtra(AppDefType.ChatPushMessageKey.baseActivityName, OperationRelatedContentActivity.class.getName());
// 左へ移動しながら戻る
startActivity(intent, NaviConsts.Left);
}
public void showCancelDownloadDialog(final ContentDto contentDto) {
......@@ -544,6 +544,9 @@ public class OperationRelatedContentActivity extends ABVUIActivity {
updateCollaborationInfo();
refreshCollaborationUI();
super.onResume();
if(goChatRoom(getIntent(), ChatWebViewActivity.class.getName(), OperationRelatedContentActivity.class.getName())) {
return;
}
showOperationRelatedContentList();
}
......@@ -595,4 +598,16 @@ public class OperationRelatedContentActivity extends ABVUIActivity {
super.showAlertDialog(alertDialog);
}
@Override
public void onActivityResult(int requestCode, int resultCode, Intent intent) {
super.onActivityResult(requestCode, resultCode, intent);
if (requestCode == ABookCommConstants.PUSH_MESSAGE_DLG_REQUEST_CODE) {
if (resultCode == ABookCommConstants.PUSH_MESSAGE_DLG_RESULT.OK) {
finish();
goChatRoom(intent, ChatWebViewActivity.class.getName(), getClass().getName());
}
return;
}
}
}
......@@ -1632,7 +1632,6 @@ public class ActivityHandlingHelper extends ABookHelper implements RemoteObserve
//プシュメッセージ一覧からチャットに入る
public void startChatWebViewActivityWithPushMessage(PushMessageDto dto) {
String className = ChatWebViewActivity.class.getName();
boolean isNormalSize = (mContext.getResources().getConfiguration().screenLayout & Configuration.SCREENLAYOUT_SIZE_MASK) == Configuration.SCREENLAYOUT_SIZE_NORMAL;
Intent intent = new Intent();
intent.putExtra("chatWebviewUrl",ABVEnvironment.getInstance().acmsAddress + ABVDataCache.getInstance().getUrlPath() + "/chatapi/chat/");
......@@ -1640,12 +1639,11 @@ public class ActivityHandlingHelper extends ABookHelper implements RemoteObserve
intent.putExtra("sid", sid);
String loginId = ABVDataCache.getInstance().getMemberInfo().loginId;
String shopName = ABVDataCache.getInstance().getUrlPath();
intent.putExtra("loginId", loginId);
intent.putExtra("shopName", shopName);
if(dto != null)
{
intent.putExtra("roomId",dto.roomId);
intent.putExtra("roomName", dto.roomName);
intent.putExtra(AppDefType.ChatPushMessageKey.loginId, loginId);
intent.putExtra(AppDefType.ChatPushMessageKey.shopName, shopName);
if (dto != null) {
intent.putExtra(AppDefType.ChatPushMessageKey.loginId, dto.roomId);
intent.putExtra(AppDefType.ChatPushMessageKey.roomName, dto.roomName);
}
intent.setClassName(mContext.getPackageName(), className);
intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
......@@ -1655,36 +1653,39 @@ public class ActivityHandlingHelper extends ABookHelper implements RemoteObserve
//チャットに入る
public void startChatWebViewActivity() {
String className = ChatWebViewActivity.class.getName();
boolean isNormalSize = (mContext.getResources().getConfiguration().screenLayout & Configuration.SCREENLAYOUT_SIZE_MASK) == Configuration.SCREENLAYOUT_SIZE_NORMAL;
Intent intent = new Intent();
intent.putExtra("chatWebviewUrl",ABVEnvironment.getInstance().acmsAddress + ABVDataCache.getInstance().getUrlPath() + "/chatapi/chat/");
String sid = ABVDataCache.getInstance().getMemberInfo().sid;
intent.putExtra("sid", sid);
String loginId = ABVDataCache.getInstance().getMemberInfo().loginId;
String shopName = ABVDataCache.getInstance().getUrlPath();
intent.putExtra("loginId", loginId);
intent.putExtra("shopName", shopName);
intent.putExtra(AppDefType.ChatPushMessageKey.loginId, loginId);
intent.putExtra(AppDefType.ChatPushMessageKey.shopName, shopName);
intent.setClassName(mContext.getPackageName(), className);
intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
getCurrentActivity().startActivity(intent);
}
// プシュメッセージからチャットに入る
public void startChatWebViewActivity(Long roomId, String roomName) {
String className = ChatWebViewActivity.class.getName();
boolean isNormalSize = (mContext.getResources().getConfiguration().screenLayout & Configuration.SCREENLAYOUT_SIZE_MASK) == Configuration.SCREENLAYOUT_SIZE_NORMAL;
/**
* プシュメッセージからチャットに遷移する
* @param roomId chatRoom の Id
* @param roomName chatRoom の名前
* @param targetActivityName 直接chatRoom に遷移する場合は、ChatWebViewActivity名。chatRoomに遷移する前に、別のActivityを経由する場合は、そのActivity名
* @param baseActivityName この関数を呼び出したActivity名。戻る時にはこのアクティビティに戻る
*/
public void startChatWebViewActivity(Long roomId, String roomName, String targetActivityName, String baseActivityName) {
Intent intent = new Intent();
intent.putExtra("chatWebviewUrl",ABVEnvironment.getInstance().acmsAddress + ABVDataCache.getInstance().getUrlPath() + "/chatapi/chat/");
String sid = ABVDataCache.getInstance().getMemberInfo().sid;
intent.putExtra("sid", sid);
String loginId = ABVDataCache.getInstance().getMemberInfo().loginId;
String shopName = ABVDataCache.getInstance().getUrlPath();
intent.putExtra("loginId", loginId);
intent.putExtra("shopName", shopName);
intent.putExtra("roomId", roomId);
intent.putExtra("roomName", roomName);
intent.setClassName(mContext.getPackageName(), className);
intent.putExtra(AppDefType.ChatPushMessageKey.loginId, loginId);
intent.putExtra(AppDefType.ChatPushMessageKey.shopName, shopName);
intent.putExtra(AppDefType.ChatPushMessageKey.roomId, roomId);
intent.putExtra(AppDefType.ChatPushMessageKey.roomName, roomName);
intent.putExtra(AppDefType.ChatPushMessageKey.baseActivityName, baseActivityName);
intent.setClassName(mContext.getPackageName(), targetActivityName);
intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
getCurrentActivity().startActivity(intent);
}
......@@ -1914,22 +1915,28 @@ public class ActivityHandlingHelper extends ABookHelper implements RemoteObserve
this.previousOfSettingActivity2 = activity;
}
public void startChatWebViewActivityWithCollaboration(Long roomId, String roomName, String collaborationType, String roomType) {
String className = ChatWebViewActivity.class.getName();
boolean isNormalSize = (mContext.getResources().getConfiguration().screenLayout & Configuration.SCREENLAYOUT_SIZE_MASK) == Configuration.SCREENLAYOUT_SIZE_NORMAL;
/**
* プッシュメッセージから協業に遷移する
* @param roomId
* @param roomName
* @param collaborationType
* @param roomType
*/
public void startChatWebViewActivityWithCollaboration(Long roomId, String roomName, String collaborationType, String roomType, String targetActivityName, String baseActivityName) {
Intent intent = new Intent();
intent.putExtra("chatWebviewUrl",ABVEnvironment.getInstance().acmsAddress + ABVDataCache.getInstance().getUrlPath() + "/chatapi/chat/");
intent.putExtra("chatWebviewUrl", ABVEnvironment.getInstance().acmsAddress + ABVDataCache.getInstance().getUrlPath() + "/chatapi/chat/");
String sid = ABVDataCache.getInstance().getMemberInfo().sid;
intent.putExtra("sid", sid);
String loginId = ABVDataCache.getInstance().getMemberInfo().loginId;
String shopName = ABVDataCache.getInstance().getUrlPath();
intent.putExtra("loginId", loginId);
intent.putExtra("collaborationType", collaborationType);
intent.putExtra("shopName", shopName);
intent.putExtra("roomId", roomId);
intent.putExtra("roomName", roomName);
intent.putExtra("roomType", roomType);
intent.setClassName(mContext.getPackageName(), className);
intent.putExtra(AppDefType.ChatPushMessageKey.loginId, loginId);
intent.putExtra(AppDefType.ChatPushMessageKey.collaborationType, collaborationType);
intent.putExtra(AppDefType.ChatPushMessageKey.shopName, shopName);
intent.putExtra(AppDefType.ChatPushMessageKey.roomId, roomId);
intent.putExtra(AppDefType.ChatPushMessageKey.roomName, roomName);
intent.putExtra(AppDefType.ChatPushMessageKey.roomType, roomType);
intent.putExtra(AppDefType.ChatPushMessageKey.baseActivityName, baseActivityName);
intent.setClassName(mContext.getPackageName(), targetActivityName);
intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
getCurrentActivity().startActivity(intent);
}
......
......@@ -22,6 +22,6 @@ public class HomeOperationListHelper extends OperationListHelper {
protected List<OperationDto> findOperationList() throws Exception {
int operationSortType = mAppActivity.getSortCondition();
OperationSortingType operationSortingType = OperationSortingType.parse(operationSortType);
return operationLogic.getRefreshOperation(mAppActivity.mSearchWord, mAppActivity.mStartDateStr, mAppActivity.mEndDateStr, operationSortingType);
return operationLogic.getRefreshOperation(mAppActivity.mSearchWord, mAppActivity.mStartDateStr, mAppActivity.mEndDateStr, operationSortingType, mAppActivity.mOperationGroupMasterId);
}
}
......@@ -68,11 +68,9 @@ public class OperationGroupMasterListHelper extends CategoryOperationListHelper<
// クリアフラグをfalseにセット
ABVEnvironment.getInstance().setOperationGroupMasterClearFlg(false);
// 作業種別の選択画面を閉じる
mAppActivity.closeOperationGroupMasterDialog();
}
OperationGroupMasterDto peekOperationGroupMasterDto = stack.peek();
mAppActivity.checkBatchNeedSyncButton(peekOperationGroupMasterDto.operationGroupMasterId);
int operationSortType = mAppActivity.getSortCondition();
OperationSortingType operationSortingType = OperationSortingType.parse(operationSortType);
// 作業種別IDで紐づく作業リストを取得
......@@ -155,4 +153,11 @@ public class OperationGroupMasterListHelper extends CategoryOperationListHelper<
public List<OperationGroupMasterDto> getChildList(Integer operationGroupMasterId) {
return mOperationGroupMasterDao.getOperationGroupMasterChildList(operationGroupMasterId);
}
public void refreshList() {
OperationListActivity operationListActivity = ActivityHandlingHelper.getInstance().getActivity(OperationListActivity.class);
if (operationListActivity != null) {
operationListActivity.screenRefresh();
}
}
}
......@@ -69,7 +69,7 @@ public abstract class OperationListHelper {
abstract protected List<OperationDto> findOperationList() throws Exception;
private List<OperationDto> filterOperationList() {
public List<OperationDto> filterOperationList() {
try {
operationDtoList = findOperationList();
} catch (Exception e) {
......@@ -245,15 +245,6 @@ public abstract class OperationListHelper {
}
/**
* 作業の画面更新
*/
public void refreshList() {
if (mAdapter != null) {
mAdapter.setItem(filterOperationList());
}
}
/**
* 作業の件数取得
* @return
*/
......
......@@ -23,6 +23,7 @@ public class ChatWebView extends WebView {
private final ChatWebViewActivity chatActivity;
private ChatData chatData;
public ChatWebViewDelegate delegate;
public ChatWebView(Context context) {
super(context);
......@@ -534,6 +535,21 @@ public class ChatWebView extends WebView {
return chatData.getRoomInfo();
}
@JavascriptInterface
public void showLoadingIndicator() {
if (delegate != null) {
delegate.chatWebViewNeedsShowProgressBar();
}
}
@JavascriptInterface
public void hideLoadingIndicator() {
if (delegate != null) {
delegate.chatWebViewNeedsDismissProgressBar();
}
}
public void loadChatViewUrl(final String urlString) {
post(new Runnable() {
@Override
......@@ -577,14 +593,6 @@ public class ChatWebView extends WebView {
loadUrl("javascript:penOff();");
}
public void showLoadingIndicator() {
loadChatViewUrl("javascript:Common.showLoadingIndicator();");
}
public void dismissLoadingIndicator() {
loadUrl("javascript:Common.dismissLoadingIndicator()");
}
public void refreshForOffline() {
loadUrl("javascript:Common.refreshForOffline();");
}
......@@ -632,8 +640,4 @@ public class ChatWebView extends WebView {
public void startAudioCollaboration() {
loadChatViewUrl(String.format("javascript:Common.startCollaboration('%s');", ABookCommConstants.FLAG.COLLABORATION_TYPE.AUDIO ));
}
public void refreshContactScreen() {
loadChatViewUrl("javascript:Common.refreshContactScreen();");
}
}
package jp.agentec.abook.abv.ui.home.view;
public interface ChatWebViewDelegate {
void chatWebViewNeedsShowProgressBar();
void chatWebViewNeedsDismissProgressBar();
}
......@@ -34,8 +34,6 @@ public class CommunicationWebViewActivity extends ABVAuthenticatedActivity {
private ProgressBar m_progress;
protected ContentDto mContentDto;
protected File mLocalFile;
public final static int ABOOK_CHECK_TASK_IMAGE = 103;
public final static int ABOOK_CHECK_TASK_VIDEO = 104;
@Override
protected void onDestroy() {
......
......@@ -76,7 +76,6 @@ import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Stack;
import java.util.concurrent.ConcurrentHashMap;
import jp.agentec.abook.abv.bl.acms.client.json.DownloadedContentInfoJSON;
......@@ -94,6 +93,7 @@ import jp.agentec.abook.abv.bl.acms.type.OperationType;
import jp.agentec.abook.abv.bl.common.ABVEnvironment;
import jp.agentec.abook.abv.bl.common.CommonExecutor;
import jp.agentec.abook.abv.bl.common.Constant;
import jp.agentec.abook.abv.bl.common.constant.ABookCommConstants;
import jp.agentec.abook.abv.bl.common.constant.ABookKeys;
import jp.agentec.abook.abv.bl.common.exception.ExceptionHandler;
import jp.agentec.abook.abv.bl.common.log.Logger;
......@@ -119,7 +119,6 @@ import jp.agentec.abook.abv.cl.util.ContentLogUtil;
import jp.agentec.abook.abv.cl.util.PreferenceUtil;
import jp.agentec.abook.abv.launcher.android.R;
import jp.agentec.abook.abv.launcher.android.R.id;
import jp.agentec.abook.abv.ui.common.activity.ABVAuthenticatedActivity;
import jp.agentec.abook.abv.ui.common.activity.ABVContentViewActivity;
import jp.agentec.abook.abv.ui.common.appinfo.AppColor;
import jp.agentec.abook.abv.ui.common.appinfo.AppDefType;
......@@ -137,8 +136,6 @@ import jp.agentec.abook.abv.ui.common.util.PatternStringUtil;
import jp.agentec.abook.abv.ui.common.view.ABVEditText;
import jp.agentec.abook.abv.ui.common.view.ABVPopupListWindow;
import jp.agentec.abook.abv.ui.common.vo.Size;
import jp.agentec.abook.abv.ui.home.activity.ChatWebViewActivity;
import jp.agentec.abook.abv.ui.home.activity.OperationRelatedContentActivity;
import jp.agentec.abook.abv.ui.home.helper.ABookCheckWebViewHelper;
import jp.agentec.abook.abv.ui.home.helper.ActivityHandlingHelper;
import jp.agentec.abook.abv.ui.Interface.MovePageInterface;
......@@ -1401,7 +1398,7 @@ public class ContentViewActivity extends ABVContentViewActivity {
if (ContentJSON.KEY_PDF_TYPE.equals(contentDto.contentType) || ContentJSON.KEY_NONE_TYPE.equals(contentDto.contentType)
|| ContentJSON.KEY_OTHER_TYPE.equals(contentDto.contentType)) {
mExitBtn.setBackgroundResource(R.drawable.btn_first_back);
mLinkOriginalBackBtn.setVisibility(View.VISIBLE);
mLinkOriginalBackBtn.setVisibility(View.GONE);
mHistoryBtn.setVisibility(View.GONE);
indexBtn.setVisibility(View.GONE);
mBtnMeetingRoomSetting.setVisibility(View.GONE);
......@@ -3829,6 +3826,15 @@ public class ContentViewActivity extends ABVContentViewActivity {
Uri[] result = null;
Uri dataUri = null;
if (requestCode == ABookCommConstants.PUSH_MESSAGE_DLG_REQUEST_CODE) {
// プッシュメッセージダイアログのリザルトだった場合
if (resultCode == ABookCommConstants.PUSH_MESSAGE_DLG_RESULT.OK && !StringUtil.isNullOrEmpty(baseActivityName)) {
finishActivity();
goChatRoom(intent, baseActivityName, ContentViewActivity.class.getName());
}
return;
}
if (intent != null && resultCode == RESULT_OK) {
String dataString = intent.getDataString();
if (dataString != null) {
......@@ -3842,9 +3848,9 @@ public class ContentViewActivity extends ABVContentViewActivity {
case WEBVIEW:
case PREVIEW:
isAnotherViewOpenFlg = false;
// playPageBGMSound(mCurrentPageNumber); //프리뷰 모드 일때 음악재생 Bug
//playPageBGMSound(mCurrentPageNumber); //프리뷰 모드 일때 음악재생 Bug
break;
case ABOOK_CHECK_TASK_IMAGE:
case ABookCommConstants.ABOOK_CHECK_TASK_IMAGE:
if (mUploadMessage == null) {
return;
}
......@@ -3865,7 +3871,7 @@ public class ContentViewActivity extends ABVContentViewActivity {
ErrorMessage.showErrorMessageToast(getApplicationContext(), ErrorCode.E107);
}
break;
case ABOOK_CHECK_TASK_VIDEO:
case ABookCommConstants.ABOOK_CHECK_TASK_VIDEO:
if (mUploadMessage == null) {
return;
}
......
......@@ -17,6 +17,14 @@ import android.widget.FrameLayout;
import android.widget.ImageButton;
import android.widget.RelativeLayout;
import android.widget.Toast;
import android.app.DownloadManager;
import android.webkit.URLUtil;
import android.webkit.CookieManager;
import android.webkit.DownloadListener;
import android.os.Environment;
import android.webkit.WebViewClient;
import android.content.Context;
import android.graphics.Bitmap;
import org.xwalk.core.XWalkNavigationHistory;
import org.xwalk.core.XWalkPreferences;
......@@ -26,17 +34,24 @@ import org.xwalk.core.XWalkUIClient;
import org.xwalk.core.XWalkView;
import org.xwalk.core.XWalkWebResourceRequest;
import org.xwalk.core.XWalkWebResourceResponse;
import org.xwalk.core.XWalkDownloadListener;
import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;
import java.util.ArrayList;
import java.util.List;
import java.io.File;
import java.io.FileOutputStream;
import java.util.Objects;
import jp.agentec.abook.abv.bl.acms.client.json.content.ContentJSON;
import jp.agentec.abook.abv.bl.common.ABVEnvironment;
import jp.agentec.abook.abv.bl.common.Callback;
import jp.agentec.abook.abv.bl.common.CommonExecutor;
import jp.agentec.abook.abv.bl.common.Constant;
import jp.agentec.abook.abv.bl.common.constant.ABookCommConstants;
import jp.agentec.abook.abv.bl.common.constant.ABookKeys;
import jp.agentec.abook.abv.bl.common.log.Logger;
import jp.agentec.abook.abv.bl.data.dao.AbstractDao;
......@@ -44,9 +59,11 @@ import jp.agentec.abook.abv.bl.data.dao.ContentDao;
import jp.agentec.abook.abv.bl.download.ContentDownloader;
import jp.agentec.abook.abv.bl.download.ContentZipDownloadNotification;
import jp.agentec.abook.abv.bl.dto.ContentDto;
import jp.agentec.abook.abv.bl.dto.OperationDto;
import jp.agentec.abook.abv.bl.logic.AbstractLogic;
import jp.agentec.abook.abv.bl.logic.ContentReadingLogLogic;
import jp.agentec.abook.abv.bl.logic.ContractLogic;
import jp.agentec.abook.abv.bl.logic.OperationLogic;
import jp.agentec.abook.abv.cl.util.ContentLogUtil;
import jp.agentec.abook.abv.cl.util.PreferenceUtil;
import jp.agentec.abook.abv.launcher.android.R;
......@@ -72,6 +89,8 @@ public class HTMLXWalkWebViewActivity extends ParentWebViewActivity {
private int objectLogId;
private XWalkView webView;
private OperationLogic mOperationLogic = AbstractLogic.getLogic(OperationLogic.class);
private HTMLXWalkWebViewActivity.JsInf jsInf = new HTMLXWalkWebViewActivity.JsInf();
private Integer lastPageNo = 0;
......@@ -123,6 +142,36 @@ public class HTMLXWalkWebViewActivity extends ParentWebViewActivity {
XWalkPreferences.setValue(XWalkPreferences.REMOTE_DEBUGGING, true); //デバッグモード(chromeからinspect可)
}
webView.setDownloadListener(new XWalkDownloadListener(this) {
@Override
public void onDownloadStart(String url, String userAgent,
String contentDisposition, String mimetype,
long contentLength) {
DownloadManager.Request request = new DownloadManager.Request(
Uri.parse(url));
final String fileName = URLUtil.guessFileName(url, contentDisposition, mimetype);
request.setMimeType(mimetype);
//------------------------COOKIE!!------------------------
String cookies = CookieManager.getInstance().getCookie(url);
request.addRequestHeader("cookie", cookies);
//------------------------COOKIE!!------------------------
request.addRequestHeader("User-Agent", userAgent);
request.setTitle(fileName);
request.allowScanningByMediaScanner();
request.setNotificationVisibility(DownloadManager.Request.VISIBILITY_VISIBLE_NOTIFY_COMPLETED); //Notify client once download is completed!
request.setDestinationInExternalPublicDir(Environment.DIRECTORY_DOWNLOADS, fileName);
DownloadManager dm = (DownloadManager) getSystemService(DOWNLOAD_SERVICE);
if (dm != null) {
dm.enqueue(request);
}
Toast.makeText(getApplicationContext(), getString(R.string.download_start), //To notify the Client that the file is being downloaded
Toast.LENGTH_LONG).show();
}
});
final RelativeLayout fl = (RelativeLayout) findViewById(R.id.frameTopbar);
// ***** 戻るボタン
......@@ -224,9 +273,9 @@ public class HTMLXWalkWebViewActivity extends ParentWebViewActivity {
Logger.d(TAG, "*********************commonOpenFileChooser");
boolean result = false;
if (acceptType.toLowerCase().indexOf(ABookKeys.IMAGE) != -1) {
result = startCameraIntent(ABOOK_CHECK_TASK_IMAGE, "Camera", ABookKeys.IMAGE, true);
result = startCameraIntent(ABookCommConstants.ABOOK_CHECK_TASK_IMAGE, "Camera", ABookKeys.IMAGE, true);
} else if (acceptType.toLowerCase().indexOf(ABookKeys.VIDEO) != -1) {
result = startCameraIntent(ABOOK_CHECK_TASK_VIDEO, "Video", ABookKeys.VIDEO, true);
result = startCameraIntent(ABookCommConstants.ABOOK_CHECK_TASK_VIDEO, "Video", ABookKeys.VIDEO, true);
}
mUploadMessage = uploadFile;
if (result) {
......@@ -442,7 +491,10 @@ public class HTMLXWalkWebViewActivity extends ParentWebViewActivity {
configureRemote();
}
});
historyListBtn.setVisibility(View.GONE);
if (ContentJSON.KEY_LIST_TYPE.equals(mContentDto.contentType)) {
fl.setVisibility(View.GONE);
}
if(isLinkedContent) {
if (ContentJSON.KEY_MOVIE_TYPE.equals(mContentDto.contentType) || ContentJSON.KEY_MUSIC_TYPE.equals(mContentDto.contentType)
|| ContentJSON.KEY_PANO_IMAGE_TYPE.equals(mContentDto.contentType) || ContentJSON.KEY_PANO_MOVIE_TYPE.equals(mContentDto.contentType)
......@@ -532,6 +584,15 @@ public class HTMLXWalkWebViewActivity extends ParentWebViewActivity {
public void openEditPage() {
commonOpenEditPage();
}
@org.xwalk.core.JavascriptInterface
public String getOperation() {
ArrayList<OperationDto> operationDtos = new ArrayList<OperationDto>();
OperationDto opertaionDto = mOperationLogic.getOperation(mOperationId);
operationDtos.add(opertaionDto);
String operationJson = mOperationLogic.createOperationListJson(operationDtos, null);
return operationJson;
}
}
@Override
......@@ -713,7 +774,7 @@ public class HTMLXWalkWebViewActivity extends ParentWebViewActivity {
protected void onActivityResult(int requestCode, int resultCode, Intent intent) {
Uri result = (intent == null || resultCode != RESULT_OK) ? null : intent.getData();
if (requestCode == ABOOK_CHECK_TASK_IMAGE) {
if (requestCode == ABookCommConstants.ABOOK_CHECK_TASK_IMAGE) {
if (mUploadMessage == null) {
return;
}
......@@ -729,13 +790,13 @@ public class HTMLXWalkWebViewActivity extends ParentWebViewActivity {
mUploadMessage.onReceiveValue(null);
ErrorMessage.showErrorMessageToast(getApplicationContext(), ErrorCode.E107);
}
} else if (requestCode == ABOOK_CHECK_TASK_VIDEO) {
} else if (requestCode == ABookCommConstants.ABOOK_CHECK_TASK_VIDEO) {
if (mUploadMessage == null) {
return;
}
// 動画
mUploadMessage.onReceiveValue(result);
} else if (requestCode == ABOOK_CHECK_SELECT_SCENE) {
} else if (requestCode == ABookCommConstants.ABOOK_CHECK_SELECT_SCENE) {
if (intent != null && result != null) {
confirmEntrySceneDialog(result);
}
......
package jp.agentec.abook.abv.ui.viewer.activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
......@@ -12,17 +13,16 @@ import android.widget.ImageButton;
import java.util.ArrayList;
import jp.agentec.abook.abv.bl.acms.client.json.content.ContentJSON;
import jp.agentec.abook.abv.bl.common.ABVEnvironment;
import jp.agentec.abook.abv.bl.common.constant.ABookCommConstants;
import jp.agentec.abook.abv.bl.common.log.Logger;
import jp.agentec.abook.abv.bl.data.ABVDataCache;
import jp.agentec.abook.abv.bl.data.dao.AbstractDao;
import jp.agentec.abook.abv.bl.data.dao.ContentDao;
import jp.agentec.abook.abv.bl.dto.ContentDto;
import jp.agentec.abook.abv.launcher.android.R;
import jp.agentec.abook.abv.ui.common.activity.ABVContentViewActivity;
import jp.agentec.abook.abv.ui.common.appinfo.options.Options;
import jp.agentec.abook.abv.ui.common.view.ABVPopupListWindow;
import jp.agentec.abook.abv.ui.home.helper.ActivityHandlingHelper;
import jp.agentec.adf.util.StringUtil;
// TODO: later 遠隔連動関連はContentView,HTMLWebViewと共通しているので要集約
public class NoPdfViewActivity extends ABVContentViewActivity {
......@@ -209,4 +209,17 @@ public class NoPdfViewActivity extends ABVContentViewActivity {
layout.addView(view);
}
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent intent) {
super.onActivityResult(requestCode, requestCode, intent);
if (requestCode == ABookCommConstants.PUSH_MESSAGE_DLG_REQUEST_CODE) {
// プッシュメッセージダイアログのリザルトだった場合
if (resultCode == ABookCommConstants.PUSH_MESSAGE_DLG_RESULT.OK && !StringUtil.isNullOrEmpty(baseActivityName)) {
finishActivity();
goChatRoom(intent, baseActivityName, getClass().getName());
}
return;
}
}
}
......@@ -147,7 +147,7 @@ public class FoxitPdfCore {
* @throws PDFException
*/
public PointF getPageSize(int pageIndex) throws PDFException {
Logger.i("getPageSize : " + pageIndex);
Logger.d("getPageSize : " + pageIndex);
PDFPage pdfPage = mPDFDoc.getPage(pageIndex);
return new PointF(pdfPage.getWidth(), pdfPage.getHeight());
}
......@@ -165,7 +165,7 @@ public class FoxitPdfCore {
* @return
*/
public Bitmap drawPage(int page, int pageW, int pageH, int patchX, int patchY, int patchW, int patchH) {
Logger.i(TAG, "drawPage start.");
Logger.d(TAG, "drawPage start.");
synchronized (mContext) {
Bitmap bm = Bitmap.createBitmap(patchW, patchH, Bitmap.Config.ARGB_8888);
PDFPage pdfPage = loadPage(mPDFDoc, page, PDFPage.e_ParsePageNormal);
......@@ -198,7 +198,7 @@ public class FoxitPdfCore {
Logger.e(TAG, "Failed to render the page No.%d! %s", page, e.getMessage());
}
Logger.i(TAG, "drawPage end.");
Logger.d(TAG, "drawPage end.");
return bm;
}
}
......
......@@ -264,7 +264,7 @@ public class PdfImageProvider {
Logger.d(TAG, "setPauseTask " + ste.getClassName() + "#" + ste.getMethodName() + " " + pauseTask);
}
else {
Logger.i(TAG, "setPauseTask " + pauseTask);
Logger.d(TAG, "setPauseTask " + pauseTask);
}
if (pauseTask) {
pauseTaskCount++;
......@@ -307,7 +307,7 @@ public class PdfImageProvider {
int width = (int) (size.x * pageScale);
int height = (int) (size.y * pageScale);
Logger.i(TAG, "[drawPage]: pageNumber=" + pageNumber + " width=" + width + " height=" + height + " imagePath=" + imagePath);
Logger.d(TAG, "[drawPage]: pageNumber=" + pageNumber + " width=" + width + " height=" + height + " imagePath=" + imagePath);
Bitmap bm = null;
try {
bm = mFoxitPdfCore.drawPage(pageNumber, width, height, 0, 0, width, height);
......
......@@ -86,8 +86,7 @@ public class AudioPlayView extends RelativeLayout {
if (StringUtil.isNullOrEmpty(contentName)) { // オーサリング動画の場合
LinearLayout linearLayout1 = (LinearLayout)controlLayout.findViewById(R.id.linear1);
linearLayout1.setVisibility(View.GONE);
}
else { // 動画コンテンツの場合
} else { // 動画コンテンツの場合
TextView txtTitle = (TextView)controlLayout.findViewById(R.id.txtTitle);
txtTitle.setText(contentName);
......@@ -192,8 +191,7 @@ public class AudioPlayView extends RelativeLayout {
if (mMediaPlayer.isPlaying()) {
mBtnPlay.setImageDrawable(getResources().getDrawable(R.drawable.btn_play));
pause();
}
else{
} else{
mBtnPlay.setImageDrawable(getResources().getDrawable(R.drawable.btn_pause));
restart();
}
......@@ -214,8 +212,7 @@ public class AudioPlayView extends RelativeLayout {
position = 0;
}
jump(position);
}
else {
} else {
btnBackward.setImageDrawable(getResources().getDrawable(R.drawable.btn_backward));
}
return false;
......@@ -236,8 +233,7 @@ public class AudioPlayView extends RelativeLayout {
position = duration;
}
jump(position);
}
else {
} else {
btnForward.setImageDrawable(getResources().getDrawable(R.drawable.btn_forward));
}
return false;
......@@ -272,8 +268,7 @@ public class AudioPlayView extends RelativeLayout {
LinearLayout.LayoutParams params;
if (config.orientation == Configuration.ORIENTATION_LANDSCAPE && !isMobile) {
params = new LinearLayout.LayoutParams((int) (density * 500), ViewGroup.LayoutParams.WRAP_CONTENT);
}
else {
} else {
params = new LinearLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT);
}
......@@ -285,8 +280,7 @@ public class AudioPlayView extends RelativeLayout {
if (isMobile && point.x < point.y) { // モバイルで縦長の場合、戻り・早送りはなし
btnBackward.setVisibility(View.GONE);
btnForward.setVisibility(View.GONE);
}
else {
} else {
btnBackward.setVisibility(View.VISIBLE);
btnForward.setVisibility(View.VISIBLE);
}
......@@ -401,6 +395,10 @@ public class AudioPlayView extends RelativeLayout {
public void stop() {
if (mMediaPlayer != null) {
mVisualizer.release();
if (mMediaPlayer.isPlaying()){
mMediaPlayer.stop();
}
mMediaPlayer.reset();
mMediaPlayer.release();
mMediaPlayer = null;
}
......
......@@ -20,15 +20,20 @@ import android.widget.RelativeLayout;
import org.json.adf.JSONObject;
import java.util.ArrayList;
import java.util.List;
import jp.agentec.abook.abv.bl.common.Constant;
import jp.agentec.abook.abv.bl.common.constant.ABookCommConstants;
import jp.agentec.abook.abv.bl.common.constant.ABookKeys;
import jp.agentec.abook.abv.bl.common.log.Logger;
import jp.agentec.abook.abv.bl.data.dao.AbstractDao;
import jp.agentec.abook.abv.bl.data.dao.TaskDao;
import jp.agentec.abook.abv.bl.dto.OperationDto;
import jp.agentec.abook.abv.bl.dto.OperationTaskDto;
import jp.agentec.abook.abv.bl.dto.TaskDto;
import jp.agentec.abook.abv.bl.logic.AbstractLogic;
import jp.agentec.abook.abv.bl.logic.OperationLogic;
import jp.agentec.abook.abv.launcher.android.R;
import jp.agentec.abook.abv.ui.common.activity.ABVActivity;
import jp.agentec.abook.abv.ui.common.activity.ABVContentViewActivity;
......@@ -67,6 +72,8 @@ public class OperationTaskLayout extends RelativeLayout {
private ContentViewActivity mContext;
private JsInf jsInf = new JsInf();
private OperationLogic mOperationLogic = AbstractLogic.getLogic(OperationLogic.class);
private static TaskDao mTaskDao = AbstractDao.getDao(TaskDao.class);
public OperationTaskLayout(final Context context, final long contentId, final String linkUrl, boolean isNormalSize) {
......@@ -131,10 +138,10 @@ public class OperationTaskLayout extends RelativeLayout {
FileChooserParams fileChooserParams) {
boolean result = false;
if(fileChooserParams.getAcceptTypes()[0].toLowerCase().indexOf(ABookKeys.IMAGE) != -1) {
result = ((ABVActivity)context).startCameraIntent(((ABVContentViewActivity)context).ABOOK_CHECK_TASK_IMAGE, "Camera", ABookKeys.IMAGE, true);
result = ((ABVActivity)context).startCameraIntent(ABookCommConstants.ABOOK_CHECK_TASK_IMAGE, "Camera", ABookKeys.IMAGE, true);
} else if(fileChooserParams.getAcceptTypes()[0].toLowerCase().indexOf(ABookKeys.VIDEO) != -1) {
result = ((ABVActivity)context).startCameraIntent(((ABVContentViewActivity)context).ABOOK_CHECK_TASK_VIDEO, "Video", ABookKeys.VIDEO, true);
result = ((ABVActivity)context).startCameraIntent(ABookCommConstants.ABOOK_CHECK_TASK_VIDEO, "Video", ABookKeys.VIDEO, true);
}
if (result) {
......@@ -554,5 +561,14 @@ public class OperationTaskLayout extends RelativeLayout {
public void openEditPage() {
((ABVContentViewActivity) OperationTaskLayout.this.mContext).commonOpenEditPage();
}
@JavascriptInterface
public String getOperation() {
ArrayList<OperationDto> operationDtos = new ArrayList<OperationDto>();
OperationDto opertaionDto = mOperationLogic.getOperation(mContext.mOperationId);
operationDtos.add(opertaionDto);
String operationJson = mOperationLogic.createOperationListJson(operationDtos, null);
return operationJson;
}
}
}
......@@ -38,12 +38,12 @@ app_versioncode=1
# abvEnvironments.xml
#cms server
acms_address=https://check.abookcloud.com/acms
download_server_address=https://check.abookcloud.com/acms
acms_address=https://check130.agentec.jp/acms
download_server_address=https://check130.agentec.jp/acms
#syncview server
websocket_server_http_url=https://checkdev1.agentec.jp/v1
websocket_server_ws_url=wss://checkdev1.agentec.jp/v1
websocket_server_http_url=https://check130.agentec.jp/v1
websocket_server_ws_url=wss://check130.agentec.jp/v1
#WebSocket debug出力
websocket_debug=false
......@@ -86,8 +86,8 @@ is_check_invalid_passward_limit=true
repeat_default=true
#Setting Info(設定画面のABookについての設定情報)
version_name=1.3.201
release_date=2021/07/06
version_name=1.4.100
release_date=2021/07/29
copy_right=2016 AGENTEC Co.,Ltd. All rights reserved.
hope_page=http://www.agentec.jp
contact_email=abook-appsupport@agentec.jp
......
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