| | |
| | | } |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public AjaxResult updateDeviceDeviceMaintenance(DeviceMaintenance deviceMaintenance) { |
| | | // 处理临时文件关联 |
| | | if (deviceMaintenance.getTempFileIds() != null && !deviceMaintenance.getTempFileIds().isEmpty()) { |
| | | for (String tempId : deviceMaintenance.getTempFileIds()) { |
| | | try { |
| | | deviceMaintenanceFileService.bindFromTemp(tempId, deviceMaintenance.getId().intValue(), null); |
| | | } catch (Exception e) { |
| | | return AjaxResult.error("关联临时文件失败: " + e.getMessage()); |
| | | } |
| | | } |
| | | } |
| | | |
| | | if (this.updateById(deviceMaintenance)) { |
| | | return AjaxResult.success(); |
| | | } |