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
136c8a58
Commit
136c8a58
authored
May 28, 2019
by
Kim Jinsung
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#33772 定期点検の営業日更新対応
parent
7125dce7
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
215 additions
and
168 deletions
+215
-168
ABVJE_BL/src/jp/agentec/abook/abv/bl/acms/type/ServiceOption.java
+7
-0
ABVJE_BL/src/jp/agentec/abook/abv/bl/data/ABVDataCache.java
+129
-124
ABVJE_BL/src/jp/agentec/abook/abv/bl/logic/OperationLogic.java
+69
-12
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/home/adapter/OperationListAdapter.java
+3
-16
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/home/adapter/OperationPanelAdapter.java
+2
-16
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/home/helper/OperationListHelper.java
+5
-0
No files found.
ABVJE_BL/src/jp/agentec/abook/abv/bl/acms/type/ServiceOption.java
View file @
136c8a58
...
...
@@ -147,5 +147,11 @@ public interface ServiceOption {
* 報告タイプ:N(通常)、Y(定期点検)
*/
int
OperationReportType
=
171
;
/**
* 営業日変更時間
*/
int
OperationChangeTime
=
173
;
}
}
\ No newline at end of file
ABVJE_BL/src/jp/agentec/abook/abv/bl/data/ABVDataCache.java
View file @
136c8a58
...
...
@@ -25,14 +25,14 @@ import jp.agentec.adf.util.StringUtil;
// TODO: clone()使っているところは不要なので次のバージョンアップのタイミングで取る
public
class
ABVDataCache
{
private
static
final
String
TAG
=
"Cache"
;
private
static
ABVDataCache
instance
=
null
;
public
ServiceOption
serviceOption
=
null
;
private
MemberInfoDto
memberInfoDto
=
null
;
private
List
<
ServiceOptionDto
>
serviceOptionDtoList
=
null
;
private
String
urlPath
;
private
Integer
diffMinFromUTC
;
// ACMSサーバ時間におけるUTCから差分 deliveryStartDateUTCを含まない旧コンテンツ用に必要
...
...
@@ -53,15 +53,15 @@ public class ABVDataCache {
* @since 1.0.0
*/
private
int
defaultGroupId
=
-
1
;
public
static
synchronized
ABVDataCache
getInstance
()
{
if
(
instance
==
null
)
{
instance
=
new
ABVDataCache
();
}
return
instance
;
}
private
ABVDataCache
()
{
serviceOption
=
new
ServiceOption
();
}
...
...
@@ -80,10 +80,10 @@ public class ABVDataCache {
}
}
}
return
null
;
}
/**
* キャッシュに格納されているユーザ情報を返します。
* @return ユーザ情報を格納した {@link MemberInfoDto} のインスタンスを返します。
...
...
@@ -99,11 +99,11 @@ public class ABVDataCache {
public
int
getDefaultCategoryId
()
{
return
defaultCategoryId
;
}
public
int
getDefaultGroupId
()
{
return
defaultGroupId
;
}
/**
* キャッシュのサービスオプション情報をキャッシュに追加します。既に同じサービスオプション情報が存在する場合は更新します。
* @param serviceOptionDto サービスオプション情報です。
...
...
@@ -129,7 +129,7 @@ public class ABVDataCache {
serviceOptionDtoList
.
add
((
ServiceOptionDto
)
serviceOptionDto
.
clone
());
}
}
public
void
addServiceOptions
(
List
<
ServiceOptionDto
>
list
)
{
if
(
list
!=
null
)
{
for
(
ServiceOptionDto
dto
:
list
)
{
...
...
@@ -137,32 +137,32 @@ public class ABVDataCache {
}
}
}
/**
* キャッシュのユーザ情報を更新します。
* @param dto 更新するユーザ情報です。
* @since 1.0.0
*/
public
void
refreshMemberInfo
(
MemberInfoDto
dto
)
{
memberInfoDto
=
dto
;
memberInfoDto
=
dto
;
}
private
void
refreshMemberInfo
()
{
MemberInfoDao
dao
=
AbstractDao
.
getDao
(
MemberInfoDao
.
class
);
memberInfoDto
=
dao
.
getMemberInfo
(
LoginStatus
.
LoggedIn
.
statusCode
());
}
public
void
refreshDefaultCategoryId
(
int
categoryId
)
{
defaultCategoryId
=
categoryId
;
}
public
void
refreshDefaultGroupId
(
int
groupId
)
{
defaultGroupId
=
groupId
;
}
public
boolean
refreshServiceOptions
()
{
boolean
refreshed
=
false
;
try
{
ServiceOptionDao
dao
=
AbstractDao
.
getDao
(
ServiceOptionDao
.
class
);
List
<
ServiceOptionDto
>
list
=
dao
.
getServiceOptions
();
...
...
@@ -177,22 +177,22 @@ public class ABVDataCache {
}
catch
(
Exception
e
)
{
Logger
.
e
(
TAG
,
"refreshServiceOptions failed."
,
e
);
}
return
refreshed
;
}
public
void
setUrlPath
(
String
urlPath
)
{
this
.
urlPath
=
urlPath
;
}
public
String
getUrlPath
()
{
boolean
firstLogin
=
false
;
if
(
memberInfoDto
==
null
)
{
try
{
MemberInfoDao
dao
=
AbstractDao
.
getDao
(
MemberInfoDao
.
class
);
MemberInfoDto
dto
=
dao
.
getMemberInfo
(
LoginStatus
.
LoggedIn
.
statusCode
());
if
(
dto
==
null
)
{
firstLogin
=
true
;
}
...
...
@@ -200,7 +200,7 @@ public class ABVDataCache {
// 何もしない
}
}
if
(
firstLogin
)
{
urlPath
=
null
;
}
else
{
...
...
@@ -208,14 +208,14 @@ public class ABVDataCache {
refreshUrlPath
();
}
}
return
urlPath
;
}
public
boolean
refreshUrlPath
()
{
boolean
refreshed
=
false
;
try
{
AcmsDao
dao
=
AbstractDao
.
getDao
(
AcmsDao
.
class
);
urlPath
=
dao
.
getUrlPath
();
...
...
@@ -223,10 +223,10 @@ public class ABVDataCache {
}
catch
(
Exception
e
)
{
Logger
.
e
(
TAG
,
"refreshUrlPath failed."
,
e
);
}
return
refreshed
;
}
/**
* キャッシュのデータを全て削除します。
* @since 1.0.0
...
...
@@ -246,107 +246,112 @@ public class ABVDataCache {
}
}
public
class
ServiceOption
{
public
boolean
isUndelivarableDelete
()
{
return
isServiceOptionEnable
(
ServiceOptionId
.
UndeliverableDelete
);
}
public
boolean
isNoAuthDelete
()
{
return
isServiceOptionEnable
(
ServiceOptionId
.
NoauthDelete
);
}
public
class
ServiceOption
{
public
boolean
isUndelivarableDelete
()
{
return
isServiceOptionEnable
(
ServiceOptionId
.
UndeliverableDelete
);
}
public
SecurityPolicyType
getForcePwChangeOnLogin
()
{
SecurityPolicyType
code
=
SecurityPolicyType
.
None
;
ServiceOptionDto
dto
=
getServiceOption
(
ServiceOptionId
.
ForcePwChangeOnLogin
);
if
(
dto
!=
null
)
{
code
=
SecurityPolicyType
.
parse
(
NumericUtil
.
parseInt
(
dto
.
val
));
}
return
code
;
}
public
SecurityPolicyType
getForcePwChangePeriodically
()
{
SecurityPolicyType
code
=
SecurityPolicyType
.
None
;
ServiceOptionDto
dto
=
getServiceOption
(
ServiceOptionId
.
ForcePwChangePeriodically
);
if
(
dto
!=
null
)
{
code
=
SecurityPolicyType
.
parse
(
NumericUtil
.
parseInt
(
dto
.
val
));
}
return
code
;
}
public
boolean
isForceLoginPeriodically
()
{
return
isServiceOptionEnable
(
ServiceOptionId
.
ForceLoginPeriodically
);
}
public
boolean
isUseridUdidOverwrite
()
{
return
isServiceOptionEnable
(
ServiceOptionId
.
UseridUdidOverwrite
);
}
public
boolean
isMarking
()
{
return
isServiceOptionEnable
(
ServiceOptionId
.
Marking
);
}
public
boolean
isNoAuthDelete
()
{
return
isServiceOptionEnable
(
ServiceOptionId
.
NoauthDelete
);
}
public
boolean
isPdfLinkDisp
()
{
return
isServiceOptionEnable
(
ServiceOptionId
.
PdfLinkDisp
);
}
public
SecurityPolicyType
getForcePwChangeOnLogin
()
{
SecurityPolicyType
code
=
SecurityPolicyType
.
None
;
public
boolean
isCatalogEdition
()
{
return
isServiceOptionEnable
(
ServiceOptionId
.
CatalogEdition
);
}
ServiceOptionDto
dto
=
getServiceOption
(
ServiceOptionId
.
ForcePwChangeOnLogin
);
public
boolean
isBizEdition
(
)
{
return
!
isServiceOptionEnable
(
ServiceOptionId
.
CatalogEdition
)
&&
!
isServiceOptionEnable
(
ServiceOptionId
.
Publisher
);
if
(
dto
!=
null
)
{
code
=
SecurityPolicyType
.
parse
(
NumericUtil
.
parseInt
(
dto
.
val
)
);
}
public
boolean
isReportGPS
()
{
return
isServiceOptionEnable
(
ServiceOptionId
.
REPORT_GPS
);
}
return
code
;
}
public
boolean
isRoutineTaskReport
()
{
return
isServiceOptionEnable
(
ServiceOptionId
.
OperationReportType
);
}
public
SecurityPolicyType
getForcePwChangePeriodically
()
{
SecurityPolicyType
code
=
SecurityPolicyType
.
None
;
public
boolean
isEnquete
()
{
return
isServiceOptionEnable
(
ServiceOptionId
.
Enquete
);
}
ServiceOptionDto
dto
=
getServiceOption
(
ServiceOptionId
.
ForcePwChangePeriodically
);
public
boolean
isExam
(
)
{
return
isServiceOptionEnable
(
ServiceOptionId
.
Exam
);
if
(
dto
!=
null
)
{
code
=
SecurityPolicyType
.
parse
(
NumericUtil
.
parseInt
(
dto
.
val
)
);
}
public
boolean
isQuiz
()
{
return
isServiceOptionEnable
(
ServiceOptionId
.
Quiz
);
}
return
code
;
}
public
boolean
isTransmitExamAtOffline
()
{
return
isServiceOptionEnable
(
ServiceOptionId
.
TransmitExamAtOfflLine
);
}
public
boolean
isForceLoginPeriodically
()
{
return
isServiceOptionEnable
(
ServiceOptionId
.
ForceLoginPeriodically
);
}
public
boolean
isUseGroup
()
{
return
isServiceOptionEnable
(
ServiceOptionId
.
UseGroup
);
}
public
boolean
isUseridUdidOverwrite
()
{
return
isServiceOptionEnable
(
ServiceOptionId
.
UseridUdidOverwrite
);
}
public
boolean
isUseGenre
()
{
return
isServiceOptionEnable
(
ServiceOptionId
.
UseGenre
);
}
public
boolean
isMarking
()
{
return
isServiceOptionEnable
(
ServiceOptionId
.
Marking
);
}
public
boolean
isPanoImage
()
{
return
isServiceOptionEnable
(
ServiceOptionId
.
PanoImage
);
}
public
boolean
isPdfLinkDisp
()
{
return
isServiceOptionEnable
(
ServiceOptionId
.
PdfLinkDisp
);
}
public
boolean
isServiceOptionEnable
(
int
serviceOptionId
)
{
ServiceOptionDto
dto
=
getServiceOption
(
serviceOptionId
);
if
(
dto
!=
null
)
{
return
ContractLogic
.
getBooleanValue
(
dto
.
val
);
}
return
false
;
public
boolean
isCatalogEdition
()
{
return
isServiceOptionEnable
(
ServiceOptionId
.
CatalogEdition
);
}
public
boolean
isBizEdition
()
{
return
!
isServiceOptionEnable
(
ServiceOptionId
.
CatalogEdition
)
&&
!
isServiceOptionEnable
(
ServiceOptionId
.
Publisher
);
}
public
boolean
isReportGPS
()
{
return
isServiceOptionEnable
(
ServiceOptionId
.
REPORT_GPS
);
}
public
boolean
isRoutineTaskReport
()
{
return
isServiceOptionEnable
(
ServiceOptionId
.
OperationReportType
);
}
public
boolean
isEnquete
()
{
return
isServiceOptionEnable
(
ServiceOptionId
.
Enquete
);
}
public
boolean
isExam
()
{
return
isServiceOptionEnable
(
ServiceOptionId
.
Exam
);
}
public
boolean
isQuiz
()
{
return
isServiceOptionEnable
(
ServiceOptionId
.
Quiz
);
}
public
boolean
isTransmitExamAtOffline
()
{
return
isServiceOptionEnable
(
ServiceOptionId
.
TransmitExamAtOfflLine
);
}
public
boolean
isUseGroup
()
{
return
isServiceOptionEnable
(
ServiceOptionId
.
UseGroup
);
}
public
boolean
isUseGenre
()
{
return
isServiceOptionEnable
(
ServiceOptionId
.
UseGenre
);
}
public
boolean
isPanoImage
()
{
return
isServiceOptionEnable
(
ServiceOptionId
.
PanoImage
);
}
public
boolean
isServiceOptionEnable
(
int
serviceOptionId
)
{
ServiceOptionDto
dto
=
getServiceOption
(
serviceOptionId
);
if
(
dto
!=
null
)
{
return
ContractLogic
.
getBooleanValue
(
dto
.
val
);
}
}
return
false
;
}
public
String
operationChangeTime
()
{
ServiceOptionDto
dto
=
getServiceOption
(
ServiceOptionId
.
OperationChangeTime
);
return
dto
.
val
;
}
}
public
void
setDiffMinFromUTC
(
String
timeZone
)
{
// UserAuthenticateLogic.getServerTimeから移行
...
...
@@ -362,14 +367,14 @@ public class ABVDataCache {
return
diffMinFromUTC
;
}
/**
* APIのURLにユーザ情報付与の特定キー作成
* @return 「事業者文字列」+「ログインID」文字列をMD5変換を返します。nullの場合もあります。
*/
public
String
getAdummyKey
()
{
if
(
getUrlPath
()
!=
null
&&
getMemberInfo
().
loginId
!=
null
)
{
return
SecurityUtil
.
getMd5Hash
(
getUrlPath
()
+
getMemberInfo
().
loginId
);
}
return
null
;
}
/**
* APIのURLにユーザ情報付与の特定キー作成
* @return 「事業者文字列」+「ログインID」文字列をMD5変換を返します。nullの場合もあります。
*/
public
String
getAdummyKey
()
{
if
(
getUrlPath
()
!=
null
&&
getMemberInfo
().
loginId
!=
null
)
{
return
SecurityUtil
.
getMd5Hash
(
getUrlPath
()
+
getMemberInfo
().
loginId
);
}
return
null
;
}
}
ABVJE_BL/src/jp/agentec/abook/abv/bl/logic/OperationLogic.java
View file @
136c8a58
...
...
@@ -10,6 +10,7 @@ import java.io.File;
import
java.io.IOException
;
import
java.security.NoSuchAlgorithmException
;
import
java.util.ArrayList
;
import
java.util.Calendar
;
import
java.util.Date
;
import
java.util.Iterator
;
import
java.util.List
;
...
...
@@ -1029,23 +1030,49 @@ public class OperationLogic extends AbstractLogic {
}
/**
*
プロジェクト一覧
取得
*
作業一覧に表示する作業情報
取得
*
* @param searchWord
* @param searchStartDateStr
* @param searchEndDateStr
* @return
* @param searchWord
検索キーワード
* @param searchStartDateStr
開始期間
* @param searchEndDateStr
終了期間
* @return
作業情報配列
*/
public
List
<
OperationDto
>
getRefreshOperation
(
String
searchWord
,
String
searchStartDateStr
,
String
searchEndDateStr
,
String
reportTypeStr
)
{
List
<
OperationDto
>
operationDtoList
;
operationDtoList
=
mOperationDao
.
getOperations
(
searchWord
,
searchStartDateStr
,
searchEndDateStr
,
reportTypeStr
);
for
(
OperationDto
operationDto
:
operationDtoList
)
{
// 作業送信フラグが存在する場合またはホットスポット更新フラグが存在する場合、needSyncFlgをtrueにセット
if
(
mTaskReportDao
.
isExistSendTaskData
(
operationDto
.
operationId
)
||
mTaskReportDao
.
isExistUpdateTargetHotSpotTaskData
(
operationDto
.
operationId
))
{
mOperationDao
.
updateNeedSyncFlg
(
operationDto
.
operationId
,
true
);
return
mOperationDao
.
getOperations
(
searchWord
,
searchStartDateStr
,
searchEndDateStr
,
reportTypeStr
);
}
/**
* 作業毎に情報更新ボタンを表示するため、NeedSyncFlgをセットする。
* @param operationDto 作業情報
* @param syncedDate 定期点検のみ利用で、最後に情報更新した日付
*/
public
void
updateOperationNeedSyncFlg
(
OperationDto
operationDto
,
String
syncedDate
)
{
//情報更新が既に表示状態は何もしない
if
(
operationDto
.
needSyncFlg
)
{
return
;
}
boolean
updateFlg
=
false
;
// 作業送信フラグが存在する場合またはホットスポット更新フラグが存在する場合、needSyncFlgをtrueにセット
if
(
mTaskReportDao
.
isExistSendTaskData
(
operationDto
.
operationId
)
||
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
;
}
}
}
return
operationDtoList
;
if
(
updateFlg
)
{
operationDto
.
needSyncFlg
=
true
;
mOperationDao
.
updateNeedSyncFlg
(
operationDto
.
operationId
,
operationDto
.
needSyncFlg
);
}
}
/**
...
...
@@ -1600,4 +1627,34 @@ public class OperationLogic extends AbstractLogic {
mTaskDao
.
insert
(
taskDto
);
}
}
/**
* サービスオプション「営業日変更時間」をチェックして、情報更新可否を判断
* @return true : 情報更新可能、false:情報更新不可
*/
public
boolean
checkServiceOptionOperaionChangeTime
()
{
String
operationChangeTime
=
ABVDataCache
.
getInstance
().
serviceOption
.
operationChangeTime
();
String
[]
timeArray
=
operationChangeTime
.
split
(
":"
,
0
);
if
(
timeArray
.
length
!=
2
)
{
//データ形式が異常
return
false
;
}
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
();
//現在の時間が営業時間より未来の場合、情報更新状態にする。
if
(
nowDate
.
after
(
operationChageDate
))
{
return
true
;
}
return
false
;
}
}
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/home/adapter/OperationListAdapter.java
View file @
136c8a58
...
...
@@ -9,7 +9,6 @@ import android.widget.ImageView;
import
android.widget.LinearLayout
;
import
android.widget.TextView
;
import
java.util.ArrayList
;
import
java.util.List
;
import
jp.agentec.abook.abv.bl.acms.type.OperationType
;
...
...
@@ -24,7 +23,6 @@ import jp.agentec.adf.util.DateTimeFormat;
import
jp.agentec.adf.util.DateTimeUtil
;
import
jp.agentec.adf.util.StringUtil
;
import
static
jp
.
agentec
.
abook
.
abv
.
cl
.
util
.
PreferenceUtil
.
getPref
;
import
static
jp
.
agentec
.
abook
.
abv
.
cl
.
util
.
PreferenceUtil
.
getUserPref
;
/**
...
...
@@ -118,21 +116,10 @@ public class OperationListAdapter extends AbstractOperationAdapter {
// 同期ボタン表示・非表示
if
(
operationDto
.
contentId
!=
null
&&
operationDto
.
contentId
!=
0
)
{
if
((
operationDto
.
needSyncFlg
))
{
holder
.
ivSync
.
setVisibility
(
View
.
VISIBLE
);
}
else
{
// needSyncFlgがfalseの場合
if
(
operationDto
.
reportType
==
ReportType
.
RoutineTask
)
{
// 定期点検プロジェクトの場合のみ、以下の処理を行う
String
syncedDate
=
getUserPref
(
mContext
,
String
.
format
(
AppDefType
.
UserPrefKey
.
SYNCED_OPERATION_ID
,
operationDto
.
operationId
),
""
);
if
(
StringUtil
.
isNullOrEmpty
(
operationDto
.
reportPeriod
)
&&
!
syncedDate
.
equals
(
DateTimeUtil
.
toString
(
DateTimeUtil
.
getCurrentSqlDate
(),
DateTimeFormat
.
yyyyMMdd_none
)))
{
// 同期ボタンタップの日付と現在の日付が異なる且つ、作業するデータが存在しない場合
holder
.
ivSync
.
setVisibility
(
View
.
VISIBLE
);
}
else
{
holder
.
ivSync
.
setVisibility
(
View
.
INVISIBLE
);
}
if
(
holder
.
ivSync
.
getVisibility
()
==
View
.
INVISIBLE
)
{
if
((
operationDto
.
needSyncFlg
))
{
holder
.
ivSync
.
setVisibility
(
View
.
VISIBLE
);
}
else
{
// 定期点検プロジェクトではない場合、同期ボタンを非活性化する
holder
.
ivSync
.
setVisibility
(
View
.
INVISIBLE
);
}
}
...
...
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/home/adapter/OperationPanelAdapter.java
View file @
136c8a58
package
jp
.
agentec
.
abook
.
abv
.
ui
.
home
.
adapter
;
import
android.content.Context
;
import
android.graphics.Color
;
import
android.view.LayoutInflater
;
import
android.view.View
;
import
android.view.ViewGroup
;
...
...
@@ -14,7 +13,6 @@ import java.util.List;
import
jp.agentec.abook.abv.bl.acms.type.OperationType
;
import
jp.agentec.abook.abv.bl.common.Constant
;
import
jp.agentec.abook.abv.bl.common.Constant.ReportType
;
import
jp.agentec.abook.abv.bl.common.log.Logger
;
import
jp.agentec.abook.abv.bl.dto.OperationDto
;
import
jp.agentec.abook.abv.launcher.android.R
;
import
jp.agentec.abook.abv.ui.common.appinfo.AppDefType
;
...
...
@@ -148,20 +146,8 @@ public class OperationPanelAdapter extends AbstractOperationAdapter {
if
((
operationDto
.
needSyncFlg
))
{
holder
.
ivSync
.
setVisibility
(
View
.
VISIBLE
);
}
else
{
// needSyncFlgがfalseの場合
if
(
operationDto
.
reportType
==
ReportType
.
RoutineTask
)
{
// 定期点検プロジェクトの場合のみ、以下の処理を行う
String
syncedDate
=
getUserPref
(
mContext
,
String
.
format
(
AppDefType
.
UserPrefKey
.
SYNCED_OPERATION_ID
,
operationDto
.
operationId
),
""
);
if
(
StringUtil
.
isNullOrEmpty
(
operationDto
.
reportPeriod
)
&&
!
syncedDate
.
equals
(
DateTimeUtil
.
toString
(
DateTimeUtil
.
getCurrentSqlDate
(),
DateTimeFormat
.
yyyyMMdd_none
)))
{
// 同期ボタンタップの日付と現在の日付が異なる且つ、作業するデータが存在しない場合
holder
.
ivSync
.
setVisibility
(
View
.
VISIBLE
);
}
else
{
holder
.
ivSync
.
setVisibility
(
View
.
INVISIBLE
);
}
}
else
{
// 定期点検プロジェクトではない場合、同期ボタンを非活性化する
holder
.
ivSync
.
setVisibility
(
View
.
INVISIBLE
);
}
// 定期点検プロジェクトではない場合、同期ボタンを非活性化する
holder
.
ivSync
.
setVisibility
(
View
.
INVISIBLE
);
}
}
else
{
// プロジェクトのコンテンツが存在しない場合は、同期ボタンを非活性化する
...
...
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/home/helper/OperationListHelper.java
View file @
136c8a58
...
...
@@ -65,6 +65,11 @@ public class OperationListHelper {
try
{
String
reportTypeStr
=
getUserPref
(
mAppActivity
,
AppDefType
.
UserPrefKey
.
OPERATION_REPORT_TYPES
,
null
);
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
),
""
);
mOperationLogic
.
updateOperationNeedSyncFlg
(
operationDto
,
syncedDate
);
}
}
catch
(
Exception
e
)
{
Logger
.
e
(
TAG
,
"findOperationList"
,
e
);
ErrorMessage
.
showErrorMessageToast
(
mAppActivity
.
getApplicationContext
(),
ErrorCode
.
E107
);
...
...
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