|
|
@@ -27,6 +27,7 @@ import com.sckw.slope.detection.model.dto.*;
|
|
|
import com.sckw.slope.detection.model.param.DeviceAdd;
|
|
|
import com.sckw.slope.detection.model.param.DeviceQuery;
|
|
|
import com.sckw.slope.detection.model.vo.DeviceOutputValueVO;
|
|
|
+import com.sckw.slope.detection.model.vo.DevicePartModelVo;
|
|
|
import com.sckw.slope.detection.model.vo.DeviceVo;
|
|
|
import com.sckw.slope.detection.model.vo.ProjectDeviceVO;
|
|
|
import jakarta.servlet.http.HttpServletRequest;
|
|
|
@@ -204,11 +205,34 @@ public class DeviceService {
|
|
|
vo.setManufacturer_contacts(deviceModel.getManufacturerContacts());
|
|
|
vo.setManufacturer_phone(deviceModel.getManufacturerPhone());
|
|
|
}
|
|
|
+ //获取字典
|
|
|
+ Map<String, SystemDict> dictList = commonService.getDictList(null, new HashMap<>() {{
|
|
|
+ put("code", DictEnum.MODEL_PART.getCodeType());
|
|
|
+ put("type", "1");
|
|
|
+ }});
|
|
|
+ //获取集成要素
|
|
|
List<KwsDeviceIntegration> intergData = new ArrayList<>();
|
|
|
- intergData = deviceIntegrationMapper.selectListByParms(vo);
|
|
|
+ intergData = deviceIntegrationMapper.selectListByParmsAndInterName(vo);
|
|
|
if(!Objects.isNull(intergData)){
|
|
|
vo.setIntegration(intergData);
|
|
|
}
|
|
|
+ //获取基础要数
|
|
|
+ List<DevicePartModelVo> partData = new ArrayList<>();
|
|
|
+ partData = deviceModelPartMapper.selectByModelId(deviceModel.getId());
|
|
|
+ if(!Objects.isNull(partData)){//首先在kws_device_model_part获取数据,然后到字典中查询
|
|
|
+
|
|
|
+ for (DevicePartModelVo part : partData) {
|
|
|
+ for (SystemDict value : dictList.values()) {
|
|
|
+ if (part.getPartName().equals(value.getValue())) {
|
|
|
+ part.setPartNameDesc(value.getLabel());
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ vo.setPart(partData);
|
|
|
+ //vo.setIntegration(intergData);
|
|
|
+ }
|
|
|
+ //获取设备基准信息
|
|
|
+
|
|
|
|
|
|
return HttpResult.ok(vo);
|
|
|
}
|
|
|
@@ -494,4 +518,6 @@ public class DeviceService {
|
|
|
}
|
|
|
return HttpResult.ok(mapList);
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
}
|