| | |
| | | wrapper_specialDeviceHistory.eq("organization_id",updateSpecialDevice.getOrganizationId()); |
| | | SpecialDeviceHistory specialDeviceHistory = specialDeviceHistoryMapper.selectOne(wrapper_specialDeviceHistory); |
| | | SpecialDeviceHistory updateSpecialDeviceHistory = new SpecialDeviceHistory(); |
| | | BeanUtils.copyProperties(updateSpecialDevice,updateSpecialDeviceHistory); |
| | | BeanUtils.copyProperties(specialDevice,updateSpecialDeviceHistory); |
| | | updateSpecialDeviceHistory.setCreateTime(null); |
| | | updateSpecialDeviceHistory.setUpdateTime(null); |
| | | updateSpecialDeviceHistory.setIsDelete(null); |
| | |
| | | //操作日志记录 |
| | | HttpServletRequest request = ((ServletRequestAttributes) Objects.requireNonNull(RequestContextHolder.getRequestAttributes())).getRequest(); |
| | | StringBuilder content = new StringBuilder(); |
| | | content.append("修改了特殊设备:").append(specialDeviceHistory.getId()).append(":"); |
| | | content.append("修改了历史特殊设备:").append(specialDeviceHistory.getId()).append(";"); |
| | | Field[] fields = SpecialDevice.class.getDeclaredFields(); |
| | | for (Field field : fields) { |
| | | if (field.getName().equals("id")) { |
| | |
| | | Object o1 = method.invoke(specialDeviceHistory); |
| | | Object o2 = method.invoke(updateSpecialDeviceHistory); |
| | | if (o2 != null) { |
| | | content.append(fieldName).append(":").append(o1).append("-->").append(o2).append(":"); |
| | | content.append(fieldName).append(":").append(o1).append("-->").append(o2).append(";"); |
| | | } |
| | | |
| | | } catch (Exception e) { |
| | |
| | | //操作日志记录 |
| | | HttpServletRequest request = ((ServletRequestAttributes) Objects.requireNonNull(RequestContextHolder.getRequestAttributes())).getRequest(); |
| | | StringBuilder content = new StringBuilder(); |
| | | content.append("修改了特殊设备:").append(specialDeviceId).append(":"); |
| | | content.append("修改了特殊设备:").append(specialDeviceId).append(";"); |
| | | Field[] fields = SpecialDevice.class.getDeclaredFields(); |
| | | for (Field field : fields) { |
| | | if (field.getName().equals("id")) { |
| | |
| | | Object o1 = method.invoke(oldSpecialDevice); |
| | | Object o2 = method.invoke(specialDevice); |
| | | if (o2 != null) { |
| | | content.append(fieldName).append(":").append(o1).append("-->").append(o2).append(":"); |
| | | content.append(fieldName).append(":").append(o1).append("-->").append(o2).append(";"); |
| | | } |
| | | |
| | | } catch (Exception e) { |