修改 influxdb query函数
This commit is contained in:
@@ -208,7 +208,6 @@ public class ProcessInspectionController {
|
||||
|
||||
NPGraphData npGraph1 = new NPGraphData(
|
||||
npGraph.getList()==null?null:npGraph.getList(),
|
||||
npGraph.getSpecificationLimit()==null?null:npGraph.getSpecificationLimit(),
|
||||
npGraph.getArgName()==null?null:npGraph.getArgName()
|
||||
);
|
||||
|
||||
@@ -233,7 +232,6 @@ public class ProcessInspectionController {
|
||||
|
||||
PGraphData npGraph1 = new PGraphData(
|
||||
pGraph.getList()==null?null:pGraph.getList(),
|
||||
pGraph.getSpecificationLimit()==null?null:pGraph.getSpecificationLimit(),
|
||||
pGraph.getArgName()==null?null:pGraph.getArgName()
|
||||
);
|
||||
|
||||
@@ -260,7 +258,6 @@ public class ProcessInspectionController {
|
||||
|
||||
CGraphData npGraph1 = new CGraphData(
|
||||
cGraph.getList()==null?null:cGraph.getList(),
|
||||
cGraph.getSpecificationLimit()==null?null:cGraph.getSpecificationLimit(),
|
||||
cGraph.getArgName()==null?null:cGraph.getArgName()
|
||||
);
|
||||
|
||||
@@ -286,7 +283,6 @@ public class ProcessInspectionController {
|
||||
|
||||
UGraphData npGraph1 = new UGraphData(
|
||||
uGraph.getList()==null?null:uGraph.getList(),
|
||||
uGraph.getSpecificationLimit()==null?null:uGraph.getSpecificationLimit(),
|
||||
uGraph.getArgName()==null?null:uGraph.getArgName()
|
||||
);
|
||||
|
||||
@@ -413,7 +409,6 @@ public class ProcessInspectionController {
|
||||
|
||||
NPGraphData npGraph1 = new NPGraphData(
|
||||
npGraph.getList()==null?null:npGraph.getList(),
|
||||
npGraph.getSpecificationLimit()==null?null:npGraph.getSpecificationLimit(),
|
||||
npGraph.getArgName()==null?null:npGraph.getArgName()
|
||||
);
|
||||
return R.ok("成功",npGraph1);
|
||||
@@ -434,7 +429,6 @@ public class ProcessInspectionController {
|
||||
|
||||
PGraphData npGraph1 = new PGraphData(
|
||||
pGraph.getList()==null?null:pGraph.getList(),
|
||||
pGraph.getSpecificationLimit()==null?null:pGraph.getSpecificationLimit(),
|
||||
pGraph.getArgName()==null?null:pGraph.getArgName()
|
||||
);
|
||||
return R.ok("成功",npGraph1);
|
||||
@@ -454,7 +448,6 @@ public class ProcessInspectionController {
|
||||
|
||||
CGraphData npGraph1 = new CGraphData(
|
||||
cGraph.getList()==null?null:cGraph.getList(),
|
||||
cGraph.getSpecificationLimit()==null?null:cGraph.getSpecificationLimit(),
|
||||
cGraph.getArgName()==null?null:cGraph.getArgName()
|
||||
);
|
||||
return R.ok("成功",npGraph1);
|
||||
@@ -475,7 +468,6 @@ public class ProcessInspectionController {
|
||||
|
||||
UGraphData uGraphData = new UGraphData(
|
||||
uGraph.getList()==null?null:uGraph.getList(),
|
||||
uGraph.getSpecificationLimit()==null?null:uGraph.getSpecificationLimit(),
|
||||
uGraph.getArgName()==null?null:uGraph.getArgName()
|
||||
);
|
||||
return R.ok("成功",uGraphData);
|
||||
|
||||
@@ -17,16 +17,17 @@ import java.util.List;
|
||||
@Data
|
||||
@ApiModel(value = "C控制图 结果类")
|
||||
public class CGraphData {
|
||||
@ApiModelProperty(value = "P控制图list数据")
|
||||
@ApiModelProperty(value = "C控制图list数据")
|
||||
private List<CPoint> list;
|
||||
@ApiModelProperty(value = "P控制图 规格线")
|
||||
private SpecificationLimit specificationLimit;
|
||||
@ApiModelProperty(value = "P控制图 参数名")
|
||||
//计数类参数,不需要显示规格线
|
||||
// @ApiModelProperty(value = "C控制图 规格线")
|
||||
// private SpecificationLimit specificationLimit;
|
||||
@ApiModelProperty(value = "C控制图 参数名")
|
||||
private String argName;
|
||||
|
||||
public CGraphData(List<CPoint> list, SpecificationLimit specificationLimit, String argName) {
|
||||
public CGraphData(List<CPoint> list, String argName) {
|
||||
this.list = list;
|
||||
this.specificationLimit = specificationLimit;
|
||||
// this.specificationLimit = specificationLimit;
|
||||
this.argName = argName;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,14 +22,14 @@ import java.util.List;
|
||||
public class NPGraphData {
|
||||
@ApiModelProperty(value = "NP控制图list数据")
|
||||
private List<NPPoint> list;
|
||||
@ApiModelProperty(value = "NP控制图 规格线")
|
||||
private SpecificationLimit specificationLimit;
|
||||
// @ApiModelProperty(value = "NP控制图 规格线")
|
||||
// private SpecificationLimit specificationLimit;
|
||||
@ApiModelProperty(value = "NP控制图 参数名")
|
||||
private String argName;
|
||||
|
||||
public NPGraphData(List<NPPoint> list, SpecificationLimit specificationLimit, String argName) {
|
||||
public NPGraphData(List<NPPoint> list, String argName) {
|
||||
this.list = list;
|
||||
this.specificationLimit = specificationLimit;
|
||||
// this.specificationLimit = specificationLimit;
|
||||
this.argName = argName;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,14 +19,14 @@ import java.util.List;
|
||||
public class PGraphData {
|
||||
@ApiModelProperty(value = "P控制图list数据")
|
||||
private List<PPoint> list;
|
||||
@ApiModelProperty(value = "P控制图 规格线")
|
||||
private SpecificationLimit specificationLimit;
|
||||
// @ApiModelProperty(value = "P控制图 规格线")
|
||||
// private SpecificationLimit specificationLimit;
|
||||
@ApiModelProperty(value = "P控制图 参数名")
|
||||
private String argName;
|
||||
|
||||
public PGraphData(List<PPoint> list, SpecificationLimit specificationLimit, String argName) {
|
||||
public PGraphData(List<PPoint> list, String argName) {
|
||||
this.list = list;
|
||||
this.specificationLimit = specificationLimit;
|
||||
// this.specificationLimit = specificationLimit;
|
||||
this.argName = argName;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,14 +19,14 @@ import java.util.List;
|
||||
public class UGraphData {
|
||||
@ApiModelProperty(value = "U控制图list数据")
|
||||
private List<UPoint> list;
|
||||
@ApiModelProperty(value = "U控制图 规格线")
|
||||
private SpecificationLimit specificationLimit;
|
||||
// @ApiModelProperty(value = "U控制图 规格线")
|
||||
// private SpecificationLimit specificationLimit;
|
||||
@ApiModelProperty(value = "U控制图 参数名")
|
||||
private String argName;
|
||||
|
||||
public UGraphData(List<UPoint> list, SpecificationLimit specificationLimit, String argName) {
|
||||
public UGraphData(List<UPoint> list, String argName) {
|
||||
this.list = list;
|
||||
this.specificationLimit = specificationLimit;
|
||||
//this.specificationLimit = specificationLimit;
|
||||
this.argName = argName;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,6 +8,7 @@ import com.cnbm.influx.param.QueryDataGroupByTimeParam;
|
||||
import com.cnbm.influx.param.Tag;
|
||||
import com.cnbm.qualityPlanning.entity.CPoint;
|
||||
import com.cnbm.qualityPlanning.entity.ControlLimit;
|
||||
import com.cnbm.qualityPlanning.entity.ControlLimitDetail;
|
||||
import com.cnbm.qualityPlanning.entity.SpecificationLimit;
|
||||
import com.influxdb.query.FluxRecord;
|
||||
import com.influxdb.query.FluxTable;
|
||||
@@ -139,11 +140,11 @@ public class CGraph {
|
||||
* desc: get Xbar控制图 的控制限
|
||||
* 注意:此函数 要在 initialDate()函数执行之后
|
||||
* */
|
||||
public ControlLimit getCL(){
|
||||
public ControlLimitDetail getCL(){
|
||||
|
||||
Double mul = 3 * Math.sqrt( this.cbar );
|
||||
Double lcl = (this.cbar-mul)<0?0:(this.cbar-mul);
|
||||
return new ControlLimit(
|
||||
return new ControlLimitDetail(
|
||||
this.cbar + mul,
|
||||
this.cbar,
|
||||
lcl
|
||||
|
||||
@@ -136,11 +136,11 @@ public class NPGraph {
|
||||
* desc: get Xbar控制图 的控制限
|
||||
* 注意:此函数 要在 initialDate()函数执行之后
|
||||
* */
|
||||
public ControlLimit getCL(Double n){
|
||||
public ControlLimitDetail getCL(Double n){
|
||||
Double npbar = n * this.pbar;
|
||||
Double mul = 3 * Math.sqrt(npbar*(1-this.pbar));
|
||||
Double lcl = (npbar-mul)<0?0:(npbar-mul);
|
||||
return new ControlLimit(
|
||||
return new ControlLimitDetail(
|
||||
npbar + mul,
|
||||
npbar,
|
||||
lcl
|
||||
|
||||
@@ -7,6 +7,7 @@ import com.cnbm.influx.constant.Constant;
|
||||
import com.cnbm.influx.param.QueryDataGroupByTimeParam;
|
||||
import com.cnbm.influx.param.Tag;
|
||||
import com.cnbm.qualityPlanning.entity.ControlLimit;
|
||||
import com.cnbm.qualityPlanning.entity.ControlLimitDetail;
|
||||
import com.cnbm.qualityPlanning.entity.PPoint;
|
||||
import com.cnbm.qualityPlanning.entity.SpecificationLimit;
|
||||
import com.influxdb.query.FluxRecord;
|
||||
@@ -148,11 +149,11 @@ public class PGraph {
|
||||
* desc: get Xbar控制图 的控制限
|
||||
* 注意:此函数 要在 initialDate()函数执行之后
|
||||
* */
|
||||
public ControlLimit getCL(Double n){
|
||||
public ControlLimitDetail getCL(Double n){
|
||||
|
||||
Double mul = 3 * Math.sqrt( ( this.pbar * (1-this.pbar) ) / n );
|
||||
Double lcl = (this.pbar-mul)<0?0:(this.pbar-mul);
|
||||
return new ControlLimit(
|
||||
return new ControlLimitDetail(
|
||||
this.pbar + mul,
|
||||
this.pbar,
|
||||
lcl
|
||||
|
||||
@@ -7,6 +7,7 @@ import com.cnbm.influx.constant.Constant;
|
||||
import com.cnbm.influx.param.QueryDataGroupByTimeParam;
|
||||
import com.cnbm.influx.param.Tag;
|
||||
import com.cnbm.qualityPlanning.entity.ControlLimit;
|
||||
import com.cnbm.qualityPlanning.entity.ControlLimitDetail;
|
||||
import com.cnbm.qualityPlanning.entity.SpecificationLimit;
|
||||
import com.cnbm.qualityPlanning.entity.UPoint;
|
||||
import com.influxdb.query.FluxRecord;
|
||||
@@ -147,11 +148,11 @@ public class UGraph {
|
||||
* desc: get Xbar控制图 的控制限
|
||||
* 注意:此函数 要在 initialDate()函数执行之后
|
||||
* */
|
||||
public ControlLimit getCL(Double n){
|
||||
public ControlLimitDetail getCL(Double n){
|
||||
|
||||
Double mul = 3 * Math.sqrt( this.ubar / n );
|
||||
Double lcl = (this.ubar-mul)<0?0:(this.ubar-mul);
|
||||
return new ControlLimit(
|
||||
return new ControlLimitDetail(
|
||||
this.ubar + mul,
|
||||
this.ubar,
|
||||
lcl
|
||||
|
||||
Reference in New Issue
Block a user