于杰
15 小时以前 44ec7c27cc897a710ff116d52a790f45ce081dcb
north-glass-erp/src/main/java/com/example/erp/service/pp/GlassOptimizeService.java
@@ -1793,7 +1793,6 @@
                            glassOptimizeMapper.deleteOptimizeDynamicLayout(projectNo);
                            glassOptimizeMapper.deleteOptimizeDynamicDetail(projectNo);
                            // 插入动态项目
                            glassOptimizeMapper.insertDynamicProject(dataMap);
                            // 处理 layouts 数组并插入
@@ -1817,26 +1816,26 @@
                                            detail.put("projectNo", projectNo);
                                            // 处理 isRotate 为 1 时交换 width 和 height 的逻辑
                                            if (detail.containsKey("isRotate")) {
                                                Object isRotateObj = detail.get("isRotate");
                                                int isRotate = 0;
                                                if (isRotateObj instanceof Number) {
                                                    isRotate = ((Number) isRotateObj).intValue();
                                                } else if (isRotateObj instanceof String) {
                                                    isRotate = Integer.parseInt(isRotateObj.toString());
                                                }
                                                if (isRotate == 1) {
                                                    // 交换 width 和 height
                                                    Object widthObj = detail.get("width");
                                                    Object heightObj = detail.get("height");
                                                    detail.put("width", heightObj);
                                                    detail.put("height", widthObj);
                                                }
                                            }
//                                            // 处理 isRotate 为 1 时交换 width 和 height 的逻辑
//                                            if (detail.containsKey("isRotate")) {
//                                                Object isRotateObj = detail.get("isRotate");
//                                                int isRotate = 0;
//                                                if (isRotateObj instanceof Number) {
//                                                    isRotate = ((Number) isRotateObj).intValue();
//                                                } else if (isRotateObj instanceof String) {
//                                                    isRotate = Integer.parseInt(isRotateObj.toString());
//                                                }
//
//                                                if (isRotate == 1) {
//                                                    // 交换 width 和 height
//                                                    Object widthObj = detail.get("width");
//                                                    Object heightObj = detail.get("height");
//                                                    detail.put("width", heightObj);
//                                                    detail.put("height", widthObj);
//
//
//                                                }
//                                            }
                                            // 处理 glassPoint 字段转换
                                            if (detail.containsKey("glassPoint")) {
@@ -1932,12 +1931,12 @@
                    String glassId = damageItem.get("glassId").toString();
                    Map<String, Object> processedItem = new HashMap<>(damageItem);
                    // 如果glassId在glassInfolList中存在,reportState保持为10,否则改为1
                    // 如果glassId在glassInfolList中存在,reportState保持为10,否则改为6
                    if (glassIdSet.contains(glassId)) {
                        // glassId存在,保持reportState为10(已在glassDamageTempList中设置)
                        processedItem.put("reportState", 10);
                    } else {
                        // glassId不存在,将reportState改为1
                        // glassId不存在,将reportState改为6
                        processedItem.put("reportState", 6);
                    }