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
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
3 deletions
+14
-3
ABVJE_BL/src/jp/agentec/abook/abv/bl/logic/OperationLogic.java
+5
-3
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,18 +1649,20 @@ public class OperationLogic extends AbstractLogic {
...
@@ -1649,18 +1649,20 @@ public class OperationLogic extends AbstractLogic {
Calendar
calender
=
Calendar
.
getInstance
();
Calendar
calender
=
Calendar
.
getInstance
();
// 現在日付
// 現在日付
Date
nowDate
=
calender
.
getTime
();
Date
nowDate
=
calender
.
getTime
();
// 現在日付と同期した日付が1日以上差分がある場合、trueと見做す
if
(
DateTimeUtil
.
isDiffOneDay
(
nowDate
,
syncedDate
))
{
return
true
;
}
else
{
calender
.
set
(
Calendar
.
MINUTE
,
minute
);
calender
.
set
(
Calendar
.
MINUTE
,
minute
);
calender
.
set
(
Calendar
.
HOUR_OF_DAY
,
hour
);
calender
.
set
(
Calendar
.
HOUR_OF_DAY
,
hour
);
calender
.
set
(
Calendar
.
SECOND
,
0
);
calender
.
set
(
Calendar
.
SECOND
,
0
);
// 現在の日付の営業時間でセット
// 現在の日付の営業時間でセット
Date
businessDate
=
calender
.
getTime
();
Date
businessDate
=
calender
.
getTime
();
// 同期処理を行った日付が営業日が過去で
// 現在の時間が営業時間より未来の場合、情報更新状態にする。
if
(
syncedDate
.
before
(
businessDate
)
&&
nowDate
.
after
(
businessDate
))
{
if
(
syncedDate
.
before
(
businessDate
)
&&
nowDate
.
after
(
businessDate
))
{
return
true
;
return
true
;
}
}
}
return
false
;
return
false
;
}
}
}
}
ABVJE_BL/src/jp/agentec/adf/util/DateTimeUtil.java
View file @
2a7a2e9f
...
@@ -584,4 +584,13 @@ public class DateTimeUtil {
...
@@ -584,4 +584,13 @@ public class DateTimeUtil {
return
calendar1
.
before
(
calendar2
);
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