zouyu
2026-05-25 79f9c8f092ccc4160e7732bf3f94a2b7ae750617
inspect-server/src/main/java/com/ruoyi/inspect/service/impl/IfsPartPropsRecordServiceImpl.java
@@ -151,6 +151,29 @@
    public IfsPartPropsRecordDTO getOneByContract(IfsInventoryQuantityDto ifsInventoryQuantityDto) {
        return baseMapper.selectOneByContract(ifsInventoryQuantityDto);
    }
    @Override
    public IfsPartPropsRecordDTO getIfsPartProps(IfsInventoryQuantityDto ifsPartPropsRecordDTO) {
        validateParams(ifsPartPropsRecordDTO);
        ifsPartPropsRecordDTO.setOrderType(OrderType.WG.getValue());
        return baseMapper.selectOneByContract(ifsPartPropsRecordDTO);
    }
    void validateParams(IfsInventoryQuantityDto ifsPartPropsRecordDTO){
        if(Objects.isNull(ifsPartPropsRecordDTO)){
            throw new RuntimeException("传入参数不能为空");
        }
        if(StringUtils.isBlank(ifsPartPropsRecordDTO.getContract())){
            throw new RuntimeException("工厂域不能为空");
        }
        if(StringUtils.isBlank(ifsPartPropsRecordDTO.getUpdateBatchNo())){
            throw new RuntimeException("批次号不能为空");
        }
        if(StringUtils.isBlank(ifsPartPropsRecordDTO.getPartNo())){
            throw new RuntimeException("零件号不能为空");
        }
    }
}