| | |
| | | BeanUtils.copyProperties(insProduct, insProductVo); |
| | | //获取设备名(前提是如果存在) |
| | | if (insProduct.getInstrumentId() != null) { |
| | | String equipmentName = instrumentService.getById(insProduct.getInstrumentId()).getEquipmentName(); |
| | | insProductVo.setInstrumentName(equipmentName); |
| | | insProductVo.setInstrumentId(insProduct.getInstrumentId()); |
| | | } |
| | | //获取用户名(前提是如果存在) |
| | | if (insProduct.getUserProId() != null) { |
| | | String userName = userMapper.selectById(insProduct.getUserProId()).getName(); |
| | | insProductVo.setUserName(userName); |
| | | insProductVo.setUserId(insProduct.getUserProId()); |
| | | } |
| | | //项目关联物料id |
| | | insProductVo.setInspectionMaterialId(inspectionMaterial.getId()); |