| | |
| | | //备注 |
| | | private String meno; |
| | | |
| | | public void updateLocNo(){ |
| | | startPoint = getPut(startPoint); |
| | | targetPoint = getPut(targetPoint); |
| | | } |
| | | public void updateIoTyoe(Integer ioTypeOld){ |
| | | switch (ioTypeOld){ |
| | | case 1: |
| | |
| | | } |
| | | } |
| | | |
| | | public String getPut(String point){ |
| | | String[] split = point.split("-"); |
| | | if (split.length == 5){ |
| | | // String locNo = String.format("%02d", ) + |
| | | // String.format("%03d", split[3]) + |
| | | // String.format("%02d", split[4]); |
| | | |
| | | return split[2]+"0"+split[3]+split[4]; |
| | | } else { |
| | | return point; |
| | | } |
| | | } |
| | | |
| | | public static String zerofill(String msg, Integer count){ |
| | | if (msg.length() == count){ |
| | | return msg; |
| | | } else if (msg.length() > count){ |
| | | return msg.substring(0, 16); |
| | | } else { |
| | | StringBuilder msgBuilder = new StringBuilder(msg); |
| | | for (int i = 0; i<count-msg.length(); i++){ |
| | | msgBuilder.insert(0,"0"); |
| | | } |
| | | return msgBuilder.toString(); |
| | | } |
| | | } |
| | | |
| | | } |