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
4cbea2b6
Commit
4cbea2b6
authored
Jun 19, 2019
by
hezhen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加删除和搜索功能
parent
1399b47c
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
36 additions
and
10 deletions
+36
-10
VehicleBiz.java
...ava/com/xinxincaravan/caravan/vehicle/biz/VehicleBiz.java
+9
-0
Vehicle.java
...ava/com/xinxincaravan/caravan/vehicle/entity/Vehicle.java
+5
-0
VehicleController.java
...xinxincaravan/caravan/vehicle/rest/VehicleController.java
+11
-0
VehicleMapper.xml
vehicle/src/main/resources/mapper/VehicleMapper.xml
+11
-10
No files found.
vehicle/src/main/java/com/xinxincaravan/caravan/vehicle/biz/VehicleBiz.java
View file @
4cbea2b6
...
@@ -837,4 +837,13 @@ public class VehicleBiz extends BaseBiz<VehicleMapper, Vehicle> {
...
@@ -837,4 +837,13 @@ public class VehicleBiz extends BaseBiz<VehicleMapper, Vehicle> {
//去重
//去重
return
zoneCompanyIds
.
parallelStream
().
distinct
().
collect
(
Collectors
.
toList
());
return
zoneCompanyIds
.
parallelStream
().
distinct
().
collect
(
Collectors
.
toList
());
}
}
//删除车辆信息
public
RestResponse
delVehicleById
(
String
id
){
Vehicle
vehicle
=
new
Vehicle
();
vehicle
.
setId
(
id
);
vehicle
.
setIsDel
(
1
);
updateSelectiveById
(
vehicle
);
return
RestResponse
.
suc
();
}
}
}
vehicle/src/main/java/com/xinxincaravan/caravan/vehicle/entity/Vehicle.java
View file @
4cbea2b6
...
@@ -136,4 +136,9 @@ public class Vehicle {
...
@@ -136,4 +136,9 @@ public class Vehicle {
*/
*/
private
Integer
expectDestinationBranchCompanyId
;
private
Integer
expectDestinationBranchCompanyId
;
/**
* 是否删除;0-正常;1-删除
*/
private
Integer
isDel
;
}
}
\ No newline at end of file
vehicle/src/main/java/com/xinxincaravan/caravan/vehicle/rest/VehicleController.java
View file @
4cbea2b6
...
@@ -293,5 +293,16 @@ public class VehicleController extends BaseController<VehicleBiz> {
...
@@ -293,5 +293,16 @@ public class VehicleController extends BaseController<VehicleBiz> {
return
vehicleBookRecordBiz
.
retVehicle
(
operatorId
,
userName
,
retVehicleVo
);
return
vehicleBookRecordBiz
.
retVehicle
(
operatorId
,
userName
,
retVehicleVo
);
}
}
/**
* 删除车辆信息
* @param id
* @return
* @throws Exception
*/
@RequestMapping
(
value
=
"/del/{id}"
,
method
=
RequestMethod
.
DELETE
)
public
RestResponse
retVehicle
(
@PathVariable
String
id
)
throws
Exception
{
return
baseBiz
.
delVehicleById
(
id
);
}
}
}
vehicle/src/main/resources/mapper/VehicleMapper.xml
View file @
4cbea2b6
...
@@ -49,7 +49,7 @@
...
@@ -49,7 +49,7 @@
LEFT JOIN branch_company bc ON v.park_branch_company_id = bc.id
LEFT JOIN branch_company bc ON v.park_branch_company_id = bc.id
LEFT JOIN branch_company bc1 ON v.expect_destination_branch_company_id = bc1.id
LEFT JOIN branch_company bc1 ON v.expect_destination_branch_company_id = bc1.id
where
where
1=1
v.is_del=0
<if
test=
"mRangeDateEnd !=null"
>
<if
test=
"mRangeDateEnd !=null"
>
and v.maintenance_date
<
= #{mRangeDateEnd}
and v.maintenance_date
<
= #{mRangeDateEnd}
</if>
</if>
...
@@ -98,12 +98,13 @@
...
@@ -98,12 +98,13 @@
)
)
</foreach>
</foreach>
</if>
</if>
<if
test=
"subordinateBranch !=null or addrProvince !=null or addrCity !=null or zoneId !=null "
>
and (
<trim
suffixOverrides=
"OR"
>
<if
test=
"subordinateBranch !=null "
>
<if
test=
"subordinateBranch !=null "
>
( v.park_branch_company_id = #{subordinateBranch} or v.expect_destination_branch_company_id=#{subordinateBranch} ) OR
and ( v.park_branch_company_id = #{subordinateBranch} or v.expect_destination_branch_company_id=#{subordinateBranch} )
</if>
</if>
<if
test=
" addrProvince !=null or addrCity !=null or zoneId !=null "
>
and (
<trim
suffixOverrides=
"OR"
>
<if
test=
"addrProvince !=null"
>
<if
test=
"addrProvince !=null"
>
(bc.addr_province=#{addrProvince} or bc1.addr_province=#{addrProvince}) OR
(bc.addr_province=#{addrProvince} or bc1.addr_province=#{addrProvince}) OR
</if>
</if>
...
@@ -158,7 +159,7 @@
...
@@ -158,7 +159,7 @@
LEFT JOIN branch_company bc ON v.park_branch_company_id = bc.id
LEFT JOIN branch_company bc ON v.park_branch_company_id = bc.id
LEFT JOIN branch_company bc1 ON v.expect_destination_branch_company_id = bc1.id
LEFT JOIN branch_company bc1 ON v.expect_destination_branch_company_id = bc1.id
where
where
1=1
v.is_del=0
<if
test=
"companyList != null"
>
<if
test=
"companyList != null"
>
and ( v.park_branch_company_id in (
and ( v.park_branch_company_id in (
<trim
suffixOverrides=
","
>
<trim
suffixOverrides=
","
>
...
@@ -224,12 +225,12 @@
...
@@ -224,12 +225,12 @@
)
)
</foreach>
</foreach>
</if>
</if>
<if
test=
"subordinateBranch !=null or addrProvince !=null or addrCity !=null or zoneId !=null "
>
<if
test=
"subordinateBranch !=null "
>
and ( v.park_branch_company_id = #{subordinateBranch} or v.expect_destination_branch_company_id=#{subordinateBranch} )
</if>
<if
test=
" addrProvince !=null or addrCity !=null or zoneId !=null "
>
and (
and (
<trim
suffixOverrides=
"OR"
>
<trim
suffixOverrides=
"OR"
>
<if
test=
"subordinateBranch !=null "
>
( v.park_branch_company_id = #{subordinateBranch} or v.expect_destination_branch_company_id=#{subordinateBranch} ) OR
</if>
<if
test=
"addrProvince !=null"
>
<if
test=
"addrProvince !=null"
>
(bc.addr_province=#{addrProvince} or bc1.addr_province=#{addrProvince}) OR
(bc.addr_province=#{addrProvince} or bc1.addr_province=#{addrProvince}) OR
</if>
</if>
...
...
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