|
@@ -179,9 +179,8 @@ public class BaseVehicleController extends BaseController {
|
|
@PostMapping("/vehicleAdd")
|
|
@PostMapping("/vehicleAdd")
|
|
@Log(title = "机车信息管理", businessType = BusinessType.INSERT)
|
|
@Log(title = "机车信息管理", businessType = BusinessType.INSERT)
|
|
public AjaxResult vehicleAdd(@RequestBody BaseVehicle baseVehicle) {
|
|
public AjaxResult vehicleAdd(@RequestBody BaseVehicle baseVehicle) {
|
|
- if (StringUtils.isEmptySunhh(baseVehicle) || StringUtils.isEmptySunhh(baseVehicle.getVehicleName())
|
|
|
|
- || StringUtils.isEmptySunhh(baseVehicle.getVehicleCode())) {
|
|
|
|
- return AjaxResult.error("机车名称、机车编码不能为空!");
|
|
|
|
|
|
+ if (StringUtils.isEmptySunhh(baseVehicle) || StringUtils.isEmptySunhh(baseVehicle.getVehicleCode())) {
|
|
|
|
+ return AjaxResult.error("机车号不能为空!");
|
|
}
|
|
}
|
|
return baseVehicleService.vehicleAdd(baseVehicle, getUserId());
|
|
return baseVehicleService.vehicleAdd(baseVehicle, getUserId());
|
|
}
|
|
}
|
|
@@ -199,6 +198,9 @@ public class BaseVehicleController extends BaseController {
|
|
if (StringUtils.isEmptySunhh(baseVehicle) || StringUtils.isEmptySunhh(baseVehicle.getId())) {
|
|
if (StringUtils.isEmptySunhh(baseVehicle) || StringUtils.isEmptySunhh(baseVehicle.getId())) {
|
|
return AjaxResult.error("修改ID不能为空!");
|
|
return AjaxResult.error("修改ID不能为空!");
|
|
}
|
|
}
|
|
|
|
+ if ( StringUtils.isEmptySunhh(baseVehicle.getVehicleCode())) {
|
|
|
|
+ return AjaxResult.error("机车号不能为空!");
|
|
|
|
+ }
|
|
return baseVehicleService.vehicleUpdate(baseVehicle, getUserId());
|
|
return baseVehicleService.vehicleUpdate(baseVehicle, getUserId());
|
|
}
|
|
}
|
|
|
|
|