value
2024-04-17 cddc46a1ba318426cf01ae3fd354807c3b3b2465
inspect-server/src/main/java/com/yuanchu/mom/service/impl/InsOrderPlanServiceImpl.java
@@ -456,6 +456,8 @@
                template.writeAndClose(Files.newOutputStream(Paths.get(wordUrl + "/" + name)));
                insReport.setUrl("/word/" + name);
                insReportMapper.insert(insReport);
                insOrder.setState(4);
                insOrderMapper.updateById(insOrder);
            } catch (IOException e) {
                throw new RuntimeException(e);
            }
@@ -477,14 +479,15 @@
                JSONObject sheet = JSON.parseObject(JSON.toJSONString(JSON.parseArray(JSON.toJSONString(JSON.parseObject(thing).get("data"))).get(0)));
                JSONObject config = JSON.parseObject(JSON.toJSONString(sheet.get("config")));
                List<JSONObject> cellData = JSON.parseArray(JSON.toJSONString(sheet.get("celldata")), JSONObject.class);
                List<JSONObject> tableData = new ArrayList<>();
//                List<JSONObject> tableData = new ArrayList<>();
                Map<String, Object> style = new HashMap<>();
                style.put("rowlen", config.get("rowlen"));
                style.put("columnlen", config.get("columnlen"));
                int r = -1;
                if (BeanUtil.isNotEmpty(cellData)) {
                /*if (BeanUtil.isNotEmpty(cellData)) {
                    for (JSONObject o : cellData) {
                        JSONObject v = JSON.parseObject(JSON.toJSONString(o.get("v")));
                        tableData.add(o);
                        if (BeanUtil.isNotEmpty(v.get("ps"))) {
                            JSONObject ps = JSON.parseObject(JSON.toJSONString(v.get("ps")));
                            if (ps.get("value").equals("检验项") && v.get("v").equals(product.getInspectionItem())) {
@@ -502,8 +505,8 @@
                            }
                        }
                    }
                }
                product.setTemplate(tableData);
                }*/
                product.setTemplate(cellData);
                product.setStyle(style);
            }
        }