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
ab986b1e
Commit
ab986b1e
authored
Sep 01, 2020
by
unset
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master-vehicle-price' into dev-tiande
parents
819382ca
e8a3bd36
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
8 deletions
+7
-8
AddOrUpdateVehicleVo.java
.../com/xxfc/platform/vehicle/pojo/AddOrUpdateVehicleVo.java
+1
-8
VehicleBiz.java
...c/main/java/com/xxfc/platform/vehicle/biz/VehicleBiz.java
+6
-0
No files found.
xx-vehicle/xx-vehicle-api/src/main/java/com/xxfc/platform/vehicle/pojo/AddOrUpdateVehicleVo.java
View file @
ab986b1e
package
com
.
xxfc
.
platform
.
vehicle
.
pojo
;
import
lombok.Data
;
import
org.apache.commons.lang3.StringUtils
;
import
org.joda.time.DateTime
;
import
org.joda.time.format.DateTimeFormat
;
import
javax.persistence.Column
;
import
java.util.Date
;
...
...
@@ -200,9 +197,5 @@ public class AddOrUpdateVehicleVo {
private
String
registerDate
;
public
void
setRegisterDate
()
{
if
(
StringUtils
.
isNotBlank
(
registerDate
))
{
this
.
vehicleRegisterDate
=
DateTime
.
parse
(
registerDate
,
DateTimeFormat
.
forPattern
(
"yyyy-MM-dd"
)).
toDate
();
}
}
}
\ No newline at end of file
xx-vehicle/xx-vehicle-server/src/main/java/com/xxfc/platform/vehicle/biz/VehicleBiz.java
View file @
ab986b1e
...
...
@@ -225,6 +225,9 @@ public class VehicleBiz extends BaseBiz<VehicleMapper, Vehicle> implements UserR
for
(
AddOrUpdateVehicleVo
addOrUpdateVehicleVo
:
addOrUpdateVehicleVoList
)
{
Vehicle
vehicle
=
new
Vehicle
();
if
(
StringUtils
.
isNotBlank
(
addOrUpdateVehicleVo
.
getRegisterDate
()))
{
addOrUpdateVehicleVo
.
setVehicleRegisterDate
(
DateTime
.
parse
(
addOrUpdateVehicleVo
.
getRegisterDate
(),
DateTimeFormat
.
forPattern
(
"yyyy-MM-dd"
)).
toDate
());
}
BeanUtilsBean
.
getInstance
().
copyProperties
(
vehicle
,
addOrUpdateVehicleVo
);
if
(
addOrUpdateVehicleVo
.
getParkBranchCompanyId
()
==
null
)
{
...
...
@@ -293,6 +296,9 @@ public class VehicleBiz extends BaseBiz<VehicleMapper, Vehicle> implements UserR
}
for
(
AddOrUpdateVehicleVo
addOrUpdateVehicleVo
:
addOrUpdateVehicleVoList
)
{
Vehicle
vehicle
=
new
Vehicle
();
if
(
StringUtils
.
isNotBlank
(
addOrUpdateVehicleVo
.
getRegisterDate
()))
{
addOrUpdateVehicleVo
.
setVehicleRegisterDate
(
DateTime
.
parse
(
addOrUpdateVehicleVo
.
getRegisterDate
(),
DateTimeFormat
.
forPattern
(
"yyyy-MM-dd"
)).
toDate
());
}
BeanUtilsBean
.
getInstance
().
copyProperties
(
vehicle
,
addOrUpdateVehicleVo
);
if
(
addOrUpdateVehicleVo
.
getParkBranchCompanyId
()
==
null
)
{
throw
new
BaseException
(
ResultCode
.
RET_COMPANY_CAN_NOT_BE_NULL
);
...
...
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