public MessageObject<MeetOrTrainVO> syncMeet(IoSession session, Object msg) throws Exception {
    MessageObject<MeetOrTrainVO> me = (MessageObject<MeetOrTrainVO>) msg;
    long meId = 0;
    int status = 1;
    List<MeetOrTrainVO> list = me.getList();
    for (MeetOrTrainVO meVo : list) {
      MeetOrTrain meet = new MeetOrTrain();
      meet.setName(meVo.getName());
      meet.setAddress(meVo.getAddress());
      meet.setStartDate(meVo.getStartDate());
      meet.setOrgName(meVo.getOrgName());
      meet.setEndDate(meVo.getEndDate());
      meet.setOrganizationCode(meVo.getOrganizationCode());
      if (meVo.getOrganizationCode() != "HR") {
        Organization organization = null;
        if (meVo.getOrganizationCode().equals("null") || meVo.getOrganizationCode().equals("")) {
          organization = organizationService.getOrganizationByName(meVo.getOrgName());
        } else {
          organization = organizationService.getOrganizationByCode(meVo.getOrganizationCode());
        }
        Employee depEmp = organization.getBranchLeader();
        Employee perEmp = organizationService.getOrganizationByCode("HR").getBranchLeader();
        if (depEmp == null && perEmp == null) {
          status = 0; // 如果是0则是没有任何一个部门负责人
          break;
        }
        if (depEmp == perEmp || depEmp == null) {
          meet.setPersonnelVerify(perEmp);
          meet.setCurrentVerify(perEmp);
        } else {
          meet.setDepartmentVerify(depEmp);
          meet.setPersonnelVerify(perEmp);
          meet.setCurrentVerify(depEmp);
        }

      } else {
        Organization organization =
            organizationService.getOrganizationByCode(meVo.getOrganizationCode());
        meet.setPersonnelVerify(organizationService.getOrganizationByCode("HR").getBranchLeader());
        meet.setCurrentVerify(organization.getBranchLeader());
      }
      meet.setTheme(meVo.getTheme());
      meId = meetOrTrainService.AddMeetOrTrain(meet);
    }
    List<MeetOrTrainVO> as = new ArrayList<MeetOrTrainVO>();
    MeetOrTrainVO meOV = new MeetOrTrainVO();
    meOV.setId(meId);
    meOV.setTheme(status + "");
    as.add(meOV);
    System.out.println("返回的Id是:" + meId);
    MessageObject<MeetOrTrainVO> list1 = new MessageObject<MeetOrTrainVO>("1000", as);
    return list1;
  }
 public MessageObject<OrganizationVO> syncOrganization(IoSession session, Object msg) {
   List<Organization> orgs = organizationService.getAll();
   MessageObject<OrganizationVO> list = new MessageObject<OrganizationVO>("1000", toOrgVO(orgs));
   return list;
 }