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
d55b2e19
Commit
d55b2e19
authored
Nov 29, 2019
by
Lee Jaebin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#36065 営業日を過ぎた場合、前日の報告を削除するため、同期ボタンを活性化する処理追加
parent
abbdc0d5
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
29 additions
and
21 deletions
+29
-21
ABVJE_BL/src/jp/agentec/abook/abv/bl/logic/OperationLogic.java
+18
-19
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/home/activity/OperationListActivity.java
+1
-1
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/home/helper/OperationListHelper.java
+10
-1
No files found.
ABVJE_BL/src/jp/agentec/abook/abv/bl/logic/OperationLogic.java
View file @
d55b2e19
...
...
@@ -1044,9 +1044,9 @@ public class OperationLogic extends AbstractLogic {
/**
* 作業毎に情報更新ボタンを表示するため、NeedSyncFlgをセットする。
* @param operationDto 作業情報
* @param syncedDate
定期点検のみ利用で、
最後に情報更新した日付
* @param syncedDate 最後に情報更新した日付
*/
public
void
updateOperationNeedSyncFlg
(
OperationDto
operationDto
,
String
syncedDate
)
{
public
void
updateOperationNeedSyncFlg
(
OperationDto
operationDto
,
Date
syncedDate
)
{
//情報更新が既に表示状態は何もしない
if
(
operationDto
.
needSyncFlg
)
{
return
;
...
...
@@ -1058,22 +1058,18 @@ public class OperationLogic extends AbstractLogic {
mTaskReportDao
.
isExistUpdateTargetHotSpotTaskData
(
operationDto
.
operationId
))
{
updateFlg
=
true
;
}
//情報更新ボタンの仕様変更で以下の処理はコメント(復活する可能性がするため)
// //定期点検のみ同期ボタンタップの日付と現在の日付が異なる且つ、作業するデータが存在しない場合
// if (operationDto.reportType == Constant.ReportType.RoutineTask) {
// if (StringUtil.isNullOrEmpty(operationDto.reportPeriod) && !syncedDate.equals(DateTimeUtil.toString(DateTimeUtil.getCurrentSqlDate(), DateTimeFormat.yyyyMMdd_none))) {
// //営業時間以後、情報更新可能とする。
// if (checkServiceOptionOperaionChangeTime()) {
// updateFlg = true;
// }
// }
// }
//情報更新ボタンの仕様変更(定期点検のみ、データがない場合は情報更新ボタン表示)
// 定期点検の場合
if
(
operationDto
.
reportType
==
Constant
.
ReportType
.
RoutineTask
)
{
if
(
StringUtil
.
isNullOrEmpty
(
operationDto
.
reportPeriod
))
{
updateFlg
=
true
;
}
}
else
{
// 定期点検以外
// 同期処理を行った日付が営業日を超えているかチェック
if
(
syncedDate
!=
null
&&
checkServiceOptionOperaionChangeTime
(
syncedDate
))
{
updateFlg
=
true
;
}
}
if
(
updateFlg
)
{
...
...
@@ -1637,9 +1633,10 @@ public class OperationLogic extends AbstractLogic {
/**
* サービスオプション「営業日変更時間」をチェックして、情報更新可否を判断
* @param syncedDate 最終同期日付
* @return true : 情報更新可能、false:情報更新不可
*/
public
boolean
checkServiceOptionOperaionChangeTime
()
{
public
boolean
checkServiceOptionOperaionChangeTime
(
Date
syncedDate
)
{
String
operationChangeTime
=
ABVDataCache
.
getInstance
().
serviceOption
.
operationChangeTime
();
String
[]
timeArray
=
operationChangeTime
.
split
(
":"
,
0
);
...
...
@@ -1649,17 +1646,19 @@ public class OperationLogic extends AbstractLogic {
int
hour
=
Integer
.
valueOf
(
timeArray
[
0
]);
//時間
int
minute
=
Integer
.
valueOf
(
timeArray
[
1
]);
//分
Calendar
calender
=
Calendar
.
getInstance
();
// 現在日付
Date
nowDate
=
calender
.
getTime
();
calender
.
set
(
Calendar
.
MINUTE
,
minute
);
calender
.
set
(
Calendar
.
HOUR_OF_DAY
,
hour
);
calender
.
set
(
Calendar
.
SECOND
,
0
);
Date
operationChageDate
=
calender
.
getTime
();
// 現在の日付の営業時間でセット
Date
businessDate
=
calender
.
getTime
();
//現在の時間が営業時間より未来の場合、情報更新状態にする。
if
(
nowDate
.
after
(
operationChageDate
))
{
// 同期処理を行った日付が営業日が過去で
// 現在の時間が営業時間より未来の場合、情報更新状態にする。
if
(
syncedDate
.
before
(
businessDate
)
&&
nowDate
.
after
(
businessDate
))
{
return
true
;
}
return
false
;
...
...
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/home/activity/OperationListActivity.java
View file @
d55b2e19
...
...
@@ -753,8 +753,8 @@ public class OperationListActivity extends ABVUIActivity {
showSimpleAlertDialog
(
getString
(
R
.
string
.
app_name
),
dialogMsg
);
}
}
putUserPref
(
String
.
format
(
AppDefType
.
UserPrefKey
.
SYNCED_OPERATION_ID
,
operationId
),
DateTimeUtil
.
toString
(
DateTimeUtil
.
getCurrentSqlDate
(),
DateTimeFormat
.
yyyyMMdd_none
));
}
putUserPref
(
String
.
format
(
AppDefType
.
UserPrefKey
.
SYNCED_OPERATION_ID
,
operationId
),
DateTimeUtil
.
toString
(
DateTimeUtil
.
getCurrentSqlDate
(),
DateTimeFormat
.
yyyyMMddHHmmss_slash
));
}
catch
(
AcmsException
e
)
{
//noinspection EnumSwitchStatementWhichMissesCases
switch
(
e
.
getCode
())
{
...
...
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/home/helper/OperationListHelper.java
View file @
d55b2e19
...
...
@@ -12,6 +12,7 @@ import com.handmark.pulltorefresh.library.PullToRefreshGridView;
import
com.handmark.pulltorefresh.library.PullToRefreshListView
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.List
;
import
jp.agentec.abook.abv.bl.common.log.Logger
;
...
...
@@ -30,6 +31,9 @@ import jp.agentec.abook.abv.ui.home.activity.OperationListActivity;
import
jp.agentec.abook.abv.ui.home.adapter.AbstractOperationAdapter
;
import
jp.agentec.abook.abv.ui.home.adapter.OperationListAdapter
;
import
jp.agentec.abook.abv.ui.home.adapter.OperationPanelAdapter
;
import
jp.agentec.adf.util.DateTimeFormat
;
import
jp.agentec.adf.util.DateTimeUtil
;
import
jp.agentec.adf.util.StringUtil
;
import
static
jp
.
agentec
.
abook
.
abv
.
bl
.
acms
.
type
.
OperationType
.
PANO
;
import
static
jp
.
agentec
.
abook
.
abv
.
cl
.
util
.
PreferenceUtil
.
getUserPref
;
...
...
@@ -67,7 +71,12 @@ public class OperationListHelper {
operationDtoList
=
mOperationLogic
.
getRefreshOperation
(
mAppActivity
.
mSearchWord
,
mAppActivity
.
mStartDateStr
,
mAppActivity
.
mEndDateStr
,
reportTypeStr
);
for
(
OperationDto
operationDto
:
operationDtoList
)
{
String
syncedDate
=
getUserPref
(
mAppActivity
,
String
.
format
(
AppDefType
.
UserPrefKey
.
SYNCED_OPERATION_ID
,
operationDto
.
operationId
),
""
);
// 該当する作業の最後に同期した日付を取得
String
syncedDateStr
=
getUserPref
(
mAppActivity
,
String
.
format
(
AppDefType
.
UserPrefKey
.
SYNCED_OPERATION_ID
,
operationDto
.
operationId
),
""
);
Date
syncedDate
=
null
;
if
(!
StringUtil
.
isNullOrEmpty
(
syncedDateStr
))
{
syncedDate
=
DateTimeUtil
.
toDate
(
syncedDateStr
,
DateTimeFormat
.
yyyyMMddHHmmss_slash
);
}
mOperationLogic
.
updateOperationNeedSyncFlg
(
operationDto
,
syncedDate
);
}
}
catch
(
Exception
e
)
{
...
...
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