-
大小: 2.78MB文件类型: .zip金币: 1下载: 0 次发布日期: 2023-09-13
- 语言: 数据库
- 标签: osworkflow 实例 oracle tomcat6.0
资源简介
osworkflow请假实例,使用tomcat6.0服务器,oracle数据库,导入到myeclipse中即可运行,当然需要先创建数据库。很适合osworkflow的学习
代码片段和文件信息
package com.qiny.dao;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;
import java.util.ArrayList;
import java.sql.Connection;
import java.sql.Statement;
import java.sql.ResultSet;
import java.sql.SQLException;
import javax.sql.DataSource;
import javax.naming.InitialContext;
import javax.naming.NamingException;
import com.qiny.leave.LeaveApply;
import com.qiny.leave.LeaveApprove;
public class LeaveDAO {
protected static DataSource ds = null;
public LeaveDAO() {
if (ds == null) {
try {
InitialContext ic = new InitialContext();
ds = (DataSource) ic.lookup(“java:comp/env/jdbc/DefaultDS“);
System.out.println(“<><><><><>“+ds);
} catch (NamingException ne) {
throw new RuntimeException(“NamingException while looking“);
}
}
}
public void addLeaveApply(LeaveApply leaveApply) {
try {
String exeSql = ““
+ “ INSERT INTO bus_leaveApply (applyIDapplicantreasonapplyTimedayCountwfid)“
+ “ VALUES (seq_bus_leaveApply.nextVal‘“+ leaveApply.getApplicant() + “‘‘“ + leaveApply.getReason()
+ “ ‘‘“+new SimpleDateFormat(“yyyy-MM-dd HH:mm:ss“).format(new Date()).toString()+“‘‘“ + leaveApply.getDayCount()
+ “ ‘“ + leaveApply.getWfid() + “)“;
Connection connection = ds.getConnection();
Statement statement = connection.createStatement();
statement.execute(exeSql);
statement.close();
connection.close();
} catch (SQLException ex) {
throw new RuntimeException(“DAO addLeaveApply failed!\n“ + ex.getMessage());
}
}
public void addLeaveApprove(LeaveApprove leaveApproval) {
try {
String exeSql = ““
+ “ INSERT INTO bus_leaveApprove (approveIDapplyIDapproverapproveTimeopinion)“
+ “ VALUES (seq_bus_leaveApprove.nextVal‘“ + leaveApproval.getApplyID() + “‘‘“ + leaveApproval.getApprover()
+ “ ‘‘“+new SimpleDateFormat(“yyyy-MM-dd HH:mm:ss“).format(new Date()).toString()+“‘“ + leaveApproval.getOpinion() + “)“;
Connection connection = ds.getConnection();
Statement statement = connection.createStatement();
statement.execute(exeSql);
statement.close();
connection.close();
} catch (SQLException ex) {
throw new RuntimeException(“DAO addLeaveApprove failed!\n“ + ex.getMessage());
}
}
public LeaveApply getLeaveApply(long wfid) {
LeaveApply leaveApply = new LeaveApply();
try {
String querySql = ““
+ “ SELECT applyIDapplicantreasonapplyTimedayCountwfid “
+ “ FROM bus_leaveApply WHERE wfid=“ + wfid;
Connection connection = ds.getConnection();
Statement statement = connection.createStatement();
ResultSet rs = statement.executeQuery(querySql);
if (rs.next()) {
leaveApply.setApplyID(rs.getInt(“applyID“));
leaveApply.setApplicant(rs.getString(
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2012-11-28 21:20 os_leave\
文件 1391 2012-11-30 12:35 os_leave\.classpath
目录 0 2012-12-04 14:24 os_leave\.myeclipse\
文件 297 2012-11-28 14:26 os_leave\.myme
文件 1226 2012-11-28 14:26 os_leave\.project
目录 0 2012-12-04 14:24 os_leave\.settings\
目录 0 2012-11-28 14:26 os_leave\WebRoot\
目录 0 2012-11-29 09:46 os_leave\WebRoot\me
文件 39 2012-11-28 14:26 os_leave\WebRoot\me
文件 388 2012-11-30 09:15 os_leave\WebRoot\me
目录 0 2012-11-28 14:26 os_leave\WebRoot\WEB-INF\
目录 0 2012-11-30 14:10 os_leave\WebRoot\WEB-INF\classes\
目录 0 2012-11-30 10:16 os_leave\WebRoot\WEB-INF\classes\com\
目录 0 2012-11-30 10:16 os_leave\WebRoot\WEB-INF\classes\com\qiny\
目录 0 2012-11-30 10:16 os_leave\WebRoot\WEB-INF\classes\com\qiny\dao\
文件 5426 2012-11-30 13:39 os_leave\WebRoot\WEB-INF\classes\com\qiny\dao\LeaveDAO.class
目录 0 2012-11-30 10:16 os_leave\WebRoot\WEB-INF\classes\com\qiny\leave\
文件 2192 2012-11-30 10:16 os_leave\WebRoot\WEB-INF\classes\com\qiny\leave\ApplyFunction.class
文件 2157 2012-11-30 10:16 os_leave\WebRoot\WEB-INF\classes\com\qiny\leave\ApproveFunction.class
文件 1705 2012-11-30 10:16 os_leave\WebRoot\WEB-INF\classes\com\qiny\leave\LeaveApply.class
文件 1473 2012-11-30 10:16 os_leave\WebRoot\WEB-INF\classes\com\qiny\leave\LeaveApprove.class
文件 5102 2012-11-30 14:10 os_leave\WebRoot\WEB-INF\classes\leave_apply.xm
文件 217 2005-11-17 20:24 os_leave\WebRoot\WEB-INF\classes\log4j.properties
文件 2200 2012-11-29 09:44 os_leave\WebRoot\WEB-INF\classes\osuser.xm
文件 1606 2012-11-28 19:48 os_leave\WebRoot\WEB-INF\classes\osworkflow.xm
文件 724 2012-11-29 09:45 os_leave\WebRoot\WEB-INF\classes\propertyset.xm
文件 103 2007-07-11 16:00 os_leave\WebRoot\WEB-INF\classes\workflows.xm
目录 0 2012-12-04 14:24 os_leave\WebRoot\WEB-INF\lib\
文件 379 2012-11-28 14:26 os_leave\WebRoot\WEB-INF\web.xm
文件 812 2012-11-29 11:07 os_leave\WebRoot\default.jsp
文件 1301 2012-11-29 14:14 os_leave\WebRoot\leaveApply.jsp
............此处省略41个文件信息
- 上一篇:知识竞赛源码
- 下一篇:基于ACCESS的人力资源管理系统
相关资源
- R语言连接oracle/mysql数据库脚本
- oracle12cRAC+DG+ASM标准搭建.doc
- SUSE Linux 11上安装Oracle 11g的详细步骤
- Linux--Oracle-11g-R2-RAC-安装配置详细过程
- Oracle解读AWR报告(老白)
- ORACLE ERP财务管理系统培训手册(中文
- oracle ocp 071 12c.rar
- RedHat 7.5 Oracle 18c RAC 安装操作手册.p
- Oracle_Data_Integrator应用指南
- Oracle EBS 费用性采购
- 基于Oracle数据库的简单网上书店
- 初学者第一个小项目基于JDBC+oracle实现
- Linux下Oracle 11g数据库安装
- oracle wrapped破解工具
- .net 程序链接Oracle数据库Demo
- oracle从入门到精通.pdf
- DBImport破解版sqlitetomysqltoOracle.rar
- Oracle_SES_11g Administration API Guide
- oracle linux7.2 安装oracle 11.2.0.4全过程图
- oracle分析函数全面解析
-
Oracle Databa
se Reference手册中文版 - ORATOP ORACLE监控工具
- .netCore3.0MVC_EF_Oracle项目搭建步骤.doc
- 药店管理系统数据库设计(SQL以及o
- SqlDbx 5.11专业版-无任何功能限制中文
- 北大青鸟Oracle(ppt)
- 最新 Oracle OCP 11G 题库中文版
- oracle数据库实验指导书桂电版
- 传智播客Oracle.rar
- Toad for Oracle 12.8简体中文语言包
评论
共有 条评论