智慧保安后台管理-外网-验收版本
tangzy
2021-12-06 cc057177b2fb17aee9a173a6adbabdc578fd74c7
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 = "赣洪";
 
    public static String getSecurityPaper(){
        //获取当前时间
        Date date = new Date();
        Calendar instance = Calendar.getInstance();
        instance.setTime(date);
        //获取年份
        int year = instance.get(Calendar.YEAR);
        return pre+year;
    }
}