GIF GIF demo: home page to get source contact information
Project Summary:
In the past, the management of colleges and universities mainly adopts manual management, there are problems such as information updating is not timely query, change and management information tedious manual management consumes a lot of manpower and material resources. It is very important to study and develop the employment management system for college graduates. This topic is based on Java language and MySQL database using Java Web, Springboot Technology design and development based on Javaweb, Springboot employment information management system for the school to provide a convenient and effective system to manage the employment information of college students this system mainly includes graduate management, enterprise information management, students on information management, information query and other functions to achieve the university biniu, the management of the situation, And the ability to record and query the graduates’ graduation test shows that the system allows stable and reliable application of the system can be conducive to the timely and comprehensive management of the graduates’ employment information, but also saves a lot of time and energy for the managers.
Main technologies and software:
Main technology: Springboot + Mybatis +mysql+ Layui +templates, etc
Software tools: JDK1.8+ IDEA + Navicat, etc
Project function realization:
User login:
\
Front-end login HTML style
<! DOCTYPE html> <html> <head th:include="include/commoncss::commoncss(~{::link})"> <link rel="stylesheet" href="/resources/css/login.css"> </head> <body> <div class="login-content"> <div class="layui-row"> <div Class ="layui-col-md12"> <div class="layui-row"> <div class=" layui-col-MD12 login-promt"> <span> Employment management system </span> </div> <div class="layui-col-md12"> <form class="layui-form" action=""> <div class="layui-form-item"> <label class="layui-form-label"><i class="layui-icon layui-icon-username"></i></label> <div class="layui-input-block"> <input Type ="text" name="userAccount" required lay-verify="required" placeholder=" Please input account "autocomplete="off" class="layui-input"> </div> </div> <div class="layui-form-item"> <label class="layui-form-label"><i class="layui-icon layui-icon-password"></i></label> <div class="layui-input-block"> <input type="password" name="userPwd" required Lay-verify ="required" placeholder=" please input the password "autocomplete="off" class="layui-input"> </div> </div> <div class="layui-form-item"> <div class="layui-input-block"> <button type="button" class="layui-btn" lay-submit="" Lay - the filter = "formLogin" > login < / button > < / div > < / div > < / form > < / div > < / div > < / div > < / div > < / div > < div th:include="include/commonjs::commonjs(~{::script})"> <script type="text/javascript" src="/resources/js/system/home/login.js"></script> </div> </body> </html>Copy the code
Background Java Controller login interface implementation
@ResponseBody @RequestMapping("/employment/login") public CommonResult<User> login(User user){ user.setUserPwd(MD5Util.getMD5(user.getUserPwd())); User loginUser = userService.getUserByAccount(user.getUserAccount()); if(loginUser == null || ! LoginUser. GetUserPwd (.) the equals (user getUserPwd ())) {return CommonResult. GenerateFailureResult (" account or password is incorrect ", 1, null); }else{ return CommonResult.generateSuccessResult(1, loginUser); }}Copy the code
Administrator homepage:
The login page and administrator page are used to manage employment information, statistics about employment information, user information, and exit.
Background main code implementation:
After successful login, the system switches to the background employment information list page to display data
\
import java.util.UUID; @Controller public class EmploymentInfoController { @Autowired EmploymentInfoService employmentInfoService; @RequestMapping({"/employment/index", "/employment/employmentinfo"}) public String index(){ return "system/employmentinfo/employmentinfo"; } @ResponseBody @RequestMapping("/employment/getallinfo") public CommonResult<List<EmploymentInfo>> getAllInfo(EmploymentInfo employmentInfo, @RequestParam("limit") int pageSize, @RequestParam("page") int pageNum){ List<EmploymentInfo> infoList = employmentInfoService.getAllEmploymentInfo(employmentInfo, pageNum, pageSize); CommonResult<List<EmploymentInfo>> rtInfoResult = CommonResult.generateSuccessResult(infoList.size(), infoList); return rtInfoResult; } @ResponseBody @RequestMapping("/employment/getinfo") public CommonResult<List<EmploymentInfo>> getinfo(EmploymentInfo info, @RequestParam("limit") int pageSize, @RequestParam("page") int pageNum){ List<EmploymentInfo> infoList = employmentInfoService.getEmploymentInfo(info, pageNum, pageSize); CommonResult<List<EmploymentInfo>> rtInfoResult = CommonResult.generateSuccessResult(infoList.size(), infoList); return rtInfoResult; } @ResponseBody @RequestMapping("/employment/addinfo") public CommonResult<Integer> addInfo(EmploymentInfo info){ info.setInformationId(UUID.randomUUID().toString()); employmentInfoService.addEmploymentInfo(info); return CommonResult.generateSuccessResult(1, 1); } @ResponseBody @RequestMapping("/employment/updateinfo") public CommonResult<Integer> updateInfo(EmploymentInfo info){ employmentInfoService.updateEmploymentInfo(info); return CommonResult.generateSuccessResult(1, 1); } @ResponseBody @RequestMapping("/employment/delinfo/{infoId}") public CommonResult<Integer> delInfo(@PathVariable("infoId") String infoId){ employmentInfoService.deleteEmploymentInfo(infoId); return CommonResult.generateSuccessResult(1, 1); }}Copy the code
Add employment information:
Add employment information code blocks to the front end
<!DOCTYPE html>
<html >
<head th:include="include/commoncss::commoncss(~{})">
</head>
<body class="layui-layout-body">
<div class="layui-layout layui-layout-admin">
<div th:replace="include/header::header"></div>
<!--查询条件-->
<fieldset class="layui-elem-field layui-field-title" style="margin-top: 15px;">
<legend>搜索条件</legend>
</fieldset>
<form action="" method="post" id="searchinfo" lay-filter="searchinfo" class="layui-form">
<div class="layui-form-item">
<div class="layui-inline">
<label class="layui-form-label">专业</label>
<div class="layui-input-inline">
<input type="text" name="studentMajor" class="layui-input input-radius"
placeholder="请输入专业名称">
</div>
</div>
<div class="layui-inline">
<label class="layui-form-label">班级</label>
<div class="layui-input-inline">
<input type="text" name="studentClass" class="layui-input input-radius"
placeholder="请输入班级名称">
</div>
</div>
<div class="layui-inline">
<label class="layui-form-label">性别</label>
<div class="layui-input-inline">
<input type="text" name="studentGender" class="layui-input input-radius"
placeholder="请输入学生性别">
</div>
</div>
<div class="layui-inline">
<label class="layui-form-label">企业</label>
<div class="layui-input-inline">
<input type="text" name="companyName" class="layui-input input-radius"
placeholder="请输入企业名称">
</div>
</div>
<div class="layui-inline">
<label class="layui-form-label">岗位</label>
<div class="layui-input-inline">
<input type="text" name="employmentStation" class="layui-input input-radius"
placeholder="请输入岗位名称">
</div>
</div>
<div class="layui-inline" style="padding-left: 3%">
<button type="button" class="layui-btn layui-btn-sm layui-btn-radius" lay-submit="" lay-filter="doSearch"><i
class="layui-icon layui-icon-search layui-icon-normal"></i>查询
</button>
<button type="reset" class="layui-btn layui-btn-sm layui-btn-radius layui-btn-warm"><i
class="layui-icon layui-icon-refresh"></i><span>重置</span>
</button>
</div>
</div>
</form>
<!-- 用户列表 -->
<div>
<table class="layui-hide" id="infoList" lay-filter="infoList"></table>
</div>
<!-- 表格操作 -->
<script type="text/html" id="infoToolBar">
<button type="button" lay-event="infoAdd" class="layui-btn layui-btn-sm layui-btn-normal layui-btn-radius">
<i class="layui-icon layui-icon-add-1"></i>添加就业信息
</button>
</script>
<!-- 用户操作 -->
<script type="text/html" id="infoListOpt">
<a class="layui-btn layui-btn-xs" lay-event="infoEdit">编辑</a>
<a class="layui-btn layui-btn-xs layui-btn-danger" lay-event="infoDel">删除</a>
</script>
<!-- 添加或修改弹出层 -->
<div style="display: none;padding: 10px;" id="addOrUpdateinfo">
<form action="" method="post" class="layui-form" id="addOrUpdateForm" lay-filter="addOrUpdateForm">
<div class="layui-form-item">
<div class="layui-inline">
<label class="layui-form-label">就业单位</label>
<div class="layui-input-block">
<input type="hidden" name="informationId">
<input type="text" name="companyName" lay-verify="required" autocomplete="off"
class="layui-input input-radius" placeholder="请输入就业单位名称">
</div>
</div>
<div class="layui-inline">
<label class="layui-form-label">就业单位地址</label>
<div class="layui-input-block">
<input type="text" name="companyAddress" lay-verify="required" autocomplete="off"
class="layui-input input-radius" placeholder="请输入就业单位地址">
</div>
</div>
<div class="layui-inline">
<label class="layui-form-label">就业岗位</label>
<div class="layui-input-block">
<input type="text" name="employmentStation" lay-verify="required" autocomplete="off"
class="layui-input input-radius" placeholder="请输入就业岗位">
</div>
</div>
<div class="layui-inline">
<label class="layui-form-label">待遇</label>
<div class="layui-input-block">
<input type="text" name="treatment" lay-verify="required" autocomplete="off"
class="layui-input input-radius" placeholder="请输入待遇">
</div>
</div>
<div class="layui-inline">
<label class="layui-form-label">能力要求</label>
<div class="layui-input-block">
<input type="text" name="abilityRequirement" lay-verify="required" autocomplete="off"
class="layui-input input-radius" placeholder="请输入能力要求">
</div>
</div>
<div class="layui-inline">
<label class="layui-form-label">学生姓名</label>
<div class="layui-input-block">
<input type="text" name="studentName" lay-verify="required" autocomplete="off"
class="layui-input input-radius" placeholder="请输入学生姓名">
</div>
</div>
<div class="layui-inline">
<label class="layui-form-label">学生专业</label>
<div class="layui-input-block">
<input type="text" name="studentMajor" lay-verify="required" autocomplete="off"
class="layui-input input-radius" placeholder="请输入学生专业">
</div>
</div>
<div class="layui-inline">
<label class="layui-form-label">学生性别</label>
<div class="layui-input-block">
<input type="radio" name="studentGender" value="男" title="男" checked>
<input type="radio" name="studentGender" value="女" title="女" >
</div>
</div>
<div class="layui-inline">
<label class="layui-form-label">学生班级</label>
<div class="layui-input-block">
<input type="text" name="studentClass" lay-verify="required" autocomplete="off"
class="layui-input input-radius" placeholder="请输入学生班级">
</div>
</div>
<div class="layui-inline">
<label class="layui-form-label">学生电话</label>
<div class="layui-input-block">
<input type="text" name="studentMobile" lay-verify="required" autocomplete="off"
class="layui-input input-radius" placeholder="请输入学生电话">
</div>
</div>
<div class="layui-inline">
<label class="layui-form-label">就业时间</label>
<div class="layui-input-block">
<input type="text" name="employmentTime" lay-verify="required" autocomplete="off"
class="layui-input input-radius" placeholder="请输入就业时间">
</div>
</div>
<div class="layui-inline">
<label class="layui-form-label">单位联系人</label>
<div class="layui-input-block">
<input type="text" name="companyContactName" lay-verify="required" autocomplete="off"
class="layui-input input-radius" placeholder="请输入单位联系人">
</div>
</div>
<div class="layui-inline">
<label class="layui-form-label">单位联系人电话</label>
<div class="layui-input-block">
<input type="text" name="companyContactMobile" lay-verify="required" autocomplete="off"
class="layui-input input-radius" placeholder="请输入单位联系人电话">
</div>
</div>
</div>
<div class="layui-form-item">
<div class="layui-input-block" style="text-align: center;padding-right: 7%">
<button type="button" class="layui-btn layui-btn-radius" lay-submit="" lay-filter="infoSubmitBtn" id="infoSubmitBtn"><i
class="layui-icon layui-icon-search layui-icon-normal"></i>提交
</button>
<button type="userReset" class="layui-btn layui-btn-radius layui-btn-warm"><i
class="layui-icon layui-icon-refresh"></i><span>重置</span>
</button>
</div>
</div>
</form>
</div>
<div th:include="include/commonjs::commonjs(~{::script})">
<script type="text/javascript" src="/resources/js/common/header.js"></script>
<script type="text/javascript" src="/resources/js/system/employmentinfo/employmentinfo.js"></script>
</div>
</div>
</body>
</html>
Copy the code
Add user information:
\
Database table design:
The users table:
CREATE TABLE `NewTable` ( `user_id` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL , `user_account` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL , `user_name` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL , `user_pwd` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL , 'user_type' int(1) NULL DEFAULT NULL COMMENT '0- administrator, 1- Common user ', PRIMARY KEY (' user_id ')) ENGINE=InnoDB DEFAULT CHARACTER SET= UTf8_bin ROW_FORMAT=COMPACT;Copy the code
Employment Information Form:
CREATE TABLE `NewTable` (
`information_id` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL ,
`company_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL ,
`company_address` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL ,
`employment_station` varchar(128) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL ,
`treatment` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL ,
`ability_requirement` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL ,
`student_name` varchar(32) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL ,
`student_major` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL ,
`student_class` varchar(32) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL ,
`student_mobile` varchar(32) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL ,
`employment_time` date NULL DEFAULT NULL ,
`company_contact_name` varchar(32) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL ,
`company_contact_mobile` varchar(32) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL ,
`student_gender` varchar(10) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL ,
PRIMARY KEY (`information_id`)
)
ENGINE=InnoDB
DEFAULT CHARACTER SET=utf8 COLLATE=utf8_bin
ROW_FORMAT=COMPACT
;
Copy the code
Conclusion:
Through recent knowledge of Java object-oriented programming, front-end knowledge, and the Java Springboot framework, I understand the importance of learning Java. In the process of developing this system, I completed many experiments and tests. During this period of learning and development, I realized that I was already familiar with it and could use it independently. Through the understanding of Java, I found that it does have a lot of convenience, it integrates abstractness, encapsulation, inheritance and polymorphism, realizes code reuse and code extension, improves the efficiency of software development. Learning Java language well is very important for our major, so IN the development process of this project, I tried my best to understand Java programming ideas, master basic skills and learn as much knowledge as possible. My basic purpose of learning programming is to develop the key skills to solve practical problems with programming methods. Java object-oriented programming is a highly practical language. The MVC three-tier architecture of springMVC framework centralizes data access and logical operations into components, enhancing the reuse of the system. The expansibility of the system is greatly improved. As well as front-end jQuery, JS and CSS styles, I can make web page layouts, style adjustments and fonts more accurate.
Get the source code:
View the homepage of the blogger contact to obtain
Moving forward to share:
Excellent practical case of Java Graduation Project 100 Sets