From 74aaf857f0e7058ed4881862396ed72ebd7d8920 Mon Sep 17 00:00:00 2001 From: caixiang <939387484@qq.com> Date: Fri, 6 Jan 2023 16:21:09 +0800 Subject: [PATCH] mark --- .../controller/ProcessInspectionController.java | 9 +++++++++ .../graphAnalyzed/forMeterage/mr/MeanRGraph.java | 4 +--- .../forMeterage/ms/MeanStandardDeviationGraph.java | 4 +--- .../graphAnalyzed/forMeterage/xmr/XMRGraph.java | 3 --- 4 files changed, 11 insertions(+), 9 deletions(-) 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(