修改标识

This commit is contained in:
2025-12-30 14:11:38 +08:00
parent a4fc02dcc3
commit 0684e0459f

View File

@@ -358,8 +358,8 @@ public class OrderInfo implements Serializable {
} }
} }
public void upPrintStatus(JSONObject printStatus, boolean isPrintSuccess) { public void upPrintStatus(JSONObject printJson, boolean isPrintSuccess) {
String currentDeviceId = printStatus.getString("id"); String currentDeviceId = printJson.getString("id");
JSONArray oldPrintStatusArray = getPrintStatusAsArray(); JSONArray oldPrintStatusArray = getPrintStatusAsArray();
// 3. 初始化新的打印状态JSON数组用于存储处理后的结果 // 3. 初始化新的打印状态JSON数组用于存储处理后的结果
JSONArray newPrintStatusArray = new JSONArray(); JSONArray newPrintStatusArray = new JSONArray();
@@ -375,10 +375,10 @@ public class OrderInfo implements Serializable {
} }
} }
if (!isPrintSuccess) { if (!isPrintSuccess) {
newPrintStatusArray.add(printStatus); newPrintStatusArray.add(printJson);
} }
if(newPrintStatusArray.isEmpty()){ if (newPrintStatusArray.isEmpty()) {
this.setPrintStatus(newPrintStatusArray.toJSONString()); printStatus = newPrintStatusArray.toJSONString();
} }
} }
} }