Sfoglia il codice sorgente

ws-修改设备报表、周期报表、手动报表删除行后解析失败的问题

ws 11 mesi fa
parent
commit
eb247b0199

+ 1 - 1
industry-system/industry-da/src/main/java/com/example/opc_da/validate/reportTable/AutomaticReportTableValidate.java

@@ -190,7 +190,7 @@ public abstract class AutomaticReportTableValidate implements ReportTableValidat
             JSONArray row = sheetData.getJSONArray(i);
             for (int j = 0; j < row.size(); j++) {
                 JSONObject rowCol = row.getJSONObject(j);
-                if (Blank.isNotEmpty(rowCol)) {
+                if (Blank.isNotEmpty(rowCol) && Blank.isNotEmpty(rowCol.get("v")) && Blank.isNotEmpty(rowCol.get("m"))) {
                     try {
                         JSONObject rowColJson = JSONObject.parseObject(rowCol.getString("celldata"));
                         if (rowColJson != null) {

+ 1 - 1
industry-system/industry-da/src/main/java/com/example/opc_da/validate/reportTable/DeviceReportTableValidate.java

@@ -205,7 +205,7 @@ public abstract class DeviceReportTableValidate implements ReportTableValidate {
                 if (Blank.isNotEmpty(rowCol)) {
                     try {
                         JSONObject rowColJson = JSONObject.parseObject(rowCol.getString("celldata"));
-                        if (rowColJson != null) {
+                        if (rowColJson != null && Blank.isNotEmpty(rowCol.get("v")) && Blank.isNotEmpty(rowCol.get("m"))) {
                             String tableId = rowColJson.getString("tableId");
                             String type = rowColJson.getString("type");
                             if (type.equals("data")) {

+ 1 - 1
industry-system/industry-da/src/main/java/com/example/opc_da/validate/reportTable/ManualReportTableValidate.java

@@ -150,7 +150,7 @@ public class ManualReportTableValidate implements ReportTableValidate {
                 if (Blank.isNotEmpty(rowCol)) {
                     try {
                         String celldata = rowCol.getString("celldata");
-                        if (Blank.isNotEmpty(celldata)) {
+                        if (Blank.isNotEmpty(celldata) && Blank.isNotEmpty(rowCol.get("v")) && Blank.isNotEmpty(rowCol.get("m"))) {
                             JSONObject rowColJson = JSONObject.parseObject(celldata);
                             String tableId = rowColJson.getString("tableId");
                             String type = rowColJson.getString("type");