| | |
| | | if (reqDto.getPosition()!=null && reqDto.getGasName()!=null){ |
| | | GasCategoryConfiguration byGasCateGoryIdAndOrientation = gasCategoryConfigurationRepository.findByGasCategoryIdAndOrientation(reqDto.getGasName(),reqDto.getPosition()); |
| | | GasCategoryConfigurationRespDTO gasCategoryConfigurationRespDTO = new GasCategoryConfigurationRespDTO(); |
| | | BeanUtils.copyProperties(byGasCateGoryIdAndOrientation,gasCategoryConfigurationRespDTO); |
| | | if (byGasCateGoryIdAndOrientation!=null){ |
| | | BeanUtils.copyProperties(byGasCateGoryIdAndOrientation,gasCategoryConfigurationRespDTO); |
| | | } |
| | | gasLineChartRespDTO.setGasCategoryConfigurationRespDTO(gasCategoryConfigurationRespDTO); |
| | | } else if (reqDto.getPosition()!=null){ |
| | | GasCategoryConfiguration byOrientation = gasCategoryConfigurationRepository.findByOrientation(reqDto.getPosition()); |
| | | GasCategoryConfigurationRespDTO gasCategoryConfigurationRespDTO = new GasCategoryConfigurationRespDTO(); |
| | | BeanUtils.copyProperties(byOrientation,gasCategoryConfigurationRespDTO); |
| | | if (byOrientation!=null){ |
| | | BeanUtils.copyProperties(byOrientation,gasCategoryConfigurationRespDTO); |
| | | } |
| | | gasLineChartRespDTO.setGasCategoryConfigurationRespDTO(gasCategoryConfigurationRespDTO); |
| | | } |
| | | |
| | |
| | | if (searchParams.getPosition()!=null && searchParams.getGasName()!=null){ |
| | | GasCategoryConfiguration byGasCateGoryIdAndOrientation = gasCategoryConfigurationRepository.findByGasCategoryIdAndOrientation(searchParams.getGasName(),searchParams.getPosition()); |
| | | GasCategoryConfigurationRespDTO gasCategoryConfigurationRespDTO = new GasCategoryConfigurationRespDTO(); |
| | | BeanUtils.copyProperties(byGasCateGoryIdAndOrientation,gasCategoryConfigurationRespDTO); |
| | | if(byGasCateGoryIdAndOrientation!=null){ |
| | | BeanUtils.copyProperties(byGasCateGoryIdAndOrientation,gasCategoryConfigurationRespDTO); |
| | | } |
| | | gasLineChartRespDTO.setGasCategoryConfigurationRespDTO(gasCategoryConfigurationRespDTO); |
| | | } else if (searchParams.getPosition()!=null){ |
| | | GasCategoryConfiguration byOrientation = gasCategoryConfigurationRepository.findByOrientation(searchParams.getPosition()); |
| | | GasCategoryConfigurationRespDTO gasCategoryConfigurationRespDTO = new GasCategoryConfigurationRespDTO(); |
| | | BeanUtils.copyProperties(byOrientation,gasCategoryConfigurationRespDTO); |
| | | if(byOrientation!=null){ |
| | | BeanUtils.copyProperties(byOrientation,gasCategoryConfigurationRespDTO); |
| | | } |
| | | gasLineChartRespDTO.setGasCategoryConfigurationRespDTO(gasCategoryConfigurationRespDTO); |
| | | } |
| | | gasLineChartRespDTO.setGasName(gasName); |