⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 agtmngstaffaction.java

📁 培训考试系统代码
💻 JAVA
📖 第 1 页 / 共 5 页
字号:
       req.setAttribute("province",rs.getString(12));
       req.setAttribute("marriage",rs.getString(13));
       req.setAttribute("workphone",rs.getString(14));
       req.setAttribute("homephone",rs.getString(15));
       req.setAttribute("mobilephone",rs.getString(16));
       req.setAttribute("address",rs.getString(17));
       req.setAttribute("postcode",rs.getString(18));
       req.setAttribute("email",rs.getString(19));
       req.setAttribute("rela1",rs.getString(20));
       req.setAttribute("rela2",rs.getString(21));
       req.setAttribute("rela3",rs.getString(22));
       req.setAttribute("rela4",rs.getString(23));
       req.setAttribute("rela1name",rs.getString(24));
       req.setAttribute("rela2name",rs.getString(25));
       req.setAttribute("rela3name",rs.getString(26));
       req.setAttribute("rela4name",rs.getString(27));
       req.setAttribute("rela1co",rs.getString(28));
       req.setAttribute("rela2co",rs.getString(29));
       req.setAttribute("rela3co",rs.getString(30));
       req.setAttribute("rela4co",rs.getString(31));
       req.setAttribute("rela1pos",rs.getString(32));
       req.setAttribute("rela2pos",rs.getString(33));
       req.setAttribute("rela3pos",rs.getString(34));
       req.setAttribute("rela4pos",rs.getString(35));
       req.setAttribute("hobby",rs.getString(36));
       req.setAttribute("specialty",rs.getString(37));
     }

      if (operatorflag.equalsIgnoreCase("AGTMNG_QUERY_BASE_NEXTMOD"))
      //定向到信息修改页面
      {
        return (mapping.findForward("basemodify"));
      }
      else if  (operatorflag.equalsIgnoreCase("AGTMNG_QUERY_BASE_NEXTVIEW"))
      //定向到信息浏览页面
      {
        req.setAttribute("errorId",ErrorCode.UNKNOW_ERROR);
        return (mapping.findForward("BaseView"));
      }
      else
      {
         req.setAttribute("errorId",ErrorCode.UNKNOW_ERROR);
         return(mapping.findForward("error"));
      }
      }
      catch (SysDbException aple)
      {
        //捕获CommonService系统异常,定向到出错页面,错误码为ErrorCode.COMMONSERVICE_ERROR
          aple.printStackTrace();
          req.setAttribute("errorId",ErrorCode.COMMONSERVICE_ERROR);
          return (mapping.findForward("error"));
       }
      catch(java.sql.SQLException sqle)
      {
         sqle.printStackTrace();
        //捕获调用aplcoms异常,定向到出错页面,错误码为ErrorCode.DATABASE_ERROR
          req.setAttribute("errorId",ErrorCode.DATABASE_ERROR);
          return (mapping.findForward("error"));
       }
      catch(Exception e)
      {
          e.printStackTrace();
        //捕获未知异常,定向到出错页面,错误码为ErrorCode.UNKNOW_ERROR
          req.setAttribute("errorId",ErrorCode.UNKNOW_ERROR);
          return (mapping.findForward("error"));
       }
      finally
        //关闭连接实例
        {
          if(aplcoms != null)
          {
             aplcoms.close();
          }
        }
    }

     /*****************************************************
     * 根据教育经历ID查询个人教育经历详细信息
     *****************************************************/
    private ActionForward queryEduArchive (ActionMapping mapping,
        ActionForm form,  HttpServletRequest req,
        HttpServletResponse res)
    {
     //得到eduid、操作标识operatorflag
     String eduid = ((AgtmngStaffForm)form).getEduid();
     String operatorflag = ((AgtmngStaffForm)form).getOperatorflag();
     SysDbConn aplcoms = null ;
     try
    {
     //连接数据源
     aplcoms = SysConnPool.getInstance().getAplComs();
     aplcoms.preparedQuery("");
     //获得输入参数staffno
     aplcoms.setString(1,eduid);
     //调用SQL_AGT_QueryEduArchive查询,得到数据集rs
     SysResultSet rs = new ResUtil(aplcoms.csCommonQuery("SQL_AGT_QueryEduArchive","1","-1").getResultSet());
     //if (rs不为空)
     if( rs != null)
     {
      //定位到第一条记录
       rs.next();
      //将查询结果传递给页面
       req.setAttribute("eduid",rs.getString(0));
       req.setAttribute("staffno",rs.getString(1));
       if (rs.getString(2) != "")
       {
           req.setAttribute("edustartdate",
               rs.getString(2).substring(0,4)+"-"+rs.getString(2).substring(4,6)+"-"+rs.getString(2).substring(6,8));
       }
       else
       {
          req.setAttribute("edustartdate", "");
       }
       if (rs.getString(3) != "")
       {
           req.setAttribute("eduenddate",
               rs.getString(3).substring(0,4)+"-"+rs.getString(3).substring(4,6)+"-"+rs.getString(3).substring(6,8));
       }
       else
       {
          req.setAttribute("eduenddate", "");
       }
       req.setAttribute("eduschool",rs.getString(4));
       req.setAttribute("eduduty",rs.getString(5));
       req.setAttribute("eduhonor",rs.getString(6));
       req.setAttribute("edupunish",rs.getString(7));
       req.setAttribute("edudetail",rs.getString(8));
      }

      if (operatorflag.equalsIgnoreCase("AGTMNG_QUERY_EDU_NEXTMOD"))
      //定向到教育经历修改页面
      {
        return (mapping.findForward("edumodify"));
      }
      else if  (operatorflag.equalsIgnoreCase("AGTMNG_QUERY_EDU_NEXTVIEW"))
      //定向到教育经历浏览页面
      {
        return (mapping.findForward("EduView"));
      }
      else return (mapping.findForward("error"));
      }
      catch (SysDbException aple)
      {
        //捕获CommonService系统异常,定向到出错页面,错误码为ErrorCode.COMMONSERVICE_ERROR
          aple.printStackTrace();
          req.setAttribute("errorId",ErrorCode.COMMONSERVICE_ERROR);
          return (mapping.findForward("error"));
       }
      catch(java.sql.SQLException sqle)
      {
        //捕获调用aplcoms异常,定向到出错页面,错误码为ErrorCode.DATABASE_ERROR
          sqle.printStackTrace();
          req.setAttribute("errorId",ErrorCode.DATABASE_ERROR);
          return (mapping.findForward("error"));
       }
      catch(Exception e)
      {
        //捕获未知异常,定向到出错页面,错误码为ErrorCode.UNKNOW_ERROR
          e.printStackTrace();
          req.setAttribute("errorId",ErrorCode.UNKNOW_ERROR);
          return (mapping.findForward("error"));
       }
      finally
        //关闭连接实例
        {
          if(aplcoms != null)
          {
             aplcoms.close();
          }
        }
      }


     /*****************************************************
     * 根据工作经历ID查询个人工作经历详细信息
     *****************************************************/
    private ActionForward queryWorkArchive (ActionMapping mapping,
        ActionForm form,  HttpServletRequest req,
        HttpServletResponse res)
    {
     //得到workid、操作标识operatorflag
     String workid = ((AgtmngStaffForm)form).getWorkid();
     String operatorflag = ((AgtmngStaffForm)form).getOperatorflag();
     SysDbConn aplcoms = null ;
     try
    {
     //连接数据源
     aplcoms = SysConnPool.getInstance().getAplComs();
     aplcoms.preparedQuery("");
     //获得输入参数staffno
     aplcoms.setString(1,workid);
     //调用SQL_AGT_QueryWorkArchive查询,得到数据集rs
     SysResultSet rs = new ResUtil(aplcoms.csCommonQuery("SQL_AGT_QueryWorkArchive","1","-1").getResultSet());
     //if (rs不为空)
     if( rs != null)
     {
      //定位到第一条记录
       rs.next();
      //将查询结果传递给页面
       req.setAttribute("workid",rs.getString(0));
       req.setAttribute("staffno",rs.getString(1));
       if (rs.getString(2) != "")
       {
           req.setAttribute("workstartdate",
                 rs.getString(2).substring(0,4)+"-"+rs.getString(2).substring(4,6)+"-"+rs.getString(2).substring(6,8));
       }
       else
       {
           req.setAttribute("workstartdate", "");
       }
       if(rs.getString(3) != "")
       {
           req.setAttribute("workenddate",
             rs.getString(3).substring(0,4)+"-"+rs.getString(3).substring(4,6)+"-"+rs.getString(3).substring(6,8));
       }
       else
       {
            req.setAttribute("workenddate","");
       }
       req.setAttribute("workdepartment",rs.getString(4));
       req.setAttribute("workduty",rs.getString(5));
       req.setAttribute("workhonor",rs.getString(6));
       req.setAttribute("workpunish",rs.getString(7));
       req.setAttribute("workdetail",rs.getString(8));
       }

      if (operatorflag.equalsIgnoreCase("AGTMNG_QUERY_WORK_NEXTMOD"))
      //定向到工作经历修改页面
      {
        return (mapping.findForward("workmodify"));
      }
      else if  (operatorflag.equalsIgnoreCase("AGTMNG_QUERY_WORK_NEXTVIEW"))
      //定向到工作经历浏览页面
      {
        return (mapping.findForward("WorkView"));
      }
      else
        return(mapping.findForward("error"));
      }
      catch (SysDbException aple)
      {
        //捕获CommonService系统异常,定向到出错页面,错误码为ErrorCode.COMMONSERVICE_ERROR
          aple.printStackTrace();
          req.setAttribute("errorId",ErrorCode.COMMONSERVICE_ERROR);
          return (mapping.findForward("error"));
       }
      catch(java.sql.SQLException sqle)
      {
        //捕获调用aplcoms异常,定向到出错页面,错误码为ErrorCode.DATABASE_ERROR
          sqle.printStackTrace();
          req.setAttribute("errorId",ErrorCode.DATABASE_ERROR);
          return (mapping.findForward("error"));
       }
      catch(Exception e)
      {
        //捕获未知异常,定向到出错页面,错误码为ErrorCode.UNKNOW_ERROR
          e.printStackTrace();
          req.setAttribute("errorId",ErrorCode.UNKNOW_ERROR);
          return (mapping.findForward("error"));
       }
      finally
        //关闭连接实例
        {
          if(aplcoms != null)
          {
             aplcoms.close();
          }
        }
    }

    /*******************************************************************
     新增业务代表基本档案,成功后根据操作标识定位到基本档案修改或教育经历新增页面
     *******************************************************************/
    private ActionForward newBaseArchive(ActionMapping mapping,
       ActionForm form, HttpServletRequest req,
        HttpServletResponse res)
    {
    //得到输入参数
    String operatorflag = ((AgtmngStaffForm)form).getOperatorflag();
    String staffno =((AgtmngStaffForm)form).getStaffno();
    String dutyid =((AgtmngStaffForm)form).getDutyid();
    String sex =((AgtmngStaffForm)form).getSex();
    String birthday =((AgtmngStaffForm)form).getBirthday();
    String idcardno =((AgtmngStaffForm)form).getIdcardno();
    String clanid =((AgtmngStaffForm)form).getClanid();
    String edulevelid =((AgtmngStaffForm)form).getEdulevelid();
    String major =((AgtmngStaffForm)form).getMajor();
    String graduatedate =((AgtmngStaffForm)form).getGraduatedate();
    String college =((AgtmngStaffForm)form).getCollege();
    String flanguage =((AgtmngStaffForm)form).getFlanguage();
    String nation =((AgtmngStaffForm)form).getNation();
    String province =((AgtmngStaffForm)form).getProvince();
    String marriage =((AgtmngStaffForm)form).getMarriage();
    String workphone =((AgtmngStaffForm)form).getWorkphone();
    String homephone =((AgtmngStaffForm)form).getHomephone();
    String mobilephone =((AgtmngStaffForm)form).getMobilephone();
    String address =((AgtmngStaffForm)form).getAddress();
    String postcode =((AgtmngStaffForm)form).getPostcode();
    String email =((AgtmngStaffForm)form).getEmail();
    String rela1name =((AgtmngStaffForm)form).getRela1name();
    String rela2name =((AgtmngStaffForm)form).getRela2name();
    String rela3name =((AgtmngStaffForm)form).getRela3name();
    String rela4name =((AgtmngStaffForm)form).getRela4name();
    String rela1 =((AgtmngStaffForm)form).getRela1();
    String rela2 =((AgtmngStaffForm)form).getRela2();
    String rela3 =((AgtmngStaffForm)form).getRela3();
    String rela4 =((AgtmngStaffForm)form).getRela4();
    String rela1co =((AgtmngStaffForm)form).getRela1co();
    String rela2co =((AgtmngStaffForm)form).getRela2co();
    String rela3co =((AgtmngStaffForm)form).getRela3co();
    String rela4co =((AgtmngStaffForm)form).getRela4co();
    String rela1pos =((AgtmngStaffForm)form).getRela1pos();
    String rela2pos =((AgtmngStaffForm)form).getRela2pos();
    String rela3pos =((AgtmngStaffForm)form).getRela3pos();
    String rela4pos =((AgtmngStaffForm)form).getRela4pos();
    String hobby =((AgtmngStaffForm)form).getHobby();
    String specialty =((AgtmngStaffForm)form).getSpecialty();
    String handlestaffno = req.getSession().getAttribute("staffno").toString();
    String skillIds = ((AgtmngStaffForm)form).getSkillIds();
    SysDbConn aplcoms = null;
    try
   {
      //连接数据源
      aplcoms = SysConnPool.getInstance().getAplComs();
      aplcoms.preparedSP();
      if (birthday != null)

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -