Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
cloud-platform
Project
Project
Details
Activity
Releases
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
youjj
cloud-platform
Commits
5d678c3c
Commit
5d678c3c
authored
Aug 26, 2019
by
jiaorz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
预订时间处理bug
parent
85e02085
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
12 deletions
+13
-12
VehicleBookHourInfoBiz.java
...com/xxfc/platform/vehicle/biz/VehicleBookHourInfoBiz.java
+13
-12
No files found.
xx-vehicle/xx-vehicle-server/src/main/java/com/xxfc/platform/vehicle/biz/VehicleBookHourInfoBiz.java
View file @
5d678c3c
...
@@ -64,19 +64,15 @@ public class VehicleBookHourInfoBiz extends BaseBiz<VehicleBookHourInfoMapper, V
...
@@ -64,19 +64,15 @@ public class VehicleBookHourInfoBiz extends BaseBiz<VehicleBookHourInfoMapper, V
int
endHour
=
new
DateTime
(
endDate
).
hourOfDay
().
get
();
int
endHour
=
new
DateTime
(
endDate
).
hourOfDay
().
get
();
//获取开始天的预定小时
//获取开始天的预定小时
int
startPredictableHour
=
0
;
int
startPredictableHour
=
0
;
if
(
hour
>
0
)
{
for
(
int
curentHour
=
hour
;
curentHour
<=
23
;
curentHour
++)
{
for
(
int
curentHour
=
hour
;
curentHour
<=
24
;
curentHour
++)
{
startPredictableHour
|=
1
<<
(
curentHour
);
startPredictableHour
|=
1
<<
(
curentHour
-
1
);
}
}
}
//获取结束天的预定小时
//获取结束天的预定小时
int
endPredictableHour
=
0
;
int
endPredictableHour
=
0
;
if
(
endHour
>
0
)
{
for
(
int
curentHour
=
0
;
curentHour
<=
endHour
;
curentHour
++)
{
for
(
int
curentHour
=
0
;
curentHour
<
endHour
;
curentHour
++)
{
endPredictableHour
|=
1
<<
(
curentHour
);
endPredictableHour
|=
1
<<
(
curentHour
);
}
}
}
DateTime
startDay
=
DateTime
.
parse
(
DateTime
.
parse
(
bookStartDate
,
DEFAULT_DATE_TIME_FORMATTER
).
toString
(
DATE_TIME_FORMATTER
),
DATE_TIME_FORMATTER
);
DateTime
startDay
=
DateTime
.
parse
(
DateTime
.
parse
(
bookStartDate
,
DEFAULT_DATE_TIME_FORMATTER
).
toString
(
DATE_TIME_FORMATTER
),
DATE_TIME_FORMATTER
);
DateTime
endDay
=
DateTime
.
parse
(
DateTime
.
parse
(
bookEndDate
,
DEFAULT_DATE_TIME_FORMATTER
).
toString
(
DATE_TIME_FORMATTER
),
DATE_TIME_FORMATTER
);
DateTime
endDay
=
DateTime
.
parse
(
DateTime
.
parse
(
bookEndDate
,
DEFAULT_DATE_TIME_FORMATTER
).
toString
(
DATE_TIME_FORMATTER
),
DATE_TIME_FORMATTER
);
...
@@ -204,10 +200,15 @@ public class VehicleBookHourInfoBiz extends BaseBiz<VehicleBookHourInfoMapper, V
...
@@ -204,10 +200,15 @@ public class VehicleBookHourInfoBiz extends BaseBiz<VehicleBookHourInfoMapper, V
}
}
public
static
void
main
(
String
[]
args
)
throws
Exception
{
// public static void main(String[] args) throws Exception{
// VehicleBookHourInfoBiz vehicleBookHourInfoBiz = new VehicleBookHourInfoBiz();
Integer
a
=
7936
&
2047
;
// Map<String, Integer> map = vehicleBookHourInfoBiz.getPredictableHours("2019-08-26 10:00:00", "2019-08-27 10:00:00", Boolean.TRUE);
System
.
out
.
println
(
a
);
// for(Map.Entry<String, Integer> entry : map.entrySet()) {
}
// System.out.println(entry.getKey());
// System.out.println(entry.getValue());
// }
// Integer a = 7936 & 2047;
// System.out.println(a);
// }
}
}
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