BUGFIX:Single design;
This commit is contained in:
@@ -23,6 +23,9 @@ public class QueryLibraryPageVO {
|
|||||||
@ApiModelProperty("二级类型")
|
@ApiModelProperty("二级类型")
|
||||||
private String level2Type;
|
private String level2Type;
|
||||||
|
|
||||||
|
@ApiModelProperty("三级类型")
|
||||||
|
private String level3Type;
|
||||||
|
|
||||||
@ApiModelProperty("design类型 用户design生成时候区别library和collection")
|
@ApiModelProperty("design类型 用户design生成时候区别library和collection")
|
||||||
private String designType;
|
private String designType;
|
||||||
|
|
||||||
|
|||||||
@@ -311,21 +311,21 @@ public class PythonService {
|
|||||||
return result.setScale(0, RoundingMode.HALF_UP).intValue();
|
return result.setScale(0, RoundingMode.HALF_UP).intValue();
|
||||||
}
|
}
|
||||||
|
|
||||||
private int calculatePinSketchNum(List<CollectionElement> sketchBoardElements, List<String> hasUseMd5List) {
|
// private int calculatePinSketchNum(List<CollectionElement> sketchBoardElements, List<String> hasUseMd5List) {
|
||||||
List<CollectionElement> pinData = getPinData(sketchBoardElements, hasUseMd5List);
|
// List<CollectionElement> pinData = getPinData(sketchBoardElements, hasUseMd5List);
|
||||||
if (CollectionUtil.isEmpty(pinData)) {
|
// if (CollectionUtil.isEmpty(pinData)) {
|
||||||
return 0;
|
// return 0;
|
||||||
}
|
// }
|
||||||
// long topNum = sketchBoardElements.stream()
|
//// long topNum = sketchBoardElements.stream()
|
||||||
// .filter(skecth -> skecth.getHasPin() == 1
|
//// .filter(skecth -> skecth.getHasPin() == 1
|
||||||
// && DesignPythonItem.OUTWEAR_DRESS_BLOUSE.contains(skecth.getLevel2Type())).count();
|
//// && DesignPythonItem.OUTWEAR_DRESS_BLOUSE.contains(skecth.getLevel2Type())).count();
|
||||||
// long bottomNum = sketchBoardElements.stream()
|
//// long bottomNum = sketchBoardElements.stream()
|
||||||
// .filter(skecth -> skecth.getHasPin() == 1
|
//// .filter(skecth -> skecth.getHasPin() == 1
|
||||||
// && DesignPythonItem.SKIRT_TROUSERS.contains(skecth.getLevel2Type())).count();
|
//// && DesignPythonItem.SKIRT_TROUSERS.contains(skecth.getLevel2Type())).count();
|
||||||
// int num = Arrays.asList(topNum, bottomNum).stream().max(Comparator.comparing(Long::valueOf)).get().intValue();
|
//// int num = Arrays.asList(topNum, bottomNum).stream().max(Comparator.comparing(Long::valueOf)).get().intValue();
|
||||||
int num = pinData.size();
|
// int num = pinData.size();
|
||||||
return Math.min(num, 8);
|
// return Math.min(num, 8);
|
||||||
}
|
// }
|
||||||
|
|
||||||
//计算当前的图片类型
|
//计算当前的图片类型
|
||||||
private CurrentDesignPictureTypeEnum calculateCurrentDesignPictureType(int pinSketchNum, int sysSketchNum, int noPinSketchNum) {
|
private CurrentDesignPictureTypeEnum calculateCurrentDesignPictureType(int pinSketchNum, int sysSketchNum, int noPinSketchNum) {
|
||||||
@@ -377,23 +377,23 @@ public class PythonService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//计算Pin图片张数
|
//计算Pin图片张数
|
||||||
private int calculatePinPictureNum(List<CollectionElement> sketchBoardElements, List<String> hasUseMd5List) {
|
// private int calculatePinPictureNum(List<CollectionElement> sketchBoardElements, List<String> hasUseMd5List) {
|
||||||
List<CollectionElement> pinData = getPinData(sketchBoardElements, hasUseMd5List);
|
// List<CollectionElement> pinData = getPinData(sketchBoardElements, hasUseMd5List);
|
||||||
if (CollectionUtil.isEmpty(pinData)) {
|
// if (CollectionUtil.isEmpty(pinData)) {
|
||||||
return 0;
|
// return 0;
|
||||||
}
|
// }
|
||||||
long topNum = sketchBoardElements.stream()
|
// long topNum = sketchBoardElements.stream()
|
||||||
.filter(skecth -> skecth.getHasPin() == 1
|
// .filter(skecth -> skecth.getHasPin() == 1
|
||||||
&& DesignPythonItem.OUTWEAR_DRESS_BLOUSE.contains(skecth.getLevel2Type())).count();
|
// && DesignPythonItem.OUTWEAR_DRESS_BLOUSE.contains(skecth.getLevel2Type())).count();
|
||||||
long bottomNum = sketchBoardElements.stream()
|
// long bottomNum = sketchBoardElements.stream()
|
||||||
.filter(skecth -> skecth.getHasPin() == 1
|
// .filter(skecth -> skecth.getHasPin() == 1
|
||||||
&& DesignPythonItem.SKIRT_TROUSERS.contains(skecth.getLevel2Type())).count();
|
// && DesignPythonItem.SKIRT_TROUSERS.contains(skecth.getLevel2Type())).count();
|
||||||
int num = Arrays.asList(topNum, bottomNum).stream().max(Comparator.comparing(Long::valueOf)).get().intValue();
|
// int num = Arrays.asList(topNum, bottomNum).stream().max(Comparator.comparing(Long::valueOf)).get().intValue();
|
||||||
if (num > 8) {
|
// if (num > 8) {
|
||||||
return 8;
|
// return 8;
|
||||||
}
|
// }
|
||||||
return num;
|
// return num;
|
||||||
}
|
// }
|
||||||
|
|
||||||
//计算当前的Print图片类型
|
//计算当前的Print图片类型
|
||||||
private CurrentDesignPrintPictureTypeEnum calculateCurrentDesignPintPictureType(long pinPrintNum, long noPinPrintNum, long noPrintNum) {
|
private CurrentDesignPrintPictureTypeEnum calculateCurrentDesignPintPictureType(long pinPrintNum, long noPinPrintNum, long noPrintNum) {
|
||||||
@@ -478,42 +478,42 @@ public class PythonService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private List<DesignPythonItem> coverToDesignPythonItem(ValidateElementVO elementVO, CurrentDesignPictureTypeEnum designPictureType) {
|
// private List<DesignPythonItem> coverToDesignPythonItem(ValidateElementVO elementVO, CurrentDesignPictureTypeEnum designPictureType) {
|
||||||
//Pin的数据
|
// //Pin的数据
|
||||||
List<CollectionElement> pinData = getPinData(elementVO.getSketchBoardElements(), elementVO.getHasUseMd5List());
|
// List<CollectionElement> pinData = getPinData(elementVO.getSketchBoardElements(), elementVO.getHasUseMd5List());
|
||||||
//计算填充PythonItemBlouse
|
// //计算填充PythonItemBlouse
|
||||||
List<DesignPythonItem> items = Lists.newArrayList();
|
// List<DesignPythonItem> items = Lists.newArrayList();
|
||||||
if (elementVO.getModelSex().equals("Female")) {
|
// if (elementVO.getModelSex().equals("Female")) {
|
||||||
List<DesignPythonItem> blouseList = calculatePythonItemBlouse(pinData, elementVO, designPictureType);
|
// List<DesignPythonItem> blouseList = calculatePythonItemBlouse(pinData, elementVO, designPictureType);
|
||||||
if (!CollectionUtils.isEmpty(blouseList)) {
|
// if (!CollectionUtils.isEmpty(blouseList)) {
|
||||||
items.addAll(blouseList);
|
// items.addAll(blouseList);
|
||||||
}
|
// }
|
||||||
//计算填充PythonItemSkirt
|
// //计算填充PythonItemSkirt
|
||||||
DesignPythonItem skirt = calculatePythonItemSkirt(pinData, elementVO, designPictureType);
|
// DesignPythonItem skirt = calculatePythonItemSkirt(pinData, elementVO, designPictureType);
|
||||||
if (Objects.nonNull(skirt)) {
|
// if (Objects.nonNull(skirt)) {
|
||||||
items.add(skirt);
|
// items.add(skirt);
|
||||||
}
|
// }
|
||||||
} else {
|
// } else {
|
||||||
// 男装逻辑
|
// // 男装逻辑
|
||||||
DesignPythonItem top = calculatePythonItemTop(pinData, elementVO, designPictureType);
|
// DesignPythonItem top = calculatePythonItemTop(pinData, elementVO, designPictureType);
|
||||||
if (Objects.nonNull(top)) {
|
// if (Objects.nonNull(top)) {
|
||||||
items.add(top);
|
// items.add(top);
|
||||||
}
|
// }
|
||||||
DesignPythonItem bottom = calculatePythonItemBottom(pinData, elementVO, designPictureType);
|
// DesignPythonItem bottom = calculatePythonItemBottom(pinData, elementVO, designPictureType);
|
||||||
if (Objects.nonNull(bottom)) {
|
// if (Objects.nonNull(bottom)) {
|
||||||
items.add(bottom);
|
// items.add(bottom);
|
||||||
}
|
// }
|
||||||
if (SingleOverallEnum.SINGLE.getRealName().equals(elementVO.getSingleOverall()) && elementVO.getSwitchCategory().equals("Outwear")) {
|
// if (SingleOverallEnum.SINGLE.getRealName().equals(elementVO.getSingleOverall()) && elementVO.getSwitchCategory().equals("Outwear")) {
|
||||||
DesignPythonItem outwear = calculatePythonItemOutwear(pinData, elementVO, designPictureType);
|
// DesignPythonItem outwear = calculatePythonItemOutwear(pinData, elementVO, designPictureType);
|
||||||
if (Objects.nonNull(outwear)) {
|
// if (Objects.nonNull(outwear)) {
|
||||||
items.add(outwear);
|
// items.add(outwear);
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
//计算填充Hairstyle Earring Shoes Body
|
// //计算填充Hairstyle Earring Shoes Body
|
||||||
items.addAll(calculatePythonItemHairstyleShoes(elementVO, elementVO.getDesignLibraryModelPoint()));
|
// items.addAll(calculatePythonItemHairstyleShoes(elementVO, elementVO.getDesignLibraryModelPoint()));
|
||||||
return items;
|
// return items;
|
||||||
}
|
// }
|
||||||
|
|
||||||
private List<DesignPythonItem> coverToDesignPythonItemNew(ValidateElementVO elementVO, CurrentDesignPictureTypeEnum designPictureType, BigDecimal systemScale) {
|
private List<DesignPythonItem> coverToDesignPythonItemNew(ValidateElementVO elementVO, CurrentDesignPictureTypeEnum designPictureType, BigDecimal systemScale) {
|
||||||
List<DesignPythonItem> itemList = new ArrayList<>();
|
List<DesignPythonItem> itemList = new ArrayList<>();
|
||||||
@@ -575,7 +575,12 @@ public class PythonService {
|
|||||||
}
|
}
|
||||||
case NO_PIN:
|
case NO_PIN:
|
||||||
case SYS_FILE: {
|
case SYS_FILE: {
|
||||||
List<CollectionElement> collectNoPin = elementVO.getSketchBoardElements().stream().filter(o -> o.getHasPin() == 0 && o.getLevel2Type().equals(styleCategory)).collect(Collectors.toList());
|
List<CollectionElement> collectNoPin;
|
||||||
|
if (CollectionUtils.isEmpty(elementVO.getSketchBoardElements())) {
|
||||||
|
collectNoPin = null;
|
||||||
|
}else {
|
||||||
|
collectNoPin = elementVO.getSketchBoardElements().stream().filter(o -> o.getHasPin() == 0 && o.getLevel2Type().equals(styleCategory)).collect(Collectors.toList());
|
||||||
|
}
|
||||||
int poolNum = 20;
|
int poolNum = 20;
|
||||||
if (CollectionUtil.isNotEmpty(collectNoPin)) {
|
if (CollectionUtil.isNotEmpty(collectNoPin)) {
|
||||||
int collectionNoPinSize = collectNoPin.size();
|
int collectionNoPinSize = collectNoPin.size();
|
||||||
@@ -887,8 +892,7 @@ public class PythonService {
|
|||||||
List<CollectionElement> noPinData = getNoPinData(elementVO);
|
List<CollectionElement> noPinData = getNoPinData(elementVO);
|
||||||
if (CollectionUtil.isEmpty(noPinData)) {
|
if (CollectionUtil.isEmpty(noPinData)) {
|
||||||
// 根据pin的获取 type
|
// 根据pin的获取 type
|
||||||
List<CollectionElement> sketchBoardPins = elementVO.getSketchBoardElements()
|
List<CollectionElement> sketchBoardPins = getPinDataWhole(elementVO);
|
||||||
.stream().filter(v -> v.getHasPin() == 1).collect(Collectors.toList());
|
|
||||||
if (elementVO.getSingleOverall().equals(SingleOverallEnum.SINGLE.getRealName())) {
|
if (elementVO.getSingleOverall().equals(SingleOverallEnum.SINGLE.getRealName())) {
|
||||||
sketchBoardPins = sketchBoardPins.stream().filter(o -> o.getLevel2Type().equals(elementVO.getSwitchCategory())).collect(Collectors.toList());
|
sketchBoardPins = sketchBoardPins.stream().filter(o -> o.getLevel2Type().equals(elementVO.getSwitchCategory())).collect(Collectors.toList());
|
||||||
}
|
}
|
||||||
@@ -924,6 +928,13 @@ public class PythonService {
|
|||||||
case SYS_FILE: {
|
case SYS_FILE: {
|
||||||
// 根据pin noPin的获取 type
|
// 根据pin noPin的获取 type
|
||||||
List<CollectionElement> sketchBoardPins = elementVO.getSketchBoardElements();
|
List<CollectionElement> sketchBoardPins = elementVO.getSketchBoardElements();
|
||||||
|
if (!CollectionUtils.isEmpty(sketchBoardPins)) {
|
||||||
|
if (elementVO.getModelSex().equals(Sex.MALE.getValue())) {
|
||||||
|
sketchBoardPins = sketchBoardPins.stream().filter(o -> MALE_CATEGORY.contains(o.getLevel2Type())).collect(Collectors.toList());
|
||||||
|
}
|
||||||
|
if (elementVO.getModelSex().equals(Sex.FEMALE.getValue())) {
|
||||||
|
sketchBoardPins = sketchBoardPins.stream().filter(o -> FEMALE_CATEGORY.contains(o.getLevel2Type())).collect(Collectors.toList());
|
||||||
|
}
|
||||||
if (elementVO.getSingleOverall().equals(SingleOverallEnum.SINGLE.getRealName())) {
|
if (elementVO.getSingleOverall().equals(SingleOverallEnum.SINGLE.getRealName())) {
|
||||||
sketchBoardPins = sketchBoardPins.stream().filter(o -> o.getLevel2Type().equals(elementVO.getSwitchCategory())).collect(Collectors.toList());
|
sketchBoardPins = sketchBoardPins.stream().filter(o -> o.getLevel2Type().equals(elementVO.getSwitchCategory())).collect(Collectors.toList());
|
||||||
}
|
}
|
||||||
@@ -933,7 +944,7 @@ public class PythonService {
|
|||||||
JSONObject attributeRecognition = getAttributeRecognitionBySameCategory(element, elementVO.getModelSex());
|
JSONObject attributeRecognition = getAttributeRecognitionBySameCategory(element, elementVO.getModelSex());
|
||||||
return processAttributeRecognitionBySameCategory(attributeRecognition, elementVO, element.getLevel2Type());
|
return processAttributeRecognitionBySameCategory(attributeRecognition, elementVO, element.getLevel2Type());
|
||||||
}
|
}
|
||||||
|
}
|
||||||
QueryWrapper<Dressing> qw = new QueryWrapper<>();
|
QueryWrapper<Dressing> qw = new QueryWrapper<>();
|
||||||
qw.lambda().eq(Dressing::getApparel, elementVO.getModelSex());
|
qw.lambda().eq(Dressing::getApparel, elementVO.getModelSex());
|
||||||
if (elementVO.getSingleOverall().equals(SingleOverallEnum.SINGLE.getRealName())) {
|
if (elementVO.getSingleOverall().equals(SingleOverallEnum.SINGLE.getRealName())) {
|
||||||
@@ -2004,7 +2015,7 @@ public class PythonService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private List<CollectionElement> getPinData(ValidateElementVO elementVO) {
|
private List<CollectionElement> getPinData(ValidateElementVO elementVO) {
|
||||||
List<CollectionElement> pinData = getPinData(elementVO.getSketchBoardElements(), elementVO.getHasUseMd5List());
|
List<CollectionElement> pinData = getPinData(elementVO.getSketchBoardElements(), elementVO.getHasUseMd5List(), elementVO.getModelSex());
|
||||||
if (elementVO.getSingleOverall().equals(SingleOverallEnum.SINGLE.getRealName())) {
|
if (elementVO.getSingleOverall().equals(SingleOverallEnum.SINGLE.getRealName())) {
|
||||||
if (!CollectionUtils.isEmpty(pinData)) {
|
if (!CollectionUtils.isEmpty(pinData)) {
|
||||||
return pinData.stream().filter(o -> o.getLevel2Type().equals(elementVO.getSwitchCategory())).collect(Collectors.toList());
|
return pinData.stream().filter(o -> o.getLevel2Type().equals(elementVO.getSwitchCategory())).collect(Collectors.toList());
|
||||||
@@ -2016,12 +2027,52 @@ public class PythonService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private List<CollectionElement> getPinData(List<CollectionElement> sketchBoardElements, List<String> hasUseMd5List) {
|
private List<CollectionElement> getPinDataWhole(ValidateElementVO elementVO) {
|
||||||
|
List<CollectionElement> pinData = getPinDataWhole(elementVO.getSketchBoardElements(), elementVO.getHasUseMd5List(), elementVO.getModelSex());
|
||||||
|
if (elementVO.getSingleOverall().equals(SingleOverallEnum.SINGLE.getRealName())) {
|
||||||
|
if (!CollectionUtils.isEmpty(pinData)) {
|
||||||
|
return pinData.stream().filter(o -> o.getLevel2Type().equals(elementVO.getSwitchCategory())).collect(Collectors.toList());
|
||||||
|
}else {
|
||||||
|
return pinData;
|
||||||
|
}
|
||||||
|
}else {
|
||||||
|
return pinData;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private List<CollectionElement> getPinDataWhole(List<CollectionElement> sketchBoardElements, List<String> hasUseMd5List, String modelSex) {
|
||||||
|
if (CollectionUtils.isEmpty(sketchBoardElements)) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
List<CollectionElement> sketchBoardPins = sketchBoardElements
|
||||||
|
.stream().filter(v -> v.getHasPin() == 1).collect(Collectors.toList());
|
||||||
|
if (modelSex.equals(Sex.MALE.getValue())) {
|
||||||
|
sketchBoardPins = sketchBoardPins.stream().filter(o -> MALE_CATEGORY.contains(o.getLevel2Type())).collect(Collectors.toList());
|
||||||
|
}
|
||||||
|
if (modelSex.equals(Sex.FEMALE.getValue())) {
|
||||||
|
sketchBoardPins = sketchBoardPins.stream().filter(o -> FEMALE_CATEGORY.contains(o.getLevel2Type())).collect(Collectors.toList());
|
||||||
|
}
|
||||||
|
if (CollectionUtils.isEmpty(sketchBoardPins)) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
return sketchBoardPins;
|
||||||
|
}
|
||||||
|
|
||||||
|
public final static List<String> FEMALE_CATEGORY = Arrays.asList("Dress","Blouse","Skirt","Trousers","Outwear");
|
||||||
|
public final static List<String> MALE_CATEGORY = Arrays.asList("Tops","Bottoms","Outwear");
|
||||||
|
|
||||||
|
private List<CollectionElement> getPinData(List<CollectionElement> sketchBoardElements, List<String> hasUseMd5List, String modelSex) {
|
||||||
if (CollectionUtils.isEmpty(sketchBoardElements)) {
|
if (CollectionUtils.isEmpty(sketchBoardElements)) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
List<CollectionElement> sketchBoardPins = sketchBoardElements
|
List<CollectionElement> sketchBoardPins = sketchBoardElements
|
||||||
.stream().filter(v -> v.getHasPin() == 1 && (!hasUseMd5List.contains(v.getMd5()))).collect(Collectors.toList());
|
.stream().filter(v -> v.getHasPin() == 1 && (!hasUseMd5List.contains(v.getMd5()))).collect(Collectors.toList());
|
||||||
|
if (modelSex.equals(Sex.MALE.getValue())) {
|
||||||
|
sketchBoardPins = sketchBoardPins.stream().filter(o -> MALE_CATEGORY.contains(o.getLevel2Type())).collect(Collectors.toList());
|
||||||
|
}
|
||||||
|
if (modelSex.equals(Sex.FEMALE.getValue())) {
|
||||||
|
sketchBoardPins = sketchBoardPins.stream().filter(o -> FEMALE_CATEGORY.contains(o.getLevel2Type())).collect(Collectors.toList());
|
||||||
|
}
|
||||||
if (CollectionUtils.isEmpty(sketchBoardPins)) {
|
if (CollectionUtils.isEmpty(sketchBoardPins)) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
@@ -2030,22 +2081,28 @@ public class PythonService {
|
|||||||
|
|
||||||
private List<CollectionElement> getNoPinData(ValidateElementVO elementVO) {
|
private List<CollectionElement> getNoPinData(ValidateElementVO elementVO) {
|
||||||
if (elementVO.getSingleOverall().equals(SingleOverallEnum.SINGLE.getRealName())) {
|
if (elementVO.getSingleOverall().equals(SingleOverallEnum.SINGLE.getRealName())) {
|
||||||
List<CollectionElement> noPinData = getNoPinData(elementVO.getSketchBoardElements());
|
List<CollectionElement> noPinData = getNoPinData(elementVO.getSketchBoardElements(), elementVO.getModelSex());
|
||||||
if (CollectionUtils.isEmpty(noPinData)) {
|
if (CollectionUtils.isEmpty(noPinData)) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
return noPinData.stream().filter(o -> o.getLevel2Type().equals(elementVO.getSwitchCategory())).collect(Collectors.toList());
|
return noPinData.stream().filter(o -> o.getLevel2Type().equals(elementVO.getSwitchCategory())).collect(Collectors.toList());
|
||||||
}else {
|
}else {
|
||||||
return getNoPinData(elementVO.getSketchBoardElements());
|
return getNoPinData(elementVO.getSketchBoardElements(), elementVO.getModelSex());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private List<CollectionElement> getNoPinData(List<CollectionElement> sketchBoardElements) {
|
private List<CollectionElement> getNoPinData(List<CollectionElement> sketchBoardElements, String modelSex) {
|
||||||
if (CollectionUtils.isEmpty(sketchBoardElements)) {
|
if (CollectionUtils.isEmpty(sketchBoardElements)) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
List<CollectionElement> sketchBoardPins = sketchBoardElements
|
List<CollectionElement> sketchBoardPins = sketchBoardElements
|
||||||
.stream().filter(v -> v.getHasPin() == 0).collect(Collectors.toList());
|
.stream().filter(v -> v.getHasPin() == 0).collect(Collectors.toList());
|
||||||
|
if (modelSex.equals(Sex.MALE.getValue())) {
|
||||||
|
sketchBoardPins = sketchBoardPins.stream().filter(o -> MALE_CATEGORY.contains(o.getLevel2Type())).collect(Collectors.toList());
|
||||||
|
}
|
||||||
|
if (modelSex.equals(Sex.FEMALE.getValue())) {
|
||||||
|
sketchBoardPins = sketchBoardPins.stream().filter(o -> FEMALE_CATEGORY.contains(o.getLevel2Type())).collect(Collectors.toList());
|
||||||
|
}
|
||||||
if (CollectionUtils.isEmpty(sketchBoardPins)) {
|
if (CollectionUtils.isEmpty(sketchBoardPins)) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -304,7 +304,7 @@ public class DesignServiceImpl extends ServiceImpl<DesignMapper, Design> impleme
|
|||||||
//保存design
|
//保存design
|
||||||
Long designId = saveOne(designDTO, collectionId, userInfo.getId());
|
Long designId = saveOne(designDTO, collectionId, userInfo.getId());
|
||||||
//计算library
|
//计算library
|
||||||
calculateLibraryAndSysFile(designDTO, elementVO, userInfo);
|
// calculateLibraryAndSysFile(designDTO, elementVO, userInfo);
|
||||||
//组装design入参
|
//组装design入参
|
||||||
DesignPythonObjects pythonObjects = pythonService.covertDesignParam(designDTO.getSystemScale(),
|
DesignPythonObjects pythonObjects = pythonService.covertDesignParam(designDTO.getSystemScale(),
|
||||||
designDTO.getSingleOverall(), designDTO.getSwitchCategory(), elementVO, designDTO.getProcessId());
|
designDTO.getSingleOverall(), designDTO.getSwitchCategory(), elementVO, designDTO.getProcessId());
|
||||||
@@ -702,10 +702,10 @@ public class DesignServiceImpl extends ServiceImpl<DesignMapper, Design> impleme
|
|||||||
throw new BusinessException("collection.not.found");
|
throw new BusinessException("collection.not.found");
|
||||||
}
|
}
|
||||||
AuthPrincipalVo userInfo = UserContext.getUserHolder();
|
AuthPrincipalVo userInfo = UserContext.getUserHolder();
|
||||||
//查询用户 sketch library
|
// //查询用户 sketch library
|
||||||
List<LibraryVo> libraryVos = libraryService.selectByAccountIdAnd1TypeList(userInfo.getId(),
|
// List<LibraryVo> libraryVos = libraryService.selectByAccountIdAnd1TypeList(userInfo.getId(),
|
||||||
Arrays.asList(CollectionLevel1TypeEnum.PRINT_BOARD.getRealName(),
|
// Arrays.asList(CollectionLevel1TypeEnum.PRINT_BOARD.getRealName(),
|
||||||
CollectionLevel1TypeEnum.SKETCH_BOARD.getRealName()));
|
// CollectionLevel1TypeEnum.SKETCH_BOARD.getRealName()));
|
||||||
//校验collection element
|
//校验collection element
|
||||||
DesignCollectionDTO designCollectionDTO = CopyUtil.copyObject(reDesignDTO, DesignCollectionDTO.class);
|
DesignCollectionDTO designCollectionDTO = CopyUtil.copyObject(reDesignDTO, DesignCollectionDTO.class);
|
||||||
ValidateElementVO elementVO = collectionElementService.validateElement(designCollectionDTO);
|
ValidateElementVO elementVO = collectionElementService.validateElement(designCollectionDTO);
|
||||||
|
|||||||
Reference in New Issue
Block a user