智慧保安后台管理-外网项目备份
guoshilong
2023-11-30 711c855e134edc75faf03d96ec8b3dd0e269fb0a
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
package org.springblade.modules.exam.util;
 
import java.util.Calendar;
import java.util.Date;
 
/**
 * 保安证编号生成
 * @author zhongrj
 * @since 2021-08-11
 */
public class SecurityPaperUtil {
 
    private final static String pre = "晋05";
 
    public static String getSecurityPaper(){
        //获取当前时间
        Date date = new Date();
        Calendar instance = Calendar.getInstance();
        instance.setTime(date);
        //获取年份
        int year = instance.get(Calendar.YEAR);
        return pre+year;
    }
}