String result= "";
result = year. Substring (2,2) + SLDW + bhzt. Substring (0,1) +seq. PadLeft (6, ' 0 '). Substring (1,5);
Should the user's needs of a province be changed
result = year. Substring (2, 2) + SLDW + "00" + This administrative division is a single seq. PadLeft (6, ' 0 '). Substring (1, 5); (The difficulty is that each administrative division has a separate sequential ID number)
String. Substring (N,m) is a string that takes the M-bit character starting at the nth bit
String. PadLeft (i, ' 0 ') is the I bit to the right of the string, not enough to fill the character ' 0 '
The previous processing method is to use the sequence ID of the Oracle database, now need to give each different administrative division a separate sequence of IDs starting from 1
That is, all the administrative divisions together row 1234567, now to different administrative divisions of a separate set of 123457.
The best way is to build a table, each administrative division behind an int used to save the current ID number ...
The next time to explore a good way and write a set of methods that can be used elsewhere!
Must be completed, and only three business days in time ... Sad t.t
Use a link to Baidu encyclopedia mark the sequence object in the Oracle database that you know today:
Http://baike.baidu.com/link?url=xHGaRHbXTiy7FUQTYJGoCLF7nFpzDp2udeqRmbecbzZLxhqJmluYxP9RR3nzy7vR1BZEOucPyPFN_GhSiGHXXa
Q_Q work item tight, Android learning pause for at least a week