|
|
|
|
@ -714,6 +714,38 @@ public class DsPartServiceImpl extends BaseServiceImpl<DsPartMapper, DsPartEntit |
|
|
|
|
return null; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public List<DsPartEntity> getPartSubList(String partCode, String partVersion) { |
|
|
|
|
//校验零件号
|
|
|
|
|
if(StringUtils.isEmpty(partCode)){ |
|
|
|
|
throw new ServiceException("零件号不能为空"); |
|
|
|
|
} |
|
|
|
|
//查询零件是否存在
|
|
|
|
|
List<DsPartEntity> dsPartEntityList = this.selectDsPartByPatCode(partCode); |
|
|
|
|
if(CollectionUtils.isEmpty(dsPartEntityList)){ |
|
|
|
|
throw new ServiceException("零件不存在"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
//查询零件
|
|
|
|
|
DsPartEntity partEntity = this.selectDsPartByPatCodeAndVersion(partCode, partVersion); |
|
|
|
|
|
|
|
|
|
List<DsPartRelationEntity> partRelationEntityList = partRelationService.selectDsPartRelationByPartId(partEntity.getId()); |
|
|
|
|
|
|
|
|
|
List<Long> validChildPartIds = partRelationEntityList.stream() |
|
|
|
|
.map(DsPartRelationEntity::getChildPartId) |
|
|
|
|
.filter(Objects::nonNull) |
|
|
|
|
.collect(Collectors.toList()); |
|
|
|
|
|
|
|
|
|
List<DsPartEntity> dsPartEntityList1 = this.selectDsPartByIds(validChildPartIds); |
|
|
|
|
|
|
|
|
|
return dsPartEntityList1; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public List<DsPartEntity> getClassCake(String partCode, String roamNo, String partVersion) { |
|
|
|
|
return null; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 创建维护任务 |
|
|
|
|
*/ |
|
|
|
|
|