Commit 6c531ff5 authored by 周健威's avatar 周健威

添加公司

parent a6f5939d
......@@ -363,15 +363,15 @@ public class OrderRentVehicleDetail implements Serializable {
@Column(name = "start_branch_id")
@ApiModelProperty(value = "出发隶属的企业id")
private Integer startBranchId;
private Long startBranchId;
@Column(name = "end_branch_id")
@ApiModelProperty(value = "结束隶属的企业id")
private Integer endBranchId;
private Long endBranchId;
@Column(name = "actual_end_branch_id")
@ApiModelProperty(value = "实际结束隶属的企业id")
private Integer actualEndBranchId;
private Long actualEndBranchId;
@Column(name = "actual_end_company_id")
@ApiModelProperty(value = "实际结束公司id")
......@@ -379,7 +379,7 @@ public class OrderRentVehicleDetail implements Serializable {
@Column(name = "vehicle_branch_id")
@ApiModelProperty(value = "车辆隶属企业id")
private Integer vehicleBranchId;
private Long vehicleBranchId;
@Column(name = "vehicle_company_id")
@ApiModelProperty(value = "车辆公司(门店)id")
......
......@@ -33,10 +33,7 @@ import com.xxfc.platform.universal.constant.DictionaryKey;
import com.xxfc.platform.universal.feign.ThirdFeign;
import com.xxfc.platform.vehicle.common.RestResponse;
import com.xxfc.platform.vehicle.constant.AccompanyingItemType;
import com.xxfc.platform.vehicle.entity.BranchCompany;
import com.xxfc.platform.vehicle.entity.VehicleBookRecord;
import com.xxfc.platform.vehicle.entity.VehicleHolidayPriceInfo;
import com.xxfc.platform.vehicle.entity.VehicleModel;
import com.xxfc.platform.vehicle.entity.*;
import com.xxfc.platform.vehicle.feign.VehicleFeign;
import com.xxfc.platform.vehicle.pojo.RentVehicleBookDTO;
import com.xxfc.platform.vehicle.pojo.dto.VehicleModelCalendarPriceDTO;
......@@ -128,7 +125,43 @@ public class OrderRentVehicleService extends AbstractOrderHandle<OrderRentVehicl
//设置新增字段
//开始公司(门店)
// if(null != bo.getStartCompanyId())
if(null != bo.getStartCompanyId()) {
List<BranchCompany> companyDetails = vehicleFeign.branchCompanyEntityList(
BeanUtil.beanToMap(new BranchCompany(){{
setId(bo.getStartCompanyId());
}}, false, true)).getData();
if(null != companyDetails && companyDetails.size() > 0) {
bo.setStartBranchId(companyDetails.get(0).getCompanyId());
}
}
//结束公司(门店)
if(null != bo.getEndCompanyId()) {
List<BranchCompany> companyDetails = vehicleFeign.branchCompanyEntityList(
BeanUtil.beanToMap(new BranchCompany(){{
setId(bo.getEndCompanyId());
}}, false, true)).getData();
if(null != companyDetails && companyDetails.size() > 0) {
bo.setEndBranchId(companyDetails.get(0).getCompanyId());
}
}
//所属公司(门店)
if(null != bo.getVehicleId()) {
Vehicle vehicle = vehicleFeign.get(bo.getVehicleId()).getData();
bo.setVehicleCompanyId(vehicle.getSubordinateBranch());
List<BranchCompany> companyDetails = vehicleFeign.branchCompanyEntityList(
BeanUtil.beanToMap(new BranchCompany(){{
setId(bo.getVehicleCompanyId());
}}, false, true)).getData();
if(null != companyDetails && companyDetails.size() > 0) {
bo.setVehicleBranchId(companyDetails.get(0).getCompanyId());
}
}
}
public void initDictionary() {
......
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