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
dd7aa92d
Commit
dd7aa92d
authored
Mar 25, 2019
by
Jeong Gilmo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#32861 作業情報追加(Android)
- CMSとの連携対応の修正
parent
e99ccc62
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
82 additions
and
25 deletions
+82
-25
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/common/activity/ABVContentViewActivity.java
+35
-24
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/home/helper/ABookCheckWebViewHelper.java
+9
-0
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/home/helper/ActivityHandlingHelper.java
+37
-1
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/viewer/activity/CheckOZDViewActivity.java
+1
-0
No files found.
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/common/activity/ABVContentViewActivity.java
View file @
dd7aa92d
...
...
@@ -73,6 +73,7 @@ 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
;
import
jp.agentec.abook.abv.ui.viewer.activity.CheckOZDViewActivity
;
import
jp.agentec.abook.abv.ui.viewer.activity.HTMLWebViewActivity
;
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.foxitPdf.FoxitPdfCore
;
...
...
@@ -135,14 +136,13 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
// #32861 作業情報追加 start
public
int
mButtonStatus
;
// 保存ボタンチェック
protected
boolean
mLocalSave
;
// 一時保存情報
protected
boolean
mAddReport
;
// 作業追加区分
// #32861 作業情報追加 end
@Override
protected
void
onCreate
(
Bundle
savedInstanceState
)
{
super
.
onCreate
(
savedInstanceState
);
Intent
intent
=
getIntent
();
contentId
=
intent
.
getLongExtra
(
ABookKeys
.
CONTENT_ID
,
0
);
contentType
=
intent
.
getStringExtra
(
ABookKeys
.
CONTENT_TYPE
);
...
...
@@ -674,8 +674,8 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
});
alertDialog
.
show
();
}
else
{
putUserPref
(
AppDefType
.
UserPrefKey
.
SYNC_TARGET_OPERATION_ID
,
mOperationId
);
finishActivity
();
// 作業終了する時、作業ID設定して作業一覧で使用するメソットを行う。
operationFinish
();
}
}
});
...
...
@@ -764,8 +764,8 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
});
alertDialog
.
show
();
}
else
{
putUserPref
(
AppDefType
.
UserPrefKey
.
SYNC_TARGET_OPERATION_ID
,
mOperationId
);
finishActivity
();
// 作業終了する時、作業ID設定して作業一覧で使用するメソットを行う。
operationFinish
();
}
}
...
...
@@ -877,7 +877,6 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
if
(
StringUtil
.
equalsAny
(
mCmd
,
ABookKeys
.
CMD_MOVE_HOT_SPOT
,
ABookKeys
.
CMD_INSERT_TASK_REPORT
,
ABookKeys
.
CMD_UPDATE_TASK_REPORT
,
ABookKeys
.
CMD_DELETE_TASK_REPORT
,
ABookKeys
.
CMD_CANCEL_TASK_REPORT
,
ABookKeys
.
CMD_LOCAL_SAVE_TASK_REPORT
))
{
boolean
isError
=
false
;
try
{
if
(
StringUtil
.
equalsAny
(
mCmd
,
ABookKeys
.
CMD_INSERT_TASK_REPORT
,
ABookKeys
.
CMD_UPDATE_TASK_REPORT
))
{
...
...
@@ -924,11 +923,19 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
final
boolean
isError
=
(
boolean
)
ret
;
closeProgressPopup
();
// #32861 作業情報追加 start
// HTML側からのコール(insertTaskReport, updateTaskReport, deleteTaskReport, cancelTaskReport)と
// 作業追加区分(mAddReport)がなしと
// エラーがなしの場合
// 現在画面を閉じる
// その以外の場合コールバック処理のみ行う。
if
(
StringUtil
.
equalsAny
(
mCmd
,
ABookKeys
.
CMD_INSERT_TASK_REPORT
,
ABookKeys
.
CMD_UPDATE_TASK_REPORT
,
ABookKeys
.
CMD_DELETE_TASK_REPORT
,
ABookKeys
.
CMD_CANCEL_TASK_REPORT
)
&&
!
mAddReport
)
{
f
inish
();
}
else
{
ABookKeys
.
CMD_DELETE_TASK_REPORT
,
ABookKeys
.
CMD_CANCEL_TASK_REPORT
)
&&
!
mAddReport
&&
!
isError
)
{
operationF
inish
();
}
else
{
afterABookCheckApi
(
mCmd
,
mTaskKey
,
0
,
""
,
null
,
isOperationPdf
());
if
(!
isError
)
{
// エラーがない場合のみ画面遷移処理を行う。
doneProcess
();
}
}
// #32861 作業情報追加 end
return
null
;
...
...
@@ -964,6 +971,7 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
}
else
if
(
mCmd
.
equals
(
ABookKeys
.
CMD_SHOW_REPORT_OZD
))
{
mReportFileName
=
abookCheckParam
.
get
(
ABookKeys
.
REPORT_FILE_NAME
);
// #32926 作業報告画面改善 start
boolean
mLocalSave
=
false
;
// 一時保存情報
if
(
abookCheckParam
.
containsKey
(
ABookKeys
.
LOCAL_SAVE
))
{
mLocalSave
=
Integer
.
parseInt
(
abookCheckParam
.
get
(
ABookKeys
.
LOCAL_SAVE
))
>
0
?
true
:
false
;
}
...
...
@@ -1218,7 +1226,6 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
// 実行Javascript - 保存
ActivityHandlingHelper
.
getInstance
().
callOzdHtmlScript
(
"javascript:CHK.saveOzReport()"
);
Logger
.
d
(
TAG
,
"ozdSaveProcess"
);
doneProcess
();
}
});
}
...
...
@@ -1255,7 +1262,6 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
// 実行Javascript - 閉じる
ActivityHandlingHelper
.
getInstance
().
callOzdHtmlScript
(
"javascript:CHK.deleteOzReport()"
);
Logger
.
d
(
TAG
,
"ozdDeleteProcess"
);
doneProcess
();
}
});
}
...
...
@@ -1265,11 +1271,10 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
ActivityHandlingHelper
.
getInstance
().
finishAllContentViewActivity
();
// 一覧画面に遷移
}
// 押したボタンによってHTML側の処理を行う
public
void
doProcess
()
{
// 押したボタンによってHTML側の処理を行う
if
(
this
instanceof
CheckOZDViewActivity
)
{
if
(
mButtonStatus
==
R
.
id
.
btn_close
)
{
super
.
finish
();
ozdCancelProcess
();
// 閉じる
}
else
if
(
mButtonStatus
==
R
.
id
.
btn_temp_save
)
{
ozdLocalSaveProcess
();
// 一時保存
...
...
@@ -1281,17 +1286,23 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
}
}
// 押したボタンによってHTML側の処理が終わった後の処理を行う
public
void
doneProcess
()
{
// 押したボタンによってHTML側の処理が終わった後の処理を行う
if
(
this
instanceof
CheckOZDViewActivity
)
{
if
(
mButtonStatus
==
R
.
id
.
btn_save
||
mButtonStatus
==
R
.
id
.
btn_close
||
mButtonStatus
==
R
.
id
.
btn_delete
){
// 作業追加区分ありの場合
if
(
mAddReport
)
{
super
.
finish
();
}
else
{
goToMain
();
// 一覧画面に遷移
}
}
// 作業追加区分ありの場合
if
(
ActivityHandlingHelper
.
getInstance
().
searchActivityStack
()
&&
mAddReport
)
{
ActivityHandlingHelper
.
getInstance
().
selectedActivityClose
();
// 現在画面を閉じる
}
else
{
operationFinish
();
// 現在画面を閉じる
}
}
// 作業終了する時、作業ID設定して作業一覧で使用するメソット
public
void
operationFinish
()
{
putUserPref
(
AppDefType
.
UserPrefKey
.
SYNC_TARGET_OPERATION_ID
,
mOperationId
);
if
(
ActivityHandlingHelper
.
getInstance
().
searchActivityStack
())
{
goToMain
();
// 一覧画面に遷移
}
else
{
finishActivity
();
// 開いてる画面を閉じる
}
}
// #32861 作業情報追加 end
...
...
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/home/helper/ABookCheckWebViewHelper.java
View file @
dd7aa92d
...
...
@@ -33,6 +33,7 @@ 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.ABVContentViewActivity
;
import
jp.agentec.abook.abv.ui.viewer.activity.CheckOZDViewActivity
;
import
jp.agentec.adf.util.DateTimeFormat
;
import
jp.agentec.adf.util.DateTimeUtil
;
import
jp.agentec.adf.util.FileUtil
;
...
...
@@ -74,6 +75,13 @@ public class ABookCheckWebViewHelper extends ABookHelper {
int
taskReportSendId
=
0
;
mFinishCallback
=
finishCallback
;
// #32861 start
// ActivityであるClassからCheckOZDViewActivityを確認してContextの値を変更する。
if
(
ActivityHandlingHelper
.
getInstance
().
searchActivityStack
())
{
context
=
(
ABVContentViewActivity
)
ActivityHandlingHelper
.
getInstance
().
selectedAtivityContext
();
}
// #32861 end
switch
(
cmd
)
{
case
ABookKeys
.
CMD_INSERT_TASK_REPORT
:
insertOrUpdateTaskReport
(
taskKey
,
enableReportHistory
,
operationId
,
contentId
,
param
,
contentPath
,
true
,
reportType
,
taskReportLevel
);
...
...
@@ -163,6 +171,7 @@ public class ABookCheckWebViewHelper extends ABookHelper {
public
void
run
()
{
OperationDto
operationDto
=
mOperationLogic
.
getOperation
(
operationId
);
boolean
isError
=
false
;
try
{
mOperationLogic
.
updateSyncOperation
(
operationId
,
true
);
if
(
mOperationLogic
.
sendTaskReportSendData
(
operationId
,
taskKey
,
taskReportLevel
,
progressCallback
))
{
...
...
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/home/helper/ActivityHandlingHelper.java
View file @
dd7aa92d
...
...
@@ -1600,7 +1600,6 @@ public class ActivityHandlingHelper extends ABookHelper implements RemoteObserve
public
void
callOzdHtmlScript
(
String
url
)
{
if
(!
currentActivityStack
.
isEmpty
())
{
for
(
final
ABVAuthenticatedActivity
activity
:
currentActivityStack
)
{
final
ABVAuthenticatedActivity
a
=
activity
;
final
String
scriptUrl
=
url
;
if
(
activity
instanceof
HTMLWebViewActivity
)
{
((
HTMLWebViewActivity
)
activity
).
callViewLoadUrl
(
scriptUrl
);
...
...
@@ -1608,5 +1607,42 @@ public class ActivityHandlingHelper extends ABookHelper implements RemoteObserve
}
}
}
// ActivityであるClassからCheckOZDViewActivityを確認する処理
public
boolean
searchActivityStack
()
{
if
(!
currentActivityStack
.
isEmpty
())
{
for
(
final
ABVAuthenticatedActivity
activity
:
currentActivityStack
)
{
if
(
activity
instanceof
CheckOZDViewActivity
)
{
return
true
;
}
}
}
return
false
;
}
// ActivityであるClassからCheckOZDViewActivityを確認して画面を閉じる処理
public
void
selectedActivityClose
()
{
if
(!
currentActivityStack
.
isEmpty
())
{
for
(
final
ABVAuthenticatedActivity
activity
:
currentActivityStack
)
{
if
(
activity
instanceof
CheckOZDViewActivity
)
{
((
CheckOZDViewActivity
)
activity
).
finishActivity
();
}
}
}
}
public
Context
selectedAtivityContext
()
{
Context
context
=
null
;
if
(!
currentActivityStack
.
isEmpty
())
{
for
(
final
ABVAuthenticatedActivity
activity
:
currentActivityStack
)
{
if
(
activity
instanceof
CheckOZDViewActivity
)
{
context
=
((
CheckOZDViewActivity
)
activity
);
return
context
;
}
}
}
return
context
;
}
// #32861 end
}
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/viewer/activity/CheckOZDViewActivity.java
View file @
dd7aa92d
...
...
@@ -77,6 +77,7 @@ public class CheckOZDViewActivity extends ABVContentViewActivity {
// #32926 作業報告画面改善 start
private
int
mTaskReportLevel
;
// 作業報告レベル
boolean
mIsOzFilePath
;
// 削除処理のフラグ
boolean
mLocalSave
;
// 一時保存フラグ
// #32926 作業報告画面改善 end
@Override
...
...
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