你好啊
2024-12-29 f96e13df01e5a0ea8c78662b66a1ad36e2ba86f4
north-glass-erp/src/main/java/com/example/erp/service/pp/ReplenishService.java
@@ -187,10 +187,15 @@
        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");