zrg
2025-04-29 1fdcf2149bae7bcd600f3585abe1ae9334d9b9f5
WebTM/views/ÖÊÁ¿¹ÜÀí/ÖÊÁ¿±¨±í/QC_InspectionFormReport.html
@@ -470,10 +470,12 @@
                var x_PPK = 0;
                var x_CPK = 0;
                var numCount = 0
                //系数 ä¸å˜çš„
                var c4 = [0.7979, 0.8862, 0.9213, 0.9400, 0.9515, 0.9594, 0.9650, 0.9693, 0.9727, 0.9754, 0.9776, 0.9794, 0.9810, 0.9823, 0.9835, 0.9845, 0.9854, 0.9862, 0.9869, 0.9876, 0.9882, 0.9887, 0.9892, 0.9896];
                //平均值的平均值
                for (var j = 1; j < option.cols[0].length; j++) {
                    if (optionAVG.length != 0 || optionS.length != 0) {
                    if (optionAVG.length != 0 || optionS.length != 0) {
                        x_AVG = calc(x_AVG, parseFloat(optionAVG[0][option.cols[0][j].field]), "+");
                    }
                }
@@ -481,6 +483,7 @@
                x_AVG = $("#HCenterline_X").val() == "" ? x_AVG : parseFloat($("#HCenterline_X").val());
                $("#HCenterline_X").val(x_AVG.toFixed(5));
                //(每天的数据-平均值的平均值) ä¹˜å¹³æ–¹ åœ¨ç›¸åŠ 
                for (var i = 1; i < option.cols[0].length; i++) {
                    for (var j = 0; j < option.data.length - 3; j++) {
                        numCount += 1;
@@ -488,9 +491,11 @@
                    }
                }
                //(sum除以(所有数量减-1)) å¼€å¹³æ–¹ ä¸åŒ…含后三行
                x_PPK = Math.sqrt(calc(x_SUM, (numCount - 1), "/"));
                 //(sum除以(所有数量)) å¼€å¹³æ–¹  ä¸åŒ…含后三行
                x_CPK = Math.sqrt(calc(x_SUM, numCount, "/"));
                var limit = $("#limit").val();
                if (parseInt(limit) >= 9) {
                    $("#HCenterline_S").val(x_PPK.toFixed(4));
@@ -498,52 +503,64 @@
                //均值 æŽ§åˆ¶ä¸Šé™ æŽ§åˆ¶ä¸‹é™
                if (limit == 1) {
                    //x控制上限 å¹³å‡å€¼çš„平均值+三倍的PPK  X控制下限  å¹³å‡å€¼çš„平均值-三倍的PPK
                    $("#HControlUpperLimit_X").val(calc(x_AVG, calc(x_PPK, 3, "*"), "+").toFixed(5))
                    $("#HControlLowerLimit_X").val(calc(x_AVG, calc(x_PPK, 3, "*"), "-").toFixed(5))
                    //计算样本量为1 çš„ ppk
                    //检验项目:平均值-下限 é™¤ä»¥ä¸‰å€çš„PPK
                    var min = calc(calc(x_AVG, calc(parseFloat($("#HDownLimit").val()), parseFloat($("#HTargetVal").val()), "+"), "-"), calc(3, x_PPK, "*"), "/");
                    //检验项目:上限-平均值 é™¤ä»¥ä¸‰å€çš„PPK
                    var max = calc(calc(calc(parseFloat($("#HUpLimit").val()), parseFloat($("#HTargetVal").val()), "+"), x_AVG, "-"), calc(3, x_PPK, "*"), "/");
                    var DataHCPK = min > max ? max : min;
                    $("#HPPK").val(DataHCPK);
                    //计算样本量为1 çš„ cpk
                    //计算样本量为1 çš„ cpk
                    var cpkSum = 0;
                    var CPK_U = 0;
                    var CPK_N = 0;
                    for (var i = 1; i < option.cols[0].length; i++) {
                        for (var j = 0; j < option.data.length - 3; j++) {
                            if (i == 1) {
                                //获取第一行的第一个值
                                CPK_U = option.data[j][option.cols[0][i].field];
                            } else {
                                CPK_N = option.data[j][option.cols[0][i].field];
                                //如果第一行的第一个值大于第二个值,第一个减去第二  å¦åˆ™å°±æ˜¯  ç¬¬äºŒä¸ªå‡åŽ»ç¬¬ä¸€ä¸ª
                                var data_un = CPK_U > CPK_N ? calc(CPK_U, CPK_N, "-") : calc(CPK_N, CPK_U, "-");
                                //把值相加
                                cpkSum = calc(cpkSum, data_un, "+");
                                CPK_U = CPK_N;
                            }
                        }
                    }
                    //cpkSum é™¤ä»¥ ç¬¬ä¸€è¡Œæ€»æ•°å‡åŽ»2
                    cpkSum = calc(cpkSum, option.cols[0].length - 2, "/");
                    //cpkSum é™¤ä»¥ç³»æ•°
                    var HAVG_CPK = calc(cpkSum, 1.128, "/");
                    //检验项目:平均值-下限 é™¤ä»¥ä¸‰å€çš„HAVG_CPK
                    min = calc(calc(x_AVG, calc(parseFloat($("#HDownLimit").val()), parseFloat($("#HTargetVal").val()), "+"), "-"), calc(3, HAVG_CPK, "*"), "/");
                    //检验项目:上限-平均值 é™¤ä»¥ä¸‰å€çš„HAVG_CPK
                    max = calc(calc(calc(parseFloat($("#HUpLimit").val()), parseFloat($("#HTargetVal").val()), "+"), x_AVG, "-"), calc(3, HAVG_CPK, "*"), "/");
                    DataHCPK = min > max ? max : min;
                    $("#HCPK").val(DataHCPK);
                } else {
                    //上限
                    if ($("#HUpLimit").val() != "" && $("#HDownLimit").val() == "") {
                    if ($("#HUpLimit").val() != "" && $("#HDownLimit").val() == "") {//上限不等于空,下限等于空
                        //检验项目:(上限值-平均值)除以(三倍的PPK é™¤ä»¥C4的系数:c4对应的样本数)
                        var HUpLimit = calc(calc(calc(parseFloat($("#HUpLimit").val()), parseFloat($("#HTargetVal").val()), "+"), x_AVG, "-"), calc(calc(3, x_PPK, "*"), c4[option.data.length - 4], "/"), "/");
                        $("#HPPK").val(HUpLimit.toFixed(4));
                    }
                    //下限
                    else if ($("#HDownLimit").val() != "" && $("#HUpLimit").val() == "") {
                    else if ($("#HDownLimit").val() != "" && $("#HUpLimit").val() == "") {//下限不等于空,上限等于空
                         //检验项目:(平均值-下限值)除以(三倍的PPK é™¤ä»¥C4的系数:c4对应的样本数)
                        var HDownLimit = calc(calc(x_AVG, calc(parseFloat($("#HDownLimit").val()), parseFloat($("#HTargetVal").val()), "+"), "-"), calc(calc(3, x_PPK, "*"), c4[option.data.length - 4], "/"), "/");
                        $("#HPPK").val(HDownLimit.toFixed(4));
                    } else {
                        //检验项目:(上限值-平均值)除以(三倍的PPK é™¤ä»¥C4的系数:c4对应的样本数)
                        var HUpLimit = calc(calc(calc(parseFloat($("#HUpLimit").val()), parseFloat($("#HTargetVal").val()), "+"), x_AVG, "-"), calc(calc(3, x_PPK, "*"), c4[option.data.length - 4], "/"), "/");
                         //检验项目:(平均值-下限值)除以(三倍的PPK é™¤ä»¥C4的系数:c4对应的样本数)
                        var HDownLimit = (x_AVG - calc(parseFloat($("#HDownLimit").val()), parseFloat($("#HTargetVal").val()), "+")) / ((3 * x_PPK) / c4[option.data.length - 4]);
                        $("#HPPK").val(HUpLimit > HDownLimit ? HDownLimit.toFixed(4) : HUpLimit.toFixed(4));
                    }
@@ -560,6 +577,7 @@
                var D3 = [0,0.000, 0.000, 0.000, 0.000, 0.000, 0.076, 0.136, 0.184, 0.223];
                var D4 = [0,3.267, 2.574, 2.282, 2.114, 2.004, 1.924, 1.864, 1.816, 1.777];
                //求极差值的平均值
                for (var j = 1; j < option.cols[0].length; j++) {
                    if (optionAVG.length != 0 || optionS.length != 0) {
                        s_AVG = calc(s_AVG, parseFloat(optionS[0][option.cols[0][j].field]), "+");
@@ -567,13 +585,13 @@
                }
                s_AVG = calc(s_AVG, (option.cols[0].length - 1), "/")
                s_AVG = $("#HCenterline_S").val() == "" || "0" ? s_AVG : parseFloat($("#HCenterline_S").val());
                $("#HCenterline_S").val(s_AVG);
                $("#HCenterline_S").val(s_AVG);//S中心线
                var limit = $("#limit").val();
                if (parseInt(limit) < 9) {
                    $("#HCenterline_S").val(s_AVG.toFixed(4));
                }
                //求平均值的平均值
                for (var j = 1; j < option.cols[0].length; j++) {
                    if (optionAVG.length != 0 || optionS.length != 0) {
                        x_AVG = calc(x_AVG, parseFloat(optionAVG[0][option.cols[0][j].field]), "+");
@@ -581,33 +599,41 @@
                }
                x_AVG = calc(x_AVG, (option.cols[0].length - 1), "/");
                x_AVG = $("#HCenterline_X").val() == "" ? x_AVG : parseFloat($("#HCenterline_X").val());
                $("#HCenterline_X").val(x_AVG.toFixed(5));
                $("#HCenterline_X").val(x_AVG.toFixed(5));//X中心线
                s_CPK = calc(s_AVG, d2[option.data.length - 4], "/");
                //均值 æŽ§åˆ¶ä¸Šé™ æŽ§åˆ¶ä¸‹é™
                if (limit > 1) {
                    //平均值+(A2的系数乘以 æžå·®å€¼çš„平均值)
                    $("#HControlUpperLimit_X").val(calc(x_AVG, calc(A2[$("#limit").val() - 1], s_AVG, "*"), "+").toFixed(5))
                    //平均值-(A2的系数乘以 æžå·®å€¼çš„平均值)
                    $("#HControlLowerLimit_X").val(calc(x_AVG, calc(A2[$("#limit").val() - 1], s_AVG, "*"), "-").toFixed(5))
                }
           
                //差值 æŽ§åˆ¶ä¸Šé™ æŽ§åˆ¶ä¸‹é™
                //D4的系数 ä¹˜ä»¥ æžå·®å€¼çš„平均值
                $("#HControlUpperLimit_S").val(calc(D4[$("#limit").val() - 1], s_AVG, "*").toFixed(5));
                 //D3的系数 ä¹˜ä»¥ æžå·®å€¼çš„平均值
                $("#HControlLowerLimit_S").val(calc(D3[$("#limit").val() - 1], s_AVG, "*").toFixed(5));
                var limit = $("#limit").val();
                if (limit > 1) {
                    //上限
                    if ($("#HUpLimit").val() != "" && $("#HDownLimit").val() == "") {
                    if ($("#HUpLimit").val() != "" && $("#HDownLimit").val() == "") {//下限不等于空,上限等于空
                        //(上限值-平均值)除以 ä¸‰å€çš„s_CPK
                        var HUpLimit = calc(calc(calc(parseFloat($("#HUpLimit").val()), parseFloat($("#HTargetVal").val()), "+"), x_AVG, "-"), (3 * s_CPK), "/");
                        $("#HCPK").val(HUpLimit.toFixed(4));
                    }
                    //下限
                    else if ($("#HDownLimit").val() != "" && $("#HUpLimit").val() == "") {
                    else if ($("#HDownLimit").val() != "" && $("#HUpLimit").val() == "") {//上限不等于空,下限等于空
                         //(平均值-下限值)除以 ä¸‰å€çš„s_CPK
                        var HDownLimit = calc(calc(x_AVG, calc(parseFloat($("#HDownLimit").val()), parseFloat($("#HTargetVal").val()), "+"), "-"), (3 * s_CPK), "/");
                        $("#HCPK").val(HDownLimit.toFixed(4));
                    } else {
                        //(上限值-平均值)除以 ä¸‰å€çš„s_CPK
                        var HUpLimit = calc(calc(calc(parseFloat($("#HUpLimit").val()), parseFloat($("#HTargetVal").val()), "+"), x_AVG, "-"), (3 * s_CPK), "/");
                        //(平均值-下限值)除以 ä¸‰å€çš„s_CPK
                        var HDownLimit = calc(calc(x_AVG, calc(parseFloat($("#HDownLimit").val()), parseFloat($("#HTargetVal").val()), "+"), "-"), (3 * s_CPK), "/");
                        if (s_CPK == 0) {
                            $("#HCPK").val(0);
@@ -960,19 +986,19 @@
            //计算spc八大判定
            function spc_judge() {
                //均值
                //均值        ï¼ˆä¸Šé™-中心限)除以 3  åˆ†æˆ3分
                var HAreaValue = calc(calc(parseFloat($("#HControlUpperLimit_X").val()), parseFloat($("#HCenterline_X").val()), "-"), 3, "/").toFixed(5);
                //上限部分
                var HAreaValue_A = parseFloat($("#HControlUpperLimit_X").val());
                var HAreaValue_A = parseFloat($("#HControlUpperLimit_X").val());//上限
                var HAreaValue_B = calc(calc(HAreaValue, 2, "*"), parseFloat($("#HCenterline_X").val()), "+").toFixed(5);
                var HAreaValue_C = calc(calc(HAreaValue, 1, "*"), parseFloat($("#HCenterline_X").val()), "+").toFixed(5);
                //下限部分
                var HAreaValue_FA = parseFloat($("#HControlLowerLimit_X").val());
                var HAreaValue_FA = parseFloat($("#HControlLowerLimit_X").val());//下限
                var HAreaValue_FB = calc(parseFloat($("#HCenterline_X").val()),calc(HAreaValue, 2, "*"), "-").toFixed(5);
                var HAreaValue_FC = calc(parseFloat($("#HCenterline_X").val()),calc(HAreaValue, 1, "*"), "-").toFixed(5);
                let HAvg = [];//平均值
                let HAvg = [];//平均值  æ ¹æ®X- è¿™ä¸€è¡Œè®¡ç®—çš„
                for (var j = 1; j < option.cols[0].length; j++) {
                    if (optionAVG.length != 0) {
@@ -983,10 +1009,14 @@
                //连续十五个点在中心线两侧的C区内
                var judge_return = [];
                if (HAvg.length >= 15) {
                    //因为是15个点  æ‰€ä»¥14的下标就是第15条数据  ç„¶åŽæ˜¯0-15,1-16
                    for (var i = 14; i < HAvg.length; i++) {
                        if (HAvg[i] >= HAreaValue_FC && HAvg[i] <= HAreaValue_C) {
                            //根据上面的i值算出从那个下标开始
                            for (var j = i - 14; j <= i; j++) {
                                //如果大于负c,小于正c é‚£å°±æœ‰é—®é¢˜
                                if (HAvg[j] >= HAreaValue_FC && HAvg[j] <= HAreaValue_C) {
                                    //当最后一条,如果大于负c,小于正c å°±è¿›åŽ»è¿½åŠ 15条数据
                                    if (i == j) {
                                        for (var j1 = i; j1 >= i - 14; j1--) {
                                            if ($.inArray(HAvg[j1], judge_return) == -1) {
@@ -995,7 +1025,7 @@
                                        }
                                    }
                                } else {
                                    break;
                                    break;  //终止当前15条,执行下一个15条
                                }
                            }
                        }
@@ -1006,6 +1036,7 @@
                    for (var i = 13; i < HAvg.length; i++) {
                        var judge = [];
                        for (var j = i - 13; j < i; j++) {
                            //用第一个跟第二的做对比,第二个跟第三个做对比,以此循环
                            if (HAvg[j] > HAvg[j + 1]) {
                                judge.push(1);
                            } else if (HAvg[j] < HAvg[j + 1]) {
@@ -1013,7 +1044,7 @@
                            }
                        }
                        for (var k = 0; k < judge.length; k++) {
                            if (judge[k] + judge[k + 1] == 0) {
                            if (judge[k] + judge[k + 1] == 0) {  //如果前后相加等于0那就是满足,不满足就直接跳出
                                if ((k + 1) == judge.length) {
                                    for (var j1 = i; j1 >= i - 13; j1--) {
                                        if ($.inArray(HAvg[j1], judge_return) == -1) {
@@ -1022,7 +1053,7 @@
                                    }
                                }
                            } else {
                                break;
                                break;//终止当前循环
                            }
                        }
                    }
@@ -1032,6 +1063,7 @@
                if (HAvg.length >= 9) {
                    for (var i = 8; i < HAvg.length; i++) {
                        var judge = [];
                        //用循环的值跟中心线对比
                        for (var j = i - 8; j <= i; j++) {
                            if (HAvg[j] > parseFloat($("#HCenterline_X").val())) {
                                judge.push(1);
@@ -1039,10 +1071,12 @@
                                judge.push(-1);
                            }
                        }
                       //对循环的插入的值,相加
                        var sum = 0;
                        for (var k = 0; k < judge.length; k++) {
                            sum += judge[k];
                        }
                        //判断循环插入的值是否等于正九或者负九
                        if (sum == 9 || sum == -9) {
                            for (var j1 = i; j1 >= i - 8; j1--) {
                                if ($.inArray(HAvg[j1], judge_return) == -1) {
@@ -1056,9 +1090,12 @@
                //连续8点落在中心线两侧且无一在C区以内(即在C区以外)
                if (HAvg.length >= 8) {
                    for (var i = 7; i < HAvg.length; i++) {
                        //循环的值是否大于正C æˆ–者 å°äºŽè´ŸC
                        if (HAvg[i] < HAreaValue_FC || HAvg[i] > HAreaValue_C) {
                            //满足 è¿›è¡Œåˆ¤æ–­å‰é¢å€¼æ˜¯å¦æ»¡è¶³
                            for (var j = i - 7; j <= i; j++) {
                                if (HAvg[j] < HAreaValue_FC || HAvg[j] > HAreaValue_C) {
                                    //如果最后都满足  æ’å…¥
                                    if (j == i) {
                                        for (var j1 = i; j1 >= i - 7; j1--) {
                                            if ($.inArray(HAvg[j1], judge_return) == -1) {
@@ -1067,7 +1104,7 @@
                                        }
                                    }
                                } else {
                                    break;
                                    break;  //有一个不满足直接终止当前循环
                                }
                            }
                        }
@@ -1078,6 +1115,7 @@
                if (HAvg.length >= 6) {
                    for (var i = 5; i < HAvg.length; i++) {
                        var judge = [];
                        //用第一个跟第二的做对比,第二个跟第三个做对比,以此循环
                        for (var j = i - 5; j < i; j++) {
                            if (HAvg[j] > HAvg[j + 1]) {
                                judge.push(1);
@@ -1085,10 +1123,12 @@
                                judge.push(-1);
                            }
                        }
                        //对追加的值 è¿›è¡Œç´¯åŠ 
                        var sum = 0;
                        for (var k = 0; k < judge.length; k++) {
                            sum += judge[k];
                        }
                        //如果是正五或者负五 é‚£å°±å…¨éƒ¨è¿½åŠ 
                        if (sum == 5 || sum == -5) {
                            for (var j1 = i; j1 >= i - 5; j1--) {
                                if ($.inArray(HAvg[j1], judge_return) == -1) {
@@ -1103,15 +1143,22 @@
                if (HAvg.length >= 5) {
                    for (var i = 4; i < HAvg.length; i++) {
                        var judge = [];
                        //当前值如果大于 ä¸­å¿ƒçº¿ å¹¶ä¸”  å¤§äºŽ æ­£C
                        if (HAvg[i] > parseFloat($("#HCenterline_X").val()) && HAvg[i] > HAreaValue_C) {
                            for (var j = i - 4; j <= i; j++) {
                                var record = [];
                                //上面满足 åˆ¤æ–­ å½“前值如果大于 ä¸­å¿ƒçº¿ å¹¶ä¸”  å¤§äºŽ æ­£C
                                if (HAvg[j] > parseFloat($("#HCenterline_X").val()) && HAvg[j] > HAreaValue_C) {
                                    record.push(HAvg[j]);
                                    if (record.length >= 4) {
                                        //如果满足4条以上数据有问题 é‚£å°±å¾ªçŽ¯æŠŠæ•°æ®æ’å…¥æ•°ç»„
                                        for (var j1 = i; j1 >= i - 4; j1--) {
                                            if ($.inArray(HAvg[j1], judge_return) == -1) {
                                                judge_return.push(HAvg[j1]);
                                            //根据
                                            //if ($.inArray(HAvg[j1], judge_return) == -1) {
                                            //    judge_return.push(HAvg[j1]);
                                            //}
                                            if ($.inArray(record[j1], judge_return) == -1) {
                                                judge_return.push(record[j1]);
                                            }
                                        }
                                    }
@@ -1119,15 +1166,21 @@
                                
                            }
                        }
                        //当前值如果小于 ä¸­å¿ƒçº¿ å¹¶ä¸”  å°äºŽ è´ŸC
                        else if (HAvg[i] < parseFloat($("#HCenterline_X").val()) && HAvg[i] < HAreaValue_FC) {
                            for (var j = i - 4; j <= i; j++) {
                                var record = [];
                                //上面满足 åˆ¤æ–­ å½“前值如果小于 ä¸­å¿ƒçº¿ å¹¶ä¸”  å°äºŽ è´ŸC
                                if (HAvg[j] < parseFloat($("#HCenterline_X").val()) && HAvg[j] < HAreaValue_FC) {
                                    record.push(HAvg[j]);
                                    if (record.length >= 4) {
                                         //如果满足4条以上数据有问题 é‚£å°±å¾ªçŽ¯æŠŠæ•°æ®æ’å…¥æ•°ç»„
                                        for (var j1 = i; j1 >= i - 4; j1--) {
                                            if ($.inArray(HAvg[j1], judge_return) == -1) {
                                                judge_return.push(HAvg[j1]);
                                            //if ($.inArray(HAvg[j1], judge_return) == -1) {
                                            //    judge_return.push(HAvg[j1]);
                                            //}
                                            if ($.inArray(record[j1], judge_return) == -1) {
                                                judge_return.push(record[j1]);
                                            }
                                        }
                                    }
@@ -1143,15 +1196,21 @@
                if (HAvg.length >= 3) {
                    for (var i = 2; i < HAvg.length; i++) {
                        var judge = [];
                        //当前值如果大于 ä¸­å¿ƒçº¿ å¹¶ä¸”  å¤§äºŽ æ­£B
                        if (HAvg[i] > parseFloat($("#HCenterline_X").val()) && HAvg[i] > HAreaValue_B) {
                            for (var j = i - 2; j <= i; j++) {
                                var record = [];
                                //上面满足 åˆ¤æ–­ å½“前值如果大于 ä¸­å¿ƒçº¿ å¹¶ä¸”  å¤§äºŽ æ­£B
                                if (HAvg[j] > parseFloat($("#HCenterline_X").val()) && HAvg[j] > HAreaValue_B) {
                                    record.push(HAvg[j]);
                                    if (record.length >= 2) {
                                         //如果满足2条以上数据有问题 é‚£å°±å¾ªçŽ¯æŠŠæ•°æ®æ’å…¥æ•°ç»„
                                        for (var j1 = i; j1 >= i - 2; j1--) {
                                            if ($.inArray(HAvg[j1], judge_return) == -1) {
                                                judge_return.push(HAvg[j1]);
                                            //if ($.inArray(HAvg[j1], judge_return) == -1) {
                                            //    judge_return.push(HAvg[j1]);
                                            //}
                                            if ($.inArray(record[j1], judge_return) == -1) {
                                                judge_return.push(record[j1]);
                                            }
                                        }
                                    }
@@ -1159,15 +1218,21 @@
                            }
                        }
                        //当前值如果小于 ä¸­å¿ƒçº¿ å¹¶ä¸”  å°äºŽ è´ŸB
                        else if (HAvg[i] < parseFloat($("#HCenterline_X").val()) && HAvg[i] < HAreaValue_FB) {
                            for (var j = i - 2; j <= i; j++) {
                                var record = [];
                                 //上面满足 åˆ¤æ–­ å½“前值如果小于 ä¸­å¿ƒçº¿ å¹¶ä¸”  å°äºŽ è´ŸB
                                if (HAvg[j] < parseFloat($("#HCenterline_X").val()) && HAvg[j] < HAreaValue_FB) {
                                    record.push(HAvg[j]);
                                    if (record.length >= 2) {
                                        //如果满足2条以上数据有问题 é‚£å°±å¾ªçŽ¯æŠŠæ•°æ®æ’å…¥æ•°ç»„
                                        for (var j1 = i; j1 >= i - 2; j1--) {
                                            if ($.inArray(HAvg[j1], judge_return) == -1) {
                                                judge_return.push(HAvg[j1]);
                                            //if ($.inArray(HAvg[j1], judge_return) == -1) {
                                            //    judge_return.push(HAvg[j1]);
                                            //}
                                            if ($.inArray(record[j1], judge_return) == -1) {
                                                judge_return.push(record[j1]);
                                            }
                                        }
                                    }
@@ -1183,11 +1248,13 @@
                if (HAvg.length >= 0) {
                    for (var i = 0; i < HAvg.length; i++) {
                        var judge = [];
                        //判断当前值是否大于 æ­£A
                        if (HAvg[i] > HAreaValue_A) {
                            if ($.inArray(HAvg[i], judge_return) == -1) {
                                judge_return.push(HAvg[i]);
                            }
                        }
                        //判断当前值是否大于 è´ŸA
                        else if (HAvg[i] < HAreaValue_FA) {
                            if ($.inArray(HAvg[i], judge_return) == -1) {
                                judge_return.push(HAvg[i]);