TASK:mannequin;
This commit is contained in:
@@ -61,4 +61,5 @@ public class ValidateElementVO {
|
||||
|
||||
private Double brandScale;
|
||||
private List<DesignLibraryModelPointVO> mannequins;
|
||||
private DesignLibraryModelPointVO designLibraryModelPointVO;
|
||||
}
|
||||
|
||||
@@ -348,7 +348,7 @@ public class PythonService {
|
||||
private DesignPythonObject createDesignPythonObject(ValidateElementVO elementVO, CurrentDesignPictureTypeEnum designPictureType, BigDecimal systemScale, String singleOverall, String switchCategory, int i) {
|
||||
DesignPythonObject pythonObject = new DesignPythonObject();
|
||||
pythonObject.setItems(coverToDesignPythonItemNew(elementVO, designPictureType, systemScale));
|
||||
pythonObject.setBasic(coverToBasic(pythonObject.getItems().get(0), singleOverall, switchCategory, elementVO.getDesignLibraryModelPoint(), elementVO.getMannequins()));
|
||||
pythonObject.setBasic(coverToBasic(pythonObject.getItems().get(0), singleOverall, switchCategory, elementVO.getDesignLibraryModelPoint(), elementVO.getDesignLibraryModelPointVO()));
|
||||
if (CollectionUtil.isNotEmpty(elementVO.getRequestIdList())) {
|
||||
pythonObject.setObjectSign(elementVO.getRequestIdList().get(i));
|
||||
}
|
||||
@@ -1696,12 +1696,20 @@ public class PythonService {
|
||||
//类型
|
||||
pythonItem.setType(type);
|
||||
if (SysFileLevel2TypeEnum.BODY.getRealName().equals(type)) {
|
||||
if (Objects.nonNull(designLibraryModelPoint)) {
|
||||
pythonItem.setBody_path(designLibraryModelPoint.getTemplateUrl());
|
||||
if (!CollectionUtils.isEmpty(elementVO.getMannequins())) {
|
||||
DesignLibraryModelPointVO vo = getRandomDesignLibraryModelPoint(elementVO.getMannequins());
|
||||
pythonItem.setBody_path(vo.getTemplateUrl());
|
||||
elementVO.setDesignLibraryModelPointVO(vo);
|
||||
} else {
|
||||
// pythonItem.setBody_path("/workspace/python_code/Multi-layer-Virtual-Try-on/dataset_for_test/Img_model.png");
|
||||
pythonItem.setBody_path("aida-mannequins/model_1693218345.2714432.png");
|
||||
}
|
||||
// if (Objects.nonNull(designLibraryModelPoint)) {
|
||||
// pythonItem.setBody_path(designLibraryModelPoint.getTemplateUrl());
|
||||
// } else {
|
||||
//// pythonItem.setBody_path("/workspace/python_code/Multi-layer-Virtual-Try-on/dataset_for_test/Img_model.png");
|
||||
// pythonItem.setBody_path("aida-mannequins/model_1693218345.2714432.png");
|
||||
// }
|
||||
} else {
|
||||
SysFileVO sysFileVO = getRandomSysFileByLevel2Type(type, Lists.newArrayList(), elementVO.getModelSex());
|
||||
pythonItem.setPath(sysFileVO.getUrl());
|
||||
@@ -2167,7 +2175,7 @@ public class PythonService {
|
||||
}
|
||||
|
||||
private DesignPythonBasic coverToBasic(DesignPythonItem designPythonItem, String singleOverall,
|
||||
String switchCategory, DesignLibraryModelPointVO designLibraryModelPoint, List<DesignLibraryModelPointVO> mannequins) {
|
||||
String switchCategory, DesignLibraryModelPointVO designLibraryModelPoint, DesignLibraryModelPointVO designLibraryModelPointVO) {
|
||||
DesignPythonBasic basic = new DesignPythonBasic();
|
||||
basic.setSingle_overall(singleOverall);
|
||||
basic.setSwitch_category(switchCategory);
|
||||
@@ -2180,9 +2188,8 @@ public class PythonService {
|
||||
basic.setSelf_template(Boolean.TRUE);
|
||||
}
|
||||
basic.setScale_earrings(0.16);
|
||||
if (!CollectionUtils.isEmpty(mannequins)) {
|
||||
DesignLibraryModelPointVO vo = getRandomDesignLibraryModelPoint(mannequins);
|
||||
basic.setBody_point_test(getMap(vo));
|
||||
if (Objects.nonNull(designLibraryModelPointVO)) {
|
||||
basic.setBody_point_test(getMap(designLibraryModelPointVO));
|
||||
}else {
|
||||
basic.setBody_point_test(getMap(designLibraryModelPoint));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user