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
fb28ee85
Commit
fb28ee85
authored
Jun 29, 2019
by
Jeong Gilmo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#33721 絞り検索のAPIとの連携
- 絞り検索のマスタデータを受信処理の修正
parent
09d4ce4c
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
130 additions
and
76 deletions
+130
-76
ABVJE_BL/src/jp/agentec/abook/abv/bl/acms/client/AcmsClient.java
+1
-2
ABVJE_BL/src/jp/agentec/abook/abv/bl/acms/client/json/ApertureMasterDataJSON.java
+7
-17
ABVJE_BL/src/jp/agentec/abook/abv/bl/acms/client/parameters/GetApertureMasterDataParameters.java
+1
-10
ABVJE_BL/src/jp/agentec/abook/abv/bl/common/ABVEnvironment.java
+14
-0
ABVJE_BL/src/jp/agentec/abook/abv/bl/data/ABVDataCache.java
+17
-1
ABVJE_BL/src/jp/agentec/abook/abv/bl/download/ContentRefresher.java
+13
-0
ABVJE_BL/src/jp/agentec/abook/abv/bl/logic/ApertureMasterDataLogic.java
+63
-0
ABVJE_BL/src/jp/agentec/abook/abv/bl/logic/OperationLogic.java
+3
-18
ABVJE_UI_Android/src/jp/agentec/abook/abv/launcher/android/ABVApplication.java
+1
-1
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/home/activity/OperationListActivity.java
+10
-27
No files found.
ABVJE_BL/src/jp/agentec/abook/abv/bl/acms/client/AcmsClient.java
View file @
fb28ee85
...
@@ -975,7 +975,6 @@ public class AcmsClient implements AcmsClientResponseListener {
...
@@ -975,7 +975,6 @@ public class AcmsClient implements AcmsClientResponseListener {
*/
*/
public
ApertureMasterDataJSON
getApertureMasterData
(
GetApertureMasterDataParameters
param
)
throws
NetworkDisconnectedException
,
AcmsException
{
public
ApertureMasterDataJSON
getApertureMasterData
(
GetApertureMasterDataParameters
param
)
throws
NetworkDisconnectedException
,
AcmsException
{
HttpResponse
response
=
send
(
AcmsApis
.
ApiGetApertureMasterData
,
param
);
HttpResponse
response
=
send
(
AcmsApis
.
ApiGetApertureMasterData
,
param
);
ApertureMasterDataJSON
json
=
new
ApertureMasterDataJSON
(
response
.
httpResponseBody
);
return
new
ApertureMasterDataJSON
(
response
.
httpResponseBody
);
return
json
;
}
}
}
}
ABVJE_BL/src/jp/agentec/abook/abv/bl/acms/client/json/ApertureMasterDataJSON.java
View file @
fb28ee85
package
jp
.
agentec
.
abook
.
abv
.
bl
.
acms
.
client
.
json
;
package
jp
.
agentec
.
abook
.
abv
.
bl
.
acms
.
client
.
json
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.Map
;
import
jp.agentec.abook.abv.bl.acms.client.AcmsClient
;
import
jp.agentec.abook.abv.bl.acms.client.AcmsClient
;
import
jp.agentec.abook.abv.bl.common.exception.AcmsException
;
import
jp.agentec.abook.abv.bl.common.exception.AcmsException
;
import
jp.agentec.abook.abv.bl.common.exception.JSONValidationException
;
import
jp.agentec.abook.abv.bl.common.exception.JSONValidationException
;
import
jp.agentec.abook.abv.bl.common.log.Logger
;
import
jp.agentec.abook.abv.bl.dto.WorkerGroupDto
;
import
jp.agentec.adf.util.DateTimeFormat
;
import
jp.agentec.adf.util.DateTimeUtil
;
import
org.json.adf.JSONArray
;
import
org.json.adf.JSONArray
;
import
org.json.adf.JSONObject
;
import
org.json.adf.JSONObject
;
...
@@ -22,10 +13,10 @@ import org.json.adf.JSONObject;
...
@@ -22,10 +13,10 @@ import org.json.adf.JSONObject;
* @version 1.0.0
* @version 1.0.0
*/
*/
public
class
ApertureMasterDataJSON
extends
AcmsCommonJSON
{
public
class
ApertureMasterDataJSON
extends
AcmsCommonJSON
{
p
ublic
static
final
String
operationLastEditDate
=
"operation
LastEditDate"
;
p
rivate
static
final
String
apertureLastEditDate
=
"aperture
LastEditDate"
;
p
ublic
static
final
String
ApertureData
=
"apertureData"
;
p
rivate
static
final
String
ApertureData
=
"apertureData"
;
public
Date
lastEditDate
;
public
String
lastEditDate
;
public
JSONObject
aperture
Json
;
public
JSONObject
aperture
Data
;
public
ApertureMasterDataJSON
(
String
jsonString
)
throws
AcmsException
{
public
ApertureMasterDataJSON
(
String
jsonString
)
throws
AcmsException
{
super
(
jsonString
);
super
(
jsonString
);
...
@@ -34,16 +25,15 @@ public class ApertureMasterDataJSON extends AcmsCommonJSON {
...
@@ -34,16 +25,15 @@ public class ApertureMasterDataJSON extends AcmsCommonJSON {
@Override
@Override
protected
void
parse
(
JSONObject
json
)
throws
JSONValidationException
{
protected
void
parse
(
JSONObject
json
)
throws
JSONValidationException
{
// 絞り検索の日付を取得
// 絞り検索の日付を取得
if
(
json
.
has
(
operation
LastEditDate
))
{
if
(
json
.
has
(
aperture
LastEditDate
))
{
lastEditDate
=
DateTimeUtil
.
toDate
(
json
.
getString
(
operationLastEditDate
),
"UTC"
,
DateTimeFormat
.
yyyyMMddHHmmss_hyphen
);
lastEditDate
=
json
.
getString
(
apertureLastEditDate
);
}
}
// 絞り検索のデータを取得
// 絞り検索のデータを取得
if
(
json
.
has
(
ApertureData
))
{
if
(
json
.
has
(
ApertureData
))
{
JSONArray
apertureList
=
json
.
getJSONArray
(
ApertureData
);
JSONArray
apertureList
=
json
.
getJSONArray
(
ApertureData
);
for
(
int
i
=
0
;
i
<
apertureList
.
length
();
i
++)
{
for
(
int
i
=
0
;
i
<
apertureList
.
length
();
i
++)
{
apertureJson
=
apertureList
.
getJSONObject
(
i
);
json
.
getJSONArray
(
ApertureData
);
apertureData
=
apertureList
.
getJSONObject
(
i
);
Logger
.
e
(
apertureJson
.
toString
());
}
}
}
}
}
}
...
...
ABVJE_BL/src/jp/agentec/abook/abv/bl/acms/client/parameters/GetApertureMasterDataParameters.java
View file @
fb28ee85
...
@@ -6,15 +6,7 @@ package jp.agentec.abook.abv.bl.acms.client.parameters;
...
@@ -6,15 +6,7 @@ package jp.agentec.abook.abv.bl.acms.client.parameters;
public
class
GetApertureMasterDataParameters
extends
AcmsParameters
{
public
class
GetApertureMasterDataParameters
extends
AcmsParameters
{
private
long
operationId
;
public
GetApertureMasterDataParameters
(
String
sid
)
{
public
GetApertureMasterDataParameters
(
String
sid
,
long
operationId
)
{
super
(
sid
);
super
(
sid
);
this
.
operationId
=
operationId
;
}
public
long
getOperationId
()
{
return
operationId
;
}
}
}
}
\ No newline at end of file
ABVJE_BL/src/jp/agentec/abook/abv/bl/common/ABVEnvironment.java
View file @
fb28ee85
...
@@ -178,6 +178,13 @@ public class ABVEnvironment {
...
@@ -178,6 +178,13 @@ public class ABVEnvironment {
public
boolean
enableToastMessage
=
true
;
public
boolean
enableToastMessage
=
true
;
// 絞り検索マスタ参照パス
public
static
final
String
OperationMasterDataDirFormat
=
"%s/ABook/operation/master"
;
// 絞り検索マスタファイル名
public
static
final
String
ApertureMasterDataFileName
=
"apertureMaster.json"
;
private
ABVEnvironment
()
{
private
ABVEnvironment
()
{
}
}
...
@@ -766,4 +773,11 @@ public class ABVEnvironment {
...
@@ -766,4 +773,11 @@ public class ABVEnvironment {
return
reportDate
;
return
reportDate
;
}
}
}
}
// MasterDataに対したJSONファイルの位置
// 経路:root/files/operation/master
public
String
getMasterFilePath
()
{
return
String
.
format
(
OperationMasterDataDirFormat
,
rootDirectory
);
}
}
}
ABVJE_BL/src/jp/agentec/abook/abv/bl/data/ABVDataCache.java
View file @
fb28ee85
...
@@ -41,7 +41,7 @@ public class ABVDataCache {
...
@@ -41,7 +41,7 @@ public class ABVDataCache {
private
static
final
int
SEVER_ALERT_INTERVAL
=
30
;
//システム日付チェック前後期間(分)
private
static
final
int
SEVER_ALERT_INTERVAL
=
30
;
//システム日付チェック前後期間(分)
// Serverから取得したapertureMasterDataのfetchDateを一時的に保存するための変数
// Serverから取得したapertureMasterDataのfetchDateを一時的に保存するための変数
p
ublic
String
tempApertureMasterDataFetchDate
=
null
;
p
rivate
String
tempApertureMasterDataFetchDate
=
null
;
/**
/**
* 未指定ジャンルのID
* 未指定ジャンルのID
...
@@ -373,4 +373,20 @@ public class ABVDataCache {
...
@@ -373,4 +373,20 @@ public class ABVDataCache {
}
}
return
null
;
return
null
;
}
}
/**
* tempApertureMasterDataFetchDateを更新する
* @param date
*/
public
void
setTempApertureMasterDataFetchDate
(
String
date
){
this
.
tempApertureMasterDataFetchDate
=
date
;
}
/**
* tempApertureMasterDataFetchDateをreturn
* @return tempApertureMasterDataFetchDate
*/
public
String
getTempApertureMasterDataFetchDate
(){
return
tempApertureMasterDataFetchDate
;
}
}
}
ABVJE_BL/src/jp/agentec/abook/abv/bl/download/ContentRefresher.java
View file @
fb28ee85
...
@@ -23,6 +23,7 @@ import jp.agentec.abook.abv.bl.data.dao.ContentDao;
...
@@ -23,6 +23,7 @@ import jp.agentec.abook.abv.bl.data.dao.ContentDao;
import
jp.agentec.abook.abv.bl.dto.ContentDto
;
import
jp.agentec.abook.abv.bl.dto.ContentDto
;
import
jp.agentec.abook.abv.bl.dto.EnqueteDto
;
import
jp.agentec.abook.abv.bl.dto.EnqueteDto
;
import
jp.agentec.abook.abv.bl.logic.AbstractLogic
;
import
jp.agentec.abook.abv.bl.logic.AbstractLogic
;
import
jp.agentec.abook.abv.bl.logic.ApertureMasterDataLogic
;
import
jp.agentec.abook.abv.bl.logic.CategoryLogic
;
import
jp.agentec.abook.abv.bl.logic.CategoryLogic
;
import
jp.agentec.abook.abv.bl.logic.ContentLogic
;
import
jp.agentec.abook.abv.bl.logic.ContentLogic
;
import
jp.agentec.abook.abv.bl.logic.ContentReadingLogLogic
;
import
jp.agentec.abook.abv.bl.logic.ContentReadingLogLogic
;
...
@@ -63,6 +64,11 @@ public class ContentRefresher {
...
@@ -63,6 +64,11 @@ public class ContentRefresher {
private
static
final
int
refreshSleepInterval
=
500
;
private
static
final
int
refreshSleepInterval
=
500
;
private
static
final
int
maxRefreshWorker
=
2
;
private
static
final
int
maxRefreshWorker
=
2
;
// masterDataを取得するため登録
private
ApertureMasterDataLogic
apertureMasterDataLogic
=
AbstractLogic
.
getLogic
(
ApertureMasterDataLogic
.
class
);
public
static
ContentRefresher
getInstance
()
{
public
static
ContentRefresher
getInstance
()
{
if
(
instance
==
null
)
{
if
(
instance
==
null
)
{
synchronized
(
ContentRefresher
.
class
)
{
synchronized
(
ContentRefresher
.
class
)
{
...
@@ -156,6 +162,13 @@ public class ContentRefresher {
...
@@ -156,6 +162,13 @@ public class ContentRefresher {
contractLogic
.
initializeContractServiceOption
();
// サービスオプション関連処理
contractLogic
.
initializeContractServiceOption
();
// サービスオプション関連処理
groupLogic
.
initializeGroups
();
// グループ設定(グループ変更の場合、FetchDateをクリアする)
groupLogic
.
initializeGroups
();
// グループ設定(グループ変更の場合、FetchDateをクリアする)
categoryLogic
.
initializeCategories
();
// カテゴリ設定
categoryLogic
.
initializeCategories
();
// カテゴリ設定
// 絞り検索マスタデータの最新更新された時のFetchDateを一時に保存する。
Logger
.
d
(
TAG
,
"before fetchDate : "
+
ABVDataCache
.
getInstance
().
getTempApertureMasterDataFetchDate
());
// CMSでメンテナンスされる絞り検索マスタデータをアプリから取得できるようにJSONファイルを生成する。
apertureMasterDataLogic
.
initializeApertureMasterData
(
ABVDataCache
.
getInstance
().
getTempApertureMasterDataFetchDate
());
Logger
.
d
(
TAG
,
"after fetchDate : "
+
ABVDataCache
.
getInstance
().
getTempApertureMasterDataFetchDate
());
if
(
interrupt
)
{
// この時点で停止要求が来た場合先には進まない。(ServiceOption/Group/Categoryの更新は1セットで行う(トランザクションはそれぞれ別))
if
(
interrupt
)
{
// この時点で停止要求が来た場合先には進まない。(ServiceOption/Group/Categoryの更新は1セットで行う(トランザクションはそれぞれ別))
Logger
.
d
(
TAG
,
"stop refresh worker before content update."
);
Logger
.
d
(
TAG
,
"stop refresh worker before content update."
);
...
...
ABVJE_BL/src/jp/agentec/abook/abv/bl/logic/ApertureMasterDataLogic.java
0 → 100644
View file @
fb28ee85
package
jp
.
agentec
.
abook
.
abv
.
bl
.
logic
;
import
org.json.adf.JSONObject
;
import
java.io.File
;
import
java.io.IOException
;
import
java.util.Date
;
import
jp.agentec.abook.abv.bl.acms.client.AcmsClient
;
import
jp.agentec.abook.abv.bl.acms.client.json.ApertureMasterDataJSON
;
import
jp.agentec.abook.abv.bl.acms.client.parameters.GetApertureMasterDataParameters
;
import
jp.agentec.abook.abv.bl.common.ABVEnvironment
;
import
jp.agentec.abook.abv.bl.common.log.Logger
;
import
jp.agentec.adf.util.DateTimeFormat
;
import
jp.agentec.adf.util.DateTimeUtil
;
import
jp.agentec.adf.util.FileUtil
;
public
class
ApertureMasterDataLogic
extends
AbstractLogic
{
private
static
final
java
.
lang
.
String
TAG
=
"RefineMasterDataLogic"
;
/**
* グループ情報をサーバから受信し、ローカルに保存します。既存のデータは上書きされます。また、サーバにないグループがローカルにある場合、そのグループは削除されます。
* 絞り検索マスタデータ情報をサーバから受信し、ローカルにJSONで保存する。
* 日付を比べてサーバーからローカルのデータより最新のデータを受信した場合、受信した情報を保存する。
* ローカルの日付はない場合、受信した情報を保存する。
* @param lastFetchDateString
*/
public
void
initializeApertureMasterData
(
String
lastFetchDateString
)
{
try
{
GetApertureMasterDataParameters
param
=
new
GetApertureMasterDataParameters
(
cache
.
getMemberInfo
().
sid
);
//サーバーから絞り検索マスタデータを取得
ApertureMasterDataJSON
masterDataJson
=
AcmsClient
.
getInstance
(
cache
.
getUrlPath
(),
networkAdapter
).
getApertureMasterData
(
param
);
//サーバーデータの日付
String
lastEditDateString
=
masterDataJson
.
lastEditDate
;
if
(
lastFetchDateString
!=
null
)
{
Date
lastFetchDate
=
DateTimeUtil
.
toDate
(
lastFetchDateString
,
"UTC"
,
DateTimeFormat
.
yyyyMMddHHmmss_hyphen
);
Date
lastEditDate
=
DateTimeUtil
.
toDate
(
lastEditDateString
,
"UTC"
,
DateTimeFormat
.
yyyyMMddHHmmss_hyphen
);
if
(
lastFetchDate
==
null
||
lastEditDate
.
after
(
lastFetchDate
))
{
createApertureMasterDataJson
(
masterDataJson
.
apertureData
);
cache
.
setTempApertureMasterDataFetchDate
(
lastEditDateString
);
}
}
else
{
createApertureMasterDataJson
(
masterDataJson
.
apertureData
);
cache
.
setTempApertureMasterDataFetchDate
(
lastEditDateString
);
}
Logger
.
i
(
masterDataJson
.
toString
());
}
catch
(
Exception
e
)
{
Logger
.
e
(
TAG
,
"apertureMasterDataSend error : "
,
e
);
}
}
/**
* apertureMaster.jsonファイル作成
* @param json
* @throws IOException
*/
private
void
createApertureMasterDataJson
(
JSONObject
json
)
throws
IOException
{
// マスタデータの保存されるパス
String
masterDataJsonPath
=
ABVEnvironment
.
getInstance
().
getMasterFilePath
()
+
File
.
separator
+
ABVEnvironment
.
getInstance
().
ApertureMasterDataFileName
;
FileUtil
.
createFile
(
masterDataJsonPath
,
json
.
toString
());
}
}
ABVJE_BL/src/jp/agentec/abook/abv/bl/logic/OperationLogic.java
View file @
fb28ee85
...
@@ -798,6 +798,9 @@ public class OperationLogic extends AbstractLogic {
...
@@ -798,6 +798,9 @@ public class OperationLogic extends AbstractLogic {
jsonObject
.
put
(
"attachedPath"
,
"../../../../files/ABook/operation/"
+
operationId
);
jsonObject
.
put
(
"attachedPath"
,
"../../../../files/ABook/operation/"
+
operationId
);
jsonObject
.
put
(
"attachedMoviePath"
,
ABVEnvironment
.
getInstance
().
getAttachedMoviesFilePath
(
contentId
));
jsonObject
.
put
(
"attachedMoviePath"
,
ABVEnvironment
.
getInstance
().
getAttachedMoviesFilePath
(
contentId
));
// 絞り検索マスタデータのパス
jsonObject
.
put
(
"masterPath"
,
ABVEnvironment
.
getInstance
().
getMasterFilePath
()
+
File
.
separator
+
ABVEnvironment
.
getInstance
().
ApertureMasterDataFileName
);
FileUtil
.
createFile
(
contentPath
+
"/content.json"
,
jsonObject
.
toString
());
FileUtil
.
createFile
(
contentPath
+
"/content.json"
,
jsonObject
.
toString
());
}
}
...
@@ -1597,22 +1600,4 @@ public class OperationLogic extends AbstractLogic {
...
@@ -1597,22 +1600,4 @@ public class OperationLogic extends AbstractLogic {
mTaskDao
.
insert
(
taskDto
);
mTaskDao
.
insert
(
taskDto
);
}
}
}
}
/**
* 絞り検索のjsonファイル
* apertureMaster.jsonを作成
*
* @param json
* @param contentPath
* @throws IOException
*/
public
void
createJsonForApertureData
(
JSONObject
json
,
String
contentPath
)
throws
IOException
{
try
{
FileUtil
.
createFile
(
contentPath
+
"/apertureMaster.json"
,
json
.
toString
());
}
catch
(
IOException
e
)
{
Logger
.
e
(
TAG
,
"createJsonForapertureMaster error : "
,
e
);
throw
e
;
}
}
}
}
ABVJE_UI_Android/src/jp/agentec/abook/abv/launcher/android/ABVApplication.java
View file @
fb28ee85
...
@@ -54,7 +54,7 @@ public class ABVApplication extends MultiDexApplication {
...
@@ -54,7 +54,7 @@ public class ABVApplication extends MultiDexApplication {
FileUtil
.
delete
(
ABVEnvironment
.
getInstance
().
getCacheTempAttachedImageDirPath
());
FileUtil
.
delete
(
ABVEnvironment
.
getInstance
().
getCacheTempAttachedImageDirPath
());
// 絞り検索のfetchDateをローカルに保存された値を取得して設定する
// 絞り検索のfetchDateをローカルに保存された値を取得して設定する
ABVDataCache
.
getInstance
().
tempApertureMasterDataFetchDate
=
PreferenceUtil
.
getUserPref
(
this
,
AppDefType
.
UserPrefKey
.
APERTURE_MASTER_DATA_FETCH_DATE
,
null
);
ABVDataCache
.
getInstance
().
setTempApertureMasterDataFetchDate
(
PreferenceUtil
.
getUserPref
(
this
,
AppDefType
.
UserPrefKey
.
APERTURE_MASTER_DATA_FETCH_DATE
,
null
)
);
}
}
@Override
@Override
...
...
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/home/activity/OperationListActivity.java
View file @
fb28ee85
...
@@ -2,7 +2,6 @@ package jp.agentec.abook.abv.ui.home.activity;
...
@@ -2,7 +2,6 @@ package jp.agentec.abook.abv.ui.home.activity;
import
android.app.DatePickerDialog
;
import
android.app.DatePickerDialog
;
import
android.app.Dialog
;
import
android.app.Dialog
;
import
android.content.Context
;
import
android.content.DialogInterface
;
import
android.content.DialogInterface
;
import
android.content.Intent
;
import
android.content.Intent
;
import
android.content.res.Configuration
;
import
android.content.res.Configuration
;
...
@@ -12,7 +11,6 @@ import android.graphics.BitmapFactory;
...
@@ -12,7 +11,6 @@ import android.graphics.BitmapFactory;
import
android.net.Uri
;
import
android.net.Uri
;
import
android.os.Bundle
;
import
android.os.Bundle
;
import
android.provider.MediaStore
;
import
android.provider.MediaStore
;
import
android.speech.tts.TextToSpeech
;
import
android.util.SparseBooleanArray
;
import
android.util.SparseBooleanArray
;
import
android.view.KeyEvent
;
import
android.view.KeyEvent
;
import
android.view.View
;
import
android.view.View
;
...
@@ -89,9 +87,9 @@ import jp.agentec.abook.abv.bl.dto.PushMessageDto;
...
@@ -89,9 +87,9 @@ import jp.agentec.abook.abv.bl.dto.PushMessageDto;
import
jp.agentec.abook.abv.bl.dto.TaskDto
;
import
jp.agentec.abook.abv.bl.dto.TaskDto
;
import
jp.agentec.abook.abv.bl.dto.TaskReportDto
;
import
jp.agentec.abook.abv.bl.dto.TaskReportDto
;
import
jp.agentec.abook.abv.bl.logic.AbstractLogic
;
import
jp.agentec.abook.abv.bl.logic.AbstractLogic
;
import
jp.agentec.abook.abv.bl.logic.ApertureMasterDataLogic
;
import
jp.agentec.abook.abv.bl.logic.OperationLogic
;
import
jp.agentec.abook.abv.bl.logic.OperationLogic
;
import
jp.agentec.abook.abv.bl.logic.PushMessageLogic
;
import
jp.agentec.abook.abv.bl.logic.PushMessageLogic
;
import
jp.agentec.abook.abv.cl.util.AndroidStringUtil
;
import
jp.agentec.abook.abv.cl.util.PreferenceUtil
;
import
jp.agentec.abook.abv.cl.util.PreferenceUtil
;
import
jp.agentec.abook.abv.launcher.android.R
;
import
jp.agentec.abook.abv.launcher.android.R
;
import
jp.agentec.abook.abv.ui.common.activity.ABVUIActivity
;
import
jp.agentec.abook.abv.ui.common.activity.ABVUIActivity
;
...
@@ -188,7 +186,9 @@ public class OperationListActivity extends ABVUIActivity {
...
@@ -188,7 +186,9 @@ public class OperationListActivity extends ABVUIActivity {
private
ArrayList
<
Integer
>
mAllOperationReportTypes
;
private
ArrayList
<
Integer
>
mAllOperationReportTypes
;
// 絞り検索マスタデータ
// 絞り検索マスタデータ
private
Date
mApertureLastEditDate
;
// private Date mApertureLastEditDate;
// 絞り検索マスタLogic
private
ApertureMasterDataLogic
mApertureMasterDataLogic
=
AbstractLogic
.
getLogic
(
ApertureMasterDataLogic
.
class
);
// ビューの作成
// ビューの作成
private
class
ReloadHandler
implements
Runnable
{
private
class
ReloadHandler
implements
Runnable
{
...
@@ -397,6 +397,8 @@ public class OperationListActivity extends ABVUIActivity {
...
@@ -397,6 +397,8 @@ public class OperationListActivity extends ABVUIActivity {
getABVUIDataCache
().
saveLastUpdateTime
();
getABVUIDataCache
().
saveLastUpdateTime
();
// リソースパターンを取得し、ローカルに保存する。
// リソースパターンを取得し、ローカルに保存する。
setResourcePattern
();
setResourcePattern
();
// 絞り検索マスタデータ最新更新する時fetchDateをローカルに保存する。
setApertureMasterDataFetchDate
();
refreshOperationList
();
refreshOperationList
();
}
}
}
}
...
@@ -638,7 +640,7 @@ public class OperationListActivity extends ABVUIActivity {
...
@@ -638,7 +640,7 @@ public class OperationListActivity extends ABVUIActivity {
mOperationLogic
.
createJsonForOperationContent
(
operationDto
.
operationId
,
contentPath
,
operationDto
.
reportType
==
ReportType
.
RoutineTask
);
mOperationLogic
.
createJsonForOperationContent
(
operationDto
.
operationId
,
contentPath
,
operationDto
.
reportType
==
ReportType
.
RoutineTask
);
// 絞り検索マスタデータを受信、JSONファイルを生成
// 絞り検索マスタデータを受信、JSONファイルを生成
mAperture
LastEditDate
=
receptionApertureMasterData
(
operationDto
.
operationId
,
contentPath
);
mAperture
MasterDataLogic
.
initializeApertureMasterData
(
ABVDataCache
.
getInstance
().
getTempApertureMasterDataFetchDate
()
);
// サーバ作業後、対応必要
// サーバ作業後、対応必要
StringBuffer
path
=
new
StringBuffer
();
StringBuffer
path
=
new
StringBuffer
();
...
@@ -1922,28 +1924,9 @@ public class OperationListActivity extends ABVUIActivity {
...
@@ -1922,28 +1924,9 @@ public class OperationListActivity extends ABVUIActivity {
}
}
/**
/**
* 絞り検索マスタデータの受信
* 絞り検索の日付を設定
* @param operationId
* @return
* @throws NetworkDisconnectedException
* @throws ABVException
* @throws IOException
* @throws InterruptedException
* @throws NoSuchAlgorithmException
* @throws ZipException
*/
*/
public
Date
receptionApertureMasterData
(
long
operationId
,
String
contentPath
)
throws
NetworkDisconnectedException
,
ABVException
,
IOException
{
private
void
setApertureMasterDataFetchDate
()
{
// 絞り検索のためparamを設定
putUserPref
(
AppDefType
.
UserPrefKey
.
APERTURE_MASTER_DATA_FETCH_DATE
,
ABVDataCache
.
getInstance
().
getTempApertureMasterDataFetchDate
());
GetApertureMasterDataParameters
param
=
new
GetApertureMasterDataParameters
(
ABVDataCache
.
getInstance
().
getMemberInfo
().
sid
,
operationId
);
// 絞り検索した日付の保存
Date
lastEditDate
;
// JSONデータのparsing
ApertureMasterDataJSON
json
=
AcmsClient
.
getInstance
(
ABVDataCache
.
getInstance
().
getUrlPath
(),
ABVEnvironment
.
getInstance
().
networkAdapter
).
getApertureMasterData
(
param
);
// JSONファイルを生成
mOperationLogic
.
createJsonForApertureData
(
json
.
apertureJson
,
contentPath
);
// 絞り検索した日付を取得
lastEditDate
=
json
.
lastEditDate
;
return
lastEditDate
;
}
}
}
}
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