| | |
| | | String district8 = String.format("%02d", Integer.parseInt(countyNum)) + String.format("%03d", Integer.parseInt(townNum)) + String.format("%03d", Integer.parseInt(villageNum)); |
| | | // 生成农户编号 |
| | | String clientNum = generateClientNum(district8); |
| | | if(clientNum == null) { |
| | | return BaseResponseUtils.buildErrorMsg("农户编号超限"); |
| | | } |
| | | // 生成12位5级行政区划编码串及名称串 |
| | | Long districtNum = Long.parseLong(provinceNum + cityNum + district8); |
| | | String districtTitle = countryName + townName + villageName; |
| | |
| | | Integer number = Integer.parseInt(clientNum.substring(8)); |
| | | number = number + 1; |
| | | if(number > 9999) { |
| | | return "农户编号超限"; |
| | | return null; |
| | | } |
| | | clientNum = clientNum.substring(0, 8) + String.format("%04d", number); |
| | | } else { |