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
7afa8cd8
Commit
7afa8cd8
authored
Dec 04, 2019
by
Lee Jaebin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#36065 営業日を過ぎた場合、前日の報告を削除するため、同期ボタンを活性化する処理追加
parent
2a7a2e9f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
17 deletions
+21
-17
ABVJE_BL/src/jp/agentec/abook/abv/bl/logic/OperationLogic.java
+21
-17
No files found.
ABVJE_BL/src/jp/agentec/abook/abv/bl/logic/OperationLogic.java
View file @
7afa8cd8
...
...
@@ -1637,32 +1637,36 @@ public class OperationLogic extends AbstractLogic {
* @return true : 情報更新可能、false:情報更新不可
*/
public
boolean
checkServiceOptionOperaionChangeTime
(
Date
syncedDate
)
{
boolean
result
=
false
;
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
]);
//分
// 営業日変更時間
int
businessHour
=
Integer
.
valueOf
(
timeArray
[
0
]);
//時間
int
businessMinute
=
Integer
.
valueOf
(
timeArray
[
1
]);
//分
Calendar
syncCalender
=
Calendar
.
getInstance
();
syncCalender
.
setTime
(
syncedDate
);
Calendar
calender
=
Calendar
.
getInstance
();
// 現在日付
Date
nowDate
=
calender
.
getTime
();
// 現在日付と同期した日付が1日以上差分がある場合、trueと見做す
if
(
DateTimeUtil
.
isDiffOneDay
(
nowDate
,
syncedDate
))
{
return
true
;
}
else
{
calender
.
set
(
Calendar
.
MINUTE
,
minute
);
calender
.
set
(
Calendar
.
HOUR_OF_DAY
,
hour
);
calender
.
set
(
Calendar
.
SECOND
,
0
);
// 現在の日付の営業時間でセット
Date
businessDate
=
calender
.
getTime
();
if
(
syncedDate
.
before
(
businessDate
)
&&
nowDate
.
after
(
businessDate
))
{
return
true
;
Date
nowDate
=
Calendar
.
getInstance
()
.
getTime
();
// 同期処理を行った時間から現在の時間まで1時間単位でループ処理
while
(
syncCalender
.
before
(
nowDate
))
{
// 1時間毎追加
syncCalender
.
add
(
Calendar
.
HOUR_OF_DAY
,
1
);
// 変更された時間取得
int
targetHour
=
syncCalender
.
get
(
Calendar
.
HOUR_OF_DAY
);
// 1時間追加された時間と営業時間と比較
if
(
targetHour
==
businessHour
)
{
result
=
true
;
break
;
}
}
return
false
;
return
result
;
}
}
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