package cn.com.goldenwater.dcproj.util; public class PtypeConversionUtil { //补全pType public static String completion(String pType){ if (pType == null){ return pType; } if(pType.length()==1){ return "00"+pType; } if (pType.length()==2){ return "0"+pType; } return pType; } //保留pType数值部分 ,删减首部多余0 public static String deletion(String pType){ if (pType == null || pType == ""){ return pType; } int pTypeNum = Integer.parseInt(pType); pType = String.valueOf(pTypeNum); return pType; } }