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
ed09a6a5
Commit
ed09a6a5
authored
Apr 28, 2026
by
Kang Donghun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#73480 通信仕組み改善検証
parent
8a85b027
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
38 additions
and
73 deletions
+38
-73
ABVJE_BL/src/jp/agentec/abook/abv/bl/logic/OperationLogic.java
+0
-24
ABVJE_UI_Android/res/xml/pref.xml
+0
-8
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/common/activity/ShowPushMessageDailogActivity.java
+3
-2
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/common/appinfo/AppDefType.java
+0
-1
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/home/activity/ABookSettingFragment.java
+4
-0
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/home/activity/DashboardActivity.java
+24
-0
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/home/activity/OperationActivity.java
+1
-0
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/home/activity/OperationListActivity.java
+0
-0
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/home/adapter/OperationListAdapter.java
+2
-18
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/home/adapter/OperationPanelAdapter.java
+2
-19
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/home/helper/OperationListHelper.java
+2
-1
No files found.
ABVJE_BL/src/jp/agentec/abook/abv/bl/logic/OperationLogic.java
View file @
ed09a6a5
...
...
@@ -91,7 +91,6 @@ public class OperationLogic extends AbstractLogic {
private
TaskWorkerGroupDao
mTaskWorkerGroupDao
=
AbstractDao
.
getDao
(
TaskWorkerGroupDao
.
class
);
private
static
final
int
FINISHED_STATUS
=
999
;
private
final
static
int
INTERVAL_LAST_EDIT_TIME_MS
=
1800000
;
public
void
initializeOperations
()
throws
AcmsException
,
NetworkDisconnectedException
{
// 作業グループリスト取得
setWorkingGroupList
();
...
...
@@ -1936,29 +1935,6 @@ public class OperationLogic extends AbstractLogic {
return
result
;
}
private
Boolean
isEnableTimeForAutoSync
(
Date
lastEditDateTime
)
{
Date
currentDateTime
=
DateTimeUtil
.
getCurrentDate
();
if
(
lastEditDateTime
==
null
)
{
return
true
;
}
else
{
long
diffInMillis
=
currentDateTime
.
getTime
()
-
lastEditDateTime
.
getTime
();
if
(
diffInMillis
>=
INTERVAL_LAST_EDIT_TIME_MS
)
{
return
true
;
}
}
return
false
;
}
public
List
<
OperationDto
>
needSyncCheckArray
(
List
<
OperationDto
>
needSyncOperationInfoArray
)
{
List
<
OperationDto
>
needSyncCheckArray
=
new
ArrayList
<>();
for
(
OperationDto
operationDto
:
needSyncOperationInfoArray
)
{
if
(
isEnableTimeForAutoSync
(
operationDto
.
operationLastSyncDate
))
{
needSyncCheckArray
.
add
(
operationDto
);
}
}
return
needSyncCheckArray
;
}
/**
* 重複作業情報を配列から除外
* @param operationDtoList
...
...
ABVJE_UI_Android/res/xml/pref.xml
View file @
ed09a6a5
...
...
@@ -68,11 +68,4 @@
android:title=
"@string/spp_machine"
>
</PreferenceScreen>
</PreferenceCategory>
<PreferenceCategory
android:title=
"@string/auto_sync"
android:key=
"auto_sync"
>
<CheckBoxPreference
android:defaultValue=
"false"
android:key=
"operationAutoSync"
android:title=
"@string/auto_sync_setting_title"
android:summary=
"@string/auto_sync_setting_subtitle"
/>
</PreferenceCategory>
</PreferenceScreen>
\ No newline at end of file
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/common/activity/ShowPushMessageDailogActivity.java
View file @
ed09a6a5
...
...
@@ -3,6 +3,7 @@ package jp.agentec.abook.abv.ui.common.activity;
import
android.content.DialogInterface
;
import
android.os.Bundle
;
import
jp.agentec.abook.abv.bl.common.ABVEnvironment
;
import
jp.agentec.abook.abv.bl.dto.OperationDto
;
import
jp.agentec.abook.abv.bl.logic.AbstractLogic
;
import
jp.agentec.abook.abv.bl.logic.OperationLogic
;
...
...
@@ -57,8 +58,8 @@ public class ShowPushMessageDailogActivity extends ABVUIActivity {
getUserPref
(
AppDefType
.
UserPrefKey
.
RESOURCE_PATTERN_TYPE
,
0
)));
}
else
{
OperationListActivity
operationListActivity
=
ActivityHandlingHelper
.
getInstance
().
getPreviousOperationListActivity
();
if
(
operationListActivity
!=
null
&&
operationListActivity
.
needAutoSync
())
{
operationListActivity
.
autoSyncOperationId
(
operationId
);
if
(
operationListActivity
!=
null
&&
ABVEnvironment
.
getInstance
().
networkAdapter
.
isNetworkConnected
())
{
operationListActivity
.
autoSync
NeedSyncAndOpen
OperationId
(
operationId
);
return
;
}
if
(
operationDto
.
needSyncFlg
)
{
...
...
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/common/appinfo/AppDefType.java
View file @
ed09a6a5
...
...
@@ -76,7 +76,6 @@ public interface AppDefType {
String
OPERATION_GROUP_MASERT_MODE
=
"operation_group_master"
;
// 通常・作業種別モード(画面)
String
OPERATION_GROUP_MASERT_ID
=
"operation_group_master_id"
;
// 作業種別のID
String
OPERATION_SORT_CONDITION
=
"operation_sort_condition"
;
// 作業のソート
String
OPERATION_AUTO_SYNC
=
"operationAutoSync"
;
String
ANDROID_13_PERMISSION_CHECK
=
"android13PermissionCheck"
;
String
ANDROID_14_PERMISSION_CHECK
=
"android14PermissionCheck"
;
...
...
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/home/activity/ABookSettingFragment.java
View file @
ed09a6a5
...
...
@@ -95,6 +95,10 @@ public class ABookSettingFragment extends PreferenceFragment {
handler
=
new
Handler
();
pref
=
PreferenceManager
.
getDefaultSharedPreferences
(
getActivity
());
// 設定XMLから削除した CheckBox(operationAutoSync)の残キーを掃除
if
(
pref
.
contains
(
"operationAutoSync"
))
{
pref
.
edit
().
remove
(
"operationAutoSync"
).
apply
();
}
addPreferencesFromResource
(
R
.
xml
.
pref
);
// アカウント
...
...
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/home/activity/DashboardActivity.java
View file @
ed09a6a5
...
...
@@ -456,6 +456,30 @@ public class DashboardActivity extends OperationActivity {
// 新着更新を止める
contentRefresher
.
stopRefresh
();
if
(
ABVEnvironment
.
getInstance
().
networkAdapter
.
isNetworkConnected
())
{
// 既に作業一覧がスタック上にある場合は、画面遷移せずにそのActivityで同期処理だけ実行する
OperationListActivity
operationListActivity
=
ActivityHandlingHelper
.
getInstance
().
getPreviousOperationListActivity
();
if
(
operationListActivity
!=
null
)
{
operationListActivity
.
autoSyncOperationIdFromDashboard
(
operationId
,
taskKey
,
taskReportId
,
reportStartDate
);
return
;
}
Intent
bridge
=
new
Intent
(
this
,
OperationListActivity
.
class
);
bridge
.
putExtra
(
OperationListActivity
.
EXTRA_PENDING_DASH_SYNC_OPERATION_ID
,
operationId
);
bridge
.
putExtra
(
OperationListActivity
.
EXTRA_PENDING_DASH_TASK_KEY
,
taskKey
);
if
(
taskReportId
!=
null
)
{
bridge
.
putExtra
(
OperationListActivity
.
EXTRA_PENDING_DASH_TASK_REPORT_ID
,
taskReportId
);
}
if
(
reportStartDate
!=
null
)
{
bridge
.
putExtra
(
OperationListActivity
.
EXTRA_PENDING_DASH_REPORT_START_DATE
,
reportStartDate
);
}
bridge
.
addFlags
(
Intent
.
FLAG_ACTIVITY_REORDER_TO_FRONT
|
Intent
.
FLAG_ACTIVITY_SINGLE_TOP
);
startActivity
(
bridge
);
// 一覧画面を経由しても遷移アニメーションを無効化して、直接遷移に見せる
overridePendingTransition
(
0
,
0
);
return
;
}
OperationDao
operationDao
=
AbstractDao
.
getDao
(
OperationDao
.
class
);
OperationDto
operationDto
=
operationDao
.
getOperation
(
operationId
);
// t_operationテーブルにcontent_idは含まれていないので、この時点でoperationDto.contentIdはnull
...
...
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/home/activity/OperationActivity.java
View file @
ed09a6a5
...
...
@@ -106,6 +106,7 @@ public class OperationActivity extends ABVUIActivity {
private
void
backHome
()
{
Intent
intent
=
new
Intent
();
intent
.
setClass
(
this
,
OperationListActivity
.
class
);
intent
.
putExtra
(
OperationListActivity
.
EXTRA_RESUME_MODE
,
OperationListActivity
.
RESUME_NEW_CONTENT_ONLY
);
intent
.
setFlags
(
Intent
.
FLAG_ACTIVITY_SINGLE_TOP
);
startActivity
(
intent
);
}
...
...
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/home/activity/OperationListActivity.java
View file @
ed09a6a5
This diff is collapsed.
Click to expand it.
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/home/adapter/OperationListAdapter.java
View file @
ed09a6a5
...
...
@@ -116,17 +116,8 @@ public class OperationListAdapter extends AbstractOperationAdapter {
holder
.
tvDate
.
setText
(
DateTimeUtil
.
toString
(
operationDto
.
operationStartDate
,
DateTimeFormat
.
yyyyMMdd_slash
)
+
" ~ "
+
DateTimeUtil
.
toString
(
operationDto
.
operationEndDate
,
DateTimeFormat
.
yyyyMMdd_slash
));
}
// 同期ボタン表示・非表示
if
(
operationDto
.
contentId
!=
null
&&
operationDto
.
contentId
!=
0
)
{
if
(
operationDto
.
needSyncFlg
)
{
holder
.
ivSync
.
setVisibility
(
View
.
VISIBLE
);
}
else
{
holder
.
ivSync
.
setVisibility
(
View
.
INVISIBLE
);
}
}
else
{
// プロジェクトのコンテンツが存在しない場合は、同期ボタンを非活性化する
holder
.
ivSync
.
setVisibility
(
View
.
INVISIBLE
);
}
// 作業別の同期ボタンは表示しない仕様
holder
.
ivSync
.
setVisibility
(
View
.
GONE
);
holder
.
reportCountNotStarted
.
setText
(
String
.
valueOf
(
operationDto
.
statusNotStartedCount
));
holder
.
reportCountWorking
.
setText
(
String
.
valueOf
(
operationDto
.
statusWorkingCount
));
...
...
@@ -139,13 +130,6 @@ public class OperationListAdapter extends AbstractOperationAdapter {
listener
.
openReport
(
operationDto
);
}
});
// 同期ボタンのタップイベント
holder
.
ivSync
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
@Override
public
void
onClick
(
View
v
)
{
listener
.
onSyncOperation
(
operationDto
);
}
});
}
return
convertView
;
...
...
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/home/adapter/OperationPanelAdapter.java
View file @
ed09a6a5
...
...
@@ -142,18 +142,8 @@ public class OperationPanelAdapter extends AbstractOperationAdapter {
holder
.
tvDate
.
setText
(
DateTimeUtil
.
toString
(
operationDto
.
operationStartDate
,
DateTimeFormat
.
yyyyMMdd_slash
)
+
" ~ "
+
DateTimeUtil
.
toString
(
operationDto
.
operationEndDate
,
DateTimeFormat
.
yyyyMMdd_slash
));
}
// 同期ボタン表示・非表示
if
(
operationDto
.
contentId
!=
null
&&
operationDto
.
contentId
!=
0
)
{
if
((
operationDto
.
needSyncFlg
))
{
holder
.
ivSync
.
setVisibility
(
View
.
VISIBLE
);
}
else
{
// 定期点検プロジェクトではない場合、同期ボタンを非活性化する
holder
.
ivSync
.
setVisibility
(
View
.
INVISIBLE
);
}
}
else
{
// プロジェクトのコンテンツが存在しない場合は、同期ボタンを非活性化する
holder
.
ivSync
.
setVisibility
(
View
.
INVISIBLE
);
}
// 作業別の同期ボタンは表示しない仕様
holder
.
ivSync
.
setVisibility
(
View
.
GONE
);
holder
.
reportCountNotStarted
.
setText
(
String
.
valueOf
(
operationDto
.
statusNotStartedCount
));
holder
.
reportCountWorking
.
setText
(
String
.
valueOf
(
operationDto
.
statusWorkingCount
));
...
...
@@ -167,13 +157,6 @@ public class OperationPanelAdapter extends AbstractOperationAdapter {
}
});
// 同期ボタンのタップイベント
holder
.
ivSync
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
@Override
public
void
onClick
(
View
v
)
{
listener
.
onSyncOperation
(
operationDto
);
}
});
}
return
convertView
;
...
...
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/home/helper/OperationListHelper.java
View file @
ed09a6a5
...
...
@@ -12,6 +12,7 @@ import java.util.ArrayList;
import
java.util.Date
;
import
java.util.List
;
import
jp.agentec.abook.abv.bl.common.ABVEnvironment
;
import
jp.agentec.abook.abv.bl.common.exception.NetworkDisconnectedException
;
import
jp.agentec.abook.abv.bl.common.log.Logger
;
import
jp.agentec.abook.abv.bl.dto.OperationDto
;
...
...
@@ -264,7 +265,7 @@ public abstract class OperationListHelper {
abstract
protected
List
<
OperationDto
>
findOperationList
()
throws
Exception
;
public
void
onClickReport
(
OperationDto
operationDto
)
{
if
(
mAppActivity
.
needAutoSync
())
{
if
(
ABVEnvironment
.
getInstance
().
networkAdapter
.
isNetworkConnected
())
{
mAppActivity
.
autoSyncOperationId
(
operationDto
.
operationId
);
return
;
}
...
...
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