Precise and accurate unified social credit code is regular (js)

Reference standard:

"Unified Social Credit Code encoding rules GB_32100-2015_ legal persons and other organizations."
According to encoding rules:
a unified code 18, the Uniform Code from 18 digits or uppercase letters (NA I、O、Z、S、V) composed of five parts :
the first part (1 bit) as registration management department codes, 9 represents the business sector; ( number or capital letters )
a second portion (bit 2) of the class code mechanism; ( number or capital letters )
a third portion ( bit 3-8) registration authority for the administrative divisions code; ( 数字)
part IV (9-17 bits) for the national organization code; ( digital or capital letters )
part V (No. 18) to check code ( numbers or capital letters )

 

Regular written:

Uniform Social Credit Code: / ^ [^ _ IOZSVa-z \ W] {2} \ d {6} [^ _ IOZSVa-z \ W] {10} $ / g

     Began to write the beginning of the end is not written, ... ^ start, $ end to make up

When using a single calibration: test method; match method to use an array.

 

There is also a business registration number is positive, it is the rule numbers 15 letters: / ^ [A-Za-z0-9] \ w {14} $ / g

 

 

Uniform code 18, the uniform code to an 18-bit number or capital letters (NA I、O、Z、S、V), with five parts:

the first part (1 bit) for the registration and management department codes, 9 represents the business sector; (Digital or capital letters)

a second portion (bit 2) of the class code mechanism; (capital letters or numbers)

of the third section (3-8) of the registration authority administrative code; ( 数字)

part IV (p bits 9-17) for the national organization code; (capital letters or numbers)

part V (position 18) is a check code (numeric or capital letters)

Regular written:

Uniform Social Credit Code: / [^ _ IOZSVa-z \ W] {2} \ d {6} [^ _ IOZSVa-z \ W] {10} $ / g

Some online do not have that $ number, my test is to check out after a proper, plus write things will continue to return true ,, and 91420000737944946L is true, after 91420000737944946Ltest still really ... no length ending

When using a single calibration: test method; match method to use an array.

There is also a business registration number is positive, it is the rule numbers 15 letters: / ^ [A-Za-z0-9] \ w {14} $ / g

Annex unified social credit code constitutes:

Form a unified code

1 Structure

From 18-bit uniform code digits or capital letters (without I, O, Z, S, V) components.

1st: registration and management department code (a total of one character)

No. 2: Organization category code (a total of one character)

No. 3 to No. 8: registration authority administrative code (a total of six digits)

9 bit to 17: the main code (organization code) (a total of nine characters)

of 18: checksum (a total character)

2 code and description

Registration Management Code: use Arabic numerals or capital letters.

Institutions to prepare: 1

The Home: 5

Commerce: 9

Other: Y

Institutions category code: using Arabic numerals or capital letters.

The organ mechanism: 11 Heading

12 Heading: institutions to prepare public institutions

and mass organizations institutions to prepare the Central Office of the direct administration of the preparation: 13 Heading

Other agencies prepared: 19 Heading



civil society groups: 51 Heading

civil private non-enterprise units: 52 Heading

civil Foundation: 53 Heading

civil Other: 59 Heading



businesses: 91 Heading

industrial and commercial individual industrial and commercial households: 92 Heading

Industrial and Commercial farmer cooperatives: 93 Heading



other: Y1 starts

Registration authority administrative code: only use Arabic numerals. According to GB / T
coding 2260.

For example: Chengdu, Sichuan Province city level is 510100; Sichuan Zigong City artesian district is 510,302.

Body identification code (organization code): use Arabic numerals or capital letters. According to GB
11714 coding.

Prior to the implementation of the unified social credit code and the organization code on the previous organization code certificate by the nine characters. Format the XXXXXXXX the Y- . Eight front is called "bulk Code"; the last is called "checksum." Checksum code consists of a body and a hyphen - connect (). People to easily see checksum. But after three certificates one, nine characters organizations have all been included in the unified social credit code 9 to No. 17, its hyphen on the original organization code is not brought into the unified social credit code.

Original "checksum" calculation rule on the organization code is:

For example: a company organization code: 59467239-9. That its final organization a code checksum 9 is how to calculate out of it?

Step: Take eight organization code before the code for the base body. 59467239

Tip: If the code contained in the body of capital letters. A is the base 10, the base B is 11, C is the base 12, and so on, until the base 35 Z.

Step two: taking the weighting factor values. Because the body of the code organization code of a total of eight characters. This weighting factor is eight values ​​from left to right are: 3,7,9,10,5,8,4,2.

The third step: a body of code bits corresponding to the base value is multiplied by a factor.

5 × 3 = 15,9 × 7 = 63,4 × 9 = 36,6 × 10 = 60,

7×5=35,2×8=16,3×4=12,9×2=18​​

Step 4: summing the products are added.

15 + 63 + 36 + 60 + 35 + 16 + 12 + 18 = 255

Step 5: sum is divided by 11, the number of remainder.

255 ÷ 11 = 33, the remainder is 2.

Step Six: 11 by subtracting the number of digits I to give find the value of the checksum. When the value of the check code is 10, the check code is represented by X-capital letters; when the value of the check code is 11, the check code is represented by 0; calculated checksum value remaining on their use Arabic numerals to represent itself.

11-2 = 9, therefore the complete organization code for this company is
59467239-9.

Checksum: use Arabic numerals or capital letters to represent. Reference checksum calculated GB / T
17710.

For example: a company's unified social credit code 91512081MA62K0260E, that its final checksum E bit is how to calculate out of it?

The first step: Take a unified social credit code before seventeen as the base. 9,151,208,121,106,219,026
0 Tip: If the first seventeen unified social credit Code contains capital letters (do not use I, O, Z, S, V five letters) . The letters corresponding to the base are: A = 10, B = 11 , C = 12, D = 13, E = 14, F = 15, G = 16, H = 17, J = 18, K = 19, L = 20, M = 21, N

= 22, P = 23, Q = 24, R = 25, T = 26, U = 27, W = 28, X = 29, Y = 30 Step: take weighting factor values. Because the front of the front of the uniform social credit code has seventeen characters. This is the value a weighting factor seventeen left to right are: 1,3,9,27,19,26,16,17,20,29,25,13,8,24,10,30,2 8

The third step: the number of bits corresponding to the base value is multiplied by a factor.

9 × 1 = 9,1 × 3 = 3,5 × 9 = 45,1 × 27 = 27,2 × 19 = 38,0 × 26 = 0,8 × 16 = 128

1×17=17,21×20=420,10×29=290,6×25=150,2×13=26,19×8=152​

0×23=0,2×10=20,6×30=180,0×28=0

Step 4: summing the products are added. 3 + 9 + 45 + 27 + 38 + 17 + 0 + 128 + 420 + 290 + 150 + 26 + 152 + 20 + 0 + 0 + 180 = 1495

Step Five: The sum is divided by 31, find the remainder.

1495 ÷ 31 = 48, the remainder is 17.

Step Six: 31 by subtracting the number in Arabic numerals I to give find the value of the checksum. When the value of the check codes from 0 to 9, to use the value of the check code as a direct final unified social credit code check code; If the checksum value is 10 to 30, the check code is converted to corresponding capital letters. Correspondence relationship: A = 10, B = 11, C = 12, D = 13, E = 14, F = 15, G = 16, H = 17, J = 18, K = 19, L = 20, M = 21, N = 22, P = 23, Q = 24, R = 25, T = 26, U = 27, W = 28, X = 29, Y = 30

Because, 31-17 = 14, so the company complete unified social credit code
91512081MA62K0260E.

————————————————

Unified Social Credit transcoding relationship with the original business license registration number, tax registration number, organization code

As the 18 unified social credit Code from October 1, 2015 formally implemented. There are many current systems do not fully converted to the unified social credit code. When you need to make your experience complete the organization code or tax registration number when you should how to obtain information from the unified social credit code?

Essentially:

the ninth to the seventeenth unified social credit code is the original organization code.

Uniform Code of Social Credit third to seventeenth vast majority of cases are the original tax registration number. (However, because a small number of institutions issuing local administrative divisions code to do the norm. So, there is a new unified social enterprise credit small part of the code is not necessarily the No. 3 to No. 8 Arabic numerals and will be able to complete the corresponding previous tax registration number of the top six.)

Unified social credit code does not correspond to the original business license registration number. You have to fill out when faced with business license registration number, and does not recognize the Uniform Code of Social Credit occasion. You only come up before the old business license registration number to view above.

For example: 91370200163562681G the unified social credit code.

Which is organization code: 16356268-1

their tax registration number is: 370200163562681
If the previous tax registration number out slightly, it is generally 370,200 inconsistent. Especially the two 00

Guess you like

Origin www.cnblogs.com/Alex80/p/11580880.html