From f6abc8c724eed706487b7616bc6c816e5db5c939 Mon Sep 17 00:00:00 2001
From: czt <czt18638530771@163.com>
Date: 星期二, 09 十二月 2025 20:13:48 +0800
Subject: [PATCH] 数量检测页面提交

---
 fzzy-igdss-web/src/main/resources/static/grain/PrintBuilder-lay.js |  576 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 576 insertions(+), 0 deletions(-)

diff --git a/fzzy-igdss-web/src/main/resources/static/grain/PrintBuilder-lay.js b/fzzy-igdss-web/src/main/resources/static/grain/PrintBuilder-lay.js
new file mode 100644
index 0000000..8dd2dd1
--- /dev/null
+++ b/fzzy-igdss-web/src/main/resources/static/grain/PrintBuilder-lay.js
@@ -0,0 +1,576 @@
+//鍒濆鍖栨ā鏉�
+initModel = function () {
+    if (CACHE_PRINT_MODEL.size > 0) {
+        return;
+    }
+    $.ajax({
+        type: "POST",
+        url: "/grain/build-print-model-all",
+        data: JSON.stringify({
+            depotId: depotId
+        }),
+        dataType: "json",
+        contentType: "application/json;charset=UTF-8",
+        success: function (result) {
+            if (result.code != "0000") {
+                layer.msg(result.msg);
+                return null;
+            } else {
+                //瀛樻斁鍦ㄧ紦瀛樹腑
+                CACHE_PRINT_MODEL = result.data;
+            }
+        },
+        error: function () {
+            layer.msg("鍒濆鍖栨ā鏉垮け璐ワ紒锛�");
+        }
+    });
+};
+
+/**
+ * 鍗曚粨鎵撳嵃锛屽鏋滅洿鎺ヨ繑鍥炵殑妯℃澘淇℃伅涓篘ULL锛岄噸鏂拌幏鍙栦笅妯℃澘
+ * @param grainData
+ */
+toPrintSingle = function (grainData) {
+    var html = null;
+
+    var depotData = grainData.depotData;
+    if (!depotData.depotType) {
+        depotData.depotType = DepotType.T_01;
+    }
+    var key = builderModelKey(depotData.depotType, grainData.cable, grainData.cableCir);
+
+    //鍏堜粠鍗曚釜妯℃澘涓幏鍙�
+    var modelData = CACHE_PRINT_MODEL[key];
+    if (modelData) {
+        html = builderModelByType(modelData, grainData);
+        previewA4(html);
+        return;
+    }
+
+    console.log("---------閲嶆柊鑾峰彇妯℃澘--------");
+
+    $.ajax({
+        type: "POST",
+        url: "/grain/build-print-model",
+        data: JSON.stringify({
+            depotId: depotId,
+            depotType: depotData.depotType,
+            cableRule: grainData.cable,
+            cableCir: grainData.cableCir
+        }),
+        dataType: "json",
+        contentType: "application/json;charset=UTF-8",
+        success: function (result) {
+            if (result.code != "0000") {
+                layer.alert("鏈嶅姟鍣ㄨ幏鍙栨墦鍗版ā鏉垮け璐ワ紝璇烽噸鏂版搷浣�-" + result.msg);
+                return;
+            } else {
+                html = builderModelByType(result.data, grainData);
+                previewA4(html);
+                return;
+            }
+        },
+        error: function () {
+            layer.alert("鏈嶅姟鍣ㄨ幏鍙栨墦鍗版ā鏉垮け璐ワ紒锛侊紒");
+        }
+    });
+};
+
+/**
+ * 鑾峰彇妯℃澘
+ * @param grainData
+ */
+builderModel = function (grainData) {
+    var depotData = grainData.depotData;
+    if (!depotData.depotType) {
+        depotData.depotType = DepotType.T_01;
+    }
+    var key = builderModelKey(depotData.depotType, grainData.cable, grainData.cableCir);
+
+    //鍏堜粠鍗曚釜妯℃澘涓幏鍙�
+    var modelData = CACHE_PRINT_MODEL[key];
+    if (modelData) {
+        // return builderModelStep2(modelData, grainData);
+        return builderModelByType(modelData, grainData);
+    } else {
+        return null;
+    }
+};
+
+/**
+ * 鑾峰彇妯℃澘鍚庢坊鍔犳暟鎹�
+ * @param grainData
+ */
+builderModelByType = function (modelData, grainData) {
+    var depotData = grainData.depotData;
+    //鍔ㄦ�佹暟鎹俊鎭�--骞虫柟浠�
+    if (DepotType.T_01 == depotData.depotType || DepotType.T_05 == depotData.depotType) {
+        return builderModelLay(grainData);
+    } else if (DepotType.T_02 == depotData.depotType) {
+        return builderModelCir(modelData, grainData);
+    } else if (DepotType.T_03 == depotData.depotType) {
+        return builderModelCir(modelData, grainData);
+    } else if (DepotType.T_04 == depotData.depotType) {
+        return builderModelCir(modelData, grainData);
+    } else {
+        return builderModelLay(modelData, grainData);
+    }
+};
+
+/**
+ * 鑾峰彇妯℃澘鍚庢坊鍔犳暟鎹�--绛掍粨
+ * @param grainData
+ */
+builderModelCir = function (modelData, grainData) {
+    var attCable = grainData.cable.split("-");
+    numZ = attCable[0];
+    numY = attCable[1];
+    numX = attCable[2];
+
+    var model = modelData.model;
+    var depotData = grainData.depotData;
+    //鏇挎崲鍩虹鏁版嵁
+    if (dept) {
+        model = model.replace("companyName", dept.deptName);
+    } else {
+        model = model.replace("companyName", "鏅烘収绮簱");
+    }
+    model = model.replace("depotName", depotData.name)
+        .replace("weather", grainData.weather == null ? "" : grainData.weather)
+        .replace("orientation", depotData.orientation == null ? "" : depotData.orientation)
+        .replace("checkDate", grainData.receiveDate)
+        .replace("remark", grainData.remark == null ? "姝e父" : grainData.remark)
+        .replace("c_max_all", grainData.tempMax)
+        .replace("c_min_all", grainData.tempMin)
+        .replace("c_ave_all", grainData.tempAve);
+
+    model = model.replace("c_out_ave_all", "");//鏆傛椂涓嶇敤
+    model = model.replace("c_in_ave_all", "");//鏆傛椂涓嶇敤
+
+    model = model.replace("c_tIn", grainData.tempIn <= -100.0 ? "澶囩敤" : grainData.tempIn)
+        .replace("c_hIn", grainData.humidityIn <= -100.0 ? "澶囩敤" : grainData.humidityIn)
+        .replace("c_tOut", grainData.tempOut <= -100.0 ? "澶囩敤" : grainData.tempOut)
+        .replace("c_hOut", grainData.humidityOut <= -100.0 ? "澶囩敤" : grainData.humidityOut)
+        .replace("c_depotType", depotData.depotTypeName == null ? "/" : depotData.depotTypeName)
+        .replace("c_storeDate", depotData.storeDate == null ? "/" : depotData.storeDate.substring(0, 10))
+        .replace("c_foodLocation", depotData.foodLocation == null ? "/" : depotData.foodLocation)
+        .replace("c_foodVariety", depotData.foodVarietyName == null ? "/" : depotData.foodVarietyName)
+        .replace("c_perWet", depotData.perWet == null ? "/" : depotData.perWet)
+        .replace("c_perImpurity", depotData.perImpurity == null ? "/" : depotData.perImpurity)
+        .replace("c_bulkWeight", depotData.bulkWeight == null ? "/" : depotData.bulkWeight)
+        .replace("c_storeDate", depotData.storeDate == null ? "/" : depotData.storeDate)
+        .replace("c_storageReal", depotData.storageReal == null ? "/" : (Number(depotData.storageReal) / 1000).toFixed(2))
+        .replace("c_checkUser", grainData.checkUser == null ? "/" : grainData.checkUser)
+        .replace("c_storeKeeperName", depotData.storeKeeperName == null ? "/" : depotData.storeKeeperName)
+        .replace("createBillDate", grainData.sysDate);
+
+    //鍔ㄦ�佹暟鎹俊鎭�--骞虫柟浠�
+    if (DepotType.T_01 == depotData.depotType) {
+        if ("ROW" == modelData.modelType) {
+            model = addPointsRow1(model, grainData, numX);
+        } else {
+            model = addPoints1(model, grainData, numX);
+        }
+    }
+    //鍔ㄦ�佹暟鎹俊鎭�--娴呭渾浠�
+    if (DepotType.T_02 == depotData.depotType) {
+        model = addPoints4(model, grainData);
+    }
+    //鍔ㄦ�佹暟鎹俊鎭�--娌圭綈
+    if (DepotType.T_03 == depotData.depotType) {
+        var oilHeight = grainData.oilHeight;
+        if (oilHeight) {
+            var att = oilHeight.split("-");
+            model = model.replace("c_depotHeight", att[1])
+                .replace("c_oilHeight", att[0]);
+        } else {
+            model = model.replace("c_depotHeight", "#")
+                .replace("c_oilHeight", "#");
+        }
+        model = addPoints4(model, grainData);
+    }
+    //鍔ㄦ�佹暟鎹俊鎭�--绔嬬瓛浠�
+    if (DepotType.T_04 == depotData.depotType) {
+        model = addPoints4(model, grainData);
+    }
+    return model;
+};
+
+/**
+ * 骞虫柟浠撴墦鍗版姤琛�
+ */
+builderModelLay = function (grainData) {
+
+    var companyId = grainData.companyId;
+    var depotData = grainData.depotData;
+    var quality = grainData.mquality;
+    var qualityItemMap = {};
+    if (quality) {
+        var item = quality.checkItems;
+        if (item) {
+            for (var i = 0; i < item.length; i++) {
+                qualityItemMap[item[i].standardId] = item[i];
+            }
+        }
+    }
+    var cable = grainData.cable;
+    var attr = cable.split("-");
+    var numZ = attr[0];//灞傞厤缃�
+    var numY = attr[1];//琛岄厤缃�
+    var numX = attr[2];//鍒楅厤缃�
+    var listLays = grainData.listLays;
+
+    var model = "<!DOCTYPE html><html lang=\"zh-cn\">\n"
+        + "<head><meta http-equiv=\"Content-Type\" content=\"text/html;charset=UTF-8\"><title>绮儏鎶ヨ〃妯$増</title>"
+        + "    <style>\n"
+        + "        table,table tr th,table tr td{border:1px solid #0d1021}table{width:100%;line-height:23px;text-align:center;font-size:14px}.table-2{border-top:0px solid #0d1021 !important}.table-2 tr{border-top:0px solid #0d1021 !important}.table-2 td{border-top:0px solid #0d1021 !important}.table-row-tr{border-left:0px !important;border-right:0px !important;border-top:0px !important}.table-row-fz{border:0px !important}.link-top{width:100%;border-top:solid #0d1021 1px}</style>\n"
+        + "</head>\n" + "<body>";
+
+    model += "<div style=\"text-align: center\">\n"
+        + "<span style=\"font-size: 26px; font-weight: bold;\">\n";
+    if (dept) {
+        model += dept.deptName;
+    } else {
+        model += "--XXX--绮簱"
+    }
+    model += "</span><div class=\"link-top\"></div><div class=\"link-top\"></div>\n";
+    model += "<span style=\"font-size: 18px; \">";
+    model += depotData.name;
+    if (compareData) {
+        model += "&nbsp;&nbsp;&nbsp;&nbsp;绮儏鎶ヨ〃(灞傚熀鍑�) 瀵规瘮 " + compareData.batchId + "</span>\n";
+    } else {
+        model += "&nbsp;&nbsp;&nbsp;&nbsp;绮儏鎶ヨ〃(灞傚熀鍑�)</span>\n";
+    }
+    model += "</div><div style=\"margin-top: 5px;\"><span style=\"float: left;\">澶╂皵锛�";
+    model += grainData.weather == null ? "" : grainData.weather;
+    model += "&nbsp;&nbsp;鏂瑰悜锛�";
+    model += depotData.orientation == null ? "" : depotData.orientation
+    model += "</span><span style=\"float: right;\">妫�娴嬫椂闂达細";
+    model += grainData.receiveDate;
+    model += "</span></div>";
+
+    //鍔ㄦ�侀厤缃�
+    model += "<table cellspacing=\"0\" cellpadding=\"0\"><tr><td colspan=\"2\"></td>";
+    //鍔ㄦ�佹坊鍔犲垪閰嶇疆
+    for (var x = 1; x <= numX; x++) {
+        model += "<td>绗�" + x + "鍒�</td>";
+    }
+    model += "</tr>";
+    //鍔ㄦ�佹坊鍔犻噰闆嗙偣淇℃伅 Y
+    for (var y = 1; y <= numY; y++) {
+        for (var z = 1; z <= numZ; z++) {
+            model += "<tr>";
+            if (1 == z) {
+                model += "<td rowspan=" + numZ + " class=\"table-row-tr\">"
+                    + y + "琛�</td>";
+            }
+            if (z == numZ) {
+                model += "<td class=\"table-row-tr\">" + z + "灞�</td>";
+            } else {
+                model += "<td class=\"table-row-fz\">" + z + "灞�</td>";
+            }
+            for (var x = numX; x >= 1; x--) { //鍊肩殑鏍煎紡锛歝ell+灞�+琛�+鍒�
+                if (z == numZ) {
+                    model += "<td class=\"table-row-tr\">c_" + z + y + x
+                        + "</td>";
+                } else {
+                    model += "<td class=\"table-row-fz\">c_" + z + y + x
+                        + "</td>";
+                }
+            }
+            model += "</tr>";
+        }
+    }
+    model += "</table>";
+    //寮�濮嬫坊鍔犵伯鎯呮暣浣撴暟鎹�
+    model += "<table cellspacing=\"0\" cellpadding=\"0\" class=\"table-2\">";
+    model += "<tr><td width=\"200px\">绮儏鍒嗘瀽锛�</td>";
+    model += "<td colspan=5>" + grainData.remark + "</td></tr>";
+    model += "</tr><tr><td></td><td>鏈�楂�</td><td>鏈�浣�</td><td>骞冲潎</td><td>鍛ㄥ潎</td><td>鍐呭潎</td></tr>";
+    //閬嶅巻姣忓眰鐨勪俊鎭�
+    var layData;
+    for (var i = 0; i < listLays.length; i++) {
+        layData = listLays[i];
+        model += "<tr><td>";
+        model += layData.fz + "灞�";
+        model += "</td><td>";
+        model += layData.tempMax;
+        model += "</td><td>";
+        model += layData.tempMin;
+        model += "</td><td>";
+        model += layData.tempAve;
+        model += "</td><td>";
+        model += layData.tempAveOut;
+        model += "</td><td>";
+        model += layData.tempAveIn;
+        model += "</td></tr>";
+    }
+    //鏁翠粨
+    model += "<tr><td>鏁翠粨</td><td>";
+    model += grainData.tempMax;
+    model += "</td><td>";
+    model += grainData.tempMin;
+    model += "</td><td>";
+    model += grainData.tempAve;
+    model += "</td><td>";
+    model += "</td><td>";
+    model += "</td></tr>";
+
+    //鍥哄畾鏍忎綅鍊�
+    model += "<tr><td>浠撴俯锛�" + (grainData.tempIn <= -100.0 ? "澶囩敤" : grainData.tempIn) + "</td>";
+    model += "<td>浠撴箍锛�" + (grainData.humidityIn <= -100.0 ? "澶囩敤" : grainData.humidityIn) + "</td>";
+    model += "<td colspan=\"2\">姘旀俯锛�" + (grainData.tempOut <= -100.0 ? "澶囩敤" : grainData.tempOut) + "</td>";
+    model += "<td colspan=\"2\">姘旀箍锛�" + (grainData.humidityOut <= -100.0 ? "澶囩敤" : grainData.humidityOut) + "</td></tr>";
+
+    model += "<tr><td>浠撴埧绫诲瀷</td><td>" + (depotData.depotTypeName == null ? '/' : depotData.depotTypeName) + "</td>";
+    model += "<td colspan=\"2\">鍏ヤ粨鏃ユ湡</td><td colspan=\"2\">"
+        + (depotData.storeDate == null ? '/' : depotData.storeDate.substring(0, 10)) + "</td></tr>";
+
+    model += "<tr><td>绮鍝佺</td><td>" + (depotData.foodVarietyName == null ? '/' : depotData.foodVarietyName) + "</td>";
+    model += "<td colspan=\"2\">瀹為檯鍌ㄩ噺锛堝惃锛�</td><td colspan=\"2\">"
+        + (depotData.storageReal == null ? '/' : (Number(depotData.storageReal) / 1000).toFixed(2)) + "</td></tr>";
+
+    model += "<tr><td>姘村垎(鍏ヤ粨% ~ 褰撳墠%)</td><td>" + (depotData.perWet == null ? '/' : depotData.perWet) + " ~ " + getCheckValue(qualityItemMap, "C01") + "</td>";
+    model += "<td colspan=\"2\">鍑虹硻鐜�(%)</td><td colspan=\"2\">"
+        + getCheckValue(qualityItemMap, "C09") + "</td></tr>";
+
+    model += "<tr><td>鍙戣娊鐜囷紙%锛�</td><td>" + getCheckValue(qualityItemMap, "C32") + "</td>";//鍙戣娊鐜�
+    model += "<td colspan=\"2\">绮浜у湴</td><td colspan=\"2\">"
+        + (depotData.foodLocation == null ? '/' : depotData.foodLocation) + "</td></tr>";
+    if ('5336' == companyId) {
+        model += "<tr><td>瀹归噸锛坓/L锛�</td><td>" + getCheckValue(qualityItemMap, "C03") + "</td>";
+    } else {
+        model += "<tr><td>瀹归噸锛坘g/m3锛�</td><td>" + getCheckValue(qualityItemMap, "C03") + "</td>";
+    }
+
+    model += "<td colspan=\"2\">闈㈢瓔鎸佹按鐜囷紙%锛�</td><td colspan=\"2\">" + getCheckValue(qualityItemMap, "C08") + "</td></tr>";//娌℃湁濉啓
+
+    model += "<tr><td>鏉傝川锛�%锛�</td><td>" + getCheckValue(qualityItemMap, "C02") + "</td>";
+    model += "<td colspan=\"2\">涓嶅畬鍠勭矑锛�%锛�</td><td colspan=\"2\">";
+    model += getCheckValue(qualityItemMap, "C04");
+    model += "</td></tr>";
+
+    model += "<tr><td>妫�娴嬩汉</td><td>" + (grainData.checkUser == null ? '/' : grainData.checkUser) + "</td>";
+    model += "<td colspan=\"2\">淇濈鍛�</td><td colspan=\"2\">"
+        + (depotData.storeKeeperName == null ? '/' : depotData.storeKeeperName) + "</td></tr>";
+    model += "</table>";
+
+    //娣诲姞灏鹃儴淇℃伅
+    model += "<div style=\"margin-top: 5px;\">";
+    model += "<span style=\"float: left;\">娉細#琛ㄧず灞傛渶浣庢俯&nbsp;&nbsp;*琛ㄧず灞傛渶楂樻俯&nbsp;&nbsp;\<琛ㄧず鐢电紗寮�濮嬩綅缃甛></span>";
+    model += "<span style=\"float: right;\">鍒惰〃鏃堕棿锛�" + grainData.sysDate
+        + "</span></div>";
+    model += "</div></body></html>";
+    //鐐逛綅淇℃伅璧嬪��
+    model = attrPointsLay(model, grainData.listPoints, listLays, numX);
+    return model;
+};
+
+//鏍规嵁閲囬泦鐐硅祴鍊硷紝娉ㄦ剰鏁版嵁搴撶敓鎴愮殑鍧愭爣鏄粠0寮�濮嬬殑
+attrPointsLay = function (model, listPoints, listLays, numX) {
+    var point;
+    var key;
+    var lay;
+    var temp;
+    for (var i = 0; i < listPoints.length; i++) {
+        point = listPoints[i];
+        temp = point.temp;
+        key = "c_" + (point.z + 1) + (point.y + 1) + (point.x + 1);
+        //鍒ゆ柇灞傞珮浣庢俯
+        lay = listLays[point.z];
+        if (-100.0 == temp) {
+            temp = "澶囩敤";
+        }
+        if (-101.0 == temp) {
+            temp = "鏁呴殰";
+        }
+        if (temp == lay.tempMax) {
+            temp = temp + "*";
+        }
+        if (temp == lay.tempMin) {
+            temp = temp + "#";
+        }
+        //key = c_z+1 + 1 + numX琛ㄧず绗竴鍒�
+        if (key == ("c_" + (point.z + 1) + "1" + numX)) {
+            temp = "<" + temp + ">";
+        }
+        model = model.replace(key, temp);
+    }
+    return model;
+};
+
+/**
+ * 妯℃澘缂撳瓨KEY鐨勭敓鎴�
+ * @param depotType
+ * @param cable
+ * @param cableCir
+ */
+builderModelKey = function (depotType, cable, cableCir) {
+    if (cableCir) {
+        return depotType + "_" + cable + "_" + cableCir;
+    }
+    return depotType + "_" + cable;
+};
+
+//鏍规嵁閲囬泦鐐硅祴鍊硷紝娉ㄦ剰鏁版嵁搴撶敓鎴愮殑鍧愭爣鏄粠0寮�濮嬬殑
+addPoints1 = function (model, numX) {
+    var listPoints = grainData.listPoints;
+    var listLays = grainData.listLays;
+    var point;
+    var key;
+    var lay;
+    var temp;
+    for (var i = 0; i < listPoints.length; i++) {
+        point = listPoints[i];
+        temp = point.temp;
+        lay = listLays[point.z];
+        //灞傛渶
+        if (lay.z <= listLays.length) {
+            key = "c_max_" + (lay.z + 1);
+            model = model.replace(key, lay.tempMax);
+            key = "c_min_" + (lay.z + 1);
+            model = model.replace(key, lay.tempMin);
+            key = "c_ave_" + (lay.z + 1);
+            model = model.replace(key, lay.tempAve);
+            key = "c_out_ave_" + (lay.z + 1);
+            model = model.replace(key, lay.tempAveOut);
+            key = "c_in_ave_" + (lay.z + 1);
+            model = model.replace(key, lay.tempAveIn);
+        }
+
+        key = (point.z + 1) + '_' + (point.y + 1) + '_' + (point.x + 1);
+        if (-100.0 == temp) {
+            temp = "澶囩敤";
+        }
+        if (-101.0 == temp) {
+            temp = "鏁呴殰";
+        }
+        if (temp == lay.tempMax) {
+            temp = temp + "*";
+        }
+        if (temp == lay.tempMin) {
+            temp = temp + "#";
+        }
+        //key = c_z+1 + 1 + numX琛ㄧず绗竴鍒�
+        // if (key == ((point.z + 1) + "1" + numX) + "_c") {
+        //     temp = "<" + temp + ">";
+        // }
+        model = model.replace(key, temp);
+    }
+    return model;
+};
+
+//妯悜閫氶璧嬪��
+addPointsRow1 = function (model, grainData, numX) {
+    var listPoints = grainData.listPoints;
+    var listRows = grainData.listRows;
+    var point;
+    var key;
+    var temp;
+    for (var i = 0; i < listPoints.length; i++) {
+        point = listPoints[i];
+        temp = point.temp;
+        row = listRows[point.y];
+        //琛屾渶澶�
+        if (row.y <= listRows.length) {
+            key = "c_max_" + (row.y + 1);
+            model = model.replace(key, row.tempMax);
+            key = "c_min_" + (row.y + 1);
+            model = model.replace(key, row.tempMin);
+            key = "c_ave_" + (row.y + 1);
+            model = model.replace(key, row.tempAve);
+        }
+
+        key = (point.z + 1) + '_' + (point.y + 1) + '_' + (point.x + 1);
+        if (-100.0 == temp) {
+            temp = "澶囩敤";
+        }
+        if (-101.0 == temp) {
+            temp = "鏁呴殰";
+        }
+        if (temp == row.tempMax) {
+            temp = temp + "*";
+        }
+        if (temp == row.tempMin) {
+            temp = temp + "#";
+        }
+        //key = c_z+1 + 1 + numX琛ㄧず绗竴鍒�
+        // if (key == ("c_" + (point.z + 1) + "1" + numX)) {
+        //     temp = "<" + temp + ">";
+        // }
+        model = model.replace(key, temp);
+    }
+    return model;
+};
+
+//绛掍粨娣诲姞閲囬泦鐐瑰拰灞傛俯搴︿俊鎭�
+addPoints4 = function (model, grainData) {
+    // console.log(grainData);
+    var listPoints = grainData.listPoints;
+    var listLays = grainData.listLays;
+    var point;
+    var key;
+    var lay;
+    var temp;
+    for (var i = 0; i < listPoints.length; i++) {
+        point = listPoints[i];
+        lay = listLays[point.z];
+        temp = point.temp;
+        //灞傛渶
+        if (lay.z <= listLays.length) {
+            key = "c_max_" + lay.z;
+            model = model.replace(key, lay.tempMax);
+            key = "c_min_" + lay.z;
+            model = model.replace(key, lay.tempMin);
+            key = "c_ave_" + lay.z;
+            model = model.replace(key, lay.tempAve);
+            key = "c_out_ave_" + lay.z;
+            model = model.replace(key, lay.tempAveOut);
+            key = "c_in_ave_" + lay.z;
+            model = model.replace(key, lay.tempAveIn);
+        }
+
+        key = (point.x + 1) + "_" + (point.y + 1) + "_" + (point.z + 1);
+        //鍒ゆ柇灞傞珮浣庢俯
+        if (-100.0 == temp) {
+            temp = "澶囩敤";
+        }
+        if (-101.0 == temp) {
+            temp = "鏁呴殰";
+        }
+        if (-102.0 == temp) {
+            temp = "--";
+        }
+        if (temp == lay.tempMax) {
+            temp = temp + "*";
+        }
+        if (temp == lay.tempMin) {
+            temp = temp + "#";
+        }
+        model = model.replace(key, temp);
+    }
+    return model;
+};
+/**
+ * 鏍规嵁HTML妯$増鎵撳嵃涓篈4
+ * @param strHtml
+ */
+previewA4 = function (strHtml) {
+    var LODOP = CLODOP;
+    LODOP.SET_PRINT_PAGESIZE(1, 0, 0, "A4");
+    LODOP.PRINT_INIT("绮儏鎶ヨ〃");
+    LODOP.ADD_PRINT_HTM(30, 40, "180mm", "100%", strHtml);
+    //璁剧疆榛樿婊″紶鎵撳嵃
+    LODOP.SET_PRINT_MODE("PRINT_PAGE_PERCENT", "Full-Page");
+    LODOP.PREVIEW();
+};
+
+getCheckValue = function (qualityItemMap, key) {
+    try {
+        return (qualityItemMap[key].value ? qualityItemMap[key].value : "/");
+    } catch (e) {
+        console.log(e);
+        return "/";
+    }
+    return "/";
+};
\ No newline at end of file

--
Gitblit v1.9.3