Просмотр исходного кода

[task-1766] 性能验证模块 开发 (二期) / 添加新的验证方法和新的配置detail表

Li Yuan 1 год назад
Родитель
Сommit
fffdf78d34

+ 10 - 4
ibps-provider-root/modules/provider-business/src/main/java/com/lc/ibps/components/verification/model2/PrecisionRepeatability.java

@@ -28,11 +28,17 @@ public class PrecisionRepeatability extends PVModel {
 
     public PrecisionRepeatability(double[][] data, InspectionConfigVO configVO) {
         super(data, configVO);
+        this.batchCVSValue = configVO.getBatchCVSValue();
+        this.teaFormat = getTEaFormat(configVO.getBatchCVS());
+        if(configVO.getDays() >1){
+            RealMatrix realMatrix = MatrixUtils.createRealMatrix(data);
+            this.data = realMatrix.transpose().getData();
+            this.batchCVSValue = configVO.getDailyCVSValue();
+            this.teaFormat = getTEaFormat(configVO.getDailyCVS());
+        }
         this.means = new double[this.specimensNum];
         this.standardDeviations = new double[this.specimensNum];
         this.cvs = new double[this.specimensNum];
-        this.batchCVSValue = configVO.getBatchCVSValue();
-        this.teaFormat = getTEaFormat(configVO.getBatchCVS());
     }
 
     @Override
@@ -50,8 +56,8 @@ public class PrecisionRepeatability extends PVModel {
         List<String> header = new ArrayList<String>();
 
         header.add("样本名");
-        for (int i = 1; i <= repeatNum; i++) {
-            header.add(String.format("重复#%d", i));
+        for (int i = 1; i <= data[0].length; i++) {
+            header.add(String.format("%s#%d",repeatNum>1?"重复":"天数", i));
         }
         TableDTO table = new TableDTO();
         table.buildHeader(header.toArray(new String[header.size()]));