class DepartmentUtil {

  public static void disableTargetDeptCode(List<SysDeptSelect> sysDeptSelects,
                                          String deptCode) {
    if (sysDeptSelects == null) {
      return;
    }

    for (SysDeptSelect deptSelect : sysDeptSelects) {
      if (deptSelect.getKey().equalsIgnoreCase(deptCode)) {
        deptSelect.setDisabled(true);
      }
      disableTargetDeptCode(deptSelect.getChildren(), deptCode);
    }
  }

}