智慧保安后台管理-外网
Administrator
2021-10-08 9a4a283a1413188ff5763b5e2e72c26bc2f5db3d
src/main/java/org/springblade/modules/training/service/impl/TrainingRegistrationServiceImpl.java
@@ -190,6 +190,8 @@
         }
         if (month<=9){
            months = "0" + month;
         }else {
            months = String.valueOf(month);
         }
         if (day<=9){
            days = "0" + day;
@@ -215,19 +217,19 @@
//                     + quarter;
         //前缀 = 年的最后两位  + 月份(两位) + 日 (两位) + 考试类型 正式考试  z   模拟考试   m
         String result = year
         String pre = year
            + months
            + days
            + type;
         //查询是当前前缀已生成的数量
         int count = this.getCandidateNoCount(result);
         if (count==0){
            return result + "0000";
         }
         //查询是当前前缀已生成准考证号码最大的一位
         int count = examPaperService.getCandidateNoCount(pre);
         String result = null;
         //格式化
         DecimalFormat decimalFormat = new DecimalFormat("0000");
         count++;
         result = pre + (decimalFormat.format(count));
         //返回
         return result + (decimalFormat.format(count++));
         return result;
      }
      return null;
   }