| | |
| | | if(Objects.equals(type, "补片")){ |
| | | alias="BP"; |
| | | } |
| | | //查询当天的最大数量 |
| | | Integer maximum=patchMapper.getMaximum(); |
| | | //查询当天最新的编号 |
| | | String str=patchMapper.getMaximum(); |
| | | if (str == null){ |
| | | str="00"; |
| | | } |
| | | String maximum = str.substring(str.length() - 2); |
| | | int lastTwoInteger = Integer.parseInt(maximum); |
| | | //设置两位不够补0 |
| | | String formattedNumber = String.format("%02d", maximum+1); |
| | | String formattedNumber = String.format("%02d", lastTwoInteger+1); |
| | | //格式化当前日期 |
| | | Date currentDate = new Date(); |
| | | SimpleDateFormat dateFormat = new SimpleDateFormat("yyMMdd"); |