| | |
| | | } |
| | | } |
| | | } |
| | | // 处理 glassPoint 序列化 |
| | | if (detail.containsKey("glassPoint")) { |
| | | Object glassPointObj = detail.get("glassPoint"); |
| | | if (glassPointObj != null) { |
| | | try { |
| | | // 如果 glassPointObj 已经是字符串,则不需要转换 |
| | | if (!(glassPointObj instanceof String)) { |
| | | // 将对象转换为 JSON 字符串 |
| | | String glassPointStr = mapper.writeValueAsString(glassPointObj); |
| | | detail.put("glassPoint", glassPointStr); |
| | | } |
| | | } catch (Exception e) { |
| | | // 如果转换失败,记录错误并移除该字段 |
| | | System.err.println("转换 glassPoint 失败: " + e.getMessage()); |
| | | detail.remove("glassPoint"); |
| | | } |
| | | } |
| | | } |
| | | |
| | | if (isRemain) { |
| | | offCutDetails.add(detail); |