From 8893ef0039163e16c7d0b14b30cdd602c7d7eae1 Mon Sep 17 00:00:00 2001 From: shahaibo <1023316923@qq.com> Date: Sat, 7 Oct 2023 17:55:58 +0800 Subject: [PATCH] =?UTF-8?q?BUGFIX:design=E6=8E=A5=E5=8F=A3=20python?= =?UTF-8?q?=E5=85=A5=E5=8F=82=E6=B7=BB=E5=8A=A0=E4=B8=A4=E4=B8=AA=E5=AD=97?= =?UTF-8?q?=E6=AE=B5;?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/ai/da/service/impl/DesignServiceImpl.java | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src/main/java/com/ai/da/service/impl/DesignServiceImpl.java b/src/main/java/com/ai/da/service/impl/DesignServiceImpl.java index 1cb75f53..273df5ef 100644 --- a/src/main/java/com/ai/da/service/impl/DesignServiceImpl.java +++ b/src/main/java/com/ai/da/service/impl/DesignServiceImpl.java @@ -254,8 +254,8 @@ public class DesignServiceImpl extends ServiceImpl impleme //组装design入参 DesignPythonObjects pythonObjects = pythonService.covertDesignParam(designDTO.getSystemScale(), designDTO.getSingleOverall(), designDTO.getSwitchCategory(), elementVO, designDTO.getProcessId()); - //缓存保存的文件 方便后面处理进度问题 - setDesignProcess(userInfo.getId(), pythonObjects); + //缓存保存的文件 方便后面处理进度问题 采用新的进度条获取方式 根据processId获取 +// setDesignProcess(userInfo.getId(), pythonObjects); //design pythonService.design(pythonObjects); //生成library @@ -299,9 +299,8 @@ public class DesignServiceImpl extends ServiceImpl impleme //组装design入参 DesignPythonObjects pythonObjects = pythonService.covertDesignParam(designDTO.getSystemScale(), designDTO.getSingleOverall(), designDTO.getSwitchCategory(), elementVO, designDTO.getProcessId()); -// pythonObjects.setProcess_id(designDTO.getProcessId()); - //缓存保存的文件 方便后面处理进度问题 - setDesignProcess(userInfo.getId(), pythonObjects); + //缓存保存的文件 方便后面处理进度问题 采用新的进度条获取方式 根据processId获取 +// setDesignProcess(userInfo.getId(), pythonObjects); // pythonObjects增加image_id关联 relationImageId(pythonObjects); //design @@ -325,6 +324,11 @@ public class DesignServiceImpl extends ServiceImpl impleme pythonObjects.getObjects().forEach( o -> { for (DesignPythonItem item : o.getItems()) { + List list = new ArrayList<>(); + list.add(1L); + list.add(1L); + item.setOffset(list); + item.setResize_scale(1f); String path = item.getPath(); if (StringUtils.isEmpty(path)) { String bodyPath = item.getBody_path();