导入测试

This commit is contained in:
wkc
2026-02-09 00:13:32 +08:00
parent cf5e435992
commit 26a225298a
18 changed files with 2512 additions and 20 deletions

View File

@@ -47,7 +47,15 @@ def generate_wechat():
def generate_person_id(id_type):
if id_type == '身份证':
return f"{random.randint(110000, 659999)}{random.randint(1970, 2000):02d}{random.randint(1, 12):02d}{random.randint(1, 28):02d}{random.randint(1000, 9999)}"
# 18位身份证号6位地区码 + 4位年份 + 2位月份 + 2位日期 + 3位顺序码 + 1位校验码
area_code = f"{random.randint(110000, 659999)}"
birth_year = random.randint(1960, 2000)
birth_month = f"{random.randint(1, 12):02d}"
birth_day = f"{random.randint(1, 28):02d}"
sequence_code = f"{random.randint(0, 999):03d}"
# 简单校验码随机0-9或X
check_code = random.choice(['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'X'])
return f"{area_code}{birth_year}{birth_month}{birth_day}{sequence_code}{check_code}"
else:
return str(random.randint(10000000, 99999999))