| | |
| | | public static String productCompanyCode = ""; //产品公司编码 |
| | | public static String RunningWaterNumber = "0000"; //流水号 |
| | | public static String SerialNumbers = "0000"; //序列号 |
| | | public static Calendar calendar = Calendar.getInstance(); |
| | | public static String Years = String.valueOf(calendar.get(Calendar.YEAR)); //年份 |
| | | /* public static String Years = String.valueOf(calendar.get(Calendar.YEAR)); //年份 |
| | | public static String Months = StringUtils.leftPad(String.valueOf(calendar.get(Calendar.MONTH) + 1),2, "0"); //月份 |
| | | public static String Dates = StringUtils.leftPad(String.valueOf(calendar.get(Calendar.DATE)),2, "0"); //日期 |
| | | public static String Dates = StringUtils.leftPad(String.valueOf(calendar.get(Calendar.DATE)),2, "0"); //日期*/ |
| | | |
| | | |
| | | //头部拼接 |
| | |
| | | |
| | | public static String TAIL_STRING = "";//尾部拼接 |
| | | |
| | | |
| | | public static void main(String[] args){ |
| | | createCodingRulesSFC("1","1","1"); |
| | | } |
| | | /** |
| | | * 单体编号追溯 |
| | | * @param softwareVersionCode 软件版本编码(型号+扭矩+差异款+国家地区+软件版本) |
| | |
| | | */ |
| | | |
| | | public static String createCodingRulesSFC(String softwareVersionCode,String productCompanyCode,String serialNumbers){ |
| | | |
| | | Calendar calendar = Calendar.getInstance(); |
| | | String Years = String.valueOf(calendar.get(Calendar.YEAR)); //年份 |
| | | String Months = StringUtils.leftPad(String.valueOf(calendar.get(Calendar.MONTH) + 1),2, "0"); //月份 |
| | | String Dates = StringUtils.leftPad(String.valueOf(calendar.get(Calendar.DATE)),2, "0"); //日期 |
| | | StringBuffer result = new StringBuffer(); |
| | | |
| | | String headString = ""; |