教师管理系统java+jsp+servlet+boostart

系统模块描述 
系统模块的描述主要是描述出系统模块的功能和处理。主要是用文字去描述,而不是用图形图描述。
管理员子系统模块如下:

 代码已经上传github,下载地址: https://github.com/21503882/teacher
1、教师管理:对教师的信息进行添加、修改、删除管理。
2、教师工资管理:对教师工资的信息进行添加、修改、删除管理。
3、教师考核管理:对教师考核的信息进行添加、修改、删除管理。
4、教师考勤管理:对教师考勤的信息进行添加、修改、删除管理。
5、教师医保管理:对教师医保的信息进行添加、修改、删除管理。
6、系统维护管理:对系统的管理员帐号信息进行管理。
7、修改密码:登录系统的用户修改个人密码信息。
教师子系统模块如下:
1、教师工资管理:查看教师个人的工资信息。
2、教师考核管理:查看教师个人的考核信息。
3、教师考勤管理:查看教师个人的考核信息。
4、教师医保管理:查看教师个人的医保信息。
5、修改密码:登录系统的用户修改个人密码信息。
管理员子系统的功能结构图4.1所示。

 
图4.1管理员子系统功能模块图

教师子系统的功能结构图4.2所示。

图4.2教师子系统功能模块图
 
图5.1 登录界面
 
图5.2 系统主界面
 
图5.3 管理员管理主页面
 
图5.4添加管理员页面
 
图5.5修改管理员页面
 
图5.6教师管理主界面
 
图5.7添加教师页面
 
图5.8修改教师信息界面
 
图5.9教师工资管理界面
 
图5.10添加教师工资管理界面
 
图5.11教师考核管理主页面
 
图5.12添加教师考核页面
 
图5.13教师考勤管理主页面
 
图5.14添加教师考勤管理页面
 
图5.15教师医保管理主页面
 
图5.15添加教师医保管理页面
 
图5.16 教师子系统主页面
 
图5.17 教师工资页面
 
图5.18 教师考核页面
 
图5.19 教师考勤页面
 
图5.20 教师医保页面
 
图5.21 修改密码页面

import java.util.List;
import java.util.Set;

import javax.servlet.http.HttpSession;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.util.HtmlUtils;

import com.zhihao.tmall.pojo.Product;
import com.zhihao.tmall.pojo.User;
import com.zhihao.tmall.service.CategoryService;
import com.zhihao.tmall.service.OrderItemService;
import com.zhihao.tmall.service.OrderService;
import com.zhihao.tmall.service.ProductService;

/**
 * 用于返回josn数据而非视图名称的控制器
 * 实现动态加载数据
 * @author zzh
 * 2018年8月18日
 */
@Controller
@RequestMapping("jsondata")
public class JsonController {

    @Autowired
    ProductService productService;
    @Autowired
    CategoryService categoryService;
    @Autowired
    OrderService orderService;
    @Autowired
    OrderItemService orderItemService;
    
//    private final static int LIMIT = 1;
    
    /**
     * 在home页中通过下拉滚动条,动态加载数据
     * 根据参数cid每次返回一类产品
     * @param cid 产品所属分类id
     * @return products 该分类下的产品集合
     * 2018年8月26日
     */
    @GetMapping("product/{cid}")
    @ResponseBody
    public List<Product> getProduct(@PathVariable int cid) {
        List<Product> products = productService.list(cid);
        return products;
    }
//    
//    @GetMapping("bought/{status}/{count}")
//    @ResponseBody
//    public List<Order> getOrder(@PathVariable(value="status") String status, 
//            @PathVariable(value="count") int count, HttpSession session) {
//        User user = (User)session.getAttribute("user");
//        List<Order> orders = orderService.list(user.getId(), count, LIMIT, status); 
//        orderItemService.fill(orders);
//        return orders;
//    }
    
    @GetMapping("bought/total/{status}")
    @ResponseBody
    public long getTotal(@PathVariable String status, HttpSession session) {
        User user = (User)session.getAttribute("user");
        long total = orderService.getTotalByUser(user.getId(), status);
        return total;
    }
    
    /**
     * 智能搜索提示
     * Ajax请求的方式实现实时显示后台返回的数据
     * 返回的是产品所属分类的名称非产品名称
     * 因为产品名称较长且为一连串描述性语句,而非名词性短语
     * @param keyword 搜索关键字
     * @return cNames 产品分类名字集合
     * 2018年8月21日
     */
    @GetMapping("searchtip")
    @ResponseBody
    public Set<String> searchTip(@RequestParam String keyword) {
        keyword = HtmlUtils.htmlEscape(keyword);
        // 通过关键字搜索产品,通过产品获得所属分类名称,返回分类名称集合
        List<Product> ps = productService.search(keyword);
        Set<String> cNames = productService.getCategoryName(ps);
        // 根据关键字直接搜索产品所属分类,返回产品分类名称集合
//        List<String> cNames = new ArrayList<>();
//        cNames = categoryService.search(keyword);
        return cNames;
    }
}
 代码已经上传github,下载地址: https://github.com/21503882/teacher

发布了38 篇原创文章 · 获赞 10 · 访问量 4170

猜你喜欢

转载自blog.csdn.net/QQ21503882/article/details/101363261