FlowTacheInfoManager.java
资源名称:OA.rar [点击查看]
上传用户:mingda
上传日期:2017-06-20
资源大小:27691k
文件大小:8k
源码类别:
OA系统
开发平台:
Java
- package com.gforce.gfoa;
- /**
- * <p>Title: 吉力科技办公自动化系统</p>
- * <p>Description: 吉力科技办公自动化系统</p>
- * <p>Copyright: 版权所有 2003 (c) 西安吉力科技发展有限公司 Copyright (c) 2003 GForce Sceince & Technology</p>
- * <p>Company: 西安吉力科技发展有限公司 (GForce Sceince & Technology)</p>
- * @author 常兵
- * @version 2.0
- * DATE : 2003-12-10
- * 流程环节信息管理类
- */
- import com.gforce.currency.database.*;
- import java.util.*;
- import com.gforce.currency.*;
- public class FlowTacheInfoManager extends RecordManager
- {
- public FlowTacheInfoManager()
- {}
- protected final static String TableName = "FlowTacheInfo"; //定义声明本类操作表名称
- protected final static String IDFieldName = "ID"; //定义声明主键或者可以确定唯一记录的字段名称为“ID”,必须为自增整型
- protected final static String[] NumericFieldsName = {"FlowID","UpdateUserID","IsRecordRead","RemindInterval","MaxWaitTime",
- "IsFromDefault","IsFinishedByRead"}; //声明数值型字段名称
- protected final static String[] DatetimeFieldsName = {"UpdateTime"}; //声明日期时间型字段名称
- protected final static String[] StringFieldsName = {"TacheName","FromTacheID","TacheStatus","TacheDescription",
- "ApproveUserIDs","TacheType","UpdateFromIP"}; //声明字符型字段名称
- 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;
- }
- /**
- * 获取符合指定条件的流程环节信息字段记录集
- * @param strID 流程环节信息唯一标识
- * @param strTacheName 环节名称
- * @param strFromTacheID 来自环节ID
- * @param strTacheStatus 环节状态
- * @param strTacheDescription 环节描述
- * @param strApproveUserIDs 审批用户IDs
- * @param strTacheType 环节类型
- * @param strFlowID 流程ID
- * @param strFlowName 流程名称
- * @param strUpdateUserName 更新用户ID
- * @param strUpdateFromIP 更新来源IP地址
- * @param strIsRecordRead 是否记录查阅
- * @param strRemindInterval 提醒时间间隔
- * @param strMaxWaitTime 最大停留时间
- * @param strIsFromDefault 是否环节默认
- * @param strIsFinishedByRead 查阅是否自动完成该环节
- * @param strOrderBy 排序字段
- * @param strIsDesc 是否降序排序
- * @return 符合条件记录向量集
- */
- public static Vector getRecordBySearch(String strID,String strTacheName,String strFromTacheID,
- String strTacheStatus,String strTacheDescription,
- String strApproveUserIDs,String strTacheType,String strFlowID,String strFlowName,
- String strUpdateUserName,String strUpdateFromIP,String strIsRecordRead,
- String strRemindInterval,String strMaxWaitTime,String strIsFromDefault,
- String strIsFinishedByRead,String strOrderBy,String strIsDesc)
- {
- String strSQL = "SELECT a.[ID],a.[TacheName],a.[FromTacheID],a.[TacheStatus],a.[TacheDescription]," +
- "a.[ApproveUserIDs],a.[TacheType],a.[FlowID],a.[UpdateUserID],a.[UpdateTime]," +
- "a.[UpdateFromIP],a.[IsRecordRead],a.[RemindInterval],a.[MaxWaitTime],a.[IsFromDefault]," +
- "a.[IsFinishedByRead],b.[FlowName],d.[Name] FROM [" + TableName + "] as a left outer join" +
- " [MoveFlowInfo] as b on (a.FlowID = b.ID) left outer join [UserInfo] as c on (a.UpdateUserID=c.ID)" +
- " left outer join [PersonnelInfo] as d on (c.PersonnelID=d.ID) WHERE a.[ID] > 0";
- if (strID.trim().length()>0)
- {
- strSQL += " and (a.[ID] IN (" + strID + "))";
- }
- if (strTacheName.trim().length()>0)
- {
- strSQL += " and a.[TacheName] LIKE '%" + strTacheName + "%'";
- }
- if (strFromTacheID.trim().length()>0)
- {
- strSQL += " and a.[FromTacheID] LIKE '%" + strFromTacheID + "%'";
- }
- if (strTacheStatus.trim().length()>0)
- {
- strSQL += " and a.[TacheStatus] LIKE '%" + strTacheStatus + "%'";
- }
- if (strTacheDescription.trim().length()>0)
- {
- strSQL += " and a.[TacheDescription] LIKE '%" + strTacheDescription + "%'";
- }
- if (strApproveUserIDs.trim().length()>0)
- {
- strSQL += " and a.[ApproveUserIDs] LIKE '%" + strApproveUserIDs + "%'";
- }
- if (strTacheType.trim().length()>0)
- {
- strSQL += " and a.[TacheType] LIKE '%" + strTacheType + "%'";
- }
- if (strFlowID.trim().length()>0)
- {
- strSQL += " and (a.[FlowID] IN (" + strFlowID + "))";
- }
- if (strFlowName.trim().length()>0)
- {
- strSQL += " and b.[FlowName] LIKE '%" + strFlowName + "%'";
- }
- if (strUpdateUserName.trim().length()>0)
- {
- strSQL += " and (d.[Name] LIKE '%" + strUpdateUserName + "%')";
- }
- if (strUpdateFromIP.trim().length()>0)
- {
- strSQL += " and a.[UpdateFromIP] LIKE '%" + strUpdateFromIP + "%'";
- }
- if (strIsRecordRead.trim().length()>0)
- {
- if (strIsRecordRead.equalsIgnoreCase("True"))
- strSQL += " and a.[IsRecordRead] = 1";
- else if (strIsRecordRead.equalsIgnoreCase("False"))
- strSQL += " and a.[IsRecordRead] = 0";
- }
- if (strRemindInterval.trim().length()>0)
- {
- strSQL += " and (a.[RemindInterval] IN (" + strRemindInterval + "))";
- }
- if (strMaxWaitTime.trim().length()>0)
- {
- strSQL += " and (a.[MaxWaitTime] IN (" + strMaxWaitTime + "))";
- }
- if (strIsFromDefault.trim().length()>0)
- {
- if (strIsFromDefault.equalsIgnoreCase("True"))
- strSQL += " and a.[IsFromDefault] = 1";
- else if (strIsFromDefault.equalsIgnoreCase("False"))
- strSQL += " and a.[IsFromDefault] = 0";
- }
- if (strIsFinishedByRead.trim().length()>0)
- {
- if (strIsFinishedByRead.equalsIgnoreCase("True"))
- strSQL += " and a.[IsFinishedByRead] = 1";
- else if (strIsFinishedByRead.equalsIgnoreCase("False"))
- strSQL += " and a.[IsFinishedByRead] = 0";
- }
- if (strOrderBy.trim().length() > 0)
- {
- if (strIsDesc.equalsIgnoreCase("True"))
- strSQL += " Order by " + strOrderBy + " desc";
- else
- strSQL += " Order by " + strOrderBy + "";
- }
- Vector vt = SQLManager.GetResultSet(strSQL);
- return vt;
- }
- /**
- * 获取符合指定条件的流程环节信息字段记录集(重载getRecordBySearch方法,按ID主键返回)
- * @param strID 流程环节信息唯一标识
- * @return 符合条件记录向量集
- */
- public static Vector getRecordBySearch(String strID)
- {
- Vector vt = getRecordBySearch(strID,"","","","","","","","","","","","","","","","","");
- return vt;
- }
- }