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

📄 bioinfomanager.java

📁 一个目前正在上线运行的JSP企业网站系统
💻 JAVA
字号:
package com.gforce.gfoa;
/**
 * <p>Title: 西部信托网站项目</p>
 * <p>Description: 西部信托网站项目</p>
 * <p>Copyright: 版权所有 2004 (c) 西安吉力科技发展有限公司  Copyright (c) 2004 GForce Sceince & Technology</p>
 * <p>Company: 西安吉力科技发展有限公司 (GForce Sceince & Technology)</p>
 * @author 马登军
 * @version 1.0
 */

import com.gforce.currency.*;
import com.gforce.currency.database.*;
import java.sql.*;
import java.util.*;


public class BioInfoManager
    extends RecordManager {
    public BioInfoManager() {
    }

    protected final static String TableName = "BioInfo"; //定义声明本类操作表名称
    protected final static String IDFieldName = "ID"; //定义声明主键或者可以确定唯一记录的字段名称为“ID”,必须为自增整型
    protected final static String[] NumericFieldsName = {"EducationID","MarriageID","JobID","TechnicalPostID"}; //声明数值型字段名称
    protected final static String[] StringFieldsName = {"Name","Sex","OfficeTel","HomeTel","IDCard","HomeAddress","EMail","Resume","Remark","Remark1","Photo","Accessory","EducationDate","TechPostDate","Status","PayRequest","MultUserID","MultSysID"}; //声明字符型字段名称
    protected final static String[] DatetimeFieldsName = {"BirthDate","UpdateTime","AddTime"}; //声明日期时间型字段名称
    protected final static String[] TextFieldsName =        {}; //声明大字符串型字段名称

    /**
     * 根据字段名称获取插入数据时表单元素名称
     * @param strFieldName  字段名称
     * @return  表单素名称
     */
    protected String InsertParament(String strFieldName) {
        return "" + strFieldName + ""; //可以根据需要加前缀、后缀
    }

    /**
     * 根据字段名称获取修改数据时表单元素名称
     * @param strFieldName  字段名称
     * @return  表单素名称
     */
    protected String UpdateParament(String strFieldName) {
        return "" + strFieldName + ""; //可以根据需要加前缀、后缀
    }

    /**
     * 获取本类操作表名称
     * @return  表名称
     */
    public String getTableName() { //获取本类操作表名称
        return TableName;
    }

    protected String getIDFieldName() { //获取主键或者可以确定唯一记录的字段名称
        return IDFieldName;
    }

    protected String[] getNumericFieldsName() { //获取数值型字段名称
        return NumericFieldsName;
    }

    protected String[] getStringFieldsName() { //获取字符型字段名称
        return StringFieldsName;
    }

    protected String[] getDatetimeFieldsName() { //获取日期时间型字段名称
        return DatetimeFieldsName;
    }

    protected String[] getTextFieldsName() { //获取大字符串型字段名称
        return TextFieldsName;
    }


    /**
     * 获取指定ID的风格记录数据集
     * @param iID 风格ID
     * @return 指定ID的风格记录数据集
     */
    public static Vector getRecordByID(int iID)
    {
        Vector vt = SQLManager.GetResultSet("SELECT * FROM " + TableName + " where ID = " + iID);
        return vt;
    }

    public static Vector getRecordByIDs(String strIDs)
    {      return getRecordBySearch(strIDs,"","","","","","","","","","","","","","","","","","","","","","","","","","","","","","");
    }
        /**
       * 获取符合条件的数据集
       * @param strIDs String
       * @param strName String
       * @param strSex String
       * @param strBirthDateStart String
       * @param strBirthDateEnd String
       * @param strOfficeTel String
       * @param strHomeTel String
       * @param strIDCard String
       * @param strHomeAddress String
       * @param strEMail String
       * @param strResume String
       * @param strRemark String
       * @param strRemark1 String
       * @param strEducation String
       * @param strMarriageState String
       * @param strJobName String
       * @param strTechnicalPost String
       * @param strPhoto String
       * @param strAccessory String
       * @param strEducationDate String
       * @param strTechPostDate String
       * @param strStatus String
       * @param strPayRequest String
       * @param strUpdateTimeStart String
       * @param strUpdateTimeEnd String
       * @param strAddTimeStart String
       * @param strAddTimeEnd String
       * @param strMultUserID String
       * @param strMultSysID String
       * @param strOrderBy String
       * @param strIsDesc String
       * @return Vector 获取符合条件的数据集
       */

    public static Vector getRecordBySearch(String strIDs,String strName,String strSex,
                                           String strBirthDateStart,String strBirthDateEnd,
                                           String strOfficeTel,String strHomeTel,
                                           String strIDCard,String strHomeAddress,
                                           String strEMail,String strResume,String strRemark,
                                           String strRemark1,String strEducation,String strMarriageState,
                                           String strJobName,String strTechnicalPost,String strPhoto,
                                           String strAccessory,String strEducationDate,String strTechPostDate,
                                           String strStatus,String strPayRequest,String strUpdateTimeStart,
                                           String strUpdateTimeEnd,String strAddTimeStart,String strAddTimeEnd,
                                           String strMultUserID,String strMultSysID,String strOrderBy,String strIsDesc)
    {
      String strSQL = "select a.[ID],a.[Name],a.[Sex],a.[BirthDate],a.[OfficeTel],a.[HomeTel],a.[IDCard],a.[HomeAddress],"+
        "a.[EMail],a.[Resume],a.[Remark],a.[Remark1],a.[EducationID],a.[MarriageID],a.[JobID],a.[TechnicalPostID],"+
        "a.[Photo],a.[Accessory],a.[EducationDate],a.[TechPostDate],a.[Status],a.[PayRequest],a.[UpdateTime],a.[AddTime],"+
        "a.[MultUserID],a.[MultSysID],b.[Education],c.[JobName],d.[TechnicalPost],e.[MarriageState]"+
        "from " + TableName + " as a left outer join EducationInfo as b on (a.[EducationID]=b.[ID]) left outer join JobInfo as c on (c.[ID]=a.[JobID]) "+
        "left outer join TechnicalPostInfo as d on (d.[ID]=a.[TechnicalPostID])"+
        "left outer join MarriageState as e on (e.[ID]=a.[MarriageID]) WHERE a.[ID] > 0 ";
        if (strIDs.trim().length() > 0)
         {
           strSQL += " and (a.[ID] in (" + strIDs + "))";
         }
         if (strName.trim().length() > 0)
         {
           strSQL += " and a.[Name] like '%" + strName + "%'";
         }
         if (strSex.trim().length() > 0)
         {
           strSQL += " and a.[Sex] like '%" + strSex + "%'";
         }
         if (strBirthDateStart.trim().length() > 0 && strBirthDateEnd.trim().length() > 0 )
         {
           strSQL += " and a.[BirthDate] >= '" + strBirthDateStart + " 00:00:00.000' and a.[BirthDate]<='" + strBirthDateEnd + " 23:59:59.999'";

         }
         if (strOfficeTel.trim().length() > 0)
         {
           strSQL += " and a.[OfficeTel] like '%" + strOfficeTel + "%'";
         }
         if (strHomeTel.trim().length() > 0)
         {
           strSQL += " and a.[HomeTel] like '%" + strHomeTel + "%'";
         }

         if (strIDCard.trim().length() > 0)
         {
           strSQL += " and a.[IDCard] like '%" + strIDCard + "%'";
         }

         if (strHomeAddress.trim().length() > 0)
         {
           strSQL += " and a.[HomeAddress] like '%" + strHomeAddress + "%'";
         }

         if (strEMail.trim().length() > 0)
         {
           strSQL += " and a.[EMail] like '%" + strEMail + "%'";
         }

         if (strResume.trim().length() > 0)
         {
           strSQL += " and a.[Resume] like '%" + strResume + "%'";
         }

         if (strRemark.trim().length() > 0)
         {
           strSQL += " and a.[Remark] like '%" + strRemark + "%'";
         }

         if (strRemark1.trim().length() > 0)
         {
           strSQL += " and a.[Remark1] like '%" + strRemark1 + "%'";
         }
         if (strEducation.trim().length() > 0)
         {
           strSQL += " and b.[Education] like '%" + strEducation + "%'";
         }

         if (strMarriageState.trim().length() > 0)
         {
           strSQL += " and e.[MarriageState] like '%" + strMarriageState + "%'";
         }

         if (strJobName.trim().length() > 0)
         {
           strSQL += " and c.[JobName] like '%" + strJobName + "%'";
         }

         if (strTechnicalPost.trim().length() > 0)
         {
           strSQL += " and d.[TechnicalPost] like '%" + strTechnicalPost + "%'";
         }
         if (strPhoto.trim().length() > 0)
         {
           strSQL += " and c.[Photo] like '%" + strPhoto + "%'";
         }

         if (strAccessory.trim().length() > 0)
         {
           strSQL += " and c.[Accessory] like '%" + strAccessory + "%'";
         }

         if (strEducationDate.trim().length() > 0)
         {
           strSQL += " and c.[EducationDate] like '%" + strEducationDate + "%'";
         }

         if (strTechPostDate.trim().length() > 0)
         {
           strSQL += " and c.[TechPostDate] like '%" + strTechPostDate + "%'";
         }

         if (strStatus.trim().length() > 0)
         {
           strSQL += " and c.[Status] like '%" + strStatus + "%'";
         }

         if (strPayRequest.trim().length() > 0)
         {
           strSQL += " and c.[PayRequest] like '%" + strPayRequest + "%'";
         }
         if (strUpdateTimeStart.trim().length() > 0 && strUpdateTimeEnd.trim().length() > 0 )
         {
           strSQL += " and a.[UpdateTime] >= '" + strUpdateTimeStart + " 00:00:00.000' and a.[UpdateTime]<='" + strUpdateTimeEnd + " 23:59:59.999'";

         }
         if (strAddTimeStart.trim().length() > 0 && strAddTimeEnd.trim().length() > 0 )
         {
           strSQL += " and a.[Addtime] >= '" + strAddTimeStart + " 00:00:00.000' and a.[Addtime]<='" + strAddTimeEnd + " 23:59:59.999'";

         }
         if (strMultUserID.trim().length() > 0)
         {
           strSQL += " and a.[MultUserID] like '%" + strMultUserID + "%'";
         }
         if (strMultSysID.trim().length() > 0)
         {
           strSQL += " and a.[MultSysID] like '%" + strMultSysID + "%'";
         }
         if (strOrderBy.trim().length() > 0)
         {
           if (strIsDesc.equalsIgnoreCase("True"))
           {
             strSQL += " Order by " + strOrderBy + " desc";
           }
           else
           {
             strSQL += " Order by " + strOrderBy + "";
           }
         }
         else
         {
           strSQL += " Order by a.[UpdateTime]";
         }

      Vector vt = SQLManager.GetResultSet(strSQL);
      return vt;
  }

}


⌨️ 快捷键说明

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