diff --git a/src/main/java/com/ai/da/controller/GenerateController.java b/src/main/java/com/ai/da/controller/GenerateController.java index a928720a..c5ecd7f7 100644 --- a/src/main/java/com/ai/da/controller/GenerateController.java +++ b/src/main/java/com/ai/da/controller/GenerateController.java @@ -149,7 +149,7 @@ public class GenerateController { @Operation(summary = "获取pose transfer的所有pose") @GetMapping("/getAllPose") - public Response>> getAllPose(){ + public Response>> getAllPose(){ return Response.success(generateService.getAllPose()); } diff --git a/src/main/java/com/ai/da/python/PythonService.java b/src/main/java/com/ai/da/python/PythonService.java index 22008f17..0de18f81 100644 --- a/src/main/java/com/ai/da/python/PythonService.java +++ b/src/main/java/com/ai/da/python/PythonService.java @@ -2851,10 +2851,17 @@ public class PythonService { gradientString = JSONObject.toJSONString(designSingleItem.getGradient()); } + PrintToPython printToPython; + if (designSingleIncludeLayersDTO.getDesignType().equals("default")){ + printToPython = resolveDesignSinglePrint(designSingleItem.getPrintObject().getPrints(), + designSingleItem.getPartialDesign().getPartialDesignMinioPath()); + } else { + printToPython = null; + } /*PrintToPython printToPython = resolveDesignSinglePrint(designSingleItem.getPrintObject().getPrints(), - designSingleItem.getPartialDesign().getPartialDesignMinioPath()); - resolveDesignElement(designSingleItem.getTrims(), printToPython); - log.info("组装参数【服装:{}的maskUrl: {}】",designSingleItem.getType(), designSingleItem.getMaskUrl());*/ + designSingleItem.getPartialDesign().getPartialDesignMinioPath());*/ +// resolveDesignElement(designSingleItem.getTrims(), printToPython); + log.info("组装参数【服装:{}的maskUrl: {}】",designSingleItem.getType(), designSingleItem.getMaskUrl()); String partialDesign = designSingleItem.getPartialDesign().getPartialDesignMinioPath(); String mergeImagePath = !StringUtil.isNullOrEmpty(partialDesign) @@ -2863,7 +2870,7 @@ public class PythonService { designSingleItem.getType(), designSingleItem.getPath(), designSingleItem.getColor(), - null, + printToPython, // businessId designItemDetailId (python端确认没有作用,但是数据库需要存,作用:未知) // designSingleItem.getId(), businessId, @@ -2897,9 +2904,9 @@ public class PythonService { private PrintToPython resolveDesignSinglePrint(List printObject, String partialDesign) { PrintToPython printToPython = new PrintToPython(); - DesignPythonItemPrint printSingle = new DesignPythonItemPrint(); +// DesignPythonItemPrint printSingle = new DesignPythonItemPrint(); DesignPythonItemPrint printOverall = new DesignPythonItemPrint(); - printToPython.setSingle(printSingle); +// printToPython.setSingle(printSingle); printToPython.setOverall(printOverall); printToPython.setPartial(StringUtil.isNullOrEmpty(partialDesign) ? null : partialDesign); if (Objects.isNull(printObject) || printObject.isEmpty()){ @@ -2946,14 +2953,14 @@ public class PythonService { } // log.info("本次print打点locations###{}###fileVO{}", p.getLocation(), JSON.toJSONString(fileVO)); }); - locationS.removeAll(Collections.singleton(null)); + /*locationS.removeAll(Collections.singleton(null)); scaleS.removeAll(Collections.singleton(null)); angleS.removeAll(Collections.singleton(null)); pathsS.removeAll(Collections.singleton(null)); printSingle.setLocation(locationS); printSingle.setPrint_scale_list(scaleS); printSingle.setPrint_angle_list(angleS); - printSingle.setPrint_path_list(pathsS); + printSingle.setPrint_path_list(pathsS);*/ locationO.removeAll(Collections.singleton(null)); scaleO.removeAll(Collections.singleton(null)); diff --git a/src/main/java/com/ai/da/service/GenerateService.java b/src/main/java/com/ai/da/service/GenerateService.java index 7e66a14d..e321d79d 100644 --- a/src/main/java/com/ai/da/service/GenerateService.java +++ b/src/main/java/com/ai/da/service/GenerateService.java @@ -73,7 +73,7 @@ public interface GenerateService extends IService { SketchReconstructionVO getSketchReconstruction(Long projectId); - List> getAllPose(); + List> getAllPose(); void processPoseTransformResultBatch(String taskId, String gifUrl, String videoUrl, String imageUrl, String progress); diff --git a/src/main/java/com/ai/da/service/impl/GenerateServiceImpl.java b/src/main/java/com/ai/da/service/impl/GenerateServiceImpl.java index 53d8f93b..8c25c7fc 100644 --- a/src/main/java/com/ai/da/service/impl/GenerateServiceImpl.java +++ b/src/main/java/com/ai/da/service/impl/GenerateServiceImpl.java @@ -3090,19 +3090,14 @@ public class GenerateServiceImpl extends ServiceImpl i return vo; } - public List> getAllPose() { + public List> getAllPose() { List> propertyList = PoseEnum.getPropertyList(); - List> resp = new ArrayList<>(); propertyList.forEach(item -> { - HashMap temp = new HashMap<>(); - // item.put("gif", minioUtil.getPreSignedUrl(item.get("gif"), CommonConstant.MINIO_IMAGE_EXPIRE_TIME)); - temp.put("id", Integer.parseInt(item.get("id"))); - temp.put("video", minioUtil.getPreSignedUrl(item.get("video"), CommonConstant.MINIO_IMAGE_EXPIRE_TIME)); - temp.put("firstFrame", minioUtil.getPreSignedUrl(item.get("firstFrame"), CommonConstant.MINIO_IMAGE_EXPIRE_TIME)); - resp.add(temp); + item.put("video", minioUtil.getPreSignedUrl(item.get("video"), CommonConstant.MINIO_IMAGE_EXPIRE_TIME)); + item.put("firstFrame", minioUtil.getPreSignedUrl(item.get("firstFrame"), CommonConstant.MINIO_IMAGE_EXPIRE_TIME)); }); - return resp; + return propertyList; } @Override