guoyuji
2024-12-10 7b0d59dbd16a0f90eec1ad35eff64cf40d3b97e7
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");