Eclipse+Java+Swing实现企业⼈事管理系统
Java+Swing实现企业⼈事管理系统
⼀、系统介绍
本系统实现的功能:⽤户登录、员⼯信息的增删改查、导出Execl、计算器、记事本、信息排序。采⽤AES加密算法,数据库使⽤Mysql8.0.13,界⾯良好。
⼆、系统展⽰
1.登录页
2.主页⾯
3.添加员⼯信息
4.修改员⼯信息
5.计算器
6.记事本
7.导出Execl
三、系统实现
AccountDao.java
package;
import List;
import TbAccount;
import TbDept;
import TbPerson;
import DataAccessException;
import BeanPropertyRowMapper;
import JdbcTemplate;
import JDBCUtils;
public class AccountDao {
private static JdbcTemplate template =new DataSource());
public static List<TbAccount>findAllAccount(){
try{
String sql ="select * from tb_account";
List<TbAccount> a = template.query(sql,new BeanPropertyRowMapper<TbAccount>(TbAccount.class));
return a;
}catch(DataAccessException e){
e.printStackTrace();
return null;
}
}
public static String findAccountMoneyById(int i){
try{
String sql ="select * from tb_account where timecard_id=?";
TbAccount tbAccount = template.queryForObject(sql,new BeanPropertyRowMapper<TbAccount>(TbAccount.class), i);
Money();
}catch(DataAccessException e){
e.printStackTrace();
return null;
}
}
}
DeptDao.java
package;
import List;
import TbDept;
import DataAccessException;
import BeanPropertyRowMapper;
import JdbcTemplate;
import JDBCUtils;
public class DeptDao {
private static JdbcTemplate template =new DataSource());
public static TbDept findDeptById(int deptId){
String sql ="select * from tb_dept where id=?";
TbDept dept = template.queryForObject(sql,new BeanPropertyRowMapper<TbDept>(TbDept.class), deptId); return dept;
}
public static List<TbDept>findAllDept(){
try{
String sql ="select * from tb_dept";
List<TbDept> tbDept = template.query(sql,new BeanPropertyRowMapper<TbDept>(TbDept.class));
return tbDept;
}catch(DataAccessException e){
e.printStackTrace();
return null;
}
}
public static int findDeptIdByName(String item){
String sql ="select * from tb_dept where name=?";
TbDept dept = template.queryForObject(sql,new BeanPropertyRowMapper<TbDept>(TbDept.class), item); Id();
}
public static List<TbDept>findAllDeptExceptZero(){
try{
String sql ="select * from tb_dept where id<>0";
List<TbDept> tbDept = template.query(sql,new BeanPropertyRowMapper<TbDept>(TbDept.class));
return tbDept;
}catch(DataAccessException e){
e.printStackTrace();
return null;
javaswing实现购买}
}
public static TbDept findDeptByName(String name){
try{
String sql ="select * from tb_dept where name=?";
TbDept dept = template.queryForObject(sql,new BeanPropertyRowMapper<TbDept>(TbDept.class), name); return dept;
}catch(DataAccessException e){
e.printStackTrace();
return null;
}
}
public static void addDept(TbDept d2){
try{
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。
发表评论