Browse Source

roll label

print/logistic/save
qiezi 1 year ago
parent
commit
168378073b
  1. 9
      src/main/java/com/gaotao/modules/label/service/impl/LabelFormatUserDefaultServiceImpl.java
  2. 2
      src/main/java/com/gaotao/modules/part/entity/Category.java

9
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<LabelFormatUs
lambdaUpdate()
.eq(LabelFormatUserDefault::getSite,labelFormatUserDefault.getSite())
.eq(LabelFormatUserDefault::getFormatId,labelFormatUserDefault.getFormatId())
.eq(LabelFormatUserDefault::getUsername,labelFormatUserDefault.getUsername())
.update(labelFormatUserDefault);
}
@ -66,7 +68,12 @@ public class LabelFormatUserDefaultServiceImpl extends ServiceImpl<LabelFormatUs
if (list.isEmpty()){
throw new RuntimeException(customer.getBoxNo()+" "+ sysMsgService.getLanguageMsg(SysMsgConstant.THE_PRINTER_IS_NOT_MAINTAINED));
}
List<String> defaultPrinterName = list.stream().map(l->l.getDefaultPrinterName()+("(type)")+l.getPrintType()).collect(Collectors.toList());
Map<String, List<LabelFormatUserDefault>> collect = list.stream().collect(Collectors.groupingBy(LabelFormatUserDefault::getLabelType));
List<LabelFormatUserDefault> list1 = collect.get(Constant.EXTERNAL_LABEL_TYPE);
if (list1.isEmpty()){
throw new RuntimeException(customer.getBoxNo()+" "+ sysMsgService.getLanguageMsg(SysMsgConstant.THE_PRINTER_IS_NOT_MAINTAINED));
}
List<String> defaultPrinterName = list1.stream().map(l->l.getDefaultPrinterName()+("(type)")+l.getPrintType()).collect(Collectors.toList());
printerNameList.add(defaultPrinterName);
}
return printerNameList;

2
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;
}
Loading…
Cancel
Save