|
|
|
|
@ -127,17 +127,17 @@ public class DsCraftServiceImpl extends BaseServiceImpl<DsCraftMapper, DsCraftEn |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public List<DsPartVersionEntity> getVersion(Long partId) { |
|
|
|
|
public List<DsPartVersionEntity> getVersion(String partCode) { |
|
|
|
|
//根据零件ID查询零件编码
|
|
|
|
|
DsPartEntity part = partService.getById(partId); |
|
|
|
|
if(null == part){ |
|
|
|
|
throw new ServiceException("零件ID不存在 "+partId); |
|
|
|
|
List<DsPartEntity> dsPartEntityList = partService.selectDsPartByPatCode(partCode); |
|
|
|
|
if(CollectionUtils.isEmpty(dsPartEntityList)){ |
|
|
|
|
throw new ServiceException("零件号:"+partCode+"不存在 "); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
//根据编码 查询版本号
|
|
|
|
|
List<DsPartVersionEntity> partVersionList = partVersionService.selectByPartCode(part.getPartCode()); |
|
|
|
|
List<DsPartVersionEntity> partVersionList = partVersionService.selectByPartCode(partCode); |
|
|
|
|
if(CollectionUtils.isEmpty(partVersionList)){ |
|
|
|
|
throw new IllegalArgumentException(partId+" 没有版本号信息"); |
|
|
|
|
throw new IllegalArgumentException(partCode+" 没有版本号信息"); |
|
|
|
|
} |
|
|
|
|
return partVersionList; |
|
|
|
|
} |
|
|
|
|
|