|
|
@ -90,9 +90,7 @@ public class EqSpotCheckPlanController { |
|
|
if (CollectionUtil.isNotEmpty(planDTOS)) { |
|
|
if (CollectionUtil.isNotEmpty(planDTOS)) { |
|
|
StringBuilder stringBuilder = new StringBuilder(); |
|
|
StringBuilder stringBuilder = new StringBuilder(); |
|
|
planDTOS.forEach(eqSpotCheckPlanDTO -> { |
|
|
planDTOS.forEach(eqSpotCheckPlanDTO -> { |
|
|
|
|
|
|
|
|
iotThingBaseInfoService.getThingInfo(eqSpotCheckPlanDTO, eqSpotCheckPlanDTO.getThingId(), null, "0", String.valueOf(params.get("relationTypeId"))); |
|
|
iotThingBaseInfoService.getThingInfo(eqSpotCheckPlanDTO, eqSpotCheckPlanDTO.getThingId(), null, "0", String.valueOf(params.get("relationTypeId"))); |
|
|
|
|
|
|
|
|
List<Long> standardList = new ArrayList<>(); |
|
|
List<Long> standardList = new ArrayList<>(); |
|
|
List<EqCheckSettingDTO> settingList = eqCheckSettingService.getSettingList(eqSpotCheckPlanDTO.getThingId(), "0"); |
|
|
List<EqCheckSettingDTO> settingList = eqCheckSettingService.getSettingList(eqSpotCheckPlanDTO.getThingId(), "0"); |
|
|
if (CollectionUtil.isNotEmpty(settingList)) { |
|
|
if (CollectionUtil.isNotEmpty(settingList)) { |
|
|
@ -100,25 +98,24 @@ public class EqSpotCheckPlanController { |
|
|
EqCheckStandardDTO eqCheckStandardDTO = eqCheckStandardService.getByIdAs(eqCheckSettingDTO.getStandardId(),EqCheckStandardDTO.class); |
|
|
EqCheckStandardDTO eqCheckStandardDTO = eqCheckStandardService.getByIdAs(eqCheckSettingDTO.getStandardId(),EqCheckStandardDTO.class); |
|
|
if (!Objects.isNull(eqCheckStandardDTO)) { |
|
|
if (!Objects.isNull(eqCheckStandardDTO)) { |
|
|
standardList.add(eqCheckStandardDTO.getId()); |
|
|
standardList.add(eqCheckStandardDTO.getId()); |
|
|
stringBuilder.append(eqCheckStandardDTO.getName() + ","); |
|
|
|
|
|
|
|
|
stringBuilder.append(eqCheckStandardDTO.getName()).append(","); |
|
|
} |
|
|
} |
|
|
}); |
|
|
}); |
|
|
|
|
|
eqSpotCheckPlanDTO.setEqCode(eqSpotCheckPlanDTO.getThingCode()); |
|
|
eqSpotCheckPlanDTO.setCheckIdList(standardList); |
|
|
eqSpotCheckPlanDTO.setCheckIdList(standardList); |
|
|
eqSpotCheckPlanDTO.setCheckNameList(stringBuilder.length() > 0 ? stringBuilder.toString().substring(0, stringBuilder.length() - 1) : ""); |
|
|
|
|
|
|
|
|
eqSpotCheckPlanDTO.setCheckNameList(!stringBuilder.isEmpty() ? stringBuilder.substring(0, stringBuilder.length() - 1) : ""); |
|
|
stringBuilder.setLength(0); |
|
|
stringBuilder.setLength(0); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
List<String> useIdList = StringUtils.isNotBlank(eqSpotCheckPlanDTO.getUseId()) ? Arrays.asList(eqSpotCheckPlanDTO.getUseId().split(",")) : new ArrayList<>(); |
|
|
List<String> useIdList = StringUtils.isNotBlank(eqSpotCheckPlanDTO.getUseId()) ? Arrays.asList(eqSpotCheckPlanDTO.getUseId().split(",")) : new ArrayList<>(); |
|
|
if (CollectionUtil.isNotEmpty(useIdList)) { |
|
|
if (CollectionUtil.isNotEmpty(useIdList)) { |
|
|
useIdList.forEach(idStr -> { |
|
|
useIdList.forEach(idStr -> { |
|
|
SysUserDTO sysUserDTO = sysUserService.get(Long.parseLong(idStr)); |
|
|
SysUserDTO sysUserDTO = sysUserService.get(Long.parseLong(idStr)); |
|
|
if (!Objects.isNull(sysUserDTO)) { |
|
|
if (!Objects.isNull(sysUserDTO)) { |
|
|
stringBuilder.append(sysUserDTO.getRealName() + ","); |
|
|
|
|
|
|
|
|
stringBuilder.append(sysUserDTO.getRealName()).append(","); |
|
|
} |
|
|
} |
|
|
}); |
|
|
}); |
|
|
eqSpotCheckPlanDTO.setUseIdList(useIdList); |
|
|
eqSpotCheckPlanDTO.setUseIdList(useIdList); |
|
|
eqSpotCheckPlanDTO.setOperatorNameList(stringBuilder.length() > 0 ? stringBuilder.toString().substring(0, stringBuilder.length() - 1) : ""); |
|
|
|
|
|
|
|
|
eqSpotCheckPlanDTO.setOperatorNameList(!stringBuilder.isEmpty() ? stringBuilder.substring(0, stringBuilder.length() - 1) : ""); |
|
|
stringBuilder.setLength(0); |
|
|
stringBuilder.setLength(0); |
|
|
} |
|
|
} |
|
|
}); |
|
|
}); |
|
|
@ -139,9 +136,9 @@ public class EqSpotCheckPlanController { |
|
|
} |
|
|
} |
|
|
iotThingBaseInfoService.getThingInfo(data, data.getThingId(), null, "0", relationTypeId); |
|
|
iotThingBaseInfoService.getThingInfo(data, data.getThingId(), null, "0", relationTypeId); |
|
|
|
|
|
|
|
|
|
|
|
data.setEqCode(data.getThingCode()); |
|
|
StringBuilder stringBuilder = new StringBuilder(); |
|
|
StringBuilder stringBuilder = new StringBuilder(); |
|
|
List<EqCheckSettingDTO> settingList = eqCheckSettingService.getSettingList(data.getThingId(), "0"); |
|
|
List<EqCheckSettingDTO> settingList = eqCheckSettingService.getSettingList(data.getThingId(), "0"); |
|
|
|
|
|
|
|
|
if (CollectionUtil.isNotEmpty(settingList)) { |
|
|
if (CollectionUtil.isNotEmpty(settingList)) { |
|
|
List<DataVo> standardList = new ArrayList<>(); |
|
|
List<DataVo> standardList = new ArrayList<>(); |
|
|
List<Long> standardIdList = new ArrayList<>(); |
|
|
List<Long> standardIdList = new ArrayList<>(); |
|
|
@ -153,29 +150,26 @@ public class EqSpotCheckPlanController { |
|
|
dataVo.setName(eqCheckStandardDTO.getName()); |
|
|
dataVo.setName(eqCheckStandardDTO.getName()); |
|
|
standardIdList.add(eqCheckStandardDTO.getId()); |
|
|
standardIdList.add(eqCheckStandardDTO.getId()); |
|
|
standardList.add(dataVo); |
|
|
standardList.add(dataVo); |
|
|
stringBuilder.append(eqCheckStandardDTO.getName() + ","); |
|
|
|
|
|
|
|
|
stringBuilder.append(eqCheckStandardDTO.getName()).append(","); |
|
|
} |
|
|
} |
|
|
}); |
|
|
}); |
|
|
|
|
|
|
|
|
data.setCheckIdList(standardIdList); |
|
|
data.setCheckIdList(standardIdList); |
|
|
data.setDataList(standardList); |
|
|
data.setDataList(standardList); |
|
|
data.setCheckNameList(stringBuilder.length() > 0 ? stringBuilder.toString().substring(0, stringBuilder.length() - 1) : ""); |
|
|
|
|
|
|
|
|
data.setCheckNameList(!stringBuilder.isEmpty() ? stringBuilder.substring(0, stringBuilder.length() - 1) : ""); |
|
|
stringBuilder.setLength(0); |
|
|
stringBuilder.setLength(0); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
List<String> useIdList = StringUtils.isNotBlank(data.getUseId()) ? Arrays.asList(data.getUseId().split(",")) : new ArrayList<>(); |
|
|
List<String> useIdList = StringUtils.isNotBlank(data.getUseId()) ? Arrays.asList(data.getUseId().split(",")) : new ArrayList<>(); |
|
|
|
|
|
|
|
|
if (CollectionUtil.isNotEmpty(useIdList)) { |
|
|
if (CollectionUtil.isNotEmpty(useIdList)) { |
|
|
useIdList.forEach(idStr -> { |
|
|
useIdList.forEach(idStr -> { |
|
|
SysUserDTO sysUserDTO = sysUserService.get(Long.parseLong(idStr)); |
|
|
SysUserDTO sysUserDTO = sysUserService.get(Long.parseLong(idStr)); |
|
|
if (!Objects.isNull(sysUserDTO)) { |
|
|
if (!Objects.isNull(sysUserDTO)) { |
|
|
stringBuilder.append(sysUserDTO.getRealName() + ","); |
|
|
|
|
|
|
|
|
stringBuilder.append(sysUserDTO.getRealName()).append(","); |
|
|
} |
|
|
} |
|
|
}); |
|
|
}); |
|
|
data.setUseIdList(useIdList); |
|
|
data.setUseIdList(useIdList); |
|
|
data.setOperatorNameList(stringBuilder.length() > 0 ? stringBuilder.toString().substring(0, stringBuilder.length() - 1) : ""); |
|
|
|
|
|
|
|
|
data.setOperatorNameList(!stringBuilder.isEmpty() ? stringBuilder.substring(0, stringBuilder.length() - 1) : ""); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
List<EqCheckStandardDetailDTO> detailDTOS = eqCheckStandardDetailService.getAllStandardDetailByThingId(data.getThingId(), "0"); |
|
|
List<EqCheckStandardDetailDTO> detailDTOS = eqCheckStandardDetailService.getAllStandardDetailByThingId(data.getThingId(), "0"); |
|
|
data.setDetailDTOS(detailDTOS); |
|
|
data.setDetailDTOS(detailDTOS); |
|
|
|
|
|
|
|
|
|