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
cf89955c
Commit
cf89955c
authored
Apr 16, 2019
by
Lee Jaebin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#33433 報告(回答)で、同期後に所属グループを変更すると、プレビュー表示にならない(errorCode : P006対応)
parent
f2866eb6
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
64 additions
and
46 deletions
+64
-46
ABVJE_BL/src/jp/agentec/abook/abv/bl/acms/client/AcmsClient.java
+7
-4
ABVJE_BL/src/jp/agentec/abook/abv/bl/common/exception/ABVExceptionCode.java
+5
-1
ABVJE_BL/src/jp/agentec/abook/abv/bl/logic/OperationLogic.java
+6
-2
ABVJE_Res_Default_Android/res/values-ja/strings.xml
+2
-1
ABVJE_Res_Default_Android/res/values-ko/strings.xml
+2
-1
ABVJE_Res_Default_Android/res/values/strings.xml
+2
-1
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/home/activity/OperationListActivity.java
+9
-7
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/home/helper/ABookCheckWebViewHelper.java
+31
-29
No files found.
ABVJE_BL/src/jp/agentec/abook/abv/bl/acms/client/AcmsClient.java
View file @
cf89955c
...
...
@@ -564,16 +564,19 @@ public class AcmsClient implements AcmsClientResponseListener {
if
(
json
.
errorMessage
!=
null
)
{
if
(
json
.
errorMessage
[
0
].
equals
(
"P003"
))
{
throw
new
A
BVException
(
ABVExceptionCode
.
P_E_ACMS_P003
);
throw
new
A
cmsException
(
ABVExceptionCode
.
P_E_ACMS_P003
,
json
);
}
else
if
(
json
.
errorMessage
[
0
].
equals
(
"P004"
))
{
throw
new
A
BVException
(
ABVExceptionCode
.
P_E_ACMS_P004
);
throw
new
A
cmsException
(
ABVExceptionCode
.
P_E_ACMS_P004
,
json
);
}
else
if
(
json
.
errorMessage
[
0
].
equals
(
"P005"
))
{
throw
new
ABVException
(
ABVExceptionCode
.
P_E_ACMS_P005
);
throw
new
AcmsException
(
ABVExceptionCode
.
P_E_ACMS_P005
,
json
);
}
else
if
(
json
.
errorMessage
[
0
].
equals
(
"P006"
))
{
throw
new
AcmsException
(
ABVExceptionCode
.
P_E_ACMS_P006
,
json
);
}
}
if
(
json
.
httpStatus
!=
200
)
{
throw
new
AcmsException
(
ABVExceptionCode
.
S_E_ACMS_0001
,
json
);
Logger
.
e
(
"error code : "
+
json
.
httpStatus
);
throw
new
AcmsException
(
ABVExceptionCode
.
fromResponseCode
(
result
.
httpResponseCode
),
json
);
}
return
json
;
}
...
...
ABVJE_BL/src/jp/agentec/abook/abv/bl/common/exception/ABVExceptionCode.java
View file @
cf89955c
...
...
@@ -220,7 +220,11 @@ public enum ABVExceptionCode {
/**
* 定期点検、既に点検済みです。点検データ送信できません。
*/
P_E_ACMS_P005
;
P_E_ACMS_P005
,
/**
* 既に作業報告を行う権限がありません。
*/
P_E_ACMS_P006
;
/**
* HTTPレスポンスコードから対応するコードを返す
...
...
ABVJE_BL/src/jp/agentec/abook/abv/bl/logic/OperationLogic.java
View file @
cf89955c
...
...
@@ -1213,11 +1213,15 @@ public class OperationLogic extends AbstractLogic {
removeTaskReportSendIds
.
add
(
taskReportSendDto
.
taskReportSendId
);
FileUtil
.
delete
(
ABVEnvironment
.
getInstance
().
getOperationTaskReportSendDirFilePath
(
operationId
,
taskReportSendDto
.
taskKey
,
taskReportSendDto
.
taskReportSendId
));
}
catch
(
A
BV
Exception
ex
)
{
}
catch
(
A
cms
Exception
ex
)
{
if
(
ex
.
getCode
()
==
ABVExceptionCode
.
P_E_ACMS_P005
)
{
mTaskReportSendDao
.
deleteBySendId
(
taskReportSendDto
.
taskReportSendId
);
FileUtil
.
delete
(
ABVEnvironment
.
getInstance
().
getOperationTaskReportSendDirFilePath
(
operationId
,
taskReportSendDto
.
taskKey
,
taskReportSendDto
.
taskReportSendId
));
return
true
;
}
else
if
(
ex
.
getCode
()
==
ABVExceptionCode
.
P_E_ACMS_P006
)
{
mTaskReportSendDao
.
deleteBySendId
(
taskReportSendDto
.
taskReportSendId
);
FileUtil
.
delete
(
ABVEnvironment
.
getInstance
().
getOperationTaskReportSendDirFilePath
(
operationId
,
taskReportSendDto
.
taskKey
,
taskReportSendDto
.
taskReportSendId
));
taskReportDto
.
dataSendFlg
=
false
;
mTaskReportDao
.
update
(
taskReportDto
);
}
throw
ex
;
}
catch
(
Exception
ex
)
{
...
...
ABVJE_Res_Default_Android/res/values-ja/strings.xml
View file @
cf89955c
...
...
@@ -363,8 +363,9 @@
<string
name=
"P001"
>
資料名に半角カタカナは使用できません。
</string>
<string
name=
"P002"
>
既に資料が登録されています。
</string>
<string
name=
"P003"
>
この作業は新規登録・修正・削除出来ません。
</string>
<string
name=
"P004"
>
この作業はサーバで
閲覧中です。しばらく経ってから再度同期処理を
実行してください。
</string>
<string
name=
"P004"
>
この作業はサーバで
編集中です。しばらく経ってから再度
実行してください。
</string>
<string
name=
"P005"
>
既に点検済みです。点検データ送信できません。
</string>
<string
name=
"P006"
>
既に作業報告を行う権限がありません。
</string>
<string
name=
"no_ozd_viewer"
>
ビュアーが存在しません。
</string>
<string
name=
"msg_ozd_save_fail"
>
ドキュメント保存に失敗しました。もう一度保存してください
</string>
...
...
ABVJE_Res_Default_Android/res/values-ko/strings.xml
View file @
cf89955c
...
...
@@ -365,8 +365,9 @@
<string
name=
"P001"
>
자료명에 반각가타가나는 사용할 수 없습니다.
</string>
<string
name=
"P002"
>
이미 자료가 등록되어 있습니다.
</string>
<string
name=
"P003"
>
이 작업은 신규등록, 수정, 삭제를 할 수 없습니다.
</string>
<string
name=
"P004"
>
이 작업은 서버에서 관람중입니다. 약간 시간이 경과한 뒤에 다시 동기를
해 주세요.
</string>
<string
name=
"P004"
>
해당 작업은 서버에서 편집 중이므로 잠시 후 다시 실행
해 주세요.
</string>
<string
name=
"P005"
>
이미 점검이 완료된 상태입니다. 점검 데이터를 송신할 수 없습니다.
</string>
<string
name=
"P006"
>
작업 보고 권한이 없습니다.
</string>
<string
name=
"no_ozd_viewer"
>
뷰어가 존재하지 않습니다.
</string>
<string
name=
"msg_ozd_save_fail"
>
문서저장에 실패했습니다. 다시한번 저장해주세요.
</string>
...
...
ABVJE_Res_Default_Android/res/values/strings.xml
View file @
cf89955c
...
...
@@ -369,8 +369,9 @@
<string
name=
"P001"
>
Hankaku katakana can not be used for content name.
</string>
<string
name=
"P002"
>
Content has already been registered.
</string>
<string
name=
"P003"
>
Wokring can not be newly registered, modified, or deleted.
</string>
<string
name=
"P004"
>
Wokring is being viewed on the server. Please execute the synchronization process again after a while
.
</string>
<string
name=
"P004"
>
Task of this working is being edited on the server. Please try again later
.
</string>
<string
name=
"P005"
>
It is already checked. Check data can not be sent.
</string>
<string
name=
"P006"
>
You do not have job reporting permissions.
</string>
<string
name=
"no_ozd_viewer"
>
Viewer doesn\'t exist.
</string>
<string
name=
"msg_ozd_save_fail"
>
Document save failed. Please save again.
</string>
...
...
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/home/activity/OperationListActivity.java
View file @
cf89955c
...
...
@@ -2,6 +2,7 @@ package jp.agentec.abook.abv.ui.home.activity;
import
android.app.DatePickerDialog
;
import
android.app.Dialog
;
import
android.content.Context
;
import
android.content.DialogInterface
;
import
android.content.Intent
;
import
android.content.res.Configuration
;
...
...
@@ -68,6 +69,7 @@ import jp.agentec.abook.abv.bl.common.Constant.PushMessageSendType;
import
jp.agentec.abook.abv.bl.common.constant.ABookKeys
;
import
jp.agentec.abook.abv.bl.common.exception.ABVException
;
import
jp.agentec.abook.abv.bl.common.exception.ABVExceptionCode
;
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.ABVDataCache
;
...
...
@@ -727,8 +729,8 @@ public class OperationListActivity extends ABVUIActivity {
if
(
mOperationLogic
.
sendTaskReportSendData
(
operationId
,
progressCallback
))
{
// 作業報告タイプが定期点検且つ、P005のエラーの場合、以下のエラーをトーストメッセージで表示
handleErrorMessageToast
(
PatternStringUtil
.
patternToInt
(
getApplicationContext
(),
R
.
string
.
P005
,
getUserPref
(
AppDefType
.
UserPrefKey
.
RESOURCE_PATTERN_TYPE
,
0
)));
R
.
string
.
P005
,
getUserPref
(
AppDefType
.
UserPrefKey
.
RESOURCE_PATTERN_TYPE
,
0
)));
}
progressDialogHorizontal
.
setProgress
(
60
);
...
...
@@ -758,7 +760,7 @@ public class OperationListActivity extends ABVUIActivity {
}
putUserPref
(
String
.
format
(
AppDefType
.
UserPrefKey
.
SYNCED_OPERATION_ID
,
operationId
),
DateTimeUtil
.
toString
(
DateTimeUtil
.
getCurrentSqlDate
(),
DateTimeFormat
.
yyyyMMdd_none
));
}
}
catch
(
A
BV
Exception
e
)
{
}
catch
(
A
cms
Exception
e
)
{
//noinspection EnumSwitchStatementWhichMissesCases
switch
(
e
.
getCode
())
{
case
P_E_ACMS_P003:
...
...
@@ -772,12 +774,12 @@ public class OperationListActivity extends ABVUIActivity {
R
.
string
.
P004
,
getUserPref
(
AppDefType
.
UserPrefKey
.
RESOURCE_PATTERN_TYPE
,
0
)));
break
;
case
S_E_ACMS_0500
:
handleErrorMessageToast
(
ABVExceptionCode
.
S_E_ACMS_0500
);
case
P_E_ACMS_P006
:
showSimpleAlertDialog
(
R
.
string
.
app_name
,
R
.
string
.
P006
);
break
;
default
:
Logger
.
e
(
TAG
,
"syncOperation"
,
e
);
handleErrorMessageToast
(
Error
Code
.
E107
);
handleErrorMessageToast
(
Error
Message
.
getErrorCode
(
e
)
);
break
;
}
}
catch
(
Exception
e
)
{
...
...
@@ -785,7 +787,7 @@ public class OperationListActivity extends ABVUIActivity {
handler
.
post
(
new
Runnable
()
{
@Override
public
void
run
()
{
ABVToastUtil
.
showMakeText
(
OperationListActivity
.
this
,
getResources
().
getString
(
ErrorCode
.
E107
.
resId
),
Toast
.
LENGTH_SHORT
);
handleErrorMessageToast
(
ABVExceptionCode
.
S_E_ACMS_0001
);
closeProgressPopup
();
}
});
...
...
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/home/helper/ABookCheckWebViewHelper.java
View file @
cf89955c
...
...
@@ -25,6 +25,8 @@ import jp.agentec.abook.abv.bl.common.CommonExecutor;
import
jp.agentec.abook.abv.bl.common.Constant
;
import
jp.agentec.abook.abv.bl.common.constant.ABookKeys
;
import
jp.agentec.abook.abv.bl.common.exception.ABVException
;
import
jp.agentec.abook.abv.bl.common.exception.ABVExceptionCode
;
import
jp.agentec.abook.abv.bl.common.exception.AcmsException
;
import
jp.agentec.abook.abv.bl.common.log.Logger
;
import
jp.agentec.abook.abv.bl.dto.OperationDto
;
import
jp.agentec.abook.abv.bl.dto.OperationTaskDto
;
...
...
@@ -35,6 +37,8 @@ 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.common.appinfo.AppDefType
;
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.util.PatternStringUtil
;
import
jp.agentec.abook.abv.ui.common.util.ABVToastUtil
;
import
jp.agentec.adf.util.DateTimeFormat
;
...
...
@@ -178,40 +182,38 @@ public class ABookCheckWebViewHelper extends ABookHelper {
try
{
mOperationLogic
.
updateSyncOperation
(
operationId
,
true
);
if
(
mOperationLogic
.
sendTaskReportSendData
(
operationId
,
taskKey
,
taskReportLevel
,
progressCallback
))
{
// リソースパターンの適用
context
.
handleErrorMessageToast
(
PatternStringUtil
.
patternToInt
(
context
,
R
.
string
.
P005
,
getUserPref
(
context
,
AppDefType
.
UserPrefKey
.
RESOURCE_PATTERN_TYPE
,
0
)));
mOperationLogic
.
sendTaskReportSendData
(
operationId
,
taskKey
,
taskReportLevel
,
progressCallback
);
}
catch
(
AcmsException
ex
)
{
//noinspection EnumSwitchStatementWhichMissesCases
switch
(
ex
.
getCode
())
{
case
P_E_ACMS_P003:
// リソースパターンを適用
context
.
showSimpleAlertDialog
(
R
.
string
.
app_name
,
PatternStringUtil
.
patternToInt
(
context
,
R
.
string
.
P003
,
getUserPref
(
context
,
AppDefType
.
UserPrefKey
.
RESOURCE_PATTERN_TYPE
,
0
)));
break
;
case
P_E_ACMS_P004:
context
.
showSimpleAlertDialog
(
R
.
string
.
app_name
,
PatternStringUtil
.
patternToInt
(
context
,
R
.
string
.
P004
,
getUserPref
(
context
,
AppDefType
.
UserPrefKey
.
RESOURCE_PATTERN_TYPE
,
0
)));
break
;
case
P_E_ACMS_P005:
context
.
showSimpleAlertDialog
(
PatternStringUtil
.
patternToInt
(
context
,
R
.
string
.
app_name
,
getUserPref
(
context
,
AppDefType
.
UserPrefKey
.
RESOURCE_PATTERN_TYPE
,
0
)),
PatternStringUtil
.
patternToInt
(
context
,
R
.
string
.
P005
,
getUserPref
(
context
,
AppDefType
.
UserPrefKey
.
RESOURCE_PATTERN_TYPE
,
0
)));
break
;
case
P_E_ACMS_P006:
context
.
showSimpleAlertDialog
(
R
.
string
.
app_name
,
R
.
string
.
P006
);
break
;
default
:
context
.
handleErrorMessageToast
(
ErrorMessage
.
getErrorCode
(
ex
));
break
;
}
}
catch
(
ABVException
ex
)
{
Logger
.
e
(
TAG
,
"sendTaskData"
,
ex
);
// if (isDirections) {
// context.showSimpleAlertDialog(R.string.app_name, R.string.msg_send_error_task_directions_data);
// } else {
// リソースパターンの適用
context
.
showSimpleAlertDialog
(
PatternStringUtil
.
patternToInt
(
context
,
R
.
string
.
app_name
,
getUserPref
(
context
,
AppDefType
.
UserPrefKey
.
RESOURCE_PATTERN_TYPE
,
0
)),
PatternStringUtil
.
patternToInt
(
context
,
R
.
string
.
msg_send_error_task_report_data
,
getUserPref
(
context
,
AppDefType
.
UserPrefKey
.
RESOURCE_PATTERN_TYPE
,
0
)));
// }
isError
=
true
;
}
catch
(
Exception
e
)
{
Logger
.
e
(
TAG
,
e
);
// if (isDirections) {
// context.showSimpleAlertDialog(R.string.app_name, R.string.msg_send_error_task_directions_data);
// } else {
// リソースパターンの適用
context
.
showSimpleAlertDialog
(
PatternStringUtil
.
patternToInt
(
context
,
R
.
string
.
app_name
,
getUserPref
(
context
,
AppDefType
.
UserPrefKey
.
RESOURCE_PATTERN_TYPE
,
0
)),
PatternStringUtil
.
patternToInt
(
context
,
R
.
string
.
msg_send_error_task_report_data
,
getUserPref
(
context
,
AppDefType
.
UserPrefKey
.
RESOURCE_PATTERN_TYPE
,
0
)));
// }
context
.
handleErrorMessageToast
(
ABVExceptionCode
.
S_E_ACMS_0001
);
isError
=
true
;
}
finally
{
mFinishCallback
.
callback
(
isError
);
...
...
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