Commit 48007604 by 黄小葱

Merge remote-tracking branch 'origin/master'

2 parents 034a11e3 2f2e64c6
......@@ -13,7 +13,7 @@ public class VehicleInfoVo implements Serializable {
/**
* 车辆Id
*/
private Long tempId;
private Long id;
/**
* 姓名
......
......@@ -1251,7 +1251,7 @@ public class VehicleService {
if (vehicleType != null) {
vehicle.setModelName(vehicleType.getTypeName());
}
String userId = vehicleInfoVo.getOrganizationId().replace("u", "");
String userId = vehicleInfoVo.getOrganizationId().replaceAll("u", "");
vehicle.setCreatedBy(Long.parseLong(userId));
vehicle.setCreatedDate(new Date());
vehicleMapper.insert(vehicle);
......@@ -1287,17 +1287,13 @@ public class VehicleService {
public void updateVehicleInfo(VehicleInfoVo vehicleInfoVo) {
Vehicle vehicle = new Vehicle();
BeanUtils.copyProperties(vehicleInfoVo, vehicle);
// 是配前端参数
vehicle.setId(vehicleInfoVo.getTempId());
TenantVehicleType vehicleType = tenantVehicleTypeMapper.selectByTypeId(vehicleInfoVo.getModelId());
if (vehicleType != null) {
vehicle.setModelName(vehicleType.getTypeName());
}
String userId = vehicleInfoVo.getOrganizationId().replace("u", "");
vehicle.setCreatedBy(Long.parseLong(userId));
vehicle.setUpdatedDate(new Date());
vehicle.setUpdatedBy(Long.parseLong(userId));
vehicleMapper.updateByPrimaryKey(vehicle);
vehicle.setUpdatedBy(ShieldContextHolder.getUserId());
vehicleMapper.updateByPrimaryKeySelective(vehicle);
// 绑定设备
List<DeviceInfoDto> deviceInfoDtos = vehicleInfoVo.getDeviceInfoDtos();
for (DeviceInfoDto deviceInfoDto : deviceInfoDtos) {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!