From e8760df88fffdf06d82f74e6432aed97ed936a03 Mon Sep 17 00:00:00 2001 From: shahaibo <1023316923@qq.com> Date: Thu, 5 Oct 2023 16:17:01 +0800 Subject: [PATCH] =?UTF-8?q?BUGFIX:=E6=A8=A1=E7=89=B9;?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/com/ai/da/python/PythonService.java | 4 +++- .../java/com/ai/da/service/impl/DesignServiceImpl.java | 7 +++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/main/java/com/ai/da/python/PythonService.java b/src/main/java/com/ai/da/python/PythonService.java index a710cd93..0ed115a0 100644 --- a/src/main/java/com/ai/da/python/PythonService.java +++ b/src/main/java/com/ai/da/python/PythonService.java @@ -184,13 +184,15 @@ public class PythonService { * @param singleOverall * @param switchCategory * @param elementVO + * @param processId * @return */ public DesignPythonObjects covertDesignParam(BigDecimal systemScale, String singleOverall, - String switchCategory, ValidateElementVO elementVO) { + String switchCategory, ValidateElementVO elementVO, String processId) { DesignPythonObjects designPythonObjects = new DesignPythonObjects(); List objects = Lists.newArrayList(); designPythonObjects.setObjects(objects); + designPythonObjects.setProcess_id(processId); long pinPrintNum = calculateDesignPinPrintNum(elementVO.getPrintBoardElements()); long noPinPrintNum = calculateDesignNoPinPrintNum(elementVO.getPrintBoardElements()); //没有print的 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 24e8685a..d50a07b4 100644 --- a/src/main/java/com/ai/da/service/impl/DesignServiceImpl.java +++ b/src/main/java/com/ai/da/service/impl/DesignServiceImpl.java @@ -35,7 +35,6 @@ import org.springframework.util.CollectionUtils; import org.springframework.util.StringUtils; import javax.annotation.Resource; -import javax.validation.constraints.NotNull; import java.io.File; import java.io.IOException; import java.math.BigDecimal; @@ -254,7 +253,7 @@ public class DesignServiceImpl extends ServiceImpl impleme calculateLibraryAndSysFile(designDTO, elementVO, userInfo); //组装design入参 DesignPythonObjects pythonObjects = pythonService.covertDesignParam(designDTO.getSystemScale(), - designDTO.getSingleOverall(), designDTO.getSwitchCategory(), elementVO); + designDTO.getSingleOverall(), designDTO.getSwitchCategory(), elementVO, designDTO.getProcessId()); //缓存保存的文件 方便后面处理进度问题 setDesignProcess(userInfo.getId(), pythonObjects); //design @@ -299,8 +298,8 @@ public class DesignServiceImpl extends ServiceImpl impleme calculateLibraryAndSysFile(designDTO, elementVO, userInfo); //组装design入参 DesignPythonObjects pythonObjects = pythonService.covertDesignParam(designDTO.getSystemScale(), - designDTO.getSingleOverall(), designDTO.getSwitchCategory(), elementVO); - pythonObjects.setProcess_id(designDTO.getProcessId()); + designDTO.getSingleOverall(), designDTO.getSwitchCategory(), elementVO, designDTO.getProcessId()); +// pythonObjects.setProcess_id(designDTO.getProcessId()); //缓存保存的文件 方便后面处理进度问题 setDesignProcess(userInfo.getId(), pythonObjects); // pythonObjects增加image_id关联