zouyu
10 天以前 c935e18fab3604e493de29b164ea4019244bb182
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("零件号不能为空");
        }
    }
}