|  |  | 
 |  |  | package com.matrix.system.hive.action; | 
 |  |  |  | 
 |  |  | import com.matrix.core.exception.GlobleException; | 
 |  |  | import com.matrix.core.pojo.AjaxResult; | 
 |  |  | import com.matrix.core.pojo.PaginationVO; | 
 |  |  | import com.matrix.core.tools.WebUtil; | 
 |  |  | 
 |  |  |    public @ResponseBody AjaxResult addOrModify(SysDepartInfo departInfo) { | 
 |  |  |  | 
 |  |  |       if (departInfo.getId() != null) { | 
 |  |  |  | 
 |  |  |          if (departInfo.getParentId() != null && departInfo.getParentId().equals(departInfo.getId())) { | 
 |  |  |             throw new GlobleException("父级不能是自己"); | 
 |  |  |          } | 
 |  |  |          return modify(currentService, departInfo, "部门"); | 
 |  |  |       } else { | 
 |  |  |          QueryUtil.setQueryLimit(departInfo); |