fix:根据不同类型判断性别进行男女服装筛选,否则会造成design异常

This commit is contained in:
litianxiang
2025-10-03 12:04:48 +08:00
parent a681a298f4
commit 6772610129

View File

@@ -244,7 +244,9 @@ public class CollectionElementServiceImpl extends ServiceImpl<CollectionElementM
collectionElementMapper.deleteBatchIds(ids);
}
/** 该方法已不再使用 */
/**
* 该方法已不再使用
*/
@Deprecated
@Override
public GenerateCollectionItemVO generatePrint(CollectionGeneratePrintDTO generatePrintDTO) {
@@ -553,11 +555,17 @@ public class CollectionElementServiceImpl extends ServiceImpl<CollectionElementM
while (sketchIterator.hasNext()) {
CollectionSketchDTO sketchBoard = sketchIterator.next();
String level2Type = sketchBoard.getLevel2Type();
String level3Type = "";
if ("Collection".equals(sketchBoard.getDesignType())) {
level3Type = collectionElementMapper.selectOne(new LambdaQueryWrapper<CollectionElement>().eq(CollectionElement::getId, sketchBoard.getSketchBoardId()).select(CollectionElement::getLevel3Type)).getLevel3Type();
} else if ("Library".equals(sketchBoard.getDesignType())){
level3Type = libraryService.getById(sketchBoard.getSketchBoardId()).getLevel3Type();
}
//判断性别和当前project性别是否一致不一致则移除
String level3Type = collectionElementMapper.selectOne(new LambdaQueryWrapper<CollectionElement>().eq(CollectionElement::getId, sketchBoard.getSketchBoardId()).select(CollectionElement::getLevel3Type)).getLevel3Type();
if (!level3Type.equalsIgnoreCase(designDTO.getModelSex())) {
sketchIterator.remove();
}
}
//再次判断草图板数量如果为null则跳出当前if
if (CollectionUtil.isNotEmpty(designDTO.getSketchBoards())) {