| | |
| | | //操作日志记录 |
| | | 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) { |
| | |
| | | } |
| | | } |
| | | //获取设备绑定的国控站信息 |
| | | Map<String, Object> govMpInfo = (Map<String, Object>) specialDeviceInfo.getGovMonitorPoint(); |
| | | //Map<String, Object> govMpInfo = (Map<String, Object>) specialDeviceInfo.getGovMonitorPoint(); |
| | | Map<String, Object> govMpInfo = JSON.parseObject(JSON.toJSONString(specialDeviceInfo.getGovMonitorPoint()),Map.class); |
| | | Map<String, Object> aqiMap = null; |
| | | if (govMpInfo.get("guid") != null) { |
| | | if (null != govMpInfo && null != govMpInfo.get("guid")) { |
| | | aqiMap = (Map<String, Object>) redisTemplate.opsForHash().get(RedisConstants.AQI_DATA, govMpInfo.get("guid").toString()); |
| | | } |
| | | return adjustDataUtils.adjust(deviceData, adjustFormula, org.springframework.util.ObjectUtils.isEmpty(aqiMap) ? null : aqiMap); |