Merge remote-tracking branch 'origin/develop' into develop
This commit is contained in:
@@ -1298,6 +1298,7 @@ public class PythonService {
|
|||||||
designPythonObjects.setObjects(objects);
|
designPythonObjects.setObjects(objects);
|
||||||
|
|
||||||
DesignPythonObject pythonObject = new DesignPythonObject();
|
DesignPythonObject pythonObject = new DesignPythonObject();
|
||||||
|
designPythonObjects.setProcess_id("1234");
|
||||||
pythonObject.setItems(coverToDesignSinglePythonItem(designSingleDTO, designLibraryModelPoint));
|
pythonObject.setItems(coverToDesignSinglePythonItem(designSingleDTO, designLibraryModelPoint));
|
||||||
pythonObject.setBasic(coverToSingleBasic(singleOverall, switchCategory, designLibraryModelPoint));
|
pythonObject.setBasic(coverToSingleBasic(singleOverall, switchCategory, designLibraryModelPoint));
|
||||||
objects.add(pythonObject);
|
objects.add(pythonObject);
|
||||||
|
|||||||
@@ -30,4 +30,6 @@ public interface LibraryModelPointService extends IService<LibraryModelPoint> {
|
|||||||
*/
|
*/
|
||||||
String modelsDot( ModelsDotDTO modelsDotDTO );
|
String modelsDot( ModelsDotDTO modelsDotDTO );
|
||||||
|
|
||||||
|
LibraryModelPoint getByRelationId(Long relationId,String modelType);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -404,7 +404,7 @@ public class DesignItemServiceImpl extends ServiceImpl<DesignItemMapper, DesignI
|
|||||||
high = libFile.getHigh();
|
high = libFile.getHigh();
|
||||||
width = libFile.getWidth();
|
width = libFile.getWidth();
|
||||||
}
|
}
|
||||||
LibraryModelPoint modelPoint = libraryModelPointService.getById(design.getTemplateId());
|
LibraryModelPoint modelPoint = libraryModelPointService.getByRelationId(design.getTemplateId(),design.getModelType());
|
||||||
Assert.notNull(modelPoint,"The model has not been tagged");
|
Assert.notNull(modelPoint,"The model has not been tagged");
|
||||||
|
|
||||||
designLibraryModelPointVO = collectionElementService.calculateTemplatePoint(modelPoint,high,width,modelUrl);
|
designLibraryModelPointVO = collectionElementService.calculateTemplatePoint(modelPoint,high,width,modelUrl);
|
||||||
@@ -413,6 +413,7 @@ public class DesignItemServiceImpl extends ServiceImpl<DesignItemMapper, DesignI
|
|||||||
// 组装入参
|
// 组装入参
|
||||||
DesignPythonObjects objects =pythonService.covertDesignSingleParam(
|
DesignPythonObjects objects =pythonService.covertDesignSingleParam(
|
||||||
designSingleIncludeLayersDTO,design.getSingleOverall(),design.getSwitchCategory(),designLibraryModelPointVO);
|
designSingleIncludeLayersDTO,design.getSingleOverall(),design.getSwitchCategory(),designLibraryModelPointVO);
|
||||||
|
// design
|
||||||
JSONObject jsonObject = pythonService.designNew(objects);
|
JSONObject jsonObject = pythonService.designNew(objects);
|
||||||
// preview -> 不存数据库 submit -> 存数据库
|
// preview -> 不存数据库 submit -> 存数据库
|
||||||
List<TDesignPythonOutfitDetail> tDesignPythonOutfitDetails;
|
List<TDesignPythonOutfitDetail> tDesignPythonOutfitDetails;
|
||||||
@@ -586,9 +587,9 @@ public class DesignItemServiceImpl extends ServiceImpl<DesignItemMapper, DesignI
|
|||||||
}
|
}
|
||||||
|
|
||||||
private List<OutfitDetailPythonItem> convertToOutfitDetailPythonItemList(List<DesignPythonOutfitVO> layers){
|
private List<OutfitDetailPythonItem> convertToOutfitDetailPythonItemList(List<DesignPythonOutfitVO> layers){
|
||||||
ArrayList<OutfitDetailPythonItem> composeLayerPythonItem = new ArrayList<>();
|
List<OutfitDetailPythonItem> composeLayerPythonItem = Arrays.asList(new OutfitDetailPythonItem[layers.size()]);
|
||||||
layers.forEach(layer -> {
|
layers.forEach(layer -> {
|
||||||
composeLayerPythonItem.add(layers.size() - layer.getPriority(),new OutfitDetailPythonItem(layer.getImageCategory(),
|
composeLayerPythonItem.set(layer.getPriority() - 1,new OutfitDetailPythonItem(layer.getImageCategory(),
|
||||||
layer.getPosition(),
|
layer.getPosition(),
|
||||||
layer.getImageSize(),
|
layer.getImageSize(),
|
||||||
layer.getScale(),
|
layer.getScale(),
|
||||||
|
|||||||
@@ -978,7 +978,6 @@ public class DesignServiceImpl extends ServiceImpl<DesignMapper, Design> impleme
|
|||||||
}else {
|
}else {
|
||||||
designSinglePrintDTO.setIfSingle(Boolean.TRUE);
|
designSinglePrintDTO.setIfSingle(Boolean.TRUE);
|
||||||
designSinglePrint.setLocation(JSONArray.parseArray(detailPrint.getPosition(),Double.class));
|
designSinglePrint.setLocation(JSONArray.parseArray(detailPrint.getPosition(),Double.class));
|
||||||
designSinglePrint.setScale(detailPrint.getScale());
|
|
||||||
designSinglePrint.setAngle(detailPrint.getAngle());
|
designSinglePrint.setAngle(detailPrint.getAngle());
|
||||||
designSinglePrint.setPriority(detailPrint.getPriority());
|
designSinglePrint.setPriority(detailPrint.getPriority());
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -114,4 +114,13 @@ public class LibraryModelPointServiceImpl extends ServiceImpl<LibraryModelPointM
|
|||||||
return objects.getObjects().get(0).getBasic().getSave_name();
|
return objects.getObjects().get(0).getBasic().getSave_name();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public LibraryModelPoint getByRelationId(Long relationId,String modelType){
|
||||||
|
QueryWrapper<LibraryModelPoint> queryWrapper = new QueryWrapper<>();
|
||||||
|
queryWrapper.eq("relation_id", relationId)
|
||||||
|
.eq("model_type",modelType);
|
||||||
|
|
||||||
|
return baseMapper.selectOne(queryWrapper);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user