当前位置: 首页 > article >正文

木舟0基础学习Java的第三十三天(OA企业管理系统)

贯穿项目:OA企业管理系统

框架技术:

Springboot  /  Spring  /  SpringMVC  /  MyBatis  /  Shiro

项目构建管理:

maven

数据库:

mysql

前端技术:

html  /  css  /  js  /  jquery  /  jsp

扩展技术:

MyBatis逆向工程

kindeditor富文本编辑控件

My97DatePicker日历插件

echarts图形图表控件

pio导出excel文件工具

SMS短信平台

开发工具:

IntelliJ IDEA 2024.2.0.1

JDK版本:

jdk17

服务器:

tomcat 10


MVC架构-单体

MVC架构

  • MVC注意分为模型,视图,控制器三层
  • 实现了显示模块与功能模块的分离

MVC架构的好处

  • 降低耦合性
  • 分工协作
  • 组件重用 

MVC架构的缺点

  • 增加了系统结构和实现的复杂性 

单体架构和微服务架构视图 (了解)

单体架构

微服务架构 

一.了解项目功能

二.搭建项目框架

三.添加部门

四.查询部门

五.删除部门

六.更新部门

导入oa数据库模板

/*
SQLyog Enterprise v12.08 (32 bit)
MySQL - 8.0.12 : Database - oa
*********************************************************************
*/


/*!40101 SET NAMES utf8 */;

/*!40101 SET SQL_MODE=''*/;

/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;


/*Table structure for table `auditing` */

CREATE TABLE `auditing` (
  `auditid` int(10) NOT NULL AUTO_INCREMENT,
  `expid` int(10) DEFAULT NULL,
  `empid` varchar(10) DEFAULT NULL,
  `result` varchar(10) DEFAULT NULL,
  `auditdesc` varchar(50) DEFAULT NULL,
  `time` date DEFAULT NULL,
  PRIMARY KEY (`auditid`)
) ENGINE=InnoDB AUTO_INCREMENT=14 DEFAULT CHARSET=utf8;

/*Data for the table `auditing` */

insert  into `auditing`(`auditid`,`expid`,`empid`,`result`,`auditdesc`,`time`) values (9,-1985190205,'cao','1','请财务打款','2022-03-31'),(10,-1985190205,'xiaoqiao','1','已打款','2022-03-31'),(11,-1981527373,'cao','1','请总裁审核','2022-03-31'),(12,-1981527373,'admin','1','财务打款吧','2022-03-31'),(13,-1981527373,'xiaoqiao','1','打款完毕,稍后查收','2022-03-31');

/*Table structure for table `dept` */

CREATE TABLE `dept` (
  `deptno` int(3) NOT NULL AUTO_INCREMENT,
  `deptname` varchar(15) DEFAULT NULL,
  `location` varchar(5) DEFAULT NULL,
  PRIMARY KEY (`deptno`)
) ENGINE=InnoDB AUTO_INCREMENT=192 DEFAULT CHARSET=utf8;

/*Data for the table `dept` */

insert  into `dept`(`deptno`,`deptname`,`location`) values (101,'研发部','北京'),(102,'财务部','杭州'),(103,'总裁办','杭州'),(107,'销售部','广州'),(108,'流量推广部','东莞'),(190,'审计部','北京'),(191,'人事部','北京');

/*Table structure for table `duty` */

CREATE TABLE `duty` (
  `dtid` int(10) NOT NULL AUTO_INCREMENT,
  `emprid` varchar(10) DEFAULT NULL,
  `dtdate` date DEFAULT NULL,
  `signintime` varchar(20) DEFAULT NULL,
  `signouttime` varchar(20) DEFAULT NULL,
  PRIMARY KEY (`dtid`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8;

/*Data for the table `duty` */

insert  into `duty`(`dtid`,`emprid`,`dtdate`,`signintime`,`signouttime`) values (1,'admin','2021-06-27','16:29:38','16:29:40'),(2,'san','2022-03-24','21:51:54',NULL),(3,'daqiao','2022-03-26','19:40:13','20:14:46'),(4,'xiaoqiao','2022-03-26',NULL,'20:16:07'),(5,'san','2022-03-26',NULL,'21:53:55');

/*Table structure for table `employee` */

CREATE TABLE `employee` (
  `empid` varchar(10) NOT NULL,
  `password` varchar(100) DEFAULT NULL,
  `deptno` int(3) DEFAULT NULL,
  `posid` int(5) DEFAULT NULL,
  `mgrid` varchar(10) DEFAULT NULL,
  `realname` varchar(12) DEFAULT NULL,
  `sex` char(3) DEFAULT NULL,
  `birthdate` date DEFAULT NULL,
  `hiredate` date DEFAULT NULL,
  `leavedate` date DEFAULT NULL,
  `onduty` int(1) DEFAULT NULL COMMENT '1.在职;0.离职',
  `emptype` int(1) DEFAULT NULL COMMENT '1.管理层;2.普通人员',
  `phone` char(11) DEFAULT NULL,
  `qq` varchar(10) DEFAULT NULL,
  `emercontactperson` varchar(200) DEFAULT NULL,
  `idcard` char(18) DEFAULT NULL,
  `rid` int(5) DEFAULT NULL,
  PRIMARY KEY (`empid`),
  KEY `deptno` (`deptno`),
  KEY `posid` (`posid`),
  CONSTRAINT `employee_ibfk_1` FOREIGN KEY (`deptno`) REFERENCES `dept` (`deptno`),
  CONSTRAINT `employee_ibfk_2` FOREIGN KEY (`posid`) REFERENCES `position` (`posid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

/*Data for the table `employee` */

insert  into `employee`(`empid`,`password`,`deptno`,`posid`,`mgrid`,`realname`,`sex`,`birthdate`,`hiredate`,`leavedate`,`onduty`,`emptype`,`phone`,`qq`,`emercontactperson`,`idcard`,`rid`) values ('admin','123',103,1,NULL,'雷布斯','男','1975-06-12','2010-03-05',NULL,1,1,'13688889999','763387387','13888889999','8978968734',3),('cao','123',102,2,'admin','小曹','男','2021-07-20','2021-11-09',NULL,1,1,NULL,NULL,NULL,NULL,0),('daqiao','123',102,4,'xiaoqiao','大乔','女','1970-05-05','2010-05-19','2100-10-10',1,2,'6543','543','5432','5676',0),('jingjing','f3f9711f0d707463dceaeb399fc54578',102,4,'xiaoqiao','静静','女','2018-03-05','2022-03-07',NULL,1,2,'123123123','12312312','123123123','12312312312',0),('lidan','f3f9711f0d707463dceaeb399fc54578',191,10,'admin','李丹','男','1990-04-18','2016-04-14',NULL,1,1,'678687','234234','34342','23423',2),('san','f3f9711f0d707463dceaeb399fc54578',101,9,'xiaoqiao','三儿','女','2015-03-23','2021-03-08',NULL,1,2,'21321312','123123','3243423422423','123213',0),('xiaoqiao','f3f9711f0d707463dceaeb399fc54578',102,3,'admin','小乔','女','1970-05-18','2010-05-19','2100-10-10',1,1,'765432','53423','234234','234234',1),('zhangliao','f3f9711f0d707463dceaeb399fc54578',101,9,'cao','张辽','男','1996-06-21','2013-07-11',NULL,1,2,'17361188321','23232','12312312311','2323232',0);

/*Table structure for table `expense` */

CREATE TABLE `expense` (
  `expid` int(10) NOT NULL AUTO_INCREMENT,
  `empid` varchar(10) DEFAULT NULL,
  `totalamount` double(10,2) DEFAULT NULL,
  `exptime` date DEFAULT NULL,
  `expdesc` varchar(100) DEFAULT NULL,
  `nextauditor` varchar(10) DEFAULT NULL,
  `lastResult` varchar(20) DEFAULT NULL,
  `status` char(1) DEFAULT NULL,
  PRIMARY KEY (`expid`)
) ENGINE=InnoDB AUTO_INCREMENT=2131616025 DEFAULT CHARSET=utf8;

/*Data for the table `expense` */

insert  into `expense`(`expid`,`empid`,`totalamount`,`exptime`,`expdesc`,`nextauditor`,`lastResult`,`status`) values (-1985190205,'zhangliao',1300.00,'2022-03-31','3月的报销','','已经打款','4'),(-1981527373,'zhangliao',2700.00,'2022-03-31','3月报销补充','','已经打款','4'),(-1977960848,'san',1150.00,'2022-03-29','3月份的报销','xiaoqiao','新提交','1'),(-1959181424,'san',1120.00,'2022-03-29','报销','xiaoqiao','新提交','1'),(-1937900255,'zhangliao',800.00,'2022-03-29','3月报销','admin','新提交','1'),(-1931688063,'zhangliao',1111.00,'2022-03-29','报销','admin','新提交','1'),(-1924553097,'zhangliao',2800.00,'2022-03-31','杂费的补充报销','cao','新提交','1'),(1,'daqiao',300.00,'2021-06-16','6月报销',' ','已打款','4'),(2,'daqiao',3000.00,'2021-06-16','5月报销',' ','已打款','4'),(3,'daqiao',3200.00,'2021-06-16','76543',' ','已打款','4'),(4,'daqiao',1200.00,'2021-06-16','5月报销',' ','已打款','4'),(2131616024,'san',500.00,'2022-03-29','3月的报销','xiaoqiao','新提交','1');

/*Table structure for table `expenseitem` */

CREATE TABLE `expenseitem` (
  `itemid` int(10) NOT NULL AUTO_INCREMENT,
  `expid` int(10) DEFAULT NULL,
  `type` varchar(10) DEFAULT NULL,
  `amount` double(7,2) DEFAULT NULL,
  `itemdesc` varchar(50) DEFAULT NULL,
  PRIMARY KEY (`itemid`)
) ENGINE=InnoDB AUTO_INCREMENT=22 DEFAULT CHARSET=utf8;

/*Data for the table `expenseitem` */

insert  into `expenseitem`(`itemid`,`expid`,`type`,`amount`,`itemdesc`) values (1,1,'1',100.00,'手机流量费'),(2,1,'2',200.00,'墨盒耗材'),(3,2,'4',3000.00,'住房补贴'),(4,3,'5',3200.00,'出差'),(5,4,'1',200.00,'电话费'),(6,4,'3',1000.00,'住宿费'),(7,2131616024,'1',200.00,'电话费'),(8,2131616024,'2',300.00,'耗材费'),(9,-1977960848,'1',100.00,'电话费'),(10,-1977960848,'5',1050.00,'杂费'),(11,-1959181424,'1',120.00,'电话费'),(12,-1959181424,'4',1000.00,'住宿'),(13,-1937900255,'4',500.00,'水电费'),(14,-1937900255,'2',300.00,'耗材费'),(15,-1931688063,'5',1000.00,'杂费'),(16,-1931688063,'2',111.00,'耗材费'),(17,-1985190205,'3',1000.00,'住宿费'),(18,-1985190205,'2',300.00,'杂费'),(19,-1981527373,'3',2200.00,'住宿'),(20,-1981527373,'4',500.00,'水电费'),(21,-1924553097,'5',2800.00,'杂费');

/*Table structure for table `expimage` */

CREATE TABLE `expimage` (
  `imgid` int(10) NOT NULL AUTO_INCREMENT,
  `expid` int(10) DEFAULT NULL,
  `realname` varchar(100) DEFAULT NULL,
  `filename` varchar(100) DEFAULT NULL,
  `filetype` varchar(20) DEFAULT NULL,
  PRIMARY KEY (`imgid`)
) ENGINE=InnoDB AUTO_INCREMENT=17 DEFAULT CHARSET=utf8;

/*Data for the table `expimage` */

insert  into `expimage`(`imgid`,`expid`,`realname`,`filename`,`filetype`) values (1,1,'1.jpg','uploadfiles/7a48ced9-4bce-4c77-ac04-85ca5a0bd7481.jpg','.jpg'),(2,1,'120.jpg','uploadfiles/b5038924-f6eb-423a-ac99-41c230215981120.jpg','.jpg'),(3,2,'0.jpg','uploadfiles/486a380d-a277-487c-b54a-dfcf2c3705100.jpg','.jpg'),(4,3,'0.jpg','uploadfiles/c8c7275e-1eaf-4d12-ae5e-704e04a12ff80.jpg','.jpg'),(5,4,'0.jpg','uploadfiles/669e49a0-47d7-4845-9f18-77231a23ceaa0.jpg','.jpg'),(6,-1977960848,'1.jpg','16485604672917381.jpg','.jpg'),(7,-1977960848,'2.jpg','16485604673352772.jpg','.jpg'),(8,-1959181424,'1.jpg','uploadfiles/16485606550856951.jpg','.jpg'),(9,-1959181424,'2.jpg','uploadfiles/16485606550925612.jpg','.jpg'),(10,-1937900255,'2.jpg','uploadfiles/16485608678950002.jpg','.jpg'),(11,-1937900255,'p_44.jpg','uploadfiles/1648560867897779p_44.jpg','.jpg'),(12,-1931688063,'red.jpg','uploadfiles/1648560930019436red.jpg','.jpg'),(13,-1931688063,'p_51.jpg','uploadfiles/1648560930026619p_51.jpg','.jpg'),(14,-1985190205,'p_44.jpg','uploadfiles/1648732193689759p_44.jpg','.jpg'),(15,-1981527373,'red.jpg','uploadfiles/1648732230315484red.jpg','.jpg'),(16,-1924553097,'f991a7f7362870ba.jpg','uploadfiles/1648732800058264f991a7f7362870ba.jpg','.jpg');

/*Table structure for table `income` */

CREATE TABLE `income` (
  `icid` int(10) NOT NULL AUTO_INCREMENT,
  `amount` int(10) DEFAULT NULL,
  `icdate` date DEFAULT NULL,
  `ictype` varchar(10) DEFAULT NULL,
  `indesc` varchar(100) DEFAULT NULL,
  `userid` varchar(10) DEFAULT NULL,
  PRIMARY KEY (`icid`)
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8;

/*Data for the table `income` */

insert  into `income`(`icid`,`amount`,`icdate`,`ictype`,`indesc`,`userid`) values (1,12000,'2021-06-08','1','人员外包','xiaoqiao'),(2,25000,'2021-06-07','2','项目开发','xiaoqiao'),(3,30000,'2021-06-01','3','技术咨询费','xiaoqiao'),(4,55000,'2021-05-14','4','房租收入','xiaoqiao'),(5,9000,'2021-05-11','2','项目开发','xiaoqiao'),(6,83000,'2021-05-12','2','项目开发','xiaoqiao'),(7,120000,'2021-06-08','1','人员外包','xiaoqiao');

/*Table structure for table `payment` */

CREATE TABLE `payment` (
  `pid` int(10) NOT NULL AUTO_INCREMENT,
  `payempid` varchar(10) DEFAULT NULL,
  `amount` double(10,2) DEFAULT NULL,
  `paytime` date DEFAULT NULL,
  `expid` int(10) DEFAULT NULL,
  `empid` varchar(10) DEFAULT NULL,
  PRIMARY KEY (`pid`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8;

/*Data for the table `payment` */

insert  into `payment`(`pid`,`payempid`,`amount`,`paytime`,`expid`,`empid`) values (1,'xiaoqiao',1200.00,'2021-06-16',4,'daqiao'),(2,'xiaoqiao',5000.00,'2021-06-03',3,'cao'),(3,'xiaoqiao',4000.00,'2021-06-01',2,'xiaoqiao'),(4,'xiaoqiao',3000.00,'2021-06-08',1,'zhangliao'),(5,'xiaoqiao',3500.00,'2021-06-01',1,'admin'),(6,'xiaoqiao',8000.00,'2021-06-01',5,'cao');

/*Table structure for table `position` */

CREATE TABLE `position` (
  `posid` int(5) NOT NULL AUTO_INCREMENT,
  `pname` varchar(15) DEFAULT NULL,
  `pdesc` varchar(100) DEFAULT NULL,
  PRIMARY KEY (`posid`)
) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8;

/*Data for the table `position` */

insert  into `position`(`posid`,`pname`,`pdesc`) values (1,'总裁','全面负责企业运营管理.战略发展部署'),(2,'研发经理','负责研发部门的工作及人员管理'),(3,'财务经理','负责公司财务管理'),(4,'财务人员','辅助财务经理管理公司财务'),(5,'销售经理','负责销售部门的所有管理及人员管理'),(6,'销售人员','负责完成销售工作服从销售经理的管理'),(7,'营销人员','负责营销工作'),(8,'推广人员','负责网络推广工作'),(9,'研发人员','配合研发经理,完成研发工作'),(10,'人事经理','负责公司人事管理');

/*Table structure for table `power` */

CREATE TABLE `power` (
  `pid` int(5) NOT NULL AUTO_INCREMENT,
  `empid` varchar(20) DEFAULT NULL,
  `msg` varchar(100) DEFAULT NULL,
  PRIMARY KEY (`pid`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8;

/*Data for the table `power` */

insert  into `power`(`pid`,`empid`,`msg`) values (1,'admin','审核'),(2,'xiaoqiao','审核'),(3,'lidan','审核'),(4,'cao','审核');

/*Table structure for table `roles` */

CREATE TABLE `roles` (
  `rid` int(5) NOT NULL,
  `rname` varchar(20) DEFAULT NULL,
  PRIMARY KEY (`rid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

/*Data for the table `roles` */

insert  into `roles`(`rid`,`rname`) values (0,'普通员工'),(1,'财务权'),(2,'人事管理'),(3,'超级管理员');

/*Table structure for table `t_user` */

CREATE TABLE `t_user` (
  `uid` varchar(20) NOT NULL,
  `password` varchar(100) DEFAULT NULL,
  `realname` varchar(20) DEFAULT NULL,
  PRIMARY KEY (`uid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

/*Data for the table `t_user` */

insert  into `t_user`(`uid`,`password`,`realname`) values ('cao','123','小曹'),('san','ef833cc8e3455be68e0df56555dddc4d','张辽');

/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;


http://www.kler.cn/a/396525.html

相关文章:

  • Spark RDD sortBy算子什么情况会触发shuffle
  • unity小:shaderGraph不规则涟漪、波纹效果
  • js像循环数组那样循环一个数字,Array.from()
  • 【2025最新计算机毕业设计】基于SpringBoot+Vue电脑在线装机指南教程网站【源码+文档】
  • 谷歌Gemini发布iOS版App,live语音聊天免费用!
  • vue 项目使用 nginx 部署
  • SpringBootCloud 服务注册中心Nacos对服务进行管理
  • 比特币前景再度不明,剧烈波动性恐即将回归
  • C/C++语言基础--initializer_list表达式、tuple元组、pair对组简介
  • vue2将webpack改为vite
  • 《Kotlin实战》-附录
  • 大数据实验9:Spark安装和编程实践
  • Jackson与GSON的深度对比
  • mybatis-plus: mapper-locations: “classpath*:/mapper/**/*.xml“配置!!!解释
  • 初学人工智不理解的名词3
  • 释放高级功能:Nexusflows Athene-V2-Agent在工具使用和代理用例方面超越 GPT-4o
  • 从电动汽车到车载充电器:LM317LBDR2G 线性稳压器在汽车中的多场景应用
  • springboot实现简单的数据查询接口(无实体类)
  • Java项目实战II基于微信小程序的订餐系统(开发文档+数据库+源码)
  • 本机ip地址和网络ip地址一样吗
  • AI服务器SAS硬盘汰换与数据抹除指南
  • HarmonyOS ArkUI(基于ArkTS) 开发布局 (中)
  • 基于STM32智能电流表
  • Python酷库之旅-第三方库Pandas(218)
  • 探索 TraceBoard:统计你的键盘按键使用情况
  • android应用调用c语言的so库