territory.setTerritorySort("0");
}
if (territory.getTSTerritory().getId().equals("")) {
territory.setTSTerritory(null);
}else{
TSTerritory parent = systemService.getEntity(TSTerritory.class, territory.getTSTerritory().getId());
territory.setTerritoryLevel(Short.valueOf(parent.getTerritoryLevel()+1+""));
}
if (StringUtil.isNotEmpty(territory.getId())) {
message = "地域: " + territory.getTerritoryName() + "被更新成功";
systemService.saveOrUpdate(territory);
systemService.addLog(message, Globals.Log_Type_UPDATE, Globals.Log_Leavel_INFO);