38 | ${user.truename }欢迎您登录本系统!
39 |
40 |
41 |
--------------------------------------------------------------------------------
/WebRoot/theme/css/0.css:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JavaGraduationProject/CompanyInternalManagementSystem/ecb60b332ce444c4479874960746568f2ac6a879/WebRoot/theme/css/0.css
--------------------------------------------------------------------------------
/WebRoot/theme/img/Thumbs.db:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JavaGraduationProject/CompanyInternalManagementSystem/ecb60b332ce444c4479874960746568f2ac6a879/WebRoot/theme/img/Thumbs.db
--------------------------------------------------------------------------------
/WebRoot/theme/img/admin_login.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JavaGraduationProject/CompanyInternalManagementSystem/ecb60b332ce444c4479874960746568f2ac6a879/WebRoot/theme/img/admin_login.gif
--------------------------------------------------------------------------------
/WebRoot/theme/img/admin_main_img_help.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JavaGraduationProject/CompanyInternalManagementSystem/ecb60b332ce444c4479874960746568f2ac6a879/WebRoot/theme/img/admin_main_img_help.gif
--------------------------------------------------------------------------------
/WebRoot/theme/img/admin_table_bg.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JavaGraduationProject/CompanyInternalManagementSystem/ecb60b332ce444c4479874960746568f2ac6a879/WebRoot/theme/img/admin_table_bg.gif
--------------------------------------------------------------------------------
/WebRoot/theme/img/admin_table_down.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JavaGraduationProject/CompanyInternalManagementSystem/ecb60b332ce444c4479874960746568f2ac6a879/WebRoot/theme/img/admin_table_down.jpg
--------------------------------------------------------------------------------
/WebRoot/theme/img/frame-l.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JavaGraduationProject/CompanyInternalManagementSystem/ecb60b332ce444c4479874960746568f2ac6a879/WebRoot/theme/img/frame-l.gif
--------------------------------------------------------------------------------
/WebRoot/theme/img/frame-r.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JavaGraduationProject/CompanyInternalManagementSystem/ecb60b332ce444c4479874960746568f2ac6a879/WebRoot/theme/img/frame-r.gif
--------------------------------------------------------------------------------
/WebRoot/theme/img/frame_on.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JavaGraduationProject/CompanyInternalManagementSystem/ecb60b332ce444c4479874960746568f2ac6a879/WebRoot/theme/img/frame_on.gif
--------------------------------------------------------------------------------
/WebRoot/theme/img/mtbg1.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JavaGraduationProject/CompanyInternalManagementSystem/ecb60b332ce444c4479874960746568f2ac6a879/WebRoot/theme/img/mtbg1.gif
--------------------------------------------------------------------------------
/WebRoot/theme/img/mtimg1.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JavaGraduationProject/CompanyInternalManagementSystem/ecb60b332ce444c4479874960746568f2ac6a879/WebRoot/theme/img/mtimg1.gif
--------------------------------------------------------------------------------
/WebRoot/theme/img/newitem.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JavaGraduationProject/CompanyInternalManagementSystem/ecb60b332ce444c4479874960746568f2ac6a879/WebRoot/theme/img/newitem.gif
--------------------------------------------------------------------------------
/WebRoot/theme/img/ntbg2.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JavaGraduationProject/CompanyInternalManagementSystem/ecb60b332ce444c4479874960746568f2ac6a879/WebRoot/theme/img/ntbg2.gif
--------------------------------------------------------------------------------
/WebRoot/theme/img/tn2.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JavaGraduationProject/CompanyInternalManagementSystem/ecb60b332ce444c4479874960746568f2ac6a879/WebRoot/theme/img/tn2.gif
--------------------------------------------------------------------------------
/WebRoot/theme/img/top_left_al.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JavaGraduationProject/CompanyInternalManagementSystem/ecb60b332ce444c4479874960746568f2ac6a879/WebRoot/theme/img/top_left_al.gif
--------------------------------------------------------------------------------
/WebRoot/theme/img/ttn1.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JavaGraduationProject/CompanyInternalManagementSystem/ecb60b332ce444c4479874960746568f2ac6a879/WebRoot/theme/img/ttn1.gif
--------------------------------------------------------------------------------
/WebRoot/theme/img/ttn3.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JavaGraduationProject/CompanyInternalManagementSystem/ecb60b332ce444c4479874960746568f2ac6a879/WebRoot/theme/img/ttn3.gif
--------------------------------------------------------------------------------
/WebRoot/tongxunlu/tongxunluadd.jsp:
--------------------------------------------------------------------------------
1 |
85 |
--------------------------------------------------------------------------------
/WebRoot/tongxunlu/tongxunlulist.jsp:
--------------------------------------------------------------------------------
1 |
111 |
--------------------------------------------------------------------------------
/WebRoot/tongxunlu/tongxunluupdate.jsp:
--------------------------------------------------------------------------------
1 |
83 |
--------------------------------------------------------------------------------
/WebRoot/uploadfile/20131107012558.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JavaGraduationProject/CompanyInternalManagementSystem/ecb60b332ce444c4479874960746568f2ac6a879/WebRoot/uploadfile/20131107012558.zip
--------------------------------------------------------------------------------
/WebRoot/uploadfile/20131107012558_系统说明_sql.txt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JavaGraduationProject/CompanyInternalManagementSystem/ecb60b332ce444c4479874960746568f2ac6a879/WebRoot/uploadfile/20131107012558_系统说明_sql.txt
--------------------------------------------------------------------------------
/WebRoot/uploadfile/readme.txt:
--------------------------------------------------------------------------------
1 | 该目录切勿删除,用来存放上传的文件!!
2 |
--------------------------------------------------------------------------------
/WebRoot/user/password.jsp:
--------------------------------------------------------------------------------
1 | <%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
2 | <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
3 | <%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
4 | <%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
5 | <%
6 | String path = request.getContextPath();
7 | String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
8 | %>
9 |
10 |
11 |
22 |
23 |
57 |
58 |
59 |
60 |
61 |
修改密码
62 |
63 |
64 |
65 |
66 |
115 |
116 |
117 |
--------------------------------------------------------------------------------
/WebRoot/wendang/wendangadd.jsp:
--------------------------------------------------------------------------------
1 | <%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
2 | <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
3 | <%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
4 | <%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
5 | <%
6 | String path = request.getContextPath();
7 | String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
8 | %>
9 |
10 |
11 |
22 |
31 |
32 |
33 |
添加文档
34 |
35 |
36 |
37 |
38 |
39 |
109 |
110 |
111 |
--------------------------------------------------------------------------------
/WebRoot/wendang/wendangupdate3.jsp:
--------------------------------------------------------------------------------
1 | <%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
2 | <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
3 | <%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
4 | <%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
5 | <%
6 | String path = request.getContextPath();
7 | String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
8 | %>
9 |
10 |
11 |
22 |
23 |
24 |
25 |
26 |
查看文档
27 |
28 |
29 |
30 |
31 |
67 |
68 |
69 |
--------------------------------------------------------------------------------
/WebRoot/youjian/youjianadd.jsp:
--------------------------------------------------------------------------------
1 | <%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
2 | <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
3 | <%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
4 | <%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
5 | <%
6 | String path = request.getContextPath();
7 | String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
8 | %>
9 |
10 |
11 |
22 |
23 |
24 |
25 |
26 |
发消息
27 |
28 |
29 |
30 |
82 |
83 |
84 |
--------------------------------------------------------------------------------
/WebRoot/youjian/youjianlist.jsp:
--------------------------------------------------------------------------------
1 | <%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
2 | <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
3 | <%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
4 | <%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
5 | <%
6 | String path = request.getContextPath();
7 | String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
8 | %>
9 |
10 |
11 |
22 |
23 |
41 |
42 |
43 |
发件箱
44 |
45 |
58 |
59 |
60 |
61 |
62 |
63 | 阅读状态
64 | |
65 |
66 | 消息标题
67 | |
68 |
69 | 发送时间
70 | |
71 |
72 | 操作
73 | |
74 |
75 |
76 |
77 |
78 | ${bean.readzhuangtai }
79 | |
80 |
81 |
82 | ${bean.title }
83 | |
84 |
85 | ${fn:substring(bean.createtime,0, 19)}
86 | |
87 |
88 |
89 |
90 | 查看消息
91 |
92 | 删除消息
93 | |
94 |
95 |
96 |
97 |
98 | ${pagerinfo }
99 | |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
--------------------------------------------------------------------------------
/WebRoot/youjian/youjianlist2.jsp:
--------------------------------------------------------------------------------
1 | <%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
2 | <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
3 | <%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
4 | <%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
5 | <%
6 | String path = request.getContextPath();
7 | String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
8 | %>
9 |
10 |
11 |
22 |
23 |
41 |
42 |
43 |
44 |
收件箱
45 |
46 |
60 |
61 |
62 |
63 |
64 |
65 |
66 | 阅读状态
67 | |
68 |
69 | 消息标题
70 | |
71 |
72 | 发送时间
73 | |
74 |
75 | 操作
76 | |
77 |
78 |
79 |
80 |
81 | ${bean.readzhuangtai }
82 | |
83 |
84 |
85 | ${bean.title }
86 | |
87 |
88 | ${fn:substring(bean.createtime,0, 19)}
89 | |
90 |
91 |
92 |
93 | 查看消息
94 |
95 | 回复消息
96 |
97 | 删除消息
98 | |
99 |
100 |
101 |
102 |
103 | ${pagerinfo }
104 | |
105 |
106 |
107 |
108 |
109 |
110 |
111 |
112 |
--------------------------------------------------------------------------------
/WebRoot/youjian/youjianupdate.jsp:
--------------------------------------------------------------------------------
1 | <%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
2 | <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
3 | <%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
4 | <%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
5 | <%
6 | String path = request.getContextPath();
7 | String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
8 | %>
9 |
10 |
11 |
22 |
23 |
24 |
25 |
26 |
回复消息
27 |
28 |
29 |
77 |
78 |
79 |
--------------------------------------------------------------------------------
/WebRoot/youjian/youjianupdate3.jsp:
--------------------------------------------------------------------------------
1 | <%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
2 | <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
3 | <%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
4 | <%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
5 | <%
6 | String path = request.getContextPath();
7 | String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
8 | %>
9 |
10 |
11 |
22 |
23 |
24 |
25 |
26 |
查看消息
27 |
28 |
29 |
30 |
31 |
87 |
88 |
89 |
--------------------------------------------------------------------------------
/src/dao/BumenDao.java:
--------------------------------------------------------------------------------
1 | package dao;
2 |
3 | import java.util.List;
4 |
5 | import model.Bumen;
6 |
7 |
8 | public interface BumenDao {
9 |
10 |
11 |
12 | public void insertBean(Bumen Bumen);
13 |
14 | public void deleteBean(Bumen Bumen);
15 |
16 | public void updateBean(Bumen Bumen);
17 |
18 | public Bumen selectBean(String where);
19 |
20 | public List
selectBeanList(final int start, final int limit,final String where);
21 |
22 | public int selectBeanCount(final String where);
23 |
24 |
25 | }
26 |
--------------------------------------------------------------------------------
/src/dao/GongzuorizhiDao.java:
--------------------------------------------------------------------------------
1 | package dao;
2 |
3 | import java.util.List;
4 |
5 | import model.Gongzuorizhi;
6 |
7 |
8 | public interface GongzuorizhiDao {
9 |
10 |
11 |
12 | public void insertBean(Gongzuorizhi Gongzuorizhi);
13 |
14 | public void deleteBean(Gongzuorizhi Gongzuorizhi);
15 |
16 | public void updateBean(Gongzuorizhi Gongzuorizhi);
17 |
18 | public Gongzuorizhi selectBean(String where);
19 |
20 | public List selectBeanList(final int start, final int limit,final String where);
21 |
22 | public int selectBeanCount(final String where);
23 |
24 |
25 | }
26 |
--------------------------------------------------------------------------------
/src/dao/InfoDao.java:
--------------------------------------------------------------------------------
1 | package dao;
2 |
3 | import java.util.List;
4 |
5 | import model.Info;
6 |
7 |
8 | public interface InfoDao {
9 |
10 |
11 |
12 | public void insertBean(Info Info);
13 |
14 | public void deleteBean(Info Info);
15 |
16 | public void updateBean(Info Info);
17 |
18 | public Info selectBean(String where);
19 |
20 | public List selectBeanList(final int start, final int limit,final String where);
21 |
22 | public int selectBeanCount(final String where);
23 |
24 |
25 | }
26 |
--------------------------------------------------------------------------------
/src/dao/KaoqinDao.java:
--------------------------------------------------------------------------------
1 | package dao;
2 |
3 | import java.util.List;
4 |
5 | import model.Kaoqin;
6 |
7 |
8 | public interface KaoqinDao {
9 |
10 |
11 |
12 | public void insertBean(Kaoqin Kaoqin);
13 |
14 | public void deleteBean(Kaoqin Kaoqin);
15 |
16 | public void updateBean(Kaoqin Kaoqin);
17 |
18 | public Kaoqin selectBean(String where);
19 |
20 | public List selectBeanList(final int start, final int limit,final String where);
21 |
22 | public int selectBeanCount(final String where);
23 |
24 |
25 | }
26 |
--------------------------------------------------------------------------------
/src/dao/RenwuDao.java:
--------------------------------------------------------------------------------
1 | package dao;
2 |
3 | import java.util.List;
4 |
5 | import model.Renwu;
6 |
7 |
8 | public interface RenwuDao {
9 |
10 |
11 |
12 | public void insertBean(Renwu Renwu);
13 |
14 | public void deleteBean(Renwu Renwu);
15 |
16 | public void updateBean(Renwu Renwu);
17 |
18 | public Renwu selectBean(String where);
19 |
20 | public List selectBeanList(final int start, final int limit,final String where);
21 |
22 | public int selectBeanCount(final String where);
23 |
24 |
25 | }
26 |
--------------------------------------------------------------------------------
/src/dao/TongxunluDao.java:
--------------------------------------------------------------------------------
1 | package dao;
2 |
3 | import java.util.List;
4 |
5 | import model.Tongxunlu;
6 |
7 |
8 | public interface TongxunluDao {
9 |
10 |
11 |
12 | public void insertBean(Tongxunlu Tongxunlu);
13 |
14 | public void deleteBean(Tongxunlu Tongxunlu);
15 |
16 | public void updateBean(Tongxunlu Tongxunlu);
17 |
18 | public Tongxunlu selectBean(String where);
19 |
20 | public List selectBeanList(final int start, final int limit,final String where);
21 |
22 | public int selectBeanCount(final String where);
23 |
24 |
25 | }
26 |
--------------------------------------------------------------------------------
/src/dao/UserDao.java:
--------------------------------------------------------------------------------
1 | package dao;
2 |
3 | import java.util.List;
4 |
5 | import model.User;
6 |
7 |
8 | public interface UserDao {
9 |
10 |
11 |
12 | public void insertBean(User User);
13 |
14 | public void deleteBean(User User);
15 |
16 | public void updateBean(User User);
17 |
18 | public User selectBean(String where);
19 |
20 | public List selectBeanList(final int start, final int limit,final String where);
21 |
22 | public int selectBeanCount(final String where);
23 |
24 |
25 | }
26 |
--------------------------------------------------------------------------------
/src/dao/WendangDao.java:
--------------------------------------------------------------------------------
1 | package dao;
2 |
3 | import java.util.List;
4 |
5 | import model.Wendang;
6 |
7 |
8 | public interface WendangDao {
9 |
10 |
11 |
12 | public void insertBean(Wendang Wendang);
13 |
14 | public void deleteBean(Wendang Wendang);
15 |
16 | public void updateBean(Wendang Wendang);
17 |
18 | public Wendang selectBean(String where);
19 |
20 | public List selectBeanList(final int start, final int limit,final String where);
21 |
22 | public int selectBeanCount(final String where);
23 |
24 |
25 | }
26 |
--------------------------------------------------------------------------------
/src/dao/YoujianDao.java:
--------------------------------------------------------------------------------
1 | package dao;
2 |
3 | import java.util.List;
4 |
5 | import model.Youjian;
6 |
7 |
8 | public interface YoujianDao {
9 |
10 |
11 |
12 | public void insertBean(Youjian Youjian);
13 |
14 | public void deleteBean(Youjian Youjian);
15 |
16 | public void updateBean(Youjian Youjian);
17 |
18 | public Youjian selectBean(String where);
19 |
20 | public List selectBeanList(final int start, final int limit,final String where);
21 |
22 | public int selectBeanCount(final String where);
23 |
24 |
25 | }
26 |
--------------------------------------------------------------------------------
/src/dao/impl/BumenDaoImpl.java:
--------------------------------------------------------------------------------
1 | package dao.impl;
2 |
3 | import java.sql.SQLException;
4 | import java.util.List;
5 |
6 | import model.Bumen;
7 |
8 | import org.hibernate.HibernateException;
9 | import org.hibernate.Session;
10 | import org.springframework.orm.hibernate3.HibernateCallback;
11 | import org.springframework.orm.hibernate3.support.HibernateDaoSupport;
12 |
13 | import dao.BumenDao;
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 | public class BumenDaoImpl extends HibernateDaoSupport implements BumenDao{
24 |
25 |
26 | public void deleteBean(Bumen Bumen) {
27 | this.getHibernateTemplate().delete(Bumen);
28 |
29 | }
30 |
31 | public void insertBean(Bumen Bumen) {
32 | this.getHibernateTemplate().save(Bumen);
33 |
34 | }
35 |
36 | @SuppressWarnings("unchecked")
37 | public Bumen selectBean(String where) {
38 | List list = this.getHibernateTemplate().find("from Bumen " +where);
39 | if(list.size()==0){
40 | return null;
41 | }
42 | return list.get(0);
43 | }
44 |
45 | public int selectBeanCount(String where) {
46 | long count = (Long)this.getHibernateTemplate().find("select count(*) from Bumen "+where).get(0);
47 | return (int)count;
48 | }
49 |
50 | @SuppressWarnings("unchecked")
51 | public List selectBeanList(final int start,final int limit,final String where) {
52 | return (List)this.getHibernateTemplate().executeFind(new HibernateCallback() {
53 | public Object doInHibernate(final Session session)throws HibernateException, SQLException {
54 | List list = session.createQuery("from Bumen "+where)
55 | .setFirstResult(start)
56 | .setMaxResults(limit)
57 | .list();
58 | return list;
59 | }
60 | });
61 | }
62 |
63 | public void updateBean(Bumen Bumen) {
64 | this.getHibernateTemplate().update(Bumen);
65 |
66 | }
67 |
68 |
69 | }
70 |
--------------------------------------------------------------------------------
/src/dao/impl/GongzuorizhiDaoImpl.java:
--------------------------------------------------------------------------------
1 | package dao.impl;
2 |
3 | import java.sql.SQLException;
4 | import java.util.List;
5 |
6 | import model.Gongzuorizhi;
7 |
8 | import org.hibernate.HibernateException;
9 | import org.hibernate.Session;
10 | import org.springframework.orm.hibernate3.HibernateCallback;
11 | import org.springframework.orm.hibernate3.support.HibernateDaoSupport;
12 |
13 | import dao.GongzuorizhiDao;
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 | public class GongzuorizhiDaoImpl extends HibernateDaoSupport implements GongzuorizhiDao{
24 |
25 |
26 | public void deleteBean(Gongzuorizhi Gongzuorizhi) {
27 | this.getHibernateTemplate().delete(Gongzuorizhi);
28 |
29 | }
30 |
31 | public void insertBean(Gongzuorizhi Gongzuorizhi) {
32 | this.getHibernateTemplate().save(Gongzuorizhi);
33 |
34 | }
35 |
36 | @SuppressWarnings("unchecked")
37 | public Gongzuorizhi selectBean(String where) {
38 | List list = this.getHibernateTemplate().find("from Gongzuorizhi " +where);
39 | if(list.size()==0){
40 | return null;
41 | }
42 | return list.get(0);
43 | }
44 |
45 | public int selectBeanCount(String where) {
46 | long count = (Long)this.getHibernateTemplate().find("select count(*) from Gongzuorizhi "+where).get(0);
47 | return (int)count;
48 | }
49 |
50 | @SuppressWarnings("unchecked")
51 | public List selectBeanList(final int start,final int limit,final String where) {
52 | return (List)this.getHibernateTemplate().executeFind(new HibernateCallback() {
53 | public Object doInHibernate(final Session session)throws HibernateException, SQLException {
54 | List list = session.createQuery("from Gongzuorizhi "+where)
55 | .setFirstResult(start)
56 | .setMaxResults(limit)
57 | .list();
58 | return list;
59 | }
60 | });
61 | }
62 |
63 | public void updateBean(Gongzuorizhi Gongzuorizhi) {
64 | this.getHibernateTemplate().update(Gongzuorizhi);
65 |
66 | }
67 |
68 |
69 | }
70 |
--------------------------------------------------------------------------------
/src/dao/impl/InfoDaoImpl.java:
--------------------------------------------------------------------------------
1 | package dao.impl;
2 |
3 | import java.sql.SQLException;
4 | import java.util.List;
5 |
6 | import model.Info;
7 |
8 | import org.hibernate.HibernateException;
9 | import org.hibernate.Session;
10 | import org.springframework.orm.hibernate3.HibernateCallback;
11 | import org.springframework.orm.hibernate3.support.HibernateDaoSupport;
12 |
13 | import dao.InfoDao;
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 | public class InfoDaoImpl extends HibernateDaoSupport implements InfoDao{
24 |
25 |
26 | public void deleteBean(Info Info) {
27 | this.getHibernateTemplate().delete(Info);
28 |
29 | }
30 |
31 | public void insertBean(Info Info) {
32 | this.getHibernateTemplate().save(Info);
33 |
34 | }
35 |
36 | @SuppressWarnings("unchecked")
37 | public Info selectBean(String where) {
38 | List list = this.getHibernateTemplate().find("from Info " +where);
39 | if(list.size()==0){
40 | return null;
41 | }
42 | return list.get(0);
43 | }
44 |
45 | public int selectBeanCount(String where) {
46 | long count = (Long)this.getHibernateTemplate().find("select count(*) from Info "+where).get(0);
47 | return (int)count;
48 | }
49 |
50 | @SuppressWarnings("unchecked")
51 | public List selectBeanList(final int start,final int limit,final String where) {
52 | return (List)this.getHibernateTemplate().executeFind(new HibernateCallback() {
53 | public Object doInHibernate(final Session session)throws HibernateException, SQLException {
54 | List list = session.createQuery("from Info "+where)
55 | .setFirstResult(start)
56 | .setMaxResults(limit)
57 | .list();
58 | return list;
59 | }
60 | });
61 | }
62 |
63 | public void updateBean(Info Info) {
64 | this.getHibernateTemplate().update(Info);
65 |
66 | }
67 |
68 |
69 | }
70 |
--------------------------------------------------------------------------------
/src/dao/impl/KaoqinDaoImpl.java:
--------------------------------------------------------------------------------
1 | package dao.impl;
2 |
3 | import java.sql.SQLException;
4 | import java.util.List;
5 |
6 | import model.Kaoqin;
7 |
8 | import org.hibernate.HibernateException;
9 | import org.hibernate.Session;
10 | import org.springframework.orm.hibernate3.HibernateCallback;
11 | import org.springframework.orm.hibernate3.support.HibernateDaoSupport;
12 |
13 | import dao.KaoqinDao;
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 | public class KaoqinDaoImpl extends HibernateDaoSupport implements KaoqinDao{
24 |
25 |
26 | public void deleteBean(Kaoqin Kaoqin) {
27 | this.getHibernateTemplate().delete(Kaoqin);
28 |
29 | }
30 |
31 | public void insertBean(Kaoqin Kaoqin) {
32 | this.getHibernateTemplate().save(Kaoqin);
33 |
34 | }
35 |
36 | @SuppressWarnings("unchecked")
37 | public Kaoqin selectBean(String where) {
38 | List list = this.getHibernateTemplate().find("from Kaoqin " +where);
39 | if(list.size()==0){
40 | return null;
41 | }
42 | return list.get(0);
43 | }
44 |
45 | public int selectBeanCount(String where) {
46 | long count = (Long)this.getHibernateTemplate().find("select count(*) from Kaoqin "+where).get(0);
47 | return (int)count;
48 | }
49 |
50 | @SuppressWarnings("unchecked")
51 | public List selectBeanList(final int start,final int limit,final String where) {
52 | return (List)this.getHibernateTemplate().executeFind(new HibernateCallback() {
53 | public Object doInHibernate(final Session session)throws HibernateException, SQLException {
54 | List list = session.createQuery("from Kaoqin "+where)
55 | .setFirstResult(start)
56 | .setMaxResults(limit)
57 | .list();
58 | return list;
59 | }
60 | });
61 | }
62 |
63 | public void updateBean(Kaoqin Kaoqin) {
64 | this.getHibernateTemplate().update(Kaoqin);
65 |
66 | }
67 |
68 |
69 | }
70 |
--------------------------------------------------------------------------------
/src/dao/impl/RenwuDaoImpl.java:
--------------------------------------------------------------------------------
1 | package dao.impl;
2 |
3 | import java.sql.SQLException;
4 | import java.util.List;
5 |
6 | import model.Renwu;
7 |
8 | import org.hibernate.HibernateException;
9 | import org.hibernate.Session;
10 | import org.springframework.orm.hibernate3.HibernateCallback;
11 | import org.springframework.orm.hibernate3.support.HibernateDaoSupport;
12 |
13 | import dao.RenwuDao;
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 | public class RenwuDaoImpl extends HibernateDaoSupport implements RenwuDao{
24 |
25 |
26 | public void deleteBean(Renwu Renwu) {
27 | this.getHibernateTemplate().delete(Renwu);
28 |
29 | }
30 |
31 | public void insertBean(Renwu Renwu) {
32 | this.getHibernateTemplate().save(Renwu);
33 |
34 | }
35 |
36 | @SuppressWarnings("unchecked")
37 | public Renwu selectBean(String where) {
38 | List list = this.getHibernateTemplate().find("from Renwu " +where);
39 | if(list.size()==0){
40 | return null;
41 | }
42 | return list.get(0);
43 | }
44 |
45 | public int selectBeanCount(String where) {
46 | long count = (Long)this.getHibernateTemplate().find("select count(*) from Renwu "+where).get(0);
47 | return (int)count;
48 | }
49 |
50 | @SuppressWarnings("unchecked")
51 | public List selectBeanList(final int start,final int limit,final String where) {
52 | return (List)this.getHibernateTemplate().executeFind(new HibernateCallback() {
53 | public Object doInHibernate(final Session session)throws HibernateException, SQLException {
54 | List list = session.createQuery("from Renwu "+where)
55 | .setFirstResult(start)
56 | .setMaxResults(limit)
57 | .list();
58 | return list;
59 | }
60 | });
61 | }
62 |
63 | public void updateBean(Renwu Renwu) {
64 | this.getHibernateTemplate().update(Renwu);
65 |
66 | }
67 |
68 |
69 | }
70 |
--------------------------------------------------------------------------------
/src/dao/impl/TongxunluDaoImpl.java:
--------------------------------------------------------------------------------
1 | package dao.impl;
2 |
3 | import java.sql.SQLException;
4 | import java.util.List;
5 |
6 | import model.Tongxunlu;
7 |
8 | import org.hibernate.HibernateException;
9 | import org.hibernate.Session;
10 | import org.springframework.orm.hibernate3.HibernateCallback;
11 | import org.springframework.orm.hibernate3.support.HibernateDaoSupport;
12 |
13 | import dao.TongxunluDao;
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 | public class TongxunluDaoImpl extends HibernateDaoSupport implements TongxunluDao{
24 |
25 |
26 | public void deleteBean(Tongxunlu Tongxunlu) {
27 | this.getHibernateTemplate().delete(Tongxunlu);
28 |
29 | }
30 |
31 | public void insertBean(Tongxunlu Tongxunlu) {
32 | this.getHibernateTemplate().save(Tongxunlu);
33 |
34 | }
35 |
36 | @SuppressWarnings("unchecked")
37 | public Tongxunlu selectBean(String where) {
38 | List list = this.getHibernateTemplate().find("from Tongxunlu " +where);
39 | if(list.size()==0){
40 | return null;
41 | }
42 | return list.get(0);
43 | }
44 |
45 | public int selectBeanCount(String where) {
46 | long count = (Long)this.getHibernateTemplate().find("select count(*) from Tongxunlu "+where).get(0);
47 | return (int)count;
48 | }
49 |
50 | @SuppressWarnings("unchecked")
51 | public List selectBeanList(final int start,final int limit,final String where) {
52 | return (List)this.getHibernateTemplate().executeFind(new HibernateCallback() {
53 | public Object doInHibernate(final Session session)throws HibernateException, SQLException {
54 | List list = session.createQuery("from Tongxunlu "+where)
55 | .setFirstResult(start)
56 | .setMaxResults(limit)
57 | .list();
58 | return list;
59 | }
60 | });
61 | }
62 |
63 | public void updateBean(Tongxunlu Tongxunlu) {
64 | this.getHibernateTemplate().update(Tongxunlu);
65 |
66 | }
67 |
68 |
69 | }
70 |
--------------------------------------------------------------------------------
/src/dao/impl/UserDaoImpl.java:
--------------------------------------------------------------------------------
1 | package dao.impl;
2 |
3 | import java.sql.SQLException;
4 | import java.util.List;
5 |
6 | import model.User;
7 |
8 | import org.hibernate.HibernateException;
9 | import org.hibernate.Session;
10 | import org.springframework.orm.hibernate3.HibernateCallback;
11 | import org.springframework.orm.hibernate3.support.HibernateDaoSupport;
12 |
13 | import dao.UserDao;
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 | public class UserDaoImpl extends HibernateDaoSupport implements UserDao{
24 |
25 |
26 | public void deleteBean(User User) {
27 | this.getHibernateTemplate().delete(User);
28 |
29 | }
30 |
31 | public void insertBean(User User) {
32 | this.getHibernateTemplate().save(User);
33 |
34 | }
35 |
36 | @SuppressWarnings("unchecked")
37 | public User selectBean(String where) {
38 | List list = this.getHibernateTemplate().find("from User " +where);
39 | if(list.size()==0){
40 | return null;
41 | }
42 | return list.get(0);
43 | }
44 |
45 | public int selectBeanCount(String where) {
46 | long count = (Long)this.getHibernateTemplate().find("select count(*) from User "+where).get(0);
47 | return (int)count;
48 | }
49 |
50 | @SuppressWarnings("unchecked")
51 | public List selectBeanList(final int start,final int limit,final String where) {
52 | return (List)this.getHibernateTemplate().executeFind(new HibernateCallback() {
53 | public Object doInHibernate(final Session session)throws HibernateException, SQLException {
54 | List list = session.createQuery("from User "+where)
55 | .setFirstResult(start)
56 | .setMaxResults(limit)
57 | .list();
58 | return list;
59 | }
60 | });
61 | }
62 |
63 | public void updateBean(User User) {
64 | this.getHibernateTemplate().update(User);
65 |
66 | }
67 |
68 |
69 | }
70 |
--------------------------------------------------------------------------------
/src/dao/impl/WendangDaoImpl.java:
--------------------------------------------------------------------------------
1 | package dao.impl;
2 |
3 | import java.sql.SQLException;
4 | import java.util.List;
5 |
6 | import model.Wendang;
7 |
8 | import org.hibernate.HibernateException;
9 | import org.hibernate.Session;
10 | import org.springframework.orm.hibernate3.HibernateCallback;
11 | import org.springframework.orm.hibernate3.support.HibernateDaoSupport;
12 |
13 | import dao.WendangDao;
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 | public class WendangDaoImpl extends HibernateDaoSupport implements WendangDao{
24 |
25 |
26 | public void deleteBean(Wendang Wendang) {
27 | this.getHibernateTemplate().delete(Wendang);
28 |
29 | }
30 |
31 | public void insertBean(Wendang Wendang) {
32 | this.getHibernateTemplate().save(Wendang);
33 |
34 | }
35 |
36 | @SuppressWarnings("unchecked")
37 | public Wendang selectBean(String where) {
38 | List list = this.getHibernateTemplate().find("from Wendang " +where);
39 | if(list.size()==0){
40 | return null;
41 | }
42 | return list.get(0);
43 | }
44 |
45 | public int selectBeanCount(String where) {
46 | long count = (Long)this.getHibernateTemplate().find("select count(*) from Wendang "+where).get(0);
47 | return (int)count;
48 | }
49 |
50 | @SuppressWarnings("unchecked")
51 | public List selectBeanList(final int start,final int limit,final String where) {
52 | return (List)this.getHibernateTemplate().executeFind(new HibernateCallback() {
53 | public Object doInHibernate(final Session session)throws HibernateException, SQLException {
54 | List list = session.createQuery("from Wendang "+where)
55 | .setFirstResult(start)
56 | .setMaxResults(limit)
57 | .list();
58 | return list;
59 | }
60 | });
61 | }
62 |
63 | public void updateBean(Wendang Wendang) {
64 | this.getHibernateTemplate().update(Wendang);
65 |
66 | }
67 |
68 |
69 | }
70 |
--------------------------------------------------------------------------------
/src/dao/impl/YoujianDaoImpl.java:
--------------------------------------------------------------------------------
1 | package dao.impl;
2 |
3 | import java.sql.SQLException;
4 | import java.util.List;
5 |
6 | import model.Youjian;
7 |
8 | import org.hibernate.HibernateException;
9 | import org.hibernate.Session;
10 | import org.springframework.orm.hibernate3.HibernateCallback;
11 | import org.springframework.orm.hibernate3.support.HibernateDaoSupport;
12 |
13 | import dao.YoujianDao;
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 | public class YoujianDaoImpl extends HibernateDaoSupport implements YoujianDao{
24 |
25 |
26 | public void deleteBean(Youjian Youjian) {
27 | this.getHibernateTemplate().delete(Youjian);
28 |
29 | }
30 |
31 | public void insertBean(Youjian Youjian) {
32 | this.getHibernateTemplate().save(Youjian);
33 |
34 | }
35 |
36 | @SuppressWarnings("unchecked")
37 | public Youjian selectBean(String where) {
38 | List list = this.getHibernateTemplate().find("from Youjian " +where);
39 | if(list.size()==0){
40 | return null;
41 | }
42 | return list.get(0);
43 | }
44 |
45 | public int selectBeanCount(String where) {
46 | long count = (Long)this.getHibernateTemplate().find("select count(*) from Youjian "+where).get(0);
47 | return (int)count;
48 | }
49 |
50 | @SuppressWarnings("unchecked")
51 | public List selectBeanList(final int start,final int limit,final String where) {
52 | return (List)this.getHibernateTemplate().executeFind(new HibernateCallback() {
53 | public Object doInHibernate(final Session session)throws HibernateException, SQLException {
54 | List list = session.createQuery("from Youjian "+where)
55 | .setFirstResult(start)
56 | .setMaxResults(limit)
57 | .list();
58 | return list;
59 | }
60 | });
61 | }
62 |
63 | public void updateBean(Youjian Youjian) {
64 | this.getHibernateTemplate().update(Youjian);
65 |
66 | }
67 |
68 |
69 | }
70 |
--------------------------------------------------------------------------------
/src/hibernate.cfg.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 |
8 |
9 |
10 | DBPool
11 | proxool.xml
12 |
13 | org.hibernate.connection.ProxoolConnectionProvider
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 | false
22 | true
23 |
24 |
25 |
26 | org.hibernate.dialect.MySQL5Dialect
27 |
28 |
29 |
30 |
31 | thread
32 |
33 |
34 | update
35 | root
36 | 123456
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
--------------------------------------------------------------------------------
/src/log4j.properties:
--------------------------------------------------------------------------------
1 | log4j.rootLogger=INFO, stdout
2 | #log4j.rootCategory=INFO, stdout,logfile
3 | #log4j.logger.org.springside=INFO,stdout,logfile
4 | #log4j.logger.org.springside.bookstore.plugins.service=INFO, db
5 |
6 | #define stdout
7 | log4j.appender.stdout=org.apache.log4j.ConsoleAppender
8 | log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
9 | log4j.appender.stdout.layout.ConversionPattern=%d %p [%c] - <%m>%n
10 |
11 | #define logfile
12 | #log4j.appender.logfile=org.apache.log4j.DailyRollingFileAppender
13 | #log4j.appender.logfile.File=${bookstore.root}/WEB-INF/logs/bookstore.log
14 | #log4j.appender.logfile.DatePattern=.yyyy-MM-dd
15 | #log4j.appender.logfile.layout=org.apache.log4j.PatternLayout
16 | #log4j.appender.logfile.layout.ConversionPattern=%d %p [%c] - <%m>%n
17 |
18 | #define db
19 | #log4j.appender.db=org.apache.log4j.jdbc.JDBCAppender
20 | #log4j.appender.db.BufferSize=10
21 | #log4j.appender.db.URL=jdbc:hsqldb:hsql://localhost:9002/bookstore
22 | #log4j.appender.db.driver=org.hsqldb.jdbcDriver
23 | #log4j.appender.db.user=sa
24 | #log4j.appender.db.password=
25 | #log4j.appender.db.sql=INSERT INTO LOG4J_LOG (LOGINID,PRIORITY,LOGDATE,CLASS,METHOD,MSG) VALUES('%X{userId}','%p','%d{yyyy-MM-dd HH:mm:ss}','%C','%M','%m')
26 | #log4j.appender.db.layout=org.apache.log4j.PatternLayout
27 |
--------------------------------------------------------------------------------
/src/model/Bumen.java:
--------------------------------------------------------------------------------
1 | package model;
2 |
3 | import java.io.Serializable;
4 | import javax.persistence.Entity;
5 | import javax.persistence.GeneratedValue;
6 | import javax.persistence.Id;
7 | import javax.persistence.Table;
8 |
9 | @Entity
10 | @Table(name="t_Bumen")
11 | public class Bumen implements Serializable{
12 |
13 | private static final long serialVersionUID = -7141419035239709511L;
14 |
15 | private long id;
16 |
17 | private String bumenming;//部门名称
18 |
19 | private String jianjie;//部门简介
20 |
21 | private String dianhua;//部门联系电话
22 |
23 | private int bumenlock;
24 |
25 |
26 | @Id
27 | @GeneratedValue
28 | public long getId() {
29 | return id;
30 | }
31 |
32 | public void setId(long id) {
33 | this.id = id;
34 | }
35 |
36 | public String getBumenming() {
37 | return bumenming;
38 | }
39 |
40 | public void setBumenming(String bumenming) {
41 | this.bumenming = bumenming;
42 | }
43 |
44 | public String getJianjie() {
45 | return jianjie;
46 | }
47 |
48 | public void setJianjie(String jianjie) {
49 | this.jianjie = jianjie;
50 | }
51 |
52 | public String getDianhua() {
53 | return dianhua;
54 | }
55 |
56 | public void setDianhua(String dianhua) {
57 | this.dianhua = dianhua;
58 | }
59 |
60 | public int getBumenlock() {
61 | return bumenlock;
62 | }
63 |
64 | public void setBumenlock(int bumenlock) {
65 | this.bumenlock = bumenlock;
66 | }
67 |
68 |
69 |
70 | }
71 |
--------------------------------------------------------------------------------
/src/model/Gongzuorizhi.java:
--------------------------------------------------------------------------------
1 | package model;
2 |
3 | import java.io.Serializable;
4 | import javax.persistence.Entity;
5 | import javax.persistence.GeneratedValue;
6 | import javax.persistence.Id;
7 | import javax.persistence.JoinColumn;
8 | import javax.persistence.ManyToOne;
9 | import javax.persistence.Table;
10 |
11 | @Entity
12 | @Table(name="t_Gongzuorizhi")
13 | public class Gongzuorizhi implements Serializable{
14 |
15 | private static final long serialVersionUID = -7141419035239709511L;
16 |
17 | private long id;
18 |
19 | private String content;//工作安排
20 |
21 | private String shijian;//添加时间
22 |
23 | private String title;
24 |
25 | private User user;
26 |
27 | private int gongzuorizhilock;
28 |
29 |
30 | @Id
31 | @GeneratedValue
32 | public long getId() {
33 | return id;
34 | }
35 |
36 | public void setId(long id) {
37 | this.id = id;
38 | }
39 |
40 | public String getContent() {
41 | return content;
42 | }
43 |
44 | public void setContent(String content) {
45 | this.content = content;
46 | }
47 |
48 | public String getShijian() {
49 | return shijian;
50 | }
51 |
52 | public void setShijian(String shijian) {
53 | this.shijian = shijian;
54 | }
55 |
56 | @ManyToOne
57 | @JoinColumn(name="userid")
58 | public User getUser() {
59 | return user;
60 | }
61 |
62 | public void setUser(User user) {
63 | this.user = user;
64 | }
65 |
66 | public int getGongzuorizhilock() {
67 | return gongzuorizhilock;
68 | }
69 |
70 | public void setGongzuorizhilock(int gongzuorizhilock) {
71 | this.gongzuorizhilock = gongzuorizhilock;
72 | }
73 |
74 | public String getTitle() {
75 | return title;
76 | }
77 |
78 | public void setTitle(String title) {
79 | this.title = title;
80 | }
81 |
82 |
83 |
84 |
85 | }
86 |
--------------------------------------------------------------------------------
/src/model/Info.java:
--------------------------------------------------------------------------------
1 | package model;
2 |
3 | import java.io.Serializable;
4 | import java.util.Date;
5 |
6 | import javax.persistence.Entity;
7 | import javax.persistence.GeneratedValue;
8 | import javax.persistence.Id;
9 | import javax.persistence.JoinColumn;
10 | import javax.persistence.ManyToOne;
11 | import javax.persistence.Table;
12 |
13 | @Entity
14 | @Table(name="t_Info")
15 | public class Info implements Serializable{
16 |
17 | private static final long serialVersionUID = -7141419035239709511L;
18 |
19 | private long id;
20 |
21 | private int infolock;
22 |
23 | private String title;
24 |
25 | private String content;
26 |
27 | private Date createtime;
28 |
29 | private User user;
30 |
31 | private Bumen bumen;
32 |
33 | private String leixing;//规章制度,公司新闻,公司通知
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 | public String getLeixing() {
42 | return leixing;
43 | }
44 |
45 | public void setLeixing(String leixing) {
46 | this.leixing = leixing;
47 | }
48 |
49 | @Id
50 | @GeneratedValue
51 | public long getId() {
52 | return id;
53 | }
54 |
55 | public void setId(long id) {
56 | this.id = id;
57 | }
58 |
59 |
60 |
61 | public int getInfolock() {
62 | return infolock;
63 | }
64 |
65 | public void setInfolock(int infolock) {
66 | this.infolock = infolock;
67 | }
68 |
69 | public String getTitle() {
70 | return title;
71 | }
72 |
73 | public void setTitle(String title) {
74 | this.title = title;
75 | }
76 |
77 | public String getContent() {
78 | return content;
79 | }
80 |
81 | public void setContent(String content) {
82 | this.content = content;
83 | }
84 |
85 | @ManyToOne
86 | @JoinColumn(name="userid")
87 | public User getUser() {
88 | return user;
89 | }
90 |
91 | public void setUser(User user) {
92 | this.user = user;
93 | }
94 |
95 | public Date getCreatetime() {
96 | return createtime;
97 | }
98 |
99 | public void setCreatetime(Date createtime) {
100 | this.createtime = createtime;
101 | }
102 |
103 | @ManyToOne
104 | @JoinColumn(name="bumenid")
105 | public Bumen getBumen() {
106 | return bumen;
107 | }
108 |
109 | public void setBumen(Bumen bumen) {
110 | this.bumen = bumen;
111 | }
112 |
113 |
114 |
115 | }
116 |
--------------------------------------------------------------------------------
/src/model/Kaoqin.java:
--------------------------------------------------------------------------------
1 | package model;
2 |
3 | import java.io.Serializable;
4 | import javax.persistence.Entity;
5 | import javax.persistence.GeneratedValue;
6 | import javax.persistence.Id;
7 | import javax.persistence.JoinColumn;
8 | import javax.persistence.ManyToOne;
9 | import javax.persistence.Table;
10 |
11 | @Entity
12 | @Table(name="t_Kaoqin")
13 | public class Kaoqin implements Serializable{
14 |
15 | private static final long serialVersionUID = -7141419035239709511L;
16 |
17 | private long id;
18 |
19 | private int kaoqinlock;
20 |
21 | private User user;
22 |
23 | private String leixing;//上班登记,下班登记,请假登记,出差登记,外出登记
24 |
25 | private String beizhu;//备注
26 |
27 | private String shenhezhuangtai;//审核状态 未审核,审核通过,审核不通过
28 |
29 | private String shenhejieguo;
30 |
31 | private String createtime;
32 |
33 |
34 |
35 | public String getShenhejieguo() {
36 | return shenhejieguo;
37 | }
38 |
39 | public void setShenhejieguo(String shenhejieguo) {
40 | this.shenhejieguo = shenhejieguo;
41 | }
42 |
43 | @Id
44 | @GeneratedValue
45 | public long getId() {
46 | return id;
47 | }
48 |
49 | public void setId(long id) {
50 | this.id = id;
51 | }
52 |
53 | public int getKaoqinlock() {
54 | return kaoqinlock;
55 | }
56 |
57 | public void setKaoqinlock(int kaoqinlock) {
58 | this.kaoqinlock = kaoqinlock;
59 | }
60 |
61 | @ManyToOne
62 | @JoinColumn(name="userid")
63 | public User getUser() {
64 | return user;
65 | }
66 |
67 | public void setUser(User user) {
68 | this.user = user;
69 | }
70 |
71 |
72 |
73 | public String getLeixing() {
74 | return leixing;
75 | }
76 |
77 | public void setLeixing(String leixing) {
78 | this.leixing = leixing;
79 | }
80 |
81 | public String getBeizhu() {
82 | return beizhu;
83 | }
84 |
85 | public void setBeizhu(String beizhu) {
86 | this.beizhu = beizhu;
87 | }
88 |
89 | public String getShenhezhuangtai() {
90 | return shenhezhuangtai;
91 | }
92 |
93 | public void setShenhezhuangtai(String shenhezhuangtai) {
94 | this.shenhezhuangtai = shenhezhuangtai;
95 | }
96 |
97 | public String getCreatetime() {
98 | return createtime;
99 | }
100 |
101 | public void setCreatetime(String createtime) {
102 | this.createtime = createtime;
103 | }
104 |
105 |
106 |
107 |
108 |
109 |
110 |
111 |
112 | }
113 |
--------------------------------------------------------------------------------
/src/model/Renwu.java:
--------------------------------------------------------------------------------
1 | package model;
2 |
3 | import java.io.Serializable;
4 | import javax.persistence.Entity;
5 | import javax.persistence.GeneratedValue;
6 | import javax.persistence.Id;
7 | import javax.persistence.JoinColumn;
8 | import javax.persistence.ManyToOne;
9 | import javax.persistence.Table;
10 |
11 | @Entity
12 | @Table(name="t_Renwu")
13 | public class Renwu implements Serializable{
14 |
15 | private static final long serialVersionUID = -7141419035239709511L;
16 |
17 | private long id;
18 |
19 | private String content;//工作安排
20 |
21 | private String shijian;//完成时间
22 |
23 | private String title;//工作概述
24 |
25 | private User fromuser;
26 |
27 | private User touser;
28 |
29 | private int renwulock;
30 |
31 | private String wanchengqingkuang;//未完成 ,已完成
32 |
33 | private String wanchenghuibao;//完成汇报
34 |
35 | private String wanchengpingggu;//完成评估
36 |
37 |
38 | public String getWanchenghuibao() {
39 | return wanchenghuibao;
40 | }
41 |
42 | public void setWanchenghuibao(String wanchenghuibao) {
43 | this.wanchenghuibao = wanchenghuibao;
44 | }
45 |
46 | @Id
47 | @GeneratedValue
48 | public long getId() {
49 | return id;
50 | }
51 |
52 | public void setId(long id) {
53 | this.id = id;
54 | }
55 |
56 | public String getContent() {
57 | return content;
58 | }
59 |
60 | public void setContent(String content) {
61 | this.content = content;
62 | }
63 |
64 | public String getShijian() {
65 | return shijian;
66 | }
67 |
68 | public void setShijian(String shijian) {
69 | this.shijian = shijian;
70 | }
71 |
72 | public String getTitle() {
73 | return title;
74 | }
75 |
76 | public void setTitle(String title) {
77 | this.title = title;
78 | }
79 |
80 | @ManyToOne
81 | @JoinColumn(name="fromuserid")
82 | public User getFromuser() {
83 | return fromuser;
84 | }
85 |
86 | public void setFromuser(User fromuser) {
87 | this.fromuser = fromuser;
88 | }
89 |
90 | @ManyToOne
91 | @JoinColumn(name="touserid")
92 | public User getTouser() {
93 | return touser;
94 | }
95 |
96 | public void setTouser(User touser) {
97 | this.touser = touser;
98 | }
99 |
100 | public int getRenwulock() {
101 | return renwulock;
102 | }
103 |
104 | public void setRenwulock(int renwulock) {
105 | this.renwulock = renwulock;
106 | }
107 |
108 | public String getWanchengqingkuang() {
109 | return wanchengqingkuang;
110 | }
111 |
112 | public void setWanchengqingkuang(String wanchengqingkuang) {
113 | this.wanchengqingkuang = wanchengqingkuang;
114 | }
115 |
116 | public String getWanchengpingggu() {
117 | return wanchengpingggu;
118 | }
119 |
120 | public void setWanchengpingggu(String wanchengpingggu) {
121 | this.wanchengpingggu = wanchengpingggu;
122 | }
123 |
124 |
125 |
126 |
127 | }
128 |
--------------------------------------------------------------------------------
/src/model/Tongxunlu.java:
--------------------------------------------------------------------------------
1 | package model;
2 |
3 | import java.io.Serializable;
4 | import javax.persistence.Entity;
5 | import javax.persistence.GeneratedValue;
6 | import javax.persistence.Id;
7 | import javax.persistence.JoinColumn;
8 | import javax.persistence.ManyToOne;
9 | import javax.persistence.Table;
10 |
11 | @Entity
12 | @Table(name="t_Tongxunlu")
13 | public class Tongxunlu implements Serializable{
14 |
15 | private static final long serialVersionUID = -7141419035239709511L;
16 |
17 | private long id;
18 |
19 | private String truename;
20 |
21 | private String lianxidianhua;//联系电话
22 |
23 | private String zhuzhi;//住址
24 |
25 | private User user;
26 |
27 |
28 | @Id
29 | @GeneratedValue
30 | public long getId() {
31 | return id;
32 | }
33 |
34 | public void setId(long id) {
35 | this.id = id;
36 | }
37 |
38 | public String getTruename() {
39 | return truename;
40 | }
41 |
42 | public void setTruename(String truename) {
43 | this.truename = truename;
44 | }
45 |
46 | public String getLianxidianhua() {
47 | return lianxidianhua;
48 | }
49 |
50 | public void setLianxidianhua(String lianxidianhua) {
51 | this.lianxidianhua = lianxidianhua;
52 | }
53 |
54 | public String getZhuzhi() {
55 | return zhuzhi;
56 | }
57 |
58 | public void setZhuzhi(String zhuzhi) {
59 | this.zhuzhi = zhuzhi;
60 | }
61 |
62 | @ManyToOne
63 | @JoinColumn(name="userid")
64 | public User getUser() {
65 | return user;
66 | }
67 |
68 | public void setUser(User user) {
69 | this.user = user;
70 | }
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 | }
82 |
--------------------------------------------------------------------------------
/src/model/Wendang.java:
--------------------------------------------------------------------------------
1 | package model;
2 |
3 | import java.io.Serializable;
4 | import java.util.Date;
5 |
6 | import javax.persistence.Entity;
7 | import javax.persistence.GeneratedValue;
8 | import javax.persistence.Id;
9 | import javax.persistence.JoinColumn;
10 | import javax.persistence.ManyToOne;
11 | import javax.persistence.Table;
12 |
13 | @Entity
14 | @Table(name="t_Wendang")
15 | public class Wendang implements Serializable{
16 |
17 | private static final long serialVersionUID = -7141419035239709511L;
18 |
19 | private long id;
20 |
21 | private int wendanglock;
22 |
23 | private String title;
24 |
25 | private String content;
26 |
27 | private Date createtime;
28 |
29 | private User user;
30 |
31 | private Bumen bumen;
32 |
33 | private String path;
34 |
35 |
36 | public String getPath() {
37 | return path;
38 | }
39 |
40 | public void setPath(String path) {
41 | this.path = path;
42 | }
43 |
44 | @Id
45 | @GeneratedValue
46 | public long getId() {
47 | return id;
48 | }
49 |
50 | public void setId(long id) {
51 | this.id = id;
52 | }
53 |
54 |
55 | public String getTitle() {
56 | return title;
57 | }
58 |
59 | public void setTitle(String title) {
60 | this.title = title;
61 | }
62 |
63 | public String getContent() {
64 | return content;
65 | }
66 |
67 | public void setContent(String content) {
68 | this.content = content;
69 | }
70 |
71 | @ManyToOne
72 | @JoinColumn(name="userid")
73 | public User getUser() {
74 | return user;
75 | }
76 |
77 | public void setUser(User user) {
78 | this.user = user;
79 | }
80 |
81 | public Date getCreatetime() {
82 | return createtime;
83 | }
84 |
85 | public void setCreatetime(Date createtime) {
86 | this.createtime = createtime;
87 | }
88 |
89 | @ManyToOne
90 | @JoinColumn(name="bumenid")
91 | public Bumen getBumen() {
92 | return bumen;
93 | }
94 |
95 | public void setBumen(Bumen bumen) {
96 | this.bumen = bumen;
97 | }
98 |
99 | public int getWendanglock() {
100 | return wendanglock;
101 | }
102 |
103 | public void setWendanglock(int wendanglock) {
104 | this.wendanglock = wendanglock;
105 | }
106 |
107 |
108 |
109 |
110 | }
111 |
--------------------------------------------------------------------------------
/src/model/Youjian.java:
--------------------------------------------------------------------------------
1 | package model;
2 |
3 | import java.io.Serializable;
4 | import java.util.Date;
5 |
6 | import javax.persistence.Entity;
7 | import javax.persistence.GeneratedValue;
8 | import javax.persistence.Id;
9 | import javax.persistence.JoinColumn;
10 | import javax.persistence.ManyToOne;
11 | import javax.persistence.Table;
12 |
13 | @Entity
14 | @Table(name="t_Youjian")
15 | public class Youjian implements Serializable{
16 |
17 | private static final long serialVersionUID = -7141419035239709511L;
18 |
19 | private long id;
20 |
21 | private String content;//
22 |
23 | private Date createtime;
24 |
25 | private String title;//
26 |
27 | private User fromuser;
28 |
29 | private User touser;
30 |
31 | private int youjianlock;
32 |
33 | private String readzhuangtai;//未阅读 ,已阅读
34 |
35 |
36 |
37 |
38 |
39 |
40 | @Id
41 | @GeneratedValue
42 | public long getId() {
43 | return id;
44 | }
45 |
46 | public void setId(long id) {
47 | this.id = id;
48 | }
49 |
50 | public String getContent() {
51 | return content;
52 | }
53 |
54 | public void setContent(String content) {
55 | this.content = content;
56 | }
57 |
58 |
59 | public String getTitle() {
60 | return title;
61 | }
62 |
63 | public void setTitle(String title) {
64 | this.title = title;
65 | }
66 |
67 | @ManyToOne
68 | @JoinColumn(name="fromuserid")
69 | public User getFromuser() {
70 | return fromuser;
71 | }
72 |
73 | public void setFromuser(User fromuser) {
74 | this.fromuser = fromuser;
75 | }
76 |
77 | @ManyToOne
78 | @JoinColumn(name="touserid")
79 | public User getTouser() {
80 | return touser;
81 | }
82 |
83 | public void setTouser(User touser) {
84 | this.touser = touser;
85 | }
86 |
87 | public Date getCreatetime() {
88 | return createtime;
89 | }
90 |
91 | public void setCreatetime(Date createtime) {
92 | this.createtime = createtime;
93 | }
94 |
95 | public int getYoujianlock() {
96 | return youjianlock;
97 | }
98 |
99 | public void setYoujianlock(int youjianlock) {
100 | this.youjianlock = youjianlock;
101 | }
102 |
103 | public String getReadzhuangtai() {
104 | return readzhuangtai;
105 | }
106 |
107 | public void setReadzhuangtai(String readzhuangtai) {
108 | this.readzhuangtai = readzhuangtai;
109 | }
110 |
111 |
112 |
113 |
114 |
115 |
116 | }
117 |
--------------------------------------------------------------------------------
/src/proxool.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | DBPool
6 | jdbc:mysql://localhost:3306/graduation_3_bgzdh_db?characterEncoding=utf-8
7 | com.mysql.jdbc.Driver
8 |
9 |
10 |
11 |
12 |
13 | 100
14 |
15 | 30000
16 |
17 | 20
18 |
21 |
22 | select sysdate from dual
23 |
24 |
25 |
--------------------------------------------------------------------------------
/src/spring-actions.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
--------------------------------------------------------------------------------
/src/spring-base.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
10 |
11 |
12 |
13 | classpath:hibernate.cfg.xml
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
--------------------------------------------------------------------------------
/src/spring-dao.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
--------------------------------------------------------------------------------
/src/struts.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 | index.jsp
13 | login.jsp
14 |
15 |
16 |
17 | ${url}
18 | ${url}
19 |
20 |
21 |
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/src/util/Pager.java:
--------------------------------------------------------------------------------
1 | package util;
2 |
3 | /**
4 | * Title: Pager
5 | * Description: 分页工具
6 | */
7 | public class Pager {
8 |
9 | //标准列表分页,用于后台
10 | public static String getPagerNormal(int total, int pagesize, int pagenum,String pageurl,String info) {
11 | int count = total / pagesize;
12 | if (total % pagesize > 0) {
13 | count++;
14 | }
15 | if(pageurl.indexOf("?")>-1){
16 | pageurl = pageurl + "&";
17 | }else{
18 | pageurl = pageurl + "?";
19 | }
20 | StringBuffer buf = new StringBuffer();
21 | buf.append(info+" ");
22 | buf.append(pagenum+"/"+ count +" ");
23 | if (pagenum == 1) {
24 | buf.append("【首页】【上一页】 ");
25 | } else {
26 | buf.append("【首页】【上一页】");
28 | }
29 | int bound1 = ((pagenum - 2) <= 0) ? 1 : (pagenum - 2);
30 | int bound2 = ((pagenum + 2) >= count) ? count : (pagenum + 2);
31 | for (int i = bound1; i <= bound2; i++) {
32 | if (i == pagenum) {
33 | buf.append("" + i
34 | + " ");
35 | } else {
36 | buf.append("" + i
37 | + " ");
38 | }
39 | }
40 | if (bound2 < count) {
41 | buf.append("...");
42 | }
43 | if (pagenum == count||count==0) {
44 | buf.append("【下一页】【尾页】");
45 | } else {
46 | buf.append("【下一页】【尾页】");
49 | }
50 | return buf.toString();
51 | }
52 | }
53 |
--------------------------------------------------------------------------------
/src/util/Util.java:
--------------------------------------------------------------------------------
1 | package util;
2 |
3 | import java.io.BufferedInputStream;
4 | import java.io.BufferedOutputStream;
5 | import java.io.ByteArrayOutputStream;
6 | import java.io.File;
7 | import java.io.FileInputStream;
8 | import java.io.FileOutputStream;
9 | import java.io.InputStream;
10 | import java.io.OutputStream;
11 | import java.text.SimpleDateFormat;
12 | import java.util.Date;
13 |
14 | import javax.servlet.http.HttpServletRequest;
15 |
16 | import model.User;
17 |
18 | import org.apache.tools.zip.ZipEntry;
19 | import org.apache.tools.zip.ZipOutputStream;
20 | import org.springframework.web.context.WebApplicationContext;
21 | import org.springframework.web.context.support.WebApplicationContextUtils;
22 |
23 | import dao.UserDao;
24 |
25 | public class Util {
26 |
27 | public static String getTime() {
28 | SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
29 | Date date = new Date();
30 | return sdf.format(date.getTime());
31 | }
32 |
33 | // 上传文件/复制文件。
34 | public static void copyFile(File src, File dst) {
35 | try {
36 | int BUFFER_SIZE = 16 * 1024;
37 | InputStream in = null;
38 | OutputStream out = null;
39 | try {
40 | in = new BufferedInputStream(new FileInputStream(src),
41 | BUFFER_SIZE);
42 | out = new BufferedOutputStream(new FileOutputStream(dst),
43 | BUFFER_SIZE);
44 | byte[] buffer = new byte[BUFFER_SIZE];
45 | for (int byteRead = 0; (byteRead = in.read(buffer)) > 0;) {
46 | out.write(buffer, 0, byteRead);
47 | }
48 |
49 | } finally {
50 | if (null != in) {
51 | in.close();
52 | }
53 | if (null != out) {
54 | out.close();
55 | }
56 | }
57 | } catch (Exception e) {
58 | e.printStackTrace();
59 | }
60 | }
61 |
62 | public static void createZip(String src, String nilename, String path)
63 | throws Exception {
64 | ByteArrayOutputStream bos = new ByteArrayOutputStream();
65 | ZipOutputStream zipOut = new ZipOutputStream(bos);
66 | zipOut.setEncoding("gbk");
67 |
68 | File file = new File(path, src);
69 | byte[] buffer = new byte[4096];
70 | int bytes_read;
71 | InputStream fis = new FileInputStream(file);
72 | zipOut.putNextEntry(new ZipEntry(src));
73 | while ((bytes_read = fis.read(buffer)) != -1) {
74 | zipOut.write(buffer, 0, bytes_read);
75 | }
76 | zipOut.closeEntry();
77 | fis.close();
78 |
79 | zipOut.close();
80 | FileOutputStream fout = new FileOutputStream(new File(path, nilename));
81 | bos.writeTo(fout);
82 | fout.flush();
83 | fout.close();
84 | }
85 |
86 | //初始化系统
87 | public static void init(HttpServletRequest request){
88 | WebApplicationContext app = WebApplicationContextUtils.getWebApplicationContext(request.getSession().getServletContext());
89 | UserDao userDao = (UserDao)app.getBean("userDao");
90 | User user = userDao.selectBean(" where username='admin' and userlock=0 ");
91 | if(user==null){
92 | user = new User();
93 | user.setPassword("111111");
94 | user.setRole(2);
95 | user.setTruename("总经理");
96 | user.setUsername("admin");
97 | userDao.insertBean(user);
98 | }
99 | }
100 |
101 | }
102 |
--------------------------------------------------------------------------------