|
@@ -3,6 +3,7 @@ package com.fuint.common.service.impl;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
+import com.fuint.common.dto.GoodsSpecValueDto;
|
|
|
import com.fuint.common.dto.OrderGoodsDto;
|
|
|
import com.fuint.common.dto.UserOrderDto;
|
|
|
import com.fuint.common.enums.*;
|
|
@@ -204,7 +205,20 @@ public class PrinterServiceImpl extends ServiceImpl<MtPrinterMapper, MtPrinter>
|
|
|
// 商品列表
|
|
|
if (orderInfo.getGoods() != null && orderInfo.getGoods().size() > 0) {
|
|
|
for (OrderGoodsDto goodsDto : orderInfo.getGoods()) {
|
|
|
- printContent.append(NoteFormatter.formatPrintOrderItemForNewLine80(goodsDto.getName(), goodsDto.getNum(), Double.parseDouble(goodsDto.getPrice())));
|
|
|
+ List<GoodsSpecValueDto> specList = goodsDto.getSpecList();
|
|
|
+ String name = goodsDto.getName();
|
|
|
+ List<String> specValue = new ArrayList<>();
|
|
|
+ if (specList != null && specList.size() > 0) {
|
|
|
+ for (GoodsSpecValueDto spec : specList) {
|
|
|
+ if (StringUtil.isNotEmpty(spec.getSpecValue())) {
|
|
|
+ specValue.add(spec.getSpecValue());
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (specValue.size() > 0) {
|
|
|
+ name = name + "(" + String.join(",", specValue) + ")";
|
|
|
+ }
|
|
|
+ }
|
|
|
+ printContent.append(NoteFormatter.formatPrintOrderItemForNewLine80(name, goodsDto.getNum(), Double.parseDouble(goodsDto.getPrice())));
|
|
|
}
|
|
|
}
|
|
|
|