| | |
| | | validateVehicleBind(vehicleIdSet, null); |
| | | XpCruisePlan plan = new XpCruisePlan(); |
| | | plan.setPlanName(dto.getPlanName()); |
| | | plan.setCreateBy(SecurityUtils.getLoginUser().getSysUser().getNickName()); |
| | | boolean planSaved = save(plan); |
| | | if (!planSaved || plan.getId() == null) { |
| | | throw new ServiceException("新增巡游计划失败", I18nKeyConstant.CRUISE_PLAN_ADD_FAIL); |
| | |
| | | Set<Long> vehicleIdSet = validateVehicleList(dto.getVehicleIdList()); |
| | | validateVehicleBind(vehicleIdSet, dto.getId()); |
| | | plan.setPlanName(dto.getPlanName()); |
| | | plan.setUpdateBy(SecurityUtils.getLoginUser().getSysUser().getNickName()); |
| | | boolean planUpdated = updateById(plan); |
| | | if (!planUpdated) { |
| | | throw new ServiceException("编辑巡游计划失败", I18nKeyConstant.CRUISE_PLAN_EDIT_FAIL); |