/**
* 获取值的区间
*
* @param num 值
*/
public static Map<String, Integer> getNumSection(Integer num) {
Map<String, Integer> map = new HashMap();
int length = num.toString().length();
if (length == 1) { //判断是否为个数 1234567890
map.put("maxNum", 0);
map.put("minNum", 10);
return map;
}
String count = "";
for (int i = 1; i < length; i++) {
count += "0";
}
String shou = num.toString().substring(0, 1); //获取首位
int maxNum = Integer.parseInt(shou + count);//最小
int minNum = Integer.parseInt(String.valueOf(Integer.parseInt(shou) + 1) + count);//最大
map.put("maxNum", maxNum);
map.put("minNum", minNum);
return map;
}