添加打印日志
This commit is contained in:
parent
1bf12d880c
commit
9101c788c2
|
|
@ -201,14 +201,19 @@ public class PrinterUtils {
|
|||
|
||||
for (ProductInfo productInfo : handoverInfo.getProductInfos()) {
|
||||
|
||||
|
||||
if(productInfo.getProductName().length()>=14){
|
||||
|
||||
sb.append("<S> "+productInfo.getProductName()+"</S><BR>");
|
||||
sb.append("<S> "+String.format("%27s",productInfo.getNum()).replace(' ', paddingCharacter)+"</S><BR>");
|
||||
sb.append("<S> "+String.format("%27s","*"+productInfo.getNum()).replace(' ', paddingCharacter)+"</S><BR>");
|
||||
|
||||
}else {
|
||||
int tt=22-productInfo.getProductName().length();
|
||||
sb.append("<S> "+productInfo.getProductName()+String.format("%"+tt+"s",productInfo.getNum()).replace(' ', paddingCharacter)+"</S><BR>");
|
||||
//计算英文和数字数量
|
||||
//计算中文数量
|
||||
int m= getProducrName(productInfo.getProductName());
|
||||
int tt=23-productInfo.getProductName().length();
|
||||
|
||||
sb.append("<S> "+productInfo.getProductName()+String.format("%"+6+"s","*"+productInfo.getNum()).replace(' ', paddingCharacter)+"</S><BR>");
|
||||
}
|
||||
sb.append("<BR>");
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue