| | |
| | | page.newLine("目标站:"+command.getStaNo()); |
| | | if (!command.isEmptyMk()) { |
| | | for (MatDto matDto : command.getMatDtos()) { |
| | | page.newLine(matDto.getMaknx() + "【数量" + matDto.getCount() +"】"); |
| | | //去掉小数点 |
| | | String strQty = matDto.getCount().toString(); |
| | | int idx = strQty.lastIndexOf("."); |
| | | if(idx >= 0){ |
| | | strQty.substring(0,idx); |
| | | } |
| | | page.newLine(matDto.getMaknx() + "[数量" + strQty +"]"); |
| | | // page.newLine(matDto.getMaknx() + "【数量" + matDto.getCount() +"】"); |
| | | } |
| | | } |
| | | page.newLine("\n"); |
| | | } |
| | | |
| | | // 设置字体 |
| | | page.setFont(new Font("宋体",Font.PLAIN,12)); |
| | | page.setFont(new Font("宋体",Font.PLAIN,10)); |
| | | // 设置文本颜色 |
| | | page.setForeground(Color.red); |
| | | // 设置显示特技为快速打出 |
| | |
| | | } |
| | | } else { |
| | | page.newLine("自动化立体仓库"); |
| | | page.newLine("西格邁股份有限公司"); |
| | | page.newLine("西格迈股份有限公司"); |
| | | } |
| | | |
| | | // 设置字体 |
| | |
| | | |
| | | |
| | | public static void main(String[] args) throws Exception { |
| | | String strQty = "1234"; |
| | | int index = strQty.lastIndexOf("."); |
| | | if(index>=0) { |
| | | strQty=strQty.substring(0, index); |
| | | } |
| | | System.out.println("2==>>"+strQty); |
| | | |
| | | Bx5GEnv.initial(3000); |
| | | Bx5GScreenClient screen = new Bx5GScreenClient("my"); |
| | | DisplayStyleFactory.DisplayStyle[] styles = DisplayStyleFactory.getStyles().toArray(new DisplayStyleFactory.DisplayStyle[0]); |