CreditCodeUtil
Introduction
The unified social credit code system for legal persons and other organizations is equivalent to giving legal persons and other organizations a nationally unified “identity card number”.
The rules are as follows:
- Part 1: Registration Authority Code (1 digit - numeric or uppercase letter)
- Part 2: Organization Category Code (1 digit - numeric or uppercase letter)
- Part 3: Registration Authority’s Administrative Division Code (6 digits - numeric)
- Part 4: Main Body Identification Code (Organization Code) (9 digits - numeric or uppercase letter)
- Part 5: Check Code (1 digit - numeric or uppercase letter)
This tool mainly provides verification and random generation.
Usage
Verification
String testCreditCode = "91310110666007217T";
// true
CreditCodeUtil.isCreditCode(testCreditCode);
Random Generation of Social Credit Code
final String s = CreditCodeUtil.randomCreditCode();