| | |
| | | @Autowired(required = false) |
| | | private VersionSensorUnitMapper versionSensorUnitMapper; |
| | | |
| | | @Autowired(required = false) |
| | | private GovMonitorPointMapper govMonitorPointMapper; |
| | | |
| | | @Autowired |
| | | private LogUtils logUtils; |
| | | |
| | |
| | | String updateTime = SDF.format(specialDevice.getUpdateTime()); |
| | | specialDeviceMap.put("createTime",createTime); |
| | | specialDeviceMap.put("updateTime",updateTime); |
| | | Map<String,Object> govMonitorPointMap = new HashMap<>(); |
| | | if (!ObjectUtils.isEmpty(specialDevice.getGuid()) && specialDevice.getGuid()!=null && !"".equals(specialDevice.getGuid())){ |
| | | String guid = specialDevice.getGuid().toString(); |
| | | QueryWrapper<GovMonitorPoint> wapper_govMonitorPoint = new QueryWrapper<>(); |
| | | wapper_govMonitorPoint.eq("is_delete",Constants.NOT_DELETE); |
| | | wapper_govMonitorPoint.eq("guid",guid); |
| | | GovMonitorPoint govMonitorPoint = govMonitorPointMapper.selectOne(wapper_govMonitorPoint); |
| | | if (!ObjectUtils.isEmpty(govMonitorPoint)){ |
| | | govMonitorPointMap.put("id",govMonitorPoint.getId()); |
| | | govMonitorPointMap.put("guid",govMonitorPoint.getGuid()); |
| | | govMonitorPointMap.put("name",govMonitorPoint.getName()); |
| | | } |
| | | } |
| | | specialDeviceMap.put("govMonitorPoint",govMonitorPointMap); |
| | | List<Map<String,Object>> operateList = new ArrayList<>(); |
| | | if (!ObjectUtils.isEmpty(specialDevice.getOperateIds()) && specialDevice.getOperateIds()!=null){ |
| | | String operateIds = specialDevice.getOperateIds(); |
| | |
| | | Integer orgId = specialDevice.getOrganizationId(); |
| | | deleteOrganizationUnitAlarm(orgId, versionId); |
| | | //刷新deviceInfo缓存 |
| | | CacheUtils.refreshDeviceAlarmInfo(); |
| | | CacheUtils.refreshSpecialDeviceAlarmInfo(); |
| | | //操作日志记录 |
| | | HttpServletRequest request = ((ServletRequestAttributes) Objects.requireNonNull(RequestContextHolder.getRequestAttributes())).getRequest(); |
| | | StringBuilder content = new StringBuilder(); |
| | |
| | | specialDeviceInfo.put("name", specialDevice.getName()); |
| | | specialDeviceInfo.put("mac", specialDevice.getMac()); |
| | | specialDeviceInfo.put("createTime", DateUtils.dateToDateString(specialDevice.getCreateTime())); |
| | | specialDeviceInfo.put("guid", specialDevice.getGuid()); |
| | | |
| | | //扩展字段 |
| | | //specialDeviceInfo.put("extend", device.getExtend()); |
| | |
| | | Organization organization = organizationMapper.selectById(specialDevice.getOrganizationId()); |
| | | orgInfo.put("id", organization.getId()); |
| | | orgInfo.put("name", organization.getName()); |
| | | orgInfo.put("areaCode", organization.getAreaCode()); |
| | | orgInfo.put("cityCode", organization.getCityCode()); |
| | | orgInfo.put("provinceCode", organization.getProvinceCode()); |
| | | specialDeviceInfo.put("organization", orgInfo); |
| | | |
| | | setDeviceInfoToRedis(mac, specialDeviceInfo); |