vince
2023-07-03 f1d2c2c7730540e0ee1f4ac28551886be8b89cb1
igds-protocol-bhzn/src/main/java/com/ld/igds/protocol/bhzn/verb/analysis/AnalysisGas.java
@@ -22,6 +22,8 @@
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import java.text.DecimalFormat;
import java.text.NumberFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
@@ -55,7 +57,12 @@
        log.info("气体检测开始解析");
        Res209 res209 = JSONObject.parseObject(reMessage.getContentStr(),Res209.class);
        if(2==res209.getState()){
        }else{
            log.info("气体没有采集完成,取消解析!");
            return;
        }
        DepotConf depotConf = commonService.getCacheDepotConfBySerId(ser.getCompanyId(),ser.getId() );
        //主体信息
        Gas gas = new Gas();
@@ -77,7 +84,8 @@
            info.setId(ContextUtil.buildInfoId(gas.getCompanyId(), gas.getDepotId(), gas.getBatchId()));
            info.setPassCode(i+1);
            info.setPerCo2(cO2ValArray[i].doubleValue());
            info.setPerO2(99 - (n2ValArray[i].doubleValue() /10 ));
            NumberFormat numberFormat = new DecimalFormat("0.00");
            info.setPerO2(Double.parseDouble(numberFormat.format(99 - (n2ValArray[i].doubleValue() /10 ))));
            info.setPerPh3(pH3ValArray[i].doubleValue());
            info.setPerN2(n2ValArray[i].doubleValue() / 10);
            items.add(info);