/**
* 地域级别验证
* @author lmc
* @time 2014-6-20 13:17:04
*/
public void levelCheck(int id){
String areaHql="from Area where countryAreaId="+id;
areaPojo=areaService.getArea(areaHql);
if(areaPojo.getParentId() == 0){
//顶级ID
String hql=" select * from area where parent_id=0";
areaList = areaService.getAreaList(hql);
one = areaPojo.getCountryAreaId();
}else{
//判断是三级或是二级
String hql="from Area where countryAreaId="+areaPojo.getParentId();
areaPojo2 = areaService.getArea(hql);
if(areaPojo2.getParentId() == 0){
//二级ID
//顶级集合
areaList = areaService.getAreaList("select * from area where parent_id=0");
one = areaPojo2.getCountryAreaId();
//二级集合
areaList2 = areaService.getAreaList("select * from area where parent_id="+one);
two = areaPojo.getCountryAreaId();
}else{
//三级ID
//顶级集合
areaList = areaService.getAreaList("select * from area where parent_id=0");
one = areaPojo2.getParentId();
//二级集合
areaList2 = areaService.getAreaList("select * from area where parent_id="+one);
two = areaPojo.getParentId();
//三级集合
areaList3 = areaService.getAreaList("select * from area where parent_id="+two);
three = id;
}
}
}