diff --git a/src/main/java/com/gaotao/modules/label/service/impl/LabelFormatUserDefaultServiceImpl.java b/src/main/java/com/gaotao/modules/label/service/impl/LabelFormatUserDefaultServiceImpl.java index fcedc7b..3b38441 100644 --- a/src/main/java/com/gaotao/modules/label/service/impl/LabelFormatUserDefaultServiceImpl.java +++ b/src/main/java/com/gaotao/modules/label/service/impl/LabelFormatUserDefaultServiceImpl.java @@ -15,6 +15,7 @@ import org.springframework.transaction.annotation.Transactional; import java.util.ArrayList; import java.util.List; +import java.util.Map; import java.util.stream.Collectors; @Service @@ -41,6 +42,7 @@ public class LabelFormatUserDefaultServiceImpl extends ServiceImpl defaultPrinterName = list.stream().map(l->l.getDefaultPrinterName()+("(type)")+l.getPrintType()).collect(Collectors.toList()); + Map> collect = list.stream().collect(Collectors.groupingBy(LabelFormatUserDefault::getLabelType)); + List list1 = collect.get(Constant.EXTERNAL_LABEL_TYPE); + if (list1.isEmpty()){ + throw new RuntimeException(customer.getBoxNo()+" "+ sysMsgService.getLanguageMsg(SysMsgConstant.THE_PRINTER_IS_NOT_MAINTAINED)); + } + List defaultPrinterName = list1.stream().map(l->l.getDefaultPrinterName()+("(type)")+l.getPrintType()).collect(Collectors.toList()); printerNameList.add(defaultPrinterName); } return printerNameList; diff --git a/src/main/java/com/gaotao/modules/part/entity/Category.java b/src/main/java/com/gaotao/modules/part/entity/Category.java index 9b5a014..fd0b62b 100644 --- a/src/main/java/com/gaotao/modules/part/entity/Category.java +++ b/src/main/java/com/gaotao/modules/part/entity/Category.java @@ -40,5 +40,7 @@ public class Category { private String editQtyPerCarton; + private String qtyPerRollPart; + private String active; }