rsf-server/src/main/java/com/vincent/rsf/server/manager/entity/DeviceSite.java
@@ -198,7 +198,26 @@ DictDataService dictDataService = SpringUtils.getBean(DictDataService.class); List<DictData> dictDatas = dictDataService.list(new LambdaQueryWrapper<DictData>() .eq(DictData::getDictTypeCode, DictTypeCode.DICT_SYS_TASK_TYPE) .in(DictData::getId, asList)); .in(DictData::getValue, asList)); if (dictDatas.isEmpty()) { return null; } List<String> strings = dictDatas.stream().map(DictData::getLabel).collect(Collectors.toList()); return StringUtils.join(strings, ","); } public String getDevice$(){ if (null == this.device){ return null; } String[] split = this.device.split(","); List<String> asList = Arrays.asList(split); if (asList.isEmpty()) { return null; } DictDataService dictDataService = SpringUtils.getBean(DictDataService.class); List<DictData> dictDatas = dictDataService.list(new LambdaQueryWrapper<DictData>() .eq(DictData::getDictTypeCode, DictTypeCode.DICT_SYS_DEVICE_TYPE) .in(DictData::getValue, asList)); if (dictDatas.isEmpty()) { return null; } rsf-server/src/main/java/com/vincent/rsf/server/manager/service/impl/DeviceSiteServiceImpl.java
@@ -27,8 +27,11 @@ @Override public boolean initSites(DeviceSiteParame param) { if (param.getFlagInit() == 1) { if (!this.remove(new LambdaQueryWrapper<>())) { throw new CoolException("初始化失败: 删除站点失败!!"); List<DeviceSite> list = this.list(new LambdaQueryWrapper<DeviceSite>().select(DeviceSite::getId).last("limit 1")); if (!list.isEmpty()) { if (!this.remove(new LambdaQueryWrapper<>())) { throw new CoolException("初始化失败: 删除站点失败!!"); } } } if (Objects.isNull(param.getDeviceSites()) || StringUtils.isBlank(param.getDeviceSites())) { rsf-server/src/main/java/com/vincent/rsf/server/system/constant/DictTypeCode.java
@@ -19,4 +19,9 @@ */ public final static String DICT_SYS_TASK_TYPE = "sys_task_type"; /** * 设备类型 */ public final static String DICT_SYS_DEVICE_TYPE = "sys_device_type"; }