Commit f9ffae79 authored by hanfeng's avatar hanfeng

修改车型列修改

parent 1f8c1752
......@@ -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)){
......
......@@ -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">
......
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