初定 第一版
This commit is contained in:
parent
cc5848e5cd
commit
cafcdd65e0
@ -6,13 +6,10 @@ import com.cnbm.basic.service.IProductFeaturesService;
|
|||||||
import com.cnbm.common.spc.math.StandardDiviation;
|
import com.cnbm.common.spc.math.StandardDiviation;
|
||||||
import com.cnbm.common.spc.util.DataUtils;
|
import com.cnbm.common.spc.util.DataUtils;
|
||||||
import com.cnbm.common.vo.R;
|
import com.cnbm.common.vo.R;
|
||||||
import com.cnbm.influx.config.InfluxClient;
|
|
||||||
import com.cnbm.influx.constant.Constant;
|
import com.cnbm.influx.constant.Constant;
|
||||||
import com.cnbm.influx.param.QueryDataGroupByTimeParam;
|
import com.cnbm.influx.param.QueryDataGroupByTimeParam;
|
||||||
import com.cnbm.influx.param.QueryDataParam;
|
import com.cnbm.influx.param.QueryDataParam;
|
||||||
import com.cnbm.influx.param.Range;
|
import com.cnbm.influx.param.Range;
|
||||||
import com.cnbm.influx.param.Tag;
|
|
||||||
import com.cnbm.influx.template.Event;
|
|
||||||
import com.cnbm.processInspection.dto.*;
|
import com.cnbm.processInspection.dto.*;
|
||||||
import com.cnbm.processInspection.graphAnalyzed.forCount.c.CGraph;
|
import com.cnbm.processInspection.graphAnalyzed.forCount.c.CGraph;
|
||||||
import com.cnbm.processInspection.graphAnalyzed.forCount.np.NPGraph;
|
import com.cnbm.processInspection.graphAnalyzed.forCount.np.NPGraph;
|
||||||
@ -22,8 +19,6 @@ import com.cnbm.processInspection.graphAnalyzed.forMeterage.mr.MeanRGraph;
|
|||||||
import com.cnbm.processInspection.graphAnalyzed.forMeterage.ms.MeanStandardDeviationGraph;
|
import com.cnbm.processInspection.graphAnalyzed.forMeterage.ms.MeanStandardDeviationGraph;
|
||||||
import com.cnbm.processInspection.graphAnalyzed.forMeterage.xmr.XMRGraph;
|
import com.cnbm.processInspection.graphAnalyzed.forMeterage.xmr.XMRGraph;
|
||||||
import com.cnbm.qualityPlanning.entity.ControlLimitDetail;
|
import com.cnbm.qualityPlanning.entity.ControlLimitDetail;
|
||||||
import com.influxdb.query.FluxRecord;
|
|
||||||
import com.influxdb.query.FluxTable;
|
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.springframework.beans.BeanUtils;
|
import org.springframework.beans.BeanUtils;
|
||||||
@ -32,12 +27,8 @@ import org.springframework.web.bind.annotation.PostMapping;
|
|||||||
import org.springframework.web.bind.annotation.RequestBody;
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
import java.time.Instant;
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Arrays;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Random;
|
|
||||||
|
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/processInspection")
|
@RequestMapping("/processInspection")
|
||||||
@ -227,7 +218,8 @@ public class ProcessInspectionController {
|
|||||||
NPGraph npGraph = new NPGraph(productFeatures);
|
NPGraph npGraph = new NPGraph(productFeatures);
|
||||||
|
|
||||||
QueryDataGroupByTimeParam queryDataParam = new QueryDataGroupByTimeParam();
|
QueryDataGroupByTimeParam queryDataParam = new QueryDataGroupByTimeParam();
|
||||||
queryDataParam.setMeasurement(Constant.measurement);
|
// queryDataParam.setMeasurement(Constant.measurement);
|
||||||
|
queryDataParam.setMeasurement(graphArg.getProcedureName());
|
||||||
queryDataParam.setRange(new Range( graphArg.getBegin().toInstant() , graphArg.getEnd().toInstant() ));
|
queryDataParam.setRange(new Range( graphArg.getBegin().toInstant() , graphArg.getEnd().toInstant() ));
|
||||||
queryDataParam.setTimeType(graphArg.getGroupType());
|
queryDataParam.setTimeType(graphArg.getGroupType());
|
||||||
npGraph.initialDate(queryDataParam);
|
npGraph.initialDate(queryDataParam);
|
||||||
@ -354,7 +346,8 @@ public class ProcessInspectionController {
|
|||||||
meanStandardDeviationGraph.isNeedInterpretation(graphArg.getInterpretationScheme());
|
meanStandardDeviationGraph.isNeedInterpretation(graphArg.getInterpretationScheme());
|
||||||
}
|
}
|
||||||
QueryDataParam queryDataParam = new QueryDataParam();
|
QueryDataParam queryDataParam = new QueryDataParam();
|
||||||
queryDataParam.setMeasurement(Constant.measurement);
|
// queryDataParam.setMeasurement(Constant.measurement);
|
||||||
|
queryDataParam.setMeasurement(graphArg.getProcedureName());
|
||||||
queryDataParam.setRange(new Range(graphArg.getBegin().toInstant(), graphArg.getEnd().toInstant()));
|
queryDataParam.setRange(new Range(graphArg.getBegin().toInstant(), graphArg.getEnd().toInstant()));
|
||||||
meanStandardDeviationGraph.initialDate(queryDataParam);
|
meanStandardDeviationGraph.initialDate(queryDataParam);
|
||||||
|
|
||||||
@ -389,7 +382,9 @@ public class ProcessInspectionController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
QueryDataParam queryDataParam = new QueryDataParam();
|
QueryDataParam queryDataParam = new QueryDataParam();
|
||||||
queryDataParam.setMeasurement(Constant.measurement);
|
// queryDataParam.setMeasurement(Constant.measurement);
|
||||||
|
queryDataParam.setMeasurement(graphArg.getProcedureName());
|
||||||
|
|
||||||
queryDataParam.setRange(new Range(graphArg.getBegin().toInstant(), graphArg.getEnd().toInstant()));
|
queryDataParam.setRange(new Range(graphArg.getBegin().toInstant(), graphArg.getEnd().toInstant()));
|
||||||
meanRGraph.initialDate(queryDataParam);
|
meanRGraph.initialDate(queryDataParam);
|
||||||
|
|
||||||
@ -424,7 +419,8 @@ public class ProcessInspectionController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
QueryDataParam queryDataParam = new QueryDataParam();
|
QueryDataParam queryDataParam = new QueryDataParam();
|
||||||
queryDataParam.setMeasurement(Constant.measurement);
|
// queryDataParam.setMeasurement(Constant.measurement);
|
||||||
|
queryDataParam.setMeasurement(graphArg.getProcedureName());
|
||||||
queryDataParam.setRange(new Range(graphArg.getBegin().toInstant(), graphArg.getEnd().toInstant()));
|
queryDataParam.setRange(new Range(graphArg.getBegin().toInstant(), graphArg.getEnd().toInstant()));
|
||||||
xmrGraph.initialDate(queryDataParam);
|
xmrGraph.initialDate(queryDataParam);
|
||||||
|
|
||||||
@ -453,7 +449,8 @@ public class ProcessInspectionController {
|
|||||||
PGraph pGraph = new PGraph(productFeatures);
|
PGraph pGraph = new PGraph(productFeatures);
|
||||||
|
|
||||||
QueryDataGroupByTimeParam queryDataParam = new QueryDataGroupByTimeParam();
|
QueryDataGroupByTimeParam queryDataParam = new QueryDataGroupByTimeParam();
|
||||||
queryDataParam.setMeasurement(Constant.measurement);
|
// queryDataParam.setMeasurement(Constant.measurement);
|
||||||
|
queryDataParam.setMeasurement(graphArg.getProcedureName());
|
||||||
queryDataParam.setRange(new Range( graphArg.getBegin().toInstant() , graphArg.getEnd().toInstant() ));
|
queryDataParam.setRange(new Range( graphArg.getBegin().toInstant() , graphArg.getEnd().toInstant() ));
|
||||||
queryDataParam.setTimeType(graphArg.getGroupType());
|
queryDataParam.setTimeType(graphArg.getGroupType());
|
||||||
pGraph.initialDate(queryDataParam);
|
pGraph.initialDate(queryDataParam);
|
||||||
@ -474,7 +471,8 @@ public class ProcessInspectionController {
|
|||||||
CGraph cGraph = new CGraph(productFeatures);
|
CGraph cGraph = new CGraph(productFeatures);
|
||||||
|
|
||||||
QueryDataGroupByTimeParam queryDataParam = new QueryDataGroupByTimeParam();
|
QueryDataGroupByTimeParam queryDataParam = new QueryDataGroupByTimeParam();
|
||||||
queryDataParam.setMeasurement(Constant.measurement);
|
// queryDataParam.setMeasurement(Constant.measurement);
|
||||||
|
queryDataParam.setMeasurement(graphArg.getProcedureName());
|
||||||
queryDataParam.setRange(new Range( graphArg.getBegin().toInstant() , graphArg.getEnd().toInstant() ));
|
queryDataParam.setRange(new Range( graphArg.getBegin().toInstant() , graphArg.getEnd().toInstant() ));
|
||||||
queryDataParam.setTimeType(graphArg.getGroupType());
|
queryDataParam.setTimeType(graphArg.getGroupType());
|
||||||
cGraph.initialDate(queryDataParam);
|
cGraph.initialDate(queryDataParam);
|
||||||
@ -496,7 +494,8 @@ public class ProcessInspectionController {
|
|||||||
UGraph uGraph = new UGraph(productFeatures);
|
UGraph uGraph = new UGraph(productFeatures);
|
||||||
|
|
||||||
QueryDataGroupByTimeParam queryDataParam = new QueryDataGroupByTimeParam();
|
QueryDataGroupByTimeParam queryDataParam = new QueryDataGroupByTimeParam();
|
||||||
queryDataParam.setMeasurement(Constant.measurement);
|
// queryDataParam.setMeasurement(Constant.measurement);
|
||||||
|
queryDataParam.setMeasurement(graphArg.getProcedureName());
|
||||||
queryDataParam.setRange(new Range( graphArg.getBegin().toInstant() , graphArg.getEnd().toInstant() ));
|
queryDataParam.setRange(new Range( graphArg.getBegin().toInstant() , graphArg.getEnd().toInstant() ));
|
||||||
queryDataParam.setTimeType(graphArg.getGroupType());
|
queryDataParam.setTimeType(graphArg.getGroupType());
|
||||||
uGraph.initialDate(queryDataParam);
|
uGraph.initialDate(queryDataParam);
|
||||||
|
@ -41,4 +41,7 @@ public class GraphArg {
|
|||||||
|
|
||||||
@ApiModelProperty(value = "分组类别(1=年 , 2=月 , 3=日)(用于计数型控制图)")
|
@ApiModelProperty(value = "分组类别(1=年 , 2=月 , 3=日)(用于计数型控制图)")
|
||||||
private Integer groupType;
|
private Integer groupType;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "工序名")
|
||||||
|
private String procedureName;
|
||||||
}
|
}
|
||||||
|
@ -116,7 +116,12 @@ public class MeanRGraph {
|
|||||||
List<FluxRecord> records = fluxTable.getRecords();
|
List<FluxRecord> records = fluxTable.getRecords();
|
||||||
for (FluxRecord fluxRecord : records) {
|
for (FluxRecord fluxRecord : records) {
|
||||||
//因为 传进去的就是Double 类型,所以取出来,自然而然就是Double
|
//因为 传进去的就是Double 类型,所以取出来,自然而然就是Double
|
||||||
originData.add(Double.parseDouble(fluxRecord.getValueByKey("_value").toString()));
|
Object value = fluxRecord.getValueByKey("_value");
|
||||||
|
|
||||||
|
if(value!=null){
|
||||||
|
originData.add(Double.parseDouble(value.toString()));
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user