package hrm.dept;
import java.sql.*;
import java.util.*;
import java.text.*;
import commons.*;
public class DeptService extends ExecuteDB{
private String strSql;
//获取部门树信息,返回一个ArrayList类型对象
public ArrayList deptTree() {
this.strSql="select * from T_DEPT";
ResultSet rs=null;
ArrayList list=new ArrayList();
try
{
rs=super.exeQuery(this.strSql);
while(rs.next()){
DeptForm dept=new DeptForm();
dept.setDeptId(rs.getString("DEPTID"));
dept.setDeptCode(rs.getString("DEPTCODE"));
dept.setDeptName(rs.getString("DEPTNAME"));
dept.setAddress(rs.getString("ADDRESS"));
dept.setTelphone(rs.getString("TELPHONE"));
dept.setDesc(rs.getString("DESCS"));
list.add(dept);
}
}catch(Exception e)
{
System.out.println(e.toString());
}
return list;
}
//获取部门ID为deptID的信息
DeptForm getDept(String deptCode){
this.strSql="select * from T_DEPT where DEPTCODE='"+deptCode +"'";
System.out.println("strSql is "+this.strSql);
ResultSet rs=null;
ArrayList list=new ArrayList();
DeptForm dept=null;
try
{
rs=super.exeQuery(this.strSql);
if(rs.next()){
dept=new DeptForm();
dept.setDeptId(rs.getString("DEPTID"));
dept.setDeptCode(rs.getString("DEPTCODE"));
dept.setDeptName(rs.getString("DEPTNAME"));
dept.setAddress(rs.getString("ADDRESS"));
dept.setTelphone(rs.getString("TELPHONE"));
dept.setDesc(rs.getString("DESCS"));
}
rs.close();
}catch(Exception e)
{
System.out.println(e.toString());
}
return dept;
}
//向T_DEPT表中添加添加一条新记录
public boolean insertDept(DeptInfo dept)
{
this.strSql="insert into T_DEPT ";
this.strSql=this.strSql + "(DEPTCODE,DEPTNAME,ADDRESS,TELPHONE,DESCS)";
this.strSql=this.strSql + " values ('" + dept.getDeptCode() + "','" + dept.getDeptName() + "','"
+ dept.getAddress() + "','" + dept.getTelphone() + "','" + dept.getDesc() + "')";
System.out.println(this.strSql);
boolean isAdd=super.exeSql(this.strSql);
System.out.println("ok!");
System.out.println(isAdd);
return isAdd;
}
//修改类成员变量DEPTID对应的部门信息
public boolean updateDept(DeptInfo dept){
this.strSql="update T_DEPT set ";
this.strSql=this.strSql + " DEPTCODE=" + "'" + dept.getDeptCode() + "',";
this.strSql=this.strSql + " DEPTNAME=" + "'" + dept.getDeptName() + "',";
this.strSql=this.strSql + " ADDRESS=" + "'" + dept.getAddress() + "',";
this.strSql=this.strSql + " TELPHONE=" + "'" + dept.getTelphone() + "',";
this.strSql=this.strSql + " DESCS=" + "'" + dept.getDesc() + "'";
this.strSql=this.strSql+" where DEPTID=" + dept.getDeptId();
boolean isUpdate=super.exeSql(strSql);
return isUpdate;
}
//删除DEPTCODE中对应的部门信息
public boolean delete(DeptForm dept){
this.strSql="delete from T_DEPT where DEPTID =";
this.strSql=this.strSql + dept.getDeptId();
System.out.println(this.strSql);
boolean isDelete =super.exeSql(this.strSql);
return isDelete;
}
}
没有合适的资源?快使用搜索试试~ 我知道了~
hrm.zip_hrm_hrm in java_java hrm_人才管理
共126个文件
gif:48个
jsp:14个
class:13个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 48 浏览量
2022-09-19
14:35:53
上传
评论
收藏 1.07MB ZIP 举报
温馨提示
该系统对jsp进行了初级编程 实现了ajax下的部门人才管理
资源推荐
资源详情
资源评论
收起资源包目录
hrm.zip_hrm_hrm in java_java hrm_人才管理 (126个子文件)
DeptService.class 4KB
DeptUpdateAction.class 3KB
EmpInfo.class 3KB
DeptInsertAction.class 2KB
DeptListAction.class 2KB
DeptGetAction.class 2KB
DeptForm.class 2KB
DeptDelAction.class 2KB
ExecuteDB.class 2KB
DeptInfo.class 2KB
EduInfo.class 1KB
ConnectDB.class 1KB
DeptTreeAction.class 811B
.classpath 1KB
tree.css 2KB
style.css 805B
Thumbs.db 53KB
Thumbs.db 23KB
team.gif 1018B
team1.gif 1018B
folder-expanded.gif 916B
folder.gif 915B
guanbu.gif 883B
rooticon.gif 652B
manager_old.gif 626B
download.gif 585B
usericon.gif 522B
file.gif 460B
file1.gif 453B
del.gif 306B
8-2.gif 299B
setadmin.gif 264B
usergroupicon.gif 254B
search.gif 242B
store.gif 179B
store1.gif 179B
1.gif 166B
2.gif 163B
3.gif 163B
4.gif 159B
modify.gif 157B
parenticon.gif 152B
bgcolor.gif 151B
manager.gif 134B
test1.gif 133B
folder1.gif 130B
look.gif 129B
open.gif 126B
folder3.gif 126B
8.gif 122B
folder2.gif 97B
plusbottom.gif 96B
folder4.gif 94B
plus.gif 94B
plustop.gif 93B
minus.gif 91B
minusbottom.gif 88B
minustop.gif 88B
5.gif 73B
7.gif 69B
add.gif 68B
6.gif 68B
icon-expandall.gif 64B
list.gif 64B
icon-closeall.gif 64B
0.gif 58B
struts.jar 486KB
commons-collections.jar 161KB
commons-beanutils.jar 116KB
commons-digester.jar 107KB
jakarta-oro.jar 64KB
commons-lang.jar 62KB
commons-validator.jar 46KB
commons-logging.jar 31KB
commons-fileupload.jar 22KB
struts-legacy.jar 10KB
DeptService.java 3KB
DeptForm.java 3KB
DeptUpdateAction.java 2KB
DeptInsertAction.java 2KB
EmpInfo.java 2KB
DeptListAction.java 2KB
DeptGetAction.java 2KB
DeptDelAction.java 1KB
DeptInfo.java 1KB
DeptTreeAction.java 998B
ExecuteDB.java 971B
EduInfo.java 911B
ConnectDB.java 634B
ditu.JPG 690B
datacheck.js 8KB
tree.js 6KB
dept_tree.jsp 3KB
dept_info.jsp 3KB
dept_update.jsp 3KB
emp_add.jsp 2KB
dept_add.jsp 2KB
emp_edit.jsp 2KB
edu_add.jsp 1KB
edu_edit.jsp 845B
共 126 条
- 1
- 2
资源评论
四散
- 粉丝: 52
- 资源: 1万+
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- keil2 + proteus + 8051.exe
- 1961ee27df03bd4595d28e24b00dde4e_744c805f7e4fb4d40fa3f695bfbab035_8(1).c
- mediapipe-0.9.0.1-cp37-cp37m-win-amd64.whl.zip
- windows注册表编辑工具
- mediapipe-0.9.0.1-cp37-cp37m-win-amd64.whl.zip
- 校园通行码预约管理系统20240522075502
- 车类型数据集6250张VOC+YOLO格式.zip
- The PyTorch implementation of STGCN.STGCN-main.zip
- 092300108.cpp
- 车类型数据集6000张VOC+YOLO格式.zip
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功