Commit 3bf5d9fd authored by 周健威's avatar 周健威

解决合并修改

parent 47fc0c86
...@@ -146,4 +146,9 @@ public class Vehicle { ...@@ -146,4 +146,9 @@ public class Vehicle {
*/ */
@Column(name = "travel_status") @Column(name = "travel_status")
private Integer travelStatus; private Integer travelStatus;
/**
* 是否删除;0-正常;1-删除
*/
private Integer isDel;
} }
\ No newline at end of file
...@@ -1064,4 +1064,12 @@ public class VehicleBiz extends BaseBiz<VehicleMapper, Vehicle> { ...@@ -1064,4 +1064,12 @@ public class VehicleBiz extends BaseBiz<VehicleMapper, Vehicle> {
return pageDataVO; return pageDataVO;
} }
//删除车辆信息
public RestResponse delVehicleById(String id){
Vehicle vehicle=new Vehicle();
vehicle.setId(id);
vehicle.setIsDel(1);
updateSelectiveById(vehicle);
return RestResponse.suc();
}
} }
...@@ -465,6 +465,16 @@ public class VehicleController extends BaseController<VehicleBiz> { ...@@ -465,6 +465,16 @@ public class VehicleController extends BaseController<VehicleBiz> {
return baseBiz.getOneById(id); return baseBiz.getOneById(id);
} }
/**
* 删除车辆信息
* @param id
* @return
* @throws Exception
*/
@RequestMapping(value = "/del/{id}", method = RequestMethod.DELETE)
public RestResponse retVehicle(@PathVariable String id) throws Exception {
return baseBiz.delVehicleById(id);
}
} }
...@@ -31,6 +31,7 @@ ...@@ -31,6 +31,7 @@
<select id="getByPage" parameterType="java.util.Map" <select id="getByPage" parameterType="java.util.Map"
resultType="com.xxfc.platform.vehicle.pojo.QueryVehicleVo"> resultType="com.xxfc.platform.vehicle.pojo.QueryVehicleVo">
SELECT r.* FROM (
select DISTINCT v.`id`, select DISTINCT v.`id`,
v.`code`, v.`code`,
v.`status`, v.`status`,
...@@ -68,7 +69,7 @@ ...@@ -68,7 +69,7 @@
LEFT JOIN branch_company bc ON v.park_branch_company_id = bc.id 58 left join branch_company bc on v.`subordinate_branch` = bc.id LEFT JOIN branch_company bc ON v.park_branch_company_id = bc.id 58 left join branch_company bc on v.`subordinate_branch` = 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 &lt;= #{mRangeDateEnd} and v.maintenance_date &lt;= #{mRangeDateEnd}
</if> </if>
...@@ -125,12 +126,12 @@ ...@@ -125,12 +126,12 @@
) )
</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>
...@@ -144,10 +145,12 @@ ...@@ -144,10 +145,12 @@
) )
</if> </if>
order by v.code order by v.code
) r ORDER BY r.subBranchName
</select> </select>
<select id="getByPageNotAllData" parameterType="java.util.Map" <select id="getByPageNotAllData" parameterType="java.util.Map"
resultType="com.xxfc.platform.vehicle.pojo.QueryVehicleVo"> resultType="com.xxfc.platform.vehicle.pojo.QueryVehicleVo">
SELECT r.* FROM (
select DISTINCT v.`id`, select DISTINCT v.`id`,
v.`code`, v.`code`,
v.`status`, v.`status`,
...@@ -185,7 +188,7 @@ ...@@ -185,7 +188,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=",">
...@@ -258,12 +261,12 @@ ...@@ -258,12 +261,12 @@
) )
</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>
...@@ -277,6 +280,7 @@ ...@@ -277,6 +280,7 @@
) )
</if> </if>
order by v.code order by v.code
) r ORDER BY r.subBranchName
</select> </select>
<select id="lockByCode" resultType="com.xxfc.platform.vehicle.entity.Vehicle" <select id="lockByCode" resultType="com.xxfc.platform.vehicle.entity.Vehicle"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment