huangzhen
2023-12-19 2dd2e7f54db7149965acaa11d933f85b31fbd59c
src/main/java/com/gkhy/fourierSpecialGasMonitor/service/impl/DataReceiveServiceImpl.java
@@ -157,7 +157,7 @@
    @Override
    public ForeignResult uploadGasFlux(UploadGasFluxReqDTO reqDto) {
        gasFluxParameterVerification(reqDto);
        //gasFluxParameterVerification(reqDto);
        GasFlux gasFlux = new GasFlux();
        BeanUtils.copyProperties(reqDto,gasFlux);
        gasFlux.setDataReceivingTime(LocalDateTime.now());
@@ -240,7 +240,7 @@
    @Override
    @Transactional
    public ForeignResult uploadGasConcentration(UploadGasConcentrationReqDTO reqDto) {
        gasConcentrationParameterVerification(reqDto);
        //gasConcentrationParameterVerification(reqDto);
        GasConcentration gasConcentration = new GasConcentration();
        BeanUtils.copyProperties(reqDto,gasConcentration);
        gasConcentration.setDataReceivingTime(LocalDateTime.now());
@@ -283,6 +283,7 @@
                        } catch (IllegalAccessException e) {
                            logger.info("【警告】反射获取气体浓度失败");
                        }
                        if (value != null) {
                        if (value > threshold.get(i)) {
                            Integer integer = gasExcCountMap.get(i);
                            Integer count= integer + 1;
@@ -297,6 +298,7 @@
                            Integer integer = gasExcCountMap.get(i);
                            if (integer != null) {
                                gasExcCountMap.put(i,0);
                                }
                            }
                        }
                    }
@@ -415,66 +417,66 @@
            throw new DataReceiveException(this.getClass(), ForeignResultCode.PARAM_ERROR_NULL.getCode(),"实时风向数据为空");
        if (reqDto.getPressure() == null)
            throw new DataReceiveException(this.getClass(), ForeignResultCode.PARAM_ERROR_NULL.getCode(),"实时气压数据为空");
        if (reqDto.getGasName01() <= 0)
            throw new DataReceiveException(this.getClass(), ForeignResultCode.PARAM_ERROR_NULL.getCode(),"气体种类01编号异常");
        if (reqDto.getGasName02() <= 0)
            throw new DataReceiveException(this.getClass(), ForeignResultCode.PARAM_ERROR_NULL.getCode(),"气体种类02编号异常");
        if (reqDto.getGasName03() <= 0)
            throw new DataReceiveException(this.getClass(), ForeignResultCode.PARAM_ERROR_NULL.getCode(),"气体种类03编号异常");
        if (reqDto.getGasName04() <= 0)
            throw new DataReceiveException(this.getClass(), ForeignResultCode.PARAM_ERROR_NULL.getCode(),"气体种类04编号异常");
        if (reqDto.getGasName05() <= 0)
            throw new DataReceiveException(this.getClass(), ForeignResultCode.PARAM_ERROR_NULL.getCode(),"气体种类05编号异常");
        if (reqDto.getGasName06() <= 0)
            throw new DataReceiveException(this.getClass(), ForeignResultCode.PARAM_ERROR_NULL.getCode(),"气体种类06编号异常");
        if (reqDto.getGasName07() <= 0)
            throw new DataReceiveException(this.getClass(), ForeignResultCode.PARAM_ERROR_NULL.getCode(),"气体种类07编号异常");
        if (reqDto.getGasName08() <= 0)
            throw new DataReceiveException(this.getClass(), ForeignResultCode.PARAM_ERROR_NULL.getCode(),"气体种类08编号异常");
        if (reqDto.getGasName09() <= 0)
            throw new DataReceiveException(this.getClass(), ForeignResultCode.PARAM_ERROR_NULL.getCode(),"气体种类09编号异常");
        if (reqDto.getGasName10() <= 0)
            throw new DataReceiveException(this.getClass(), ForeignResultCode.PARAM_ERROR_NULL.getCode(),"气体种类10编号异常");
        if (reqDto.getGasName11() <= 0)
            throw new DataReceiveException(this.getClass(), ForeignResultCode.PARAM_ERROR_NULL.getCode(),"气体种类11编号异常");
        if (reqDto.getGasName12() <= 0)
            throw new DataReceiveException(this.getClass(), ForeignResultCode.PARAM_ERROR_NULL.getCode(),"气体种类12编号异常");
        if (reqDto.getGasName13() <= 0)
            throw new DataReceiveException(this.getClass(), ForeignResultCode.PARAM_ERROR_NULL.getCode(),"气体种类13编号异常");
        if (reqDto.getGasName14() <= 0)
            throw new DataReceiveException(this.getClass(), ForeignResultCode.PARAM_ERROR_NULL.getCode(),"气体种类14编号异常");
        if (reqDto.getGasName15() <= 0)
            throw new DataReceiveException(this.getClass(), ForeignResultCode.PARAM_ERROR_NULL.getCode(),"气体种类15编号异常");
        if (reqDto.getGasName16() <= 0)
            throw new DataReceiveException(this.getClass(), ForeignResultCode.PARAM_ERROR_NULL.getCode(),"气体种类16编号异常");
        if (reqDto.getGasName17() <= 0)
            throw new DataReceiveException(this.getClass(), ForeignResultCode.PARAM_ERROR_NULL.getCode(),"气体种类17编号异常");
        if (reqDto.getGasName18() <= 0)
            throw new DataReceiveException(this.getClass(), ForeignResultCode.PARAM_ERROR_NULL.getCode(),"气体种类18编号异常");
        if (reqDto.getGasName19() <= 0)
            throw new DataReceiveException(this.getClass(), ForeignResultCode.PARAM_ERROR_NULL.getCode(),"气体种类19编号异常");
        if (reqDto.getGasName20() <= 0)
            throw new DataReceiveException(this.getClass(), ForeignResultCode.PARAM_ERROR_NULL.getCode(),"气体种类20编号异常");
        if (reqDto.getGasName21() <= 0)
            throw new DataReceiveException(this.getClass(), ForeignResultCode.PARAM_ERROR_NULL.getCode(),"气体种类21编号异常");
        if (reqDto.getGasName22() <= 0)
            throw new DataReceiveException(this.getClass(), ForeignResultCode.PARAM_ERROR_NULL.getCode(),"气体种类22编号异常");
        if (reqDto.getGasName23() <= 0)
            throw new DataReceiveException(this.getClass(), ForeignResultCode.PARAM_ERROR_NULL.getCode(),"气体种类23编号异常");
        if (reqDto.getGasName24() <= 0)
            throw new DataReceiveException(this.getClass(), ForeignResultCode.PARAM_ERROR_NULL.getCode(),"气体种类24编号异常");
        if (reqDto.getGasName25() <= 0)
            throw new DataReceiveException(this.getClass(), ForeignResultCode.PARAM_ERROR_NULL.getCode(),"气体种类25编号异常");
        if (reqDto.getGasName26() <= 0)
            throw new DataReceiveException(this.getClass(), ForeignResultCode.PARAM_ERROR_NULL.getCode(),"气体种类26编号异常");
        if (reqDto.getGasName27() <= 0)
            throw new DataReceiveException(this.getClass(), ForeignResultCode.PARAM_ERROR_NULL.getCode(),"气体种类27编号异常");
        if (reqDto.getGasName28() <= 0)
            throw new DataReceiveException(this.getClass(), ForeignResultCode.PARAM_ERROR_NULL.getCode(),"气体种类28编号异常");
        if (reqDto.getGasName29() <= 0)
            throw new DataReceiveException(this.getClass(), ForeignResultCode.PARAM_ERROR_NULL.getCode(),"气体种类29编号异常");
        if (reqDto.getGasName30() <= 0)
            throw new DataReceiveException(this.getClass(), ForeignResultCode.PARAM_ERROR_NULL.getCode(),"气体种类30编号异常");
        //if (reqDto.getGasName01() <= 0)
        //    throw new DataReceiveException(this.getClass(), ForeignResultCode.PARAM_ERROR_NULL.getCode(),"气体种类01编号异常");
        //if (reqDto.getGasName02() <= 0)
        //    throw new DataReceiveException(this.getClass(), ForeignResultCode.PARAM_ERROR_NULL.getCode(),"气体种类02编号异常");
        //if (reqDto.getGasName03() <= 0)
        //    throw new DataReceiveException(this.getClass(), ForeignResultCode.PARAM_ERROR_NULL.getCode(),"气体种类03编号异常");
        //if (reqDto.getGasName04() <= 0)
        //    throw new DataReceiveException(this.getClass(), ForeignResultCode.PARAM_ERROR_NULL.getCode(),"气体种类04编号异常");
        //if (reqDto.getGasName05() <= 0)
        //    throw new DataReceiveException(this.getClass(), ForeignResultCode.PARAM_ERROR_NULL.getCode(),"气体种类05编号异常");
        //if (reqDto.getGasName06() <= 0)
        //    throw new DataReceiveException(this.getClass(), ForeignResultCode.PARAM_ERROR_NULL.getCode(),"气体种类06编号异常");
        //if (reqDto.getGasName07() <= 0)
        //    throw new DataReceiveException(this.getClass(), ForeignResultCode.PARAM_ERROR_NULL.getCode(),"气体种类07编号异常");
        //if (reqDto.getGasName08() <= 0)
        //    throw new DataReceiveException(this.getClass(), ForeignResultCode.PARAM_ERROR_NULL.getCode(),"气体种类08编号异常");
        //if (reqDto.getGasName09() <= 0)
        //    throw new DataReceiveException(this.getClass(), ForeignResultCode.PARAM_ERROR_NULL.getCode(),"气体种类09编号异常");
        //if (reqDto.getGasName10() <= 0)
        //    throw new DataReceiveException(this.getClass(), ForeignResultCode.PARAM_ERROR_NULL.getCode(),"气体种类10编号异常");
        //if (reqDto.getGasName11() <= 0)
        //    throw new DataReceiveException(this.getClass(), ForeignResultCode.PARAM_ERROR_NULL.getCode(),"气体种类11编号异常");
        //if (reqDto.getGasName12() <= 0)
        //    throw new DataReceiveException(this.getClass(), ForeignResultCode.PARAM_ERROR_NULL.getCode(),"气体种类12编号异常");
        //if (reqDto.getGasName13() <= 0)
        //    throw new DataReceiveException(this.getClass(), ForeignResultCode.PARAM_ERROR_NULL.getCode(),"气体种类13编号异常");
        //if (reqDto.getGasName14() <= 0)
        //    throw new DataReceiveException(this.getClass(), ForeignResultCode.PARAM_ERROR_NULL.getCode(),"气体种类14编号异常");
        //if (reqDto.getGasName15() <= 0)
        //    throw new DataReceiveException(this.getClass(), ForeignResultCode.PARAM_ERROR_NULL.getCode(),"气体种类15编号异常");
        //if (reqDto.getGasName16() <= 0)
        //    throw new DataReceiveException(this.getClass(), ForeignResultCode.PARAM_ERROR_NULL.getCode(),"气体种类16编号异常");
        //if (reqDto.getGasName17() <= 0)
        //    throw new DataReceiveException(this.getClass(), ForeignResultCode.PARAM_ERROR_NULL.getCode(),"气体种类17编号异常");
        //if (reqDto.getGasName18() <= 0)
        //    throw new DataReceiveException(this.getClass(), ForeignResultCode.PARAM_ERROR_NULL.getCode(),"气体种类18编号异常");
        //if (reqDto.getGasName19() <= 0)
        //    throw new DataReceiveException(this.getClass(), ForeignResultCode.PARAM_ERROR_NULL.getCode(),"气体种类19编号异常");
        //if (reqDto.getGasName20() <= 0)
        //    throw new DataReceiveException(this.getClass(), ForeignResultCode.PARAM_ERROR_NULL.getCode(),"气体种类20编号异常");
        //if (reqDto.getGasName21() <= 0)
        //    throw new DataReceiveException(this.getClass(), ForeignResultCode.PARAM_ERROR_NULL.getCode(),"气体种类21编号异常");
        //if (reqDto.getGasName22() <= 0)
        //    throw new DataReceiveException(this.getClass(), ForeignResultCode.PARAM_ERROR_NULL.getCode(),"气体种类22编号异常");
        //if (reqDto.getGasName23() <= 0)
        //    throw new DataReceiveException(this.getClass(), ForeignResultCode.PARAM_ERROR_NULL.getCode(),"气体种类23编号异常");
        //if (reqDto.getGasName24() <= 0)
        //    throw new DataReceiveException(this.getClass(), ForeignResultCode.PARAM_ERROR_NULL.getCode(),"气体种类24编号异常");
        //if (reqDto.getGasName25() <= 0)
        //    throw new DataReceiveException(this.getClass(), ForeignResultCode.PARAM_ERROR_NULL.getCode(),"气体种类25编号异常");
        //if (reqDto.getGasName26() <= 0)
        //    throw new DataReceiveException(this.getClass(), ForeignResultCode.PARAM_ERROR_NULL.getCode(),"气体种类26编号异常");
        //if (reqDto.getGasName27() <= 0)
        //    throw new DataReceiveException(this.getClass(), ForeignResultCode.PARAM_ERROR_NULL.getCode(),"气体种类27编号异常");
        //if (reqDto.getGasName28() <= 0)
        //    throw new DataReceiveException(this.getClass(), ForeignResultCode.PARAM_ERROR_NULL.getCode(),"气体种类28编号异常");
        //if (reqDto.getGasName29() <= 0)
        //    throw new DataReceiveException(this.getClass(), ForeignResultCode.PARAM_ERROR_NULL.getCode(),"气体种类29编号异常");
        //if (reqDto.getGasName30() <= 0)
        //    throw new DataReceiveException(this.getClass(), ForeignResultCode.PARAM_ERROR_NULL.getCode(),"气体种类30编号异常");
    }
    private void gasFluxParameterVerification(UploadGasFluxReqDTO reqDto){
@@ -492,46 +494,46 @@
            throw new DataReceiveException(this.getClass(), ForeignResultCode.PARAM_ERROR_NULL.getCode(),"实时风速数据为空");
        if (reqDto.getWindDirection() <= 0)
            throw new DataReceiveException(this.getClass(), ForeignResultCode.PARAM_ERROR_NULL.getCode(),"实时风向数据为空");
        if (reqDto.getGasName01() <= 0)
            throw new DataReceiveException(this.getClass(), ForeignResultCode.PARAM_ERROR_NULL.getCode(),"气体种类01编号异常");
        if (reqDto.getGasName02() <= 0)
            throw new DataReceiveException(this.getClass(), ForeignResultCode.PARAM_ERROR_NULL.getCode(),"气体种类02编号异常");
        if (reqDto.getGasName03() <= 0)
            throw new DataReceiveException(this.getClass(), ForeignResultCode.PARAM_ERROR_NULL.getCode(),"气体种类03编号异常");
        if (reqDto.getGasName04() <= 0)
            throw new DataReceiveException(this.getClass(), ForeignResultCode.PARAM_ERROR_NULL.getCode(),"气体种类04编号异常");
        if (reqDto.getGasName05() <= 0)
            throw new DataReceiveException(this.getClass(), ForeignResultCode.PARAM_ERROR_NULL.getCode(),"气体种类05编号异常");
        if (reqDto.getGasName06() <= 0)
            throw new DataReceiveException(this.getClass(), ForeignResultCode.PARAM_ERROR_NULL.getCode(),"气体种类06编号异常");
        if (reqDto.getGasName07() <= 0)
            throw new DataReceiveException(this.getClass(), ForeignResultCode.PARAM_ERROR_NULL.getCode(),"气体种类07编号异常");
        if (reqDto.getGasName08() <= 0)
            throw new DataReceiveException(this.getClass(), ForeignResultCode.PARAM_ERROR_NULL.getCode(),"气体种类08编号异常");
        if (reqDto.getGasName09() <= 0)
            throw new DataReceiveException(this.getClass(), ForeignResultCode.PARAM_ERROR_NULL.getCode(),"气体种类09编号异常");
        if (reqDto.getGasName10() <= 0)
            throw new DataReceiveException(this.getClass(), ForeignResultCode.PARAM_ERROR_NULL.getCode(),"气体种类10编号异常");
        if (reqDto.getGasName11() <= 0)
            throw new DataReceiveException(this.getClass(), ForeignResultCode.PARAM_ERROR_NULL.getCode(),"气体种类11编号异常");
        if (reqDto.getGasName12() <= 0)
            throw new DataReceiveException(this.getClass(), ForeignResultCode.PARAM_ERROR_NULL.getCode(),"气体种类12编号异常");
        if (reqDto.getGasName13() <= 0)
            throw new DataReceiveException(this.getClass(), ForeignResultCode.PARAM_ERROR_NULL.getCode(),"气体种类13编号异常");
        if (reqDto.getGasName14() <= 0)
            throw new DataReceiveException(this.getClass(), ForeignResultCode.PARAM_ERROR_NULL.getCode(),"气体种类14编号异常");
        if (reqDto.getGasName15() <= 0)
            throw new DataReceiveException(this.getClass(), ForeignResultCode.PARAM_ERROR_NULL.getCode(),"气体种类15编号异常");
        if (reqDto.getGasName16() <= 0)
            throw new DataReceiveException(this.getClass(), ForeignResultCode.PARAM_ERROR_NULL.getCode(),"气体种类16编号异常");
        if (reqDto.getGasName17() <= 0)
            throw new DataReceiveException(this.getClass(), ForeignResultCode.PARAM_ERROR_NULL.getCode(),"气体种类17编号异常");
        if (reqDto.getGasName18() <= 0)
            throw new DataReceiveException(this.getClass(), ForeignResultCode.PARAM_ERROR_NULL.getCode(),"气体种类18编号异常");
        if (reqDto.getGasName19() <= 0)
            throw new DataReceiveException(this.getClass(), ForeignResultCode.PARAM_ERROR_NULL.getCode(),"气体种类19编号异常");
        if (reqDto.getGasName20() <= 0)
            throw new DataReceiveException(this.getClass(), ForeignResultCode.PARAM_ERROR_NULL.getCode(),"气体种类20编号异常");
        //if (reqDto.getGasName01() <= 0)
        //    throw new DataReceiveException(this.getClass(), ForeignResultCode.PARAM_ERROR_NULL.getCode(),"气体种类01编号异常");
        //if (reqDto.getGasName02() <= 0)
        //    throw new DataReceiveException(this.getClass(), ForeignResultCode.PARAM_ERROR_NULL.getCode(),"气体种类02编号异常");
        //if (reqDto.getGasName03() <= 0)
        //    throw new DataReceiveException(this.getClass(), ForeignResultCode.PARAM_ERROR_NULL.getCode(),"气体种类03编号异常");
        //if (reqDto.getGasName04() <= 0)
        //    throw new DataReceiveException(this.getClass(), ForeignResultCode.PARAM_ERROR_NULL.getCode(),"气体种类04编号异常");
        //if (reqDto.getGasName05() <= 0)
        //    throw new DataReceiveException(this.getClass(), ForeignResultCode.PARAM_ERROR_NULL.getCode(),"气体种类05编号异常");
        //if (reqDto.getGasName06() <= 0)
        //    throw new DataReceiveException(this.getClass(), ForeignResultCode.PARAM_ERROR_NULL.getCode(),"气体种类06编号异常");
        //if (reqDto.getGasName07() <= 0)
        //    throw new DataReceiveException(this.getClass(), ForeignResultCode.PARAM_ERROR_NULL.getCode(),"气体种类07编号异常");
        //if (reqDto.getGasName08() <= 0)
        //    throw new DataReceiveException(this.getClass(), ForeignResultCode.PARAM_ERROR_NULL.getCode(),"气体种类08编号异常");
        //if (reqDto.getGasName09() <= 0)
        //    throw new DataReceiveException(this.getClass(), ForeignResultCode.PARAM_ERROR_NULL.getCode(),"气体种类09编号异常");
        //if (reqDto.getGasName10() <= 0)
        //    throw new DataReceiveException(this.getClass(), ForeignResultCode.PARAM_ERROR_NULL.getCode(),"气体种类10编号异常");
        //if (reqDto.getGasName11() <= 0)
        //    throw new DataReceiveException(this.getClass(), ForeignResultCode.PARAM_ERROR_NULL.getCode(),"气体种类11编号异常");
        //if (reqDto.getGasName12() <= 0)
        //    throw new DataReceiveException(this.getClass(), ForeignResultCode.PARAM_ERROR_NULL.getCode(),"气体种类12编号异常");
        //if (reqDto.getGasName13() <= 0)
        //    throw new DataReceiveException(this.getClass(), ForeignResultCode.PARAM_ERROR_NULL.getCode(),"气体种类13编号异常");
        //if (reqDto.getGasName14() <= 0)
        //    throw new DataReceiveException(this.getClass(), ForeignResultCode.PARAM_ERROR_NULL.getCode(),"气体种类14编号异常");
        //if (reqDto.getGasName15() <= 0)
        //    throw new DataReceiveException(this.getClass(), ForeignResultCode.PARAM_ERROR_NULL.getCode(),"气体种类15编号异常");
        //if (reqDto.getGasName16() <= 0)
        //    throw new DataReceiveException(this.getClass(), ForeignResultCode.PARAM_ERROR_NULL.getCode(),"气体种类16编号异常");
        //if (reqDto.getGasName17() <= 0)
        //    throw new DataReceiveException(this.getClass(), ForeignResultCode.PARAM_ERROR_NULL.getCode(),"气体种类17编号异常");
        //if (reqDto.getGasName18() <= 0)
        //    throw new DataReceiveException(this.getClass(), ForeignResultCode.PARAM_ERROR_NULL.getCode(),"气体种类18编号异常");
        //if (reqDto.getGasName19() <= 0)
        //    throw new DataReceiveException(this.getClass(), ForeignResultCode.PARAM_ERROR_NULL.getCode(),"气体种类19编号异常");
        //if (reqDto.getGasName20() <= 0)
        //    throw new DataReceiveException(this.getClass(), ForeignResultCode.PARAM_ERROR_NULL.getCode(),"气体种类20编号异常");
    }