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
2a7a2e9f
Commit
2a7a2e9f
authored
Dec 02, 2019
by
Lee Jaebin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#36065 営業日を過ぎた場合、前日の報告を削除するため、同期ボタンを活性化する処理追加
parent
d55b2e19
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
10 deletions
+21
-10
ABVJE_BL/src/jp/agentec/abook/abv/bl/logic/OperationLogic.java
+12
-10
ABVJE_BL/src/jp/agentec/adf/util/DateTimeUtil.java
+9
-0
No files found.
ABVJE_BL/src/jp/agentec/abook/abv/bl/logic/OperationLogic.java
View file @
2a7a2e9f
...
...
@@ -1649,17 +1649,19 @@ public class OperationLogic extends AbstractLogic {
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
businessDate
=
calender
.
getTime
();
// 同期処理を行った日付が営業日が過去で
// 現在の時間が営業時間より未来の場合、情報更新状態にする。
if
(
syncedDate
.
before
(
businessDate
)
&&
nowDate
.
after
(
businessDate
))
{
// 現在日付と同期した日付が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
;
}
}
return
false
;
}
...
...
ABVJE_BL/src/jp/agentec/adf/util/DateTimeUtil.java
View file @
2a7a2e9f
...
...
@@ -584,4 +584,13 @@ public class DateTimeUtil {
return
calendar1
.
before
(
calendar2
);
}
/**
* 一日の差があるかどうか判定
* @return
*/
public
static
boolean
isDiffOneDay
(
Date
date1
,
Date
date2
)
{
long
diffTime
=
date1
.
getTime
()
-
date2
.
getTime
();
return
(
int
)
(
diffTime
/
(
1000
*
60
*
60
*
24
))
>
0
;
}
}
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