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
f9ffae79
Commit
f9ffae79
authored
Jul 01, 2019
by
hanfeng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改车型列修改
parent
1f8c1752
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
8 deletions
+12
-8
VehicleBiz.java
...c/main/java/com/xxfc/platform/vehicle/biz/VehicleBiz.java
+8
-4
VehicleMapper.xml
...ehicle-server/src/main/resources/mapper/VehicleMapper.xml
+4
-4
No files found.
xx-vehicle/xx-vehicle-server/src/main/java/com/xxfc/platform/vehicle/biz/VehicleBiz.java
View file @
f9ffae79
...
...
@@ -199,11 +199,14 @@ public class VehicleBiz extends BaseBiz<VehicleMapper, Vehicle> {
}
for
(
AddOrUpdateVehicleVo
addOrUpdateVehicleVo:
addOrUpdateVehicleVoList
)
{
Vehicle
vehicle
=
new
Vehicle
();
if
(
vehicle
.
getParkBranchCompanyId
()==
null
)
{
BeanUtilsBean
.
getInstance
().
copyProperties
(
vehicle
,
addOrUpdateVehicleVo
);
if
(
addOrUpdateVehicleVo
.
getParkBranchCompanyId
()==
null
)
{
throw
new
CustomIllegalParamException
(
"Stop at branch office cannot be empty"
);
}
BeanUtilsBean
.
getInstance
().
copyProperties
(
vehicle
,
addOrUpdateVehicleVo
);
vehicle
.
setId
(
UUID
.
randomUUID
().
toString
());
// 检查车牌或者编码是否已存在,已存在则返回失败
List
<
Vehicle
>
exitsVehicles
=
lockByCode
(
addOrUpdateVehicleVo
);
...
...
@@ -254,10 +257,11 @@ public class VehicleBiz extends BaseBiz<VehicleMapper, Vehicle> {
for
(
AddOrUpdateVehicleVo
addOrUpdateVehicleVo:
addOrUpdateVehicleVoList
){
Vehicle
vehicle
=
new
Vehicle
();
if
(
vehicle
.
getParkBranchCompanyId
()==
null
)
{
BeanUtilsBean
.
getInstance
().
copyProperties
(
vehicle
,
addOrUpdateVehicleVo
);
if
(
addOrUpdateVehicleVo
.
getParkBranchCompanyId
()==
null
)
{
throw
new
CustomIllegalParamException
(
"Stop at branch office cannot be empty"
);
}
BeanUtilsBean
.
getInstance
().
copyProperties
(
vehicle
,
addOrUpdateVehicleVo
);
//悲观锁,检查是否已存在车牌或编码
List
<
Vehicle
>
exitsVehicles
=
lockByCode
(
addOrUpdateVehicleVo
);
if
(
CollectionUtils
.
isNotEmpty
(
exitsVehicles
)){
...
...
xx-vehicle/xx-vehicle-server/src/main/resources/mapper/VehicleMapper.xml
View file @
f9ffae79
...
...
@@ -44,7 +44,7 @@
v.expect_destination_branch_company_id,
bc1.name as expectDestinationBranchCompanyName,
v.subordinate_branch,
--
bc2.name as subBranchName,
bc2.name as subBranchName,
v.use_type,
v.remark,
v.create_time,
...
...
@@ -79,7 +79,7 @@
-- 目的地分公司
LEFT JOIN branch_company bc1 ON v.expect_destination_branch_company_id = bc1.id
-- 所属分公司
--
LEFT JOIN branch_company bc2 ON v.subordinate_branch = bc2.id
LEFT JOIN branch_company bc2 ON v.subordinate_branch = bc2.id
where
v.is_del=0
<if
test=
"mRangeDateEnd !=null"
>
...
...
@@ -176,7 +176,7 @@
v.expect_destination_branch_company_id,
bc1.name as expectDestinationBranchCompanyName,
v.subordinate_branch,
--
bc2.name as subBranchName,
bc2.name as subBranchName,
v.use_type,
v.remark,
v.create_time,
...
...
@@ -209,7 +209,7 @@
-- 目的地分公司
LEFT JOIN branch_company bc1 ON v.expect_destination_branch_company_id = bc1.id
-- 所属分公司
--
LEFT JOIN branch_company bc2 ON v.subordinate_branch = bc2.id
LEFT JOIN branch_company bc2 ON v.subordinate_branch = bc2.id
where
v.is_del=0
<if
test=
"companyList != 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