mark for pull
This commit is contained in:
@@ -32,5 +32,11 @@
|
||||
<artifactId>ym-common</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.cnbm</groupId>
|
||||
<artifactId>ym-quality-planning</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
||||
@@ -0,0 +1,47 @@
|
||||
package com.cnbm.processInspection.entity;
|
||||
|
||||
|
||||
import com.cnbm.qualityPlanning.entity.Point;
|
||||
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* @Desc: ""
|
||||
* @Author: caixiang
|
||||
* @DATE: 2022/7/21 9:43
|
||||
*/
|
||||
public class XbarSPoint extends Point {
|
||||
public XbarSPoint(Integer position, Double value) {
|
||||
super(position, value);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Integer getPosition() {
|
||||
return super.getPosition();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Double getValue() {
|
||||
return super.getValue();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Set<Integer> getUnsatisfiedRules() {
|
||||
return super.getUnsatisfiedRules();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setPosition(Integer position) {
|
||||
super.setPosition(position);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setValue(Double value) {
|
||||
super.setValue(value);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setUnsatisfiedRules(Set<Integer> unsatisfiedRules) {
|
||||
super.setUnsatisfiedRules(unsatisfiedRules);
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,20 @@
|
||||
package com.cnbm.processInspection.graphAnalyzed;
|
||||
|
||||
import com.cnbm.basic.entity.ProductFeatures;
|
||||
import com.cnbm.common.spc.util.DataUtils;
|
||||
import com.cnbm.common.utils.DateUtils;
|
||||
import com.cnbm.influx.config.InfluxClient;
|
||||
import com.cnbm.influx.constant.Constant;
|
||||
import com.cnbm.influx.param.PageInfo;
|
||||
import com.cnbm.influx.param.QueryDataParam;
|
||||
import com.cnbm.influx.param.Range;
|
||||
import com.cnbm.influx.param.Tag;
|
||||
import com.cnbm.processInspection.controlCoefficientConstant.XBarSCoefficients;
|
||||
import com.influxdb.query.FluxRecord;
|
||||
import com.influxdb.query.FluxTable;
|
||||
|
||||
import java.time.Instant;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Desc: ""
|
||||
@@ -27,8 +41,13 @@ public class MeanStandardDeviationGraph {
|
||||
private Integer sampleSize;
|
||||
private String argName;
|
||||
|
||||
MeanStandardDeviationGraph(Integer sampleSize){
|
||||
this.sampleSize = sampleSize;
|
||||
|
||||
MeanStandardDeviationGraph(ProductFeatures productFeatures) throws Exception {
|
||||
if(productFeatures.getSampleSize()==null || productFeatures.getName()==null){
|
||||
throw new Exception("ProductFeatures 参数异常");
|
||||
}
|
||||
|
||||
this.sampleSize = productFeatures.getSampleSize().intValue();
|
||||
this.as = XBarSCoefficients.getAS(sampleSize);
|
||||
this.bu = XBarSCoefficients.getBU(sampleSize);
|
||||
this.bl = XBarSCoefficients.getBU(sampleSize);
|
||||
@@ -41,6 +60,23 @@ public class MeanStandardDeviationGraph {
|
||||
* ①
|
||||
* */
|
||||
public void initialDate(){
|
||||
QueryDataParam queryDataParam = new QueryDataParam();
|
||||
queryDataParam.setBucket(Constant.bucket);
|
||||
queryDataParam.setMeasurement("Weight");
|
||||
queryDataParam.setDropedTagName("transationId");
|
||||
queryDataParam.setTag(new Tag("argName","LTWeight"));
|
||||
queryDataParam.setRange(new Range(DataUtils.getBeforeDate(10).toInstant(), Instant.now()));
|
||||
queryDataParam.setPageInfo(new PageInfo(1,10));
|
||||
List<FluxTable> query = InfluxClient.Client.query(queryDataParam);
|
||||
List<List<FluxTable>> lists = DataUtils.fixedGroup(query, sampleSize);
|
||||
|
||||
|
||||
for (FluxTable fluxTable : query) {
|
||||
List<FluxRecord> records = fluxTable.getRecords();
|
||||
for (FluxRecord fluxRecord : records) {
|
||||
System.out.println("value: " + fluxRecord.getValueByKey("_value"));
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user