| | |
| | | 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("零件号不能为空"); |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | |