Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
abook_check
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abook_android
abook_check
Commits
ac488c42
You need to sign in or sign up before continuing.
Commit
ac488c42
authored
Aug 23, 2021
by
Kim Peace
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'communication/merging_1_4_100' into 'communication/develop'
Communication/merging 1 4 100 See merge request
!204
parents
adb49f48
7a273f5f
Hide whitespace changes
Inline
Side-by-side
Showing
33 changed files
with
792 additions
and
354 deletions
+792
-354
.gitmodules
+3
-0
ABVJE_BL/src/jp/agentec/abook/abv/bl/acms/client/json/OperationListJSON.java
+6
-0
ABVJE_BL/src/jp/agentec/abook/abv/bl/acms/client/json/content/ContentJSON.java
+1
-0
ABVJE_BL/src/jp/agentec/abook/abv/bl/acms/type/ServiceOption.java
+7
-0
ABVJE_BL/src/jp/agentec/abook/abv/bl/common/constant/ABookKeys.java
+65
-1
ABVJE_BL/src/jp/agentec/abook/abv/bl/data/ABVDataCache.java
+4
-0
ABVJE_BL/src/jp/agentec/abook/abv/bl/data/DBConnector.java
+1
-1
ABVJE_BL/src/jp/agentec/abook/abv/bl/data/DatabaseVersions.java
+1
-0
ABVJE_BL/src/jp/agentec/abook/abv/bl/data/dao/OperationDao.java
+31
-8
ABVJE_BL/src/jp/agentec/abook/abv/bl/data/dao/OperationGroupMasterDao.java
+27
-1
ABVJE_BL/src/jp/agentec/abook/abv/bl/data/dao/OperationGroupMasterOperationDao.java
+5
-0
ABVJE_BL/src/jp/agentec/abook/abv/bl/data/dao/PushMessageDao.java
+2
-0
ABVJE_BL/src/jp/agentec/abook/abv/bl/data/tables/TOperation.java
+8
-0
ABVJE_BL/src/jp/agentec/abook/abv/bl/dto/OperationDto.java
+5
-2
ABVJE_BL/src/jp/agentec/abook/abv/bl/dto/OperationGroupMasterDto.java
+1
-0
ABVJE_BL/src/jp/agentec/abook/abv/bl/logic/OperationGroupMasterLogic.java
+50
-0
ABVJE_BL/src/jp/agentec/abook/abv/bl/logic/OperationLogic.java
+40
-5
ABVJE_BL/src/jp/agentec/abook/abv/bl/logic/PushMessageLogic.java
+33
-0
ABVJE_Launcher_Android/AndroidManifest.xml
+3
-1
ABVJE_Launcher_Android/assets/chat
+1
-1
ABVJE_Launcher_Android/assets/check
+1
-0
ABVJE_UI_Android/res/layout/chat_webview.xml
+1
-1
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/common/activity/ABVActivity.java
+5
-1
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/common/activity/ABVAuthenticatedActivity.java
+4
-1
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/common/activity/ABVContentViewActivity.java
+8
-0
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/common/activity/ABVUIActivity.java
+2
-0
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/home/activity/OperationListActivity.java
+356
-311
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/home/helper/HomeOperationListHelper.java
+1
-1
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/home/helper/OperationGroupMasterListHelper.java
+7
-2
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/home/helper/OperationListHelper.java
+1
-10
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/viewer/activity/HTMLWebViewActivity.java
+62
-1
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/viewer/activity/HTMLXWalkWebViewActivity.java
+44
-0
gradle.properties
+6
-6
No files found.
.gitmodules
View file @
ac488c42
[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
ABVJE_BL/src/jp/agentec/abook/abv/bl/acms/client/json/OperationListJSON.java
View file @
ac488c42
...
...
@@ -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
))
{
...
...
ABVJE_BL/src/jp/agentec/abook/abv/bl/acms/client/json/content/ContentJSON.java
View file @
ac488c42
...
...
@@ -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
;
...
...
ABVJE_BL/src/jp/agentec/abook/abv/bl/acms/type/ServiceOption.java
View file @
ac488c42
...
...
@@ -168,5 +168,11 @@ public interface ServiceOption {
* 利用しない:N(通常)、利用する:Y
*/
int
UsableIOReport
=
186
;
/**
* RFID・バーコード使用
* 利用しない:N(通常)、利用する:Y
*/
int
UsableRFIDBarcodeScan
=
190
;
}
}
\ No newline at end of file
ABVJE_BL/src/jp/agentec/abook/abv/bl/common/constant/ABookKeys.java
View file @
ac488c42
...
...
@@ -15,6 +15,42 @@ 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
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 +72,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 +85,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 +210,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"
;
}
ABVJE_BL/src/jp/agentec/abook/abv/bl/data/ABVDataCache.java
View file @
ac488c42
...
...
@@ -343,6 +343,10 @@ public class ABVDataCache {
return
isServiceOptionEnable
(
ServiceOptionId
.
UsableIOReport
);
}
public
boolean
isUsableRFIDBarcodeScan
()
{
return
isServiceOptionEnable
(
ServiceOptionId
.
UsableRFIDBarcodeScan
);
}
/**
* @version 1.2.300
* サービスオプション(ユーザパスワードソルト付加)返す
...
...
ABVJE_BL/src/jp/agentec/abook/abv/bl/data/DBConnector.java
View file @
ac488c42
...
...
@@ -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
;
...
...
ABVJE_BL/src/jp/agentec/abook/abv/bl/data/DatabaseVersions.java
View file @
ac488c42
...
...
@@ -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障害対応。)
...
...
ABVJE_BL/src/jp/agentec/abook/abv/bl/data/dao/OperationDao.java
View file @
ac488c42
...
...
@@ -116,6 +116,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 +206,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 +233,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 +286,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
);
}
...
...
@@ -310,6 +331,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')) "
);
...
...
ABVJE_BL/src/jp/agentec/abook/abv/bl/data/dao/OperationGroupMasterDao.java
View file @
ac488c42
...
...
@@ -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
ABVJE_BL/src/jp/agentec/abook/abv/bl/data/dao/OperationGroupMasterOperationDao.java
View file @
ac488c42
...
...
@@ -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
ABVJE_BL/src/jp/agentec/abook/abv/bl/data/dao/PushMessageDao.java
View file @
ac488c42
...
...
@@ -137,4 +137,6 @@ public class PushMessageDao extends AbstractDao {
Logger
.
v
(
TAG
,
"sql=%s"
,
sql
);
return
rawQueryGetDto
(
sql
.
toString
(),
args
,
PushMessageDto
.
class
);
}
}
ABVJE_BL/src/jp/agentec/abook/abv/bl/data/tables/TOperation.java
View file @
ac488c42
...
...
@@ -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
;
}
...
...
ABVJE_BL/src/jp/agentec/abook/abv/bl/dto/OperationDto.java
View file @
ac488c42
...
...
@@ -32,6 +32,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 +52,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
...
...
ABVJE_BL/src/jp/agentec/abook/abv/bl/dto/OperationGroupMasterDto.java
View file @
ac488c42
...
...
@@ -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
()
{
}
...
...
ABVJE_BL/src/jp/agentec/abook/abv/bl/logic/OperationGroupMasterLogic.java
View file @
ac488c42
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
();
}
}
}
ABVJE_BL/src/jp/agentec/abook/abv/bl/logic/OperationLogic.java
View file @
ac488c42
...
...
@@ -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,41 @@ 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
.
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
();
}
}
ABVJE_BL/src/jp/agentec/abook/abv/bl/logic/PushMessageLogic.java
View file @
ac488c42
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
();
}
}
}
ABVJE_Launcher_Android/AndroidManifest.xml
View file @
ac488c42
...
...
@@ -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"
/>
...
...
chat
@
910c8ea6
Subproject commit
b9e820ee87a49d4ff3ef47129c3cce4222460f32
Subproject commit
910c8ea6d5226c7da0e28fbdb4cf43ddfc392dc7
check
@
07de49e3
Subproject commit 07de49e3e94c2598072e6d78061a9d1cc3e47f90
ABVJE_UI_Android/res/layout/chat_webview.xml
View file @
ac488c42
...
...
@@ -11,7 +11,7 @@
android:layout_height=
"0dp"
android:layout_weight=
"1"
android:orientation=
"vertical"
>
<
jp.agentec.abook.abv.ui.home.view.Chat
WebView
<WebView
android:id=
"@+id/chatWebview"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
/>
...
...
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/common/activity/ABVActivity.java
View file @
ac488c42
...
...
@@ -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
;
}
}
}
...
...
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/common/activity/ABVAuthenticatedActivity.java
View file @
ac488c42
...
...
@@ -955,7 +955,10 @@ public abstract class ABVAuthenticatedActivity extends ABVActivity implements Co
// プッシュメッセージで未読がなければ、下辺ツールバーのコミュニケーションボタンのバッジを外す
List
<
PushMessageDto
>
checkPushMessageList
=
mPushMessageListAdapter
.
getItems
();
if
(!
checkUnReadCommunication
(
checkPushMessageList
))
{
communicationButton
.
setImageResource
(
R
.
drawable
.
ic_communication_menu
);
//OperationListActivityのwebview化のためnullチェック(OperationListActivityのナビゲーションはWebview内に含んでいる)
if
(
communicationButton
!=
null
)
{
communicationButton
.
setImageResource
(
R
.
drawable
.
ic_communication_menu
);
}
}
}
});
...
...
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/common/activity/ABVContentViewActivity.java
View file @
ac488c42
...
...
@@ -1124,6 +1124,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
();
// 開いてる画面を閉じる
}
}
}
...
...
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/common/activity/ABVUIActivity.java
View file @
ac488c42
...
...
@@ -216,6 +216,8 @@ public abstract class ABVUIActivity extends ABVAuthenticatedActivity {
stopUpdateAnimation
();
Logger
.
e
(
TAG
,
"Exception DataRefresh"
,
e
);
handleErrorMessageToast
(
ErrorCode
.
E107
);
}
finally
{
closeProgressPopup
();
}
return
result
;
...
...
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/home/activity/OperationListActivity.java
View file @
ac488c42
...
...
@@ -10,14 +10,15 @@ import android.os.Bundle;
import
android.view.Gravity
;
import
android.view.KeyEvent
;
import
android.view.View
;
import
android.view.ViewGroup
;
import
android.view.Window
;
import
android.webkit.JavascriptInterface
;
import
android.webkit.WebSettings
;
import
android.webkit.WebView
;
import
android.widget.AbsListView
;
import
android.widget.AdapterView
;
import
android.widget.ArrayAdapter
;
import
android.widget.DatePicker
;
import
android.widget.EditText
;
import
android.widget.FrameLayout
;
import
android.widget.GridView
;
import
android.widget.ImageButton
;
import
android.widget.ListView
;
...
...
@@ -78,13 +79,13 @@ import jp.agentec.abook.abv.bl.dto.TaskReportDto;
import
jp.agentec.abook.abv.bl.logic.AbstractLogic
;
import
jp.agentec.abook.abv.bl.logic.OperationGroupMasterLogic
;
import
jp.agentec.abook.abv.bl.logic.OperationLogic
;
import
jp.agentec.abook.abv.bl.logic.PushMessageLogic
;
import
jp.agentec.abook.abv.cl.util.PreferenceUtil
;
import
jp.agentec.abook.abv.launcher.android.R
;
import
jp.agentec.abook.abv.ui.viewer.activity.OnlineHTMLWebViewActivity
;
import
jp.agentec.abook.abv.ui.common.activity.ABVUIActivity
;
import
jp.agentec.abook.abv.ui.common.appinfo.AppDefType.OperationLocationType
;
import
jp.agentec.abook.abv.ui.common.appinfo.AppDefType
;
import
jp.agentec.abook.abv.ui.common.appinfo.AppDefType.ViewMode
;
import
jp.agentec.abook.abv.ui.common.constant.ErrorCode
;
import
jp.agentec.abook.abv.ui.common.constant.ErrorMessage
;
import
jp.agentec.abook.abv.ui.common.constant.NaviConsts
;
...
...
@@ -112,24 +113,21 @@ import jp.agentec.adf.util.StringUtil;
/**
* Created by leej on 2018/08/17
*/
public
class
OperationListActivity
extends
ABVUIActivity
{
private
static
final
String
TAG
=
"OperationListActivity"
;
private
ImageButton
mViewModeButton
;
// パンネル・リスト表示ボタン
private
ImageButton
mSearchButton
;
// 検索ボタン
private
ImageButton
mCommonContentButton
;
// 共通資料ボタン
private
ImageButton
mOperationBatchSyncButton
;
// カテゴリの一括同期ボタン
private
ImageButton
mCategoryLocationButton
;
// カテゴリ選択ボタン
private
ImageButton
mQuickReportPrintButton
;
// 簡易帳票印刷ボタン
private
TextView
mOperationTitle
;
// 一覧のタイトル
private
WebView
mCheckWebView
;
private
final
String
OPERATION_LIST_PAGE
=
"file:///android_asset/check/app/index.html?"
;
private
JsInf
jsInf
=
new
JsInf
();
// 検索画面の条件(文字列)
public
String
mSearchWord
;
// 検索画面の値(作業名)
public
String
mStartDateStr
;
// 検索画面の値(作業開始日)
public
String
mEndDateStr
;
// 検索画面の値(作業終了日)
public
int
sortType
=
2
;
public
boolean
isSearch
=
false
;
public
int
mOperationGroupMasterId
=
0
;
private
EditText
mSearchTextView
;
// 検索画面の作業名
private
TextView
mStartDate
;
// 検索画面の作業開始日
...
...
@@ -137,13 +135,13 @@ public class OperationListActivity extends ABVUIActivity {
private
Dialog
mSearchDialog
;
private
Date
mOperationLastEditDate
;
private
OperationDao
mOperationDao
=
AbstractDao
.
getDao
(
OperationDao
.
class
);
private
OperationContentDao
mOperationContentDao
=
AbstractDao
.
getDao
(
OperationContentDao
.
class
);
private
TaskReportDao
mTaskReportDao
=
AbstractDao
.
getDao
(
TaskReportDao
.
class
);
private
OperationLogic
mOperationLogic
=
AbstractLogic
.
getLogic
(
OperationLogic
.
class
);
private
OperationGroupMasterLogic
mOperationGroupMasterLogic
=
AbstractLogic
.
getLogic
(
OperationGroupMasterLogic
.
class
);
private
PushMessageLogic
mPushMessageLogic
=
AbstractLogic
.
getLogic
(
PushMessageLogic
.
class
);
private
TaskDao
mTaskDao
=
AbstractDao
.
getDao
(
TaskDao
.
class
);
private
boolean
activityResultFlg
;
...
...
@@ -163,191 +161,296 @@ public class OperationListActivity extends ABVUIActivity {
private
static
final
int
SUB_DIVICE_IMAGE_LIST_ACTIVITY
=
1001
;
private
Long
mSelectedOperationId
;
// ビューの作成
private
class
ReloadHandler
implements
Runnable
{
@Override
public
void
run
()
{
View
child
=
mListHelper
.
getOperationView
();
ViewGroup
parent
=
(
ViewGroup
)
child
.
getParent
();
if
(
parent
!=
null
)
{
parent
.
removeView
(
child
);
}
FrameLayout
vg
=
(
FrameLayout
)
findViewById
(
R
.
id
.
operation_list_layout
);
vg
.
removeAllViews
();
vg
.
addView
(
child
);
// ツールバーのビューモードイメージ変更
if
(
getABVUIDataCache
().
getViewMode
()
==
AppDefType
.
ViewMode
.
PANEL
)
{
mViewModeButton
.
setImageResource
(
R
.
drawable
.
ic_display_list
);
}
else
{
mViewModeButton
.
setImageResource
(
R
.
drawable
.
ic_display_pannel
);
}
closeProgressPopup
();
}
}
private
Integer
mScanType
;
@Override
protected
void
onCreate
(
Bundle
savedInstanceState
)
{
super
.
onCreate
(
savedInstanceState
);
setContentView
(
R
.
layout
.
ac_operation_list
);
//setContentView(R.layout.ac_operation_list);
setContentView
(
R
.
layout
.
chat_webview
);
mCheckWebView
=
findViewById
(
R
.
id
.
chatWebview
);
mCheckWebView
.
setOverScrollMode
(
View
.
OVER_SCROLL_NEVER
);
//オーバースクロールしない。
mCheckWebView
.
setVerticalScrollBarEnabled
(
false
);
//スクロールバーを消す。
mCheckWebView
.
addJavascriptInterface
(
jsInf
,
"android"
);
if
(
Logger
.
isDebugEnabled
())
{
mCheckWebView
.
setWebContentsDebuggingEnabled
(
true
);
}
WebSettings
settings
=
mCheckWebView
.
getSettings
();
settings
.
setJavaScriptEnabled
(
true
);
//Javascriptを有効にする。
settings
.
setAppCacheEnabled
(
true
);
settings
.
setCacheMode
(
WebSettings
.
LOAD_DEFAULT
);
settings
.
setMixedContentMode
(
WebSettings
.
MIXED_CONTENT_ALWAYS_ALLOW
);
settings
.
setDomStorageEnabled
(
true
);
settings
.
setDatabaseEnabled
(
true
);
settings
.
setMediaPlaybackRequiresUserGesture
(
false
);
settings
.
setAllowFileAccess
(
true
);
settings
.
setUseWideViewPort
(
true
);
settings
.
setAllowContentAccess
(
true
);
settings
.
setAllowFileAccessFromFileURLs
(
true
);
settings
.
setSaveFormData
(
false
);
settings
.
setAllowUniversalAccessFromFileURLs
(
true
);
ArrayList
<
String
>
paramList
=
new
ArrayList
<
String
>();
paramList
.
add
(
"debug=1"
);
paramList
.
add
(
"app=android"
);
paramList
.
add
(
"mobile_flg="
+
(
isNormalSize
()
?
"1"
:
"0"
));
paramList
.
add
(
"isRFIDBarcodeScan="
+
(
ABVDataCache
.
getInstance
().
serviceOption
.
isUsableRFIDBarcodeScan
()
?
"1"
:
"0"
));
mCheckWebView
.
postUrl
(
OPERATION_LIST_PAGE
+
StringUtil
.
join
(
"&"
,
paramList
),
null
);
mListHelper
=
getListHelper
();
// ビュー変更ボタン
mViewModeButton
=
(
ImageButton
)
findViewById
(
R
.
id
.
btn_view_mode
);
// 検索ボタン
mSearchButton
=
(
ImageButton
)
findViewById
(
R
.
id
.
btn_search
);
// ツールバーのタイトル表示
mOperationTitle
=
(
TextView
)
findViewById
(
R
.
id
.
operation_title
);
mOperationBatchSyncButton
=
(
ImageButton
)
findViewById
(
R
.
id
.
btn_batch_sync
);
communicationButton
=
(
ImageButton
)
findViewById
(
R
.
id
.
btn_communication_menu
);
mCommonContentButton
=
(
ImageButton
)
findViewById
(
R
.
id
.
btn_common_content
);
mCategoryLocationButton
=
(
ImageButton
)
findViewById
(
R
.
id
.
btn_category_location
);
mQuickReportPrintButton
=
(
ImageButton
)
findViewById
(
R
.
id
.
btn_operation_print
);
// 定期点検で同期ボタンタップの日付と現在の日付が異なる且つ、作業するデータが存在しない場合、needSyncFlgをtrueに更新
updateNeedSyncRoutineOperation
();
// 非活性化する(ホーム画面ではホームボタンが必要ないため)
ImageButton
operationHomeButton
=
(
ImageButton
)
findViewById
(
R
.
id
.
btn_operation_home
);
operationHomeButton
.
setEnabled
(
false
);
// ビュー変更ボタンのタッチイベント
mViewModeButton
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
@Override
public
void
onClick
(
View
v
)
{
if
(
getABVUIDataCache
().
getViewMode
()
==
ViewMode
.
PANEL
)
{
getABVUIDataCache
().
setViewMode
(
ViewMode
.
LIST
);
}
else
{
getABVUIDataCache
().
setViewMode
(
ViewMode
.
PANEL
);
}
setOperationListView
();
}
});
// サービスオプション(作業種別使用)をセット
mOperationGroupMasterServiceOperationFlg
=
ABVDataCache
.
getInstance
().
serviceOption
.
isOperationGroupMaster
();
// 検索アイコンのクリックイベント
mSearchButton
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
@Override
public
void
onClick
(
View
v
)
{
showSearchDialog
();
}
});
// コミュニケーションボタン
communicationButton
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
@Override
public
void
onClick
(
View
v
)
{
showCommunicationMenuDialog
();
}
});
if
(!
StringUtil
.
isNullOrEmpty
(
getIntent
().
getStringExtra
(
AppDefType
.
PushMessageKey
.
operationId
)))
{
final
long
operationId
=
Long
.
parseLong
(
getIntent
().
getStringExtra
(
AppDefType
.
PushMessageKey
.
operationId
));
String
message
=
getIntent
().
getStringExtra
(
AppDefType
.
PushMessageKey
.
message
);
if
(
operationId
<
1
)
{
return
;
}
// 共通関連資料ボタン
mCommonContentButton
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
@Override
public
void
onClick
(
View
v
)
{
showCommonContent
();
}
});
final
ABookAlertDialog
alertDialog
=
AlertDialogUtil
.
createAlertDialog
(
this
,
getRString
(
R
.
string
.
app_name
),
message
);
// リソースパターンの適用
alertDialog
.
setPositiveButton
(
PatternStringUtil
.
patternToInt
(
getApplicationContext
(),
R
.
string
.
work_report
,
getUserPref
(
AppDefType
.
UserPrefKey
.
RESOURCE_PATTERN_TYPE
,
0
)
),
new
DialogInterface
.
OnClickListener
()
{
@Override
public
void
onClick
(
DialogInterface
dialog
,
int
whichButton
)
{
if
(
contentRefresher
.
isRefreshing
())
{
// リソースパターンの適用
ErrorMessage
.
showErrorMessageToast
(
OperationListActivity
.
this
,
PatternStringUtil
.
patternToInt
(
getApplicationContext
(),
R
.
string
.
msg_routineTask_report_disable_refreshing
,
getUserPref
(
AppDefType
.
UserPrefKey
.
RESOURCE_PATTERN_TYPE
,
0
)
)
);
}
else
if
(
ActivityHandlingHelper
.
getInstance
().
isMeetingConnected
())
{
// リソースパターンの適用
ErrorMessage
.
showErrorMessageToast
(
OperationListActivity
.
this
,
PatternStringUtil
.
patternToInt
(
getApplicationContext
(),
R
.
string
.
msg_routineTask_report_disable_meeting_room
,
getUserPref
(
AppDefType
.
UserPrefKey
.
RESOURCE_PATTERN_TYPE
,
0
)
)
);
}
else
if
(
isShowingBatchSync
())
{
// 一括同期中は移動しない
ErrorMessage
.
showErrorMessageToast
(
OperationListActivity
.
this
,
getString
(
R
.
string
.
msg_batch_sync_move_operation_view
)
);
}
else
{
OperationDto
operationDto
=
mOperationLogic
.
getOperation
(
operationId
);
if
(
operationDto
==
null
)
{
// リソースパターンの適用
ErrorMessage
.
showErrorMessageToast
(
OperationListActivity
.
this
,
PatternStringUtil
.
patternToInt
(
getApplicationContext
(),
R
.
string
.
msg_routineTask_report_disable_no_operation
,
getUserPref
(
AppDefType
.
UserPrefKey
.
RESOURCE_PATTERN_TYPE
,
0
)
)
);
}
else
if
(
operationDto
.
needSyncFlg
)
{
// リソースパターンの適用
ErrorMessage
.
showErrorMessageToast
(
OperationListActivity
.
this
,
PatternStringUtil
.
patternToInt
(
getApplicationContext
(),
R
.
string
.
msg_routineTask_report_disable_not_updated
,
getUserPref
(
AppDefType
.
UserPrefKey
.
RESOURCE_PATTERN_TYPE
,
0
)
)
);
}
else
{
startTaskDirectionOrReportView
(
operationDto
);
}
}
if
(
ABVDataCache
.
getInstance
().
serviceOption
.
isUnableIOReport
())
{
// 簡易帳票印刷ボタン
mQuickReportPrintButton
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
@Override
public
void
onClick
(
View
v
)
{
showPrintTargetSelect
();
dialog
.
dismiss
();
}
}
});
mQuickReportPrintButton
.
setVisibility
(
View
.
VISIBLE
);
}
else
{
findViewById
(
R
.
id
.
print_layout
).
setVisibility
(
View
.
GONE
);
mQuickReportPrintButton
.
setVisibility
(
View
.
GONE
);
}
);
// 一括同期ボタン
mOperationBatchSyncButton
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
@Override
public
void
onClick
(
View
v
)
{
// ネットワーク通信チェック
if
(!
ABVEnvironment
.
getInstance
().
networkAdapter
.
isNetworkConnected
())
{
showSimpleAlertDialog
(
getString
(
R
.
string
.
app_name
),
getString
(
R
.
string
.
request_network_connection
));
return
;
alertDialog
.
setNegativeButton
(
R
.
string
.
cancel
,
new
DialogInterface
.
OnClickListener
()
{
@Override
public
void
onClick
(
DialogInterface
dialog
,
int
whichButton
)
{
dialog
.
dismiss
();
}
});
// 新着更新チェック
if
(
contentRefresher
.
isRefreshing
())
{
showSimpleAlertDialog
(
getString
(
R
.
string
.
app_name
),
getString
(
R
.
string
.
msg_batch_sync_new_content_updating
));
return
;
}
alertDialog
.
show
();
// 会議室接続中
if
(
ActivityHandlingHelper
.
getInstance
().
isMeetingConnected
())
{
ABVToastUtil
.
showMakeText
(
OperationListActivity
.
this
,
R
.
string
.
msg_operation_enable_meeting_room_connected
,
Toast
.
LENGTH_SHORT
);
return
;
}
// プッシュメッセージがある場合
else
if
(!
StringUtil
.
isNullOrEmpty
(
getIntent
().
getStringExtra
(
AppDefType
.
ChatPushMessageKey
.
roomName
))
&&
getIntent
().
getLongExtra
(
AppDefType
.
ChatPushMessageKey
.
roomId
,
'0'
)
>
0
)
{
ActivityHandlingHelper
.
getInstance
().
startChatWebViewActivity
(
""
,
getIntent
().
getLongExtra
(
AppDefType
.
ChatPushMessageKey
.
roomId
,
'0'
),
getIntent
().
getStringExtra
(
AppDefType
.
ChatPushMessageKey
.
roomName
),
getIntent
().
getStringExtra
(
AppDefType
.
ChatPushMessageKey
.
roomType
)
);
}
}
private
class
JsInf
{
@JavascriptInterface
public
void
sendParam
(
String
param
)
{
JSONObject
jsonParam
=
new
JSONObject
(
param
);
OperationDto
operationDto
;
if
(
jsonParam
.
has
(
ABookKeys
.
CMD
))
{
switch
(
jsonParam
.
getString
(
ABookKeys
.
CMD
)){
case
ABookKeys
.
CMD_KEY
.
GO_SETTING
:
showSetting
();
break
;
case
ABookKeys
.
CMD_KEY
.
GO_RELATION_CONTENT
:
showCommonContent
();
break
;
case
ABookKeys
.
CMD_KEY
.
GO_PRINT_TARGET
:
showPrintTargetSelect
();
break
;
case
ABookKeys
.
CMD_KEY
.
GO_OPERATION
:
if
(!
jsonParam
.
has
(
ABookKeys
.
OPERATION_ID
))
{
break
;
}
if
(
jsonParam
.
has
(
ABookKeys
.
SCAN_TYPE
))
{
mScanType
=
jsonParam
.
getInt
(
ABookKeys
.
SCAN_TYPE
);
}
final
OperationDto
tempOperationDto
=
mOperationDao
.
getOperationJoinContent
(
jsonParam
.
getInt
(
ABookKeys
.
OPERATION_ID
));
if
(
tempOperationDto
.
needSyncFlg
)
{
mCallBack
=
new
Runnable
()
{
@Override
public
void
run
()
{
openReportView
(
tempOperationDto
);
}
};
runOnUiThread
(
new
Runnable
()
{
@Override
public
void
run
()
{
startSyncOperation
(
tempOperationDto
);
}
});
}
else
{
openReportView
(
tempOperationDto
);
}
break
;
case
ABookKeys
.
CMD_KEY
.
GO_COMMUNICATION
:
showCommunicationMenuDialog
();
break
;
case
ABookKeys
.
CMD_KEY
.
GO_PANORAMA_EDIT
:
final
OperationDto
panoramaOperationDto
=
mOperationDao
.
getOperationJoinContent
(
jsonParam
.
getInt
(
ABookKeys
.
OPERATION_ID
));
if
(
panoramaOperationDto
.
needSyncFlg
)
{
mCallBack
=
new
Runnable
()
{
@Override
public
void
run
()
{
startPanoEdit
(
panoramaOperationDto
);
}
};
runOnUiThread
(
new
Runnable
()
{
@Override
public
void
run
()
{
startSyncOperation
(
panoramaOperationDto
);
}
});
}
else
{
startPanoEdit
(
panoramaOperationDto
);
}
break
;
case
ABookKeys
.
CMD_KEY
.
REFRESH_CONTENT
:
clearSearch
();
dataRefresh
(
true
);
break
;
case
ABookKeys
.
CMD_KEY
.
CHANGE_OPERATION_GROUP_MASTER
:
clearSearch
();
List
<
OperationDto
>
operationList
=
mOperationGroupMasterLogic
.
getOperationByOperationGroupMasterId
(
jsonParam
.
getInt
(
ABookKeys
.
OPERATION_GROUPMASTER_ID
),
null
);
mOperationLogic
.
createOperationListJson
(
operationList
,
null
);
break
;
case
ABookKeys
.
CMD_KEY
.
RESET_SEARCH
:
clearSearch
();
runOnUiThread
(
new
Runnable
()
{
@Override
public
void
run
()
{
mCheckWebView
.
loadUrl
(
"javascript:CHK.initReportApp();"
);
}
});
break
;
}
showBatchSyncDialog
();
}
}
);
}
@JavascriptInterface
public
String
getCachePath
()
{
return
getCacheDir
().
getAbsolutePath
();
}
if
(!
StringUtil
.
isNullOrEmpty
(
getIntent
().
getStringExtra
(
AppDefType
.
PushMessageKey
.
operationId
)))
{
final
long
operationId
=
Long
.
parseLong
(
getIntent
().
getStringExtra
(
AppDefType
.
PushMessageKey
.
operationId
));
String
message
=
getIntent
().
getStringExtra
(
AppDefType
.
PushMessageKey
.
message
);
if
(
operationId
>
0
)
{
final
ABookAlertDialog
alertDialog
=
AlertDialogUtil
.
createAlertDialog
(
this
,
getRString
(
R
.
string
.
app_name
),
message
);
// リソースパターンの適用
alertDialog
.
setPositiveButton
(
PatternStringUtil
.
patternToInt
(
getApplicationContext
(),
R
.
string
.
work_report
,
getUserPref
(
AppDefType
.
UserPrefKey
.
RESOURCE_PATTERN_TYPE
,
0
)),
new
DialogInterface
.
OnClickListener
()
{
@Override
public
void
onClick
(
DialogInterface
dialog
,
int
whichButton
)
{
if
(
contentRefresher
.
isRefreshing
())
{
// リソースパターンの適用
ErrorMessage
.
showErrorMessageToast
(
OperationListActivity
.
this
,
PatternStringUtil
.
patternToInt
(
getApplicationContext
(),
R
.
string
.
msg_routineTask_report_disable_refreshing
,
getUserPref
(
AppDefType
.
UserPrefKey
.
RESOURCE_PATTERN_TYPE
,
0
)));
}
else
if
(
ActivityHandlingHelper
.
getInstance
().
isMeetingConnected
())
{
// リソースパターンの適用
ErrorMessage
.
showErrorMessageToast
(
OperationListActivity
.
this
,
PatternStringUtil
.
patternToInt
(
getApplicationContext
(),
R
.
string
.
msg_routineTask_report_disable_meeting_room
,
getUserPref
(
AppDefType
.
UserPrefKey
.
RESOURCE_PATTERN_TYPE
,
0
)));
}
else
if
(
isShowingBatchSync
())
{
// 一括同期中は移動しない
ErrorMessage
.
showErrorMessageToast
(
OperationListActivity
.
this
,
getString
(
R
.
string
.
msg_batch_sync_move_operation_view
));
}
else
{
OperationDto
operationDto
=
mOperationLogic
.
getOperation
(
operationId
);
@JavascriptInterface
public
String
searchOperationList
(
String
searchKeyword
,
String
searchStartDate
,
String
searchEndDate
,
int
operationGroupMasterId
)
{
mSearchWord
=
searchKeyword
;
mStartDateStr
=
searchStartDate
;
mEndDateStr
=
searchEndDate
;
List
<
OperationDto
>
operationList
;
if
(
operationGroupMasterId
!=
0
)
{
mOperationGroupMasterId
=
operationGroupMasterId
;
}
operationList
=
mListHelper
.
filterOperationList
();
String
searchOperationListStr
=
mOperationLogic
.
createOperationListJson
(
operationList
,
null
);
isSearch
=
true
;
return
searchOperationListStr
;
}
if
(
operationDto
==
null
)
{
// リソースパターンの適用
ErrorMessage
.
showErrorMessageToast
(
OperationListActivity
.
this
,
PatternStringUtil
.
patternToInt
(
getApplicationContext
(),
R
.
string
.
msg_routineTask_report_disable_no_operation
,
getUserPref
(
AppDefType
.
UserPrefKey
.
RESOURCE_PATTERN_TYPE
,
0
)));
}
else
if
(
operationDto
.
needSyncFlg
)
{
// リソースパターンの適用
ErrorMessage
.
showErrorMessageToast
(
OperationListActivity
.
this
,
PatternStringUtil
.
patternToInt
(
getApplicationContext
(),
R
.
string
.
msg_routineTask_report_disable_not_updated
,
getUserPref
(
AppDefType
.
UserPrefKey
.
RESOURCE_PATTERN_TYPE
,
0
)));
}
else
{
startTaskDirectionOrReportView
(
operationDto
);
}
}
@JavascriptInterface
public
void
startScan
()
{
//TODO ConnectScanner
}
dialog
.
dismiss
();
}
});
@JavascriptInterface
public
void
stopScan
()
{
//TODO DisconnectScanner
}
alertDialog
.
setNegativeButton
(
R
.
string
.
cancel
,
new
DialogInterface
.
OnClickListener
()
{
@Override
public
void
onClick
(
DialogInterface
dialog
,
int
whichButton
)
{
dialog
.
dismiss
();
}
});
@JavascriptInterface
public
void
setSortType
(
int
requestSortType
)
{
sortType
=
requestSortType
;
}
alertDialog
.
show
();
}
@JavascriptInterface
public
int
getSortType
()
{
return
sortType
;
}
// リスト更新
setOperationListView
();
@JavascriptInterface
public
void
testScanResult
(
String
code
,
int
scanType
)
{
onScanned
(
code
,
scanType
);
}
}
//TODO Method called when code is scanned
public
void
onScanned
(
final
String
code
,
final
int
scanType
)
{
runOnUiThread
(
new
Runnable
()
{
@Override
public
void
run
()
{
mCheckWebView
.
loadUrl
(
"javascript:CHK.scanResult("
+
code
+
","
+
scanType
+
" );"
);
}
});
}
// 共通資料画面表示
...
...
@@ -371,57 +474,14 @@ public class OperationListActivity extends ABVUIActivity {
startActivity
(
intent
,
NaviConsts
.
Right
);
}
// ツールバーの設定
private
void
configurationToolbarIcon
()
{
// バッチを付けるか判定して、イメージを設定
setCommunicationImageButton
();
// 作業種別表示・非表示
if
(
mOperationGroupMasterServiceOperationFlg
)
{
mCategoryLocationButton
.
setVisibility
(
View
.
VISIBLE
);
// アイコンの変更
if
(
getABVUIDataCache
().
getOperationGroupMasterMode
()
==
OperationLocationType
.
CATEGORY
)
{
setCategoryImage
(
true
);
mOperationTitle
.
setText
(
R
.
string
.
title_category
);
// 検索ワード削除
clearSearch
();
// 検索ボタンを無効にする
mSearchButton
.
setEnabled
(
false
);
// 一括同期ボタン表示
mOperationBatchSyncButton
.
setVisibility
(
View
.
VISIBLE
);
}
else
{
// 全て
// 検索ボタンを活性化
mSearchButton
.
setEnabled
(
true
);
setCategoryImage
(
false
);
// 一括同期ボタン非表示
mOperationBatchSyncButton
.
setVisibility
(
View
.
GONE
);
mOperationTitle
.
setText
(
R
.
string
.
title_all_operation
);
}
}
else
{
mOperationTitle
.
setText
(
R
.
string
.
title_all_operation
);
// アイコン非表示
setCategoryImage
(
false
);
mCategoryLocationButton
.
setVisibility
(
View
.
GONE
);
// 一括同期ボタンを非表示
mOperationBatchSyncButton
.
setVisibility
(
View
.
GONE
);
// 検索ボタンを活性化
mSearchButton
.
setEnabled
(
true
);
}
// 検索済みの場合、タイトルを「検索結果」にする
if
(
isSearched
())
{
mOperationTitle
.
setText
(
R
.
string
.
search_result
);
}
}
// 検索ワードのクリア
private
void
clearSearch
()
{
mSearchWord
=
null
;
mStartDateStr
=
null
;
mEndDateStr
=
null
;
mOperationGroupMasterId
=
0
;
isSearch
=
false
;
sortType
=
2
;
clearData
();
}
...
...
@@ -430,25 +490,15 @@ public class OperationListActivity extends ABVUIActivity {
return
!(
StringUtil
.
isNullOrEmpty
(
mSearchWord
)
&&
StringUtil
.
isNullOrEmpty
(
mStartDateStr
)
&&
StringUtil
.
isNullOrEmpty
(
mEndDateStr
));
}
// カテゴリのアイコンイメージ設定
private
void
setCategoryImage
(
boolean
isCategory
)
{
mCategoryLocationButton
.
setImageResource
(
isCategory
?
R
.
drawable
.
ic_category_on
:
R
.
drawable
.
ic_category_off
);
}
/**
* ビューを作り直す。
*/
public
void
setOperationListView
()
{
mListHelper
=
getListHelper
();
handler
.
post
(
new
ReloadHandler
());
configurationToolbarIcon
();
screenRefresh
();
}
// ビューを作り直さずにリストだけ更新する
public
void
refreshOperationList
()
{
mListHelper
.
refreshList
();
configurationToolbarIcon
();
}
@Override
public
void
onRefreshedContent
(
final
boolean
result
,
long
contentId
,
Exception
e
)
{
...
...
@@ -466,19 +516,13 @@ public class OperationListActivity extends ABVUIActivity {
// 絞り検索マスタデータ最新更新する時fetchDateをローカルに保存する。
setApertureMasterDataFetchDate
();
if
(
mOperationGroupMasterServiceOperationFlg
==
ABVDataCache
.
getInstance
().
serviceOption
.
isOperationGroupMaster
())
{
// サービスオプションが変わってない場合は、ビューは作らずにデータのみ更新
refreshOperationList
();
}
else
{
if
(
mOperationGroupMasterServiceOperationFlg
!=
ABVDataCache
.
getInstance
().
serviceOption
.
isOperationGroupMaster
())
{
// 初期化
getABVUIDataCache
().
clearOperationGroupMaster
();
mOperationGroupMasterServiceOperationFlg
=
ABVDataCache
.
getInstance
().
serviceOption
.
isOperationGroupMaster
();
// 作業種別の選択画面を閉じる
closeOperationGroupMasterDialog
();
// ビューを作り直す
setOperationListView
();
}
screenRefresh
();
}
}
});
...
...
@@ -496,6 +540,12 @@ public class OperationListActivity extends ABVUIActivity {
public
void
onResume
()
{
Logger
.
i
(
TAG
,
"onResume:start"
);
super
.
onResume
();
if
(
isSearch
)
{
isSearch
=
false
;
return
;
}
//アプリロック状態の場合、何もしない。
if
(
checkForceLoginPeriodically
())
{
return
;
...
...
@@ -504,7 +554,8 @@ public class OperationListActivity extends ABVUIActivity {
// 一括同期中の場合何もしない
return
;
}
refreshOperationList
();
screenRefresh
();
// プッシュメッセージ処理
if
(!
StringUtil
.
isNullOrEmpty
(
getIntent
().
getStringExtra
(
AppDefType
.
ChatPushMessageKey
.
roomName
))
&&
...
...
@@ -524,38 +575,27 @@ public class OperationListActivity extends ABVUIActivity {
// 報告画面から作業一覧へ戻った時の同期処理
final
long
operationId
=
getUserPref
(
AppDefType
.
UserPrefKey
.
SYNC_TARGET_OPERATION_ID
,
-
1L
);
if
(
operationId
!=
-
1
)
{
final
OperationDto
operationDto
=
mOperationLogic
.
getOperation
(
operationId
);
dataRefresh
(
true
);
// リソースパターンの適用
showProgressView
(
PatternStringUtil
.
patternToString
(
getApplicationContext
(),
R
.
string
.
synchronizing
,
getUserPref
(
AppDefType
.
UserPrefKey
.
RESOURCE_PATTERN_TYPE
,
0
)));
CommonExecutor
.
execute
(
new
Runnable
()
{
@Override
public
void
run
()
{
Logger
.
d
(
TAG
,
"onResume Sync operationId : "
+
operationId
);
if
(
operationDto
!=
null
&&
operationDto
.
needSyncFlg
)
{
if
(!
ABVEnvironment
.
getInstance
().
networkAdapter
.
isNetworkConnected
())
{
closeProgressPopup
();
ABVToastUtil
.
showMakeText
(
OperationListActivity
.
this
,
R
.
string
.
msg_network_offline
,
Toast
.
LENGTH_SHORT
);
return
;
}
// 同期処理後、直列処理で新着更新を行う。
singleSyncOperation
(
operationId
,
operationDto
.
reportType
);
}
else
{
closeProgressPopup
();
}
dataRefresh
(
true
);
}
});
}
if
(!
activityResultFlg
&&
operationId
==
-
1
)
{
dataRefresh
(
true
);
}
putUserPref
(
AppDefType
.
UserPrefKey
.
SYNC_TARGET_OPERATION_ID
,
-
1L
);
activityResultFlg
=
false
;
configurationToolbarIcon
();
runOnUiThread
(
new
Runnable
()
{
@Override
public
void
run
()
{
try
{
createJsonForOperationList
(
getCacheDir
().
getAbsolutePath
());
//closeProgressPopup();
}
catch
(
Exception
e
)
{
Logger
.
d
(
"Update error"
);
}
}
});
}
// 検索ダイアログ表示
...
...
@@ -617,7 +657,7 @@ public class OperationListActivity extends ABVUIActivity {
mStartDateStr
=
StringUtil
.
toString
(
mStartDate
.
getText
());
mEndDateStr
=
StringUtil
.
toString
(
mEndDate
.
getText
());
refreshOperationList
();
screenRefresh
();
mSearchDialog
.
dismiss
();
// 検索条件に条件がある場合のみ、件数のトーストメッセージは表示する
...
...
@@ -653,7 +693,6 @@ public class OperationListActivity extends ABVUIActivity {
int
month
=
calendar
.
get
(
Calendar
.
MONTH
);
int
day
=
calendar
.
get
(
Calendar
.
DAY_OF_MONTH
);
//TODO layout変更 => DatePickerDialog.Theme_Holo_Light
final
DatePickerDialog
dpd
=
new
DatePickerDialog
(
this
,
android
.
R
.
style
.
Theme_Holo_Light_Dialog
,
new
DatePickerDialog
.
OnDateSetListener
()
{
@Override
...
...
@@ -679,20 +718,17 @@ public class OperationListActivity extends ABVUIActivity {
}
private
void
clearData
()
{
// 開始日の初期化
if
(
mStartDate
!=
null
)
{
mStartDate
.
setText
(
StringUtil
.
Empty
);
}
// 終了日の初期化
if
(
mEndDate
!=
null
)
{
mEndDate
.
setText
(
StringUtil
.
Empty
);
}
// 作業名の初期化
if
(
mSearchTextView
!=
null
)
{
mSearchTextView
.
setText
(
StringUtil
.
Empty
);
}
runOnUiThread
(
new
Runnable
()
{
@Override
public
void
run
()
{
mCheckWebView
.
loadUrl
(
"javascript:$('#searchTaskName').val('');"
);
mCheckWebView
.
loadUrl
(
"javascript:$('#searchStartDate').val('');"
);
mCheckWebView
.
loadUrl
(
"javascript:$('#searchEndDate').val('');"
);
mCheckWebView
.
loadUrl
(
"javascript:$('.sort-type').removeClass('active');"
);
mCheckWebView
.
loadUrl
(
"javascript:$('#defaultSort').addClass('active');"
);
}
});
}
// 開始日と終了日のバリデーション
...
...
@@ -755,7 +791,21 @@ public class OperationListActivity extends ABVUIActivity {
path
.
append
(
"/index.html?app=android"
);
path
.
append
(
"&report_type="
+
operationDto
.
reportType
);
// 作業報告タイプ : 0:報告 1:定期点検 2:報告(回答)
path
.
append
(
"&mobile_flg="
+
(
isNormalSize
()
?
"1"
:
"0"
));
// ScreenType
path
.
append
(
"&operationId="
+
operationDto
.
operationId
);
path
.
append
(
"&sid="
+
ABVDataCache
.
getInstance
().
getMemberInfo
().
sid
);
path
.
append
(
"&quickReport="
+
operationDto
.
quickReport
);
path
.
append
(
"&shopName="
+
ABVDataCache
.
getInstance
().
getUrlPath
());
path
.
append
(
"&acmsAddress="
+
ABVEnvironment
.
getInstance
().
acmsAddress
);
if
(
mScanType
!=
null
)
{
String
scanTypeKey
=
null
;
if
(
mScanType
.
equals
(
ABookKeys
.
SCAN_TYPE_VALUE
.
BARCODE
))
{
scanTypeKey
=
ABookKeys
.
SCAN_TYPE_KEY
.
BARCODE
;
}
else
if
(
mScanType
.
equals
(
ABookKeys
.
SCAN_TYPE_VALUE
.
RFID
))
{
scanTypeKey
=
ABookKeys
.
SCAN_TYPE_KEY
.
RFID
;
}
path
.
append
(
"&scanType="
+
scanTypeKey
);
mScanType
=
null
;
}
Logger
.
d
(
TAG
,
"path : "
+
path
);
// #32926 作業報告画面改善 end
Intent
intent
=
new
Intent
();
...
...
@@ -946,7 +996,7 @@ public class OperationListActivity extends ABVUIActivity {
progressDialogHorizontal
.
setProgress
(
100
);
}
mOperationLastEditDate
=
null
;
refreshOperationList
();
//screenRefresh
();
closeProgressPopup
();
}
});
...
...
@@ -972,7 +1022,7 @@ public class OperationListActivity extends ABVUIActivity {
return
;
}
if
(
operationDto
.
contentId
!=
null
&&
operationDto
.
contentId
!=
0
)
{
showProgressPopup
();
//
showProgressPopup();
try
{
String
baseUrl
=
ABVEnvironment
.
getInstance
().
acmsAddress
+
ABVDataCache
.
getInstance
().
getUrlPath
()
+
"/shop/login/authByCheck/%s/%s"
;
String
url
=
String
.
format
(
baseUrl
,
ABVDataCache
.
getInstance
().
getMemberInfo
().
sid
,
operationDto
.
contentId
);
...
...
@@ -987,7 +1037,7 @@ public class OperationListActivity extends ABVUIActivity {
Logger
.
e
(
TAG
,
e
);
ErrorMessage
.
showErrorMessageToast
(
getApplicationContext
(),
ErrorCode
.
E107
);
}
finally
{
closeProgressPopup
();
//
closeProgressPopup();
}
}
}
...
...
@@ -1264,7 +1314,7 @@ public class OperationListActivity extends ABVUIActivity {
if
(
requestCode
==
SUB_DIVICE_IMAGE_LIST_ACTIVITY
&&
resultCode
==
RESULT_OK
)
{
mOperationLogic
.
setContentCreatingFlg
(
mSelectedOperationId
);
refreshOperationList
();
//screenRefresh
();
//10秒(コンテンツ作成し、公開までの時間)に新着更新させる。
showProgressView
(
getString
(
R
.
string
.
msg_common_processing
));
...
...
@@ -1618,15 +1668,6 @@ public class OperationListActivity extends ABVUIActivity {
}
/**
* 作業種別選択画面を閉じる処理
*/
public
void
closeOperationGroupMasterDialog
()
{
if
(
mShowDialog
!=
null
&&
mShowDialog
.
isShowing
())
{
mShowDialog
.
dismiss
();
}
}
/**
* 絞り検索の日付を設定
*/
private
void
setApertureMasterDataFetchDate
()
{
...
...
@@ -1735,19 +1776,6 @@ public class OperationListActivity extends ABVUIActivity {
return
true
;
}
/**
* 一括同期の活性化・非活性化チェック
*/
public
void
checkBatchNeedSyncButton
(
Integer
operationGroupMasterId
)
{
if
(
mOperationDao
.
hasNeedSyncOperationByGroupMasterId
(
operationGroupMasterId
))
{
// 選択したカテゴリ一覧でneedSyncFlgがtrueの作業が存在すれば、活性化する
mOperationBatchSyncButton
.
setEnabled
(
true
);
}
else
{
// 一括同期ボタンを非活性化する
mOperationBatchSyncButton
.
setEnabled
(
false
);
}
}
@Override
public
void
onDestroy
()
{
Logger
.
d
(
TAG
,
"onDestroy"
);
...
...
@@ -1782,7 +1810,7 @@ public class OperationListActivity extends ABVUIActivity {
Logger
.
d
(
TAG
,
"onClickSortMenuByTablet id:"
+
id
);
getABVUIDataCache
().
setSortCondition
((
int
)
id
);
// ビューア更新
refreshOperationList
();
screenRefresh
();
}
});
...
...
@@ -1823,7 +1851,7 @@ public class OperationListActivity extends ABVUIActivity {
@Override
public
void
onItemClick
(
AdapterView
<?>
parent
,
View
view
,
int
position
,
long
id
)
{
getABVUIDataCache
().
setSortCondition
((
int
)
id
);
refreshOperationList
();
screenRefresh
();
}
});
...
...
@@ -1924,14 +1952,9 @@ public class OperationListActivity extends ABVUIActivity {
// typeの値をxmlに書き込み
getABVUIDataCache
().
setOperationGroupMasterMode
((
int
)
type
);
// プログレスバー
showProgressPopup
();
//
showProgressPopup();
setOperationListView
();
}
if
(
getABVUIDataCache
().
getOperationGroupMasterMode
()
==
OperationLocationType
.
CATEGORY
)
{
//作業種別モードの場合は、作業種別選択ダイアログ画面を表示
showOperationGroupMasterDialog
(
true
);
}
}
/**
...
...
@@ -1942,4 +1965,26 @@ public class OperationListActivity extends ABVUIActivity {
return
getABVUIDataCache
().
getSortCondition
();
}
public
void
createJsonForOperationList
(
String
filePath
)
{
clearSearch
();
List
<
OperationDto
>
operationList
=
mListHelper
.
filterOperationList
();
mOperationLogic
.
createOperationListJson
(
operationList
,
filePath
);
mOperationGroupMasterLogic
.
createOperationGroupMasterListJson
(
filePath
);
mOperationGroupMasterLogic
.
createOperationGroupMasterRelationListJson
(
filePath
);
mPushMessageLogic
.
createOperationPushMessageListJson
(
filePath
);
}
public
void
screenRefresh
()
{
runOnUiThread
(
new
Runnable
()
{
@Override
public
void
run
()
{
try
{
createJsonForOperationList
(
getCacheDir
().
getAbsolutePath
());
mCheckWebView
.
loadUrl
(
"javascript:CHK.initReportApp();"
);
}
catch
(
Exception
e
)
{
Logger
.
d
(
"Update error"
);
}
}
});
}
}
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/home/helper/HomeOperationListHelper.java
View file @
ac488c42
...
...
@@ -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
);
}
}
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/home/helper/OperationGroupMasterListHelper.java
View file @
ac488c42
...
...
@@ -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
();
}
}
}
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/home/helper/OperationListHelper.java
View file @
ac488c42
...
...
@@ -69,7 +69,7 @@ public abstract class OperationListHelper {
abstract
protected
List
<
OperationDto
>
findOperationList
()
throws
Exception
;
p
rivate
List
<
OperationDto
>
filterOperationList
()
{
p
ublic
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
*/
...
...
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/viewer/activity/HTMLWebViewActivity.java
View file @
ac488c42
...
...
@@ -23,8 +23,20 @@ import android.widget.AdapterView.OnItemClickListener;
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
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.acms.type.AcmsApis
;
...
...
@@ -41,6 +53,8 @@ import jp.agentec.abook.abv.bl.data.dao.OperationDao;
import
jp.agentec.abook.abv.bl.download.ContentDownloader
;
import
jp.agentec.abook.abv.bl.download.ContentZipDownloadNotification
;
import
jp.agentec.abook.abv.bl.dto.OperationDto
;
import
jp.agentec.abook.abv.bl.logic.AbstractLogic
;
import
jp.agentec.abook.abv.bl.logic.OperationLogic
;
import
jp.agentec.abook.abv.cl.util.ContentLogUtil
;
import
jp.agentec.abook.abv.launcher.android.R
;
import
jp.agentec.abook.abv.ui.common.activity.ShowPushMessageDailogActivity
;
...
...
@@ -74,6 +88,8 @@ public class HTMLWebViewActivity extends ParentWebViewActivity {
private
JsInf
jsInf
=
new
JsInf
();
private
ValueCallback
<
Uri
[]>
mUploadMessage
;
private
OperationLogic
mOperationLogic
=
AbstractLogic
.
getLogic
(
OperationLogic
.
class
);
@Override
public
void
onCreate
(
Bundle
savedInstanceState
)
{
Logger
.
i
(
TAG
,
"onCreate"
);
...
...
@@ -122,8 +138,41 @@ public class HTMLWebViewActivity extends ParentWebViewActivity {
settings
.
setAllowFileAccessFromFileURLs
(
true
);
//Android7利用で警告ダイヤログ表示問題対応
//ターゲットバージョン30以上からデフォルトがfalseに設定されている問題対応
settings
.
setAllowFileAccess
(
true
);
settings
.
setAllowContentAccess
(
true
);
settings
.
setAllowUniversalAccessFromFileURLs
(
true
);
settings
.
setMixedContentMode
(
WebSettings
.
MIXED_CONTENT_ALWAYS_ALLOW
);
webView
.
setDownloadListener
(
new
DownloadListener
()
{
@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
);
//fl.setVisibility(View.GONE);
// ***** 戻るボタン
closeButton
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
...
...
@@ -398,11 +447,13 @@ public class HTMLWebViewActivity extends ParentWebViewActivity {
printButtonActivityControl
();
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
)
||
ContentJSON
.
KEY_OBJECTVR_TYPE
.
equals
(
mContentDto
.
contentType
)
||
ContentJSON
.
KEY_OTHER_TYPE
.
equals
(
mContentDto
.
contentType
))
{
closeButton
.
setBackgroundResource
(
R
.
drawable
.
btn_first_back
);
btnLinkOriginalBack
.
setVisibility
(
View
.
VISIBLE
);
btnWebBack
.
setVisibility
(
View
.
GONE
);
...
...
@@ -428,6 +479,7 @@ public class HTMLWebViewActivity extends ParentWebViewActivity {
subMenuBtn
.
setVisibility
(
View
.
GONE
);
}
}
else
{
configureRemote
();
}
if
(
meetingManager
.
isCollaboration
())
{
...
...
@@ -479,6 +531,15 @@ public class HTMLWebViewActivity extends ParentWebViewActivity {
public
void
openEditPage
()
{
commonOpenEditPage
();
}
@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
...
...
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/viewer/activity/HTMLXWalkWebViewActivity.java
View file @
ac488c42
...
...
@@ -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,11 +34,17 @@ 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
;
...
...
@@ -123,6 +137,36 @@ public class HTMLXWalkWebViewActivity extends ParentWebViewActivity {
if
(
Logger
.
isDebugEnabled
())
{
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
);
...
...
gradle.properties
View file @
ac488c42
...
...
@@ -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://check
130.agentec.jp
/acms
download_server_address
=
https://check
130.agentec.jp
/acms
#syncview server
websocket_server_http_url
=
https://check
dev1
.agentec.jp/v1
websocket_server_ws_url
=
wss://check
dev1
.agentec.jp/v1
websocket_server_http_url
=
https://check
130
.agentec.jp/v1
websocket_server_ws_url
=
wss://check
130
.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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment