diff --git a/ym-process-inspection/src/main/java/com/cnbm/processInspection/controller/ProcessInspectionController.java b/ym-process-inspection/src/main/java/com/cnbm/processInspection/controller/ProcessInspectionController.java index b8d5322..f92f0f0 100644 --- a/ym-process-inspection/src/main/java/com/cnbm/processInspection/controller/ProcessInspectionController.java +++ b/ym-process-inspection/src/main/java/com/cnbm/processInspection/controller/ProcessInspectionController.java @@ -344,6 +344,10 @@ public class ProcessInspectionController { ProductFeatures productFeatures = setRealSampleSize(graphArg); if(productFeatures == null){ return R.failed("检验参数异常"); + }else { + if(productFeatures.getSampleSize()==null || productFeatures.getName()==null){ + return R.failed("ProductFeatures 参数异常"); + } } MeanStandardDeviationGraph meanStandardDeviationGraph = new MeanStandardDeviationGraph(productFeatures); if(graphArg.getInterpretationScheme()!=null){ @@ -372,7 +376,12 @@ public class ProcessInspectionController { ProductFeatures productFeatures = setRealSampleSize(graphArg); if(productFeatures == null){ return R.failed("检验参数异常"); + }else { + if(productFeatures.getSampleSize()==null || productFeatures.getName()==null){ + return R.failed("ProductFeatures 参数异常"); + } } + MeanRGraph meanRGraph = new MeanRGraph(productFeatures); //如果要检验,,那么set 判读方案 if(graphArg.getInterpretationScheme()!=null){ diff --git a/ym-process-inspection/src/main/java/com/cnbm/processInspection/graphAnalyzed/forMeterage/mr/MeanRGraph.java b/ym-process-inspection/src/main/java/com/cnbm/processInspection/graphAnalyzed/forMeterage/mr/MeanRGraph.java index e155eee..e7c9970 100644 --- a/ym-process-inspection/src/main/java/com/cnbm/processInspection/graphAnalyzed/forMeterage/mr/MeanRGraph.java +++ b/ym-process-inspection/src/main/java/com/cnbm/processInspection/graphAnalyzed/forMeterage/mr/MeanRGraph.java @@ -65,9 +65,7 @@ public class MeanRGraph { public MeanRGraph(ProductFeatures productFeatures) throws Exception { - if(productFeatures.getSampleSize()==null || productFeatures.getName()==null){ - throw new Exception("ProductFeatures 参数异常"); - } + this.argName = productFeatures.getName(); this.sampleSize = productFeatures.getSampleSize().intValue(); this.a2 = XBarRCoefficients.getA2(sampleSize); diff --git a/ym-process-inspection/src/main/java/com/cnbm/processInspection/graphAnalyzed/forMeterage/ms/MeanStandardDeviationGraph.java b/ym-process-inspection/src/main/java/com/cnbm/processInspection/graphAnalyzed/forMeterage/ms/MeanStandardDeviationGraph.java index d66378e..9070ac8 100644 --- a/ym-process-inspection/src/main/java/com/cnbm/processInspection/graphAnalyzed/forMeterage/ms/MeanStandardDeviationGraph.java +++ b/ym-process-inspection/src/main/java/com/cnbm/processInspection/graphAnalyzed/forMeterage/ms/MeanStandardDeviationGraph.java @@ -62,9 +62,7 @@ public class MeanStandardDeviationGraph { public MeanStandardDeviationGraph(ProductFeatures productFeatures) throws Exception { - if(productFeatures.getSampleSize()==null || productFeatures.getName()==null){ - throw new Exception("ProductFeatures 参数异常"); - } + this.argName = productFeatures.getName(); this.sampleSize = productFeatures.getSampleSize().intValue(); this.as = XBarSCoefficients.getAS(sampleSize); diff --git a/ym-process-inspection/src/main/java/com/cnbm/processInspection/graphAnalyzed/forMeterage/xmr/XMRGraph.java b/ym-process-inspection/src/main/java/com/cnbm/processInspection/graphAnalyzed/forMeterage/xmr/XMRGraph.java index 3d1f718..4e0db93 100644 --- a/ym-process-inspection/src/main/java/com/cnbm/processInspection/graphAnalyzed/forMeterage/xmr/XMRGraph.java +++ b/ym-process-inspection/src/main/java/com/cnbm/processInspection/graphAnalyzed/forMeterage/xmr/XMRGraph.java @@ -62,9 +62,6 @@ public class XMRGraph { public XMRGraph(ProductFeatures productFeatures) throws Exception { - if(productFeatures.getSampleSize()==null || productFeatures.getName()==null){ - throw new Exception("ProductFeatures 参数异常"); - } this.argName = productFeatures.getName(); this.sampleSize = 1; this.specificationLimit = new SpecificationLimit(