| | |
| | | String batteryTypeCode = list.get(0).getBatteryTypeCode();//电池类型代码 |
| | | String specificationsCode = list.get(0).getSpecificationsCode();//规格代码 |
| | | String traceInfoCode = list.get(0).getTraceInfoCode();//追溯信息代码 |
| | | |
| | | String oldDateCode = list.get(0).getProDateCode(); |
| | | String proDateCode = Constants.YEARSMAP.get(now.getYear()) |
| | | + Constants.MONTHSMAP.get(now.getMonthValue()) |
| | | + Constants.DAYMAP.get(now.getDayOfMonth());//生产日期 |
| | | |
| | | String code = list.get(0).getSfcCode();//序列号 |
| | | String code = ""; |
| | | if(oldDateCode.equals(proDateCode)){ |
| | | code = list.get(0).getSfcCode();//序列号 |
| | | }else { |
| | | code = "0"; |
| | | } |
| | | code = StringUtils.leftPad(String.valueOf(Integer.valueOf(code)+1),7, "0");;//序列号 |
| | | result = mfCode+proTypeCode+batteryTypeCode+specificationsCode+traceInfoCode+proDateCode+code; |
| | | |