springboot vue工资管理系统源码和答辩PPT论文

  人类现已迈入二十一世纪,科学技术日新月异,经济、资讯等各方面都有了非常大的进步,尤其是资讯与网技术的飞速发展,对政治、经济、军事、文化等各方面都有了极大的影响。

利用电脑网的这些便利,发展一套工资管理系统,将会给员工企业带来更大的效益,而在工资管理效能上,也必然会有很大的方便!这样可以节省大量的人力、时间和金钱。该系统主要包括员工、部门、考勤信息、员工工资、留言。方便了管理员随时随地,只要电脑联网,就能对所有信息进行管理。同时,方便员工查询考勤信息、员工工资

本篇论文对工资管理系统的需求分析、功能设计、系统设计进行了较为详尽的阐述,并对系统的整体设计进行了阐述,并对各功能的实现和主要功能进行了说明,并附上了相应的操作界面图。

关键词工资管理系统

springboot vue工资管理系统源码和答辩PPT论文905

【包调试运行】springboot vue工资管理系统源码和答辩PPT论文


Abstract

Humanity has entered the 21st century, with rapid changes in science and technology, and great progress has been made in various fields such as economy and information. In particular, the rapid development of information and network technology has had a great impact on politics, economy, military, culture, and other aspects.

Using these advantages of the computer network to develop a salary management system will bring greater benefits to employees and enterprises, and in terms of salary management efficiency, there will inevitably be great convenience! This can save a lot of manpower, time, and money. The system mainly includes employee, department, attendance information, employee salary, message, etc. It is convenient for administrators to manage all information anytime and anywhere as long as the computer is connected to the network. At the same time, it is convenient for employees to query attendance information, employee salaries, etc.

This paper describes the requirements analysis, functional design, and system design of the salary management system in more detail, and describes the overall design of the system. It also describes the implementation and main functions of each function, and attaches the corresponding operating interface diagram.

Key words: salary management system;

package com.controller;


import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.pojo.*;
import com.pojo.result.Result;
import com.pojo.result.ResultPage;
import com.service.*;
import org.apache.shiro.SecurityUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import org.springframework.stereotype.Controller;
import org.springframework.web.servlet.ModelAndView;

import java.math.BigDecimal;
import java.util.Collections;
import java.util.Comparator;
import java.util.Date;
import java.util.List;

/**
 * <p>
 * 积分物品表 前端控制器
 * </p>
 *
 * @since 2022-09-06
 */
@RestController
@RequestMapping("/book")
public class BookController {

    @Autowired
    private BookService bookService;

    @Autowired
    private CategoryService categoryService;

    @Autowired
    private CommentService commentService;

    @Autowired
    private UserService userService;

    @Autowired
    private MarkService markService;

    //添加书籍
    @PostMapping("/add")
    public Result add(Book book) {
        User currentUser = (User) SecurityUtils.getSubject().getPrincipal();
        //验证表单信息
        if (bookService.getOne(new LambdaQueryWrapper<Book>().eq(Book::getName, book.getName())) != null) {
            return Result.failure("已有相同名称的书籍,请重新命名");
        } else {
            book.setUserId(currentUser.getId());
            book.setCreateDate(new Date());
            book.setAuthor(currentUser.getName());
            return Result.decide(bookService.save(book));
        }
    }

    //删除书籍
    @PostMapping("/delete")
    public Result delete(@RequestParam(value = "id") String id) {
        return Result.decide(bookService.removeById(id));
    }

    //修改书籍
    @PostMapping("/update")
    public Result update(Book book) {
        Book currentBook = bookService.getById(book.getId());
        //验证表单信息
        if (bookService.getOne(new LambdaQueryWrapper<Book>().eq(Book::getName, book.getName())) != null
                && !book.getName().equals(currentBook.getName())) {
            return Result.failure("已有相同名称的商品,请重新命名");
        } else {
            return Result.decide(bookService.updateById(book));
        }
    }

    //根据id获取书籍
    @PostMapping("/getOne")
    public Result getOne(@RequestParam(value = "id") String id) {
        return Result.success(bookService.getById(id));
    }

    //条件分页获取
    @RequestMapping("/getAll")
    public ResultPage getAll(@RequestParam(value = "userName", required = false) String userName,
                             @RequestParam(value = "bookName", required = false) String bookName,
                             @RequestParam(value = "categoryId", required = false) String categoryId,
                             @RequestParam(value = "page") Integer page,
                             @RequestParam(value = "limit") Integer limit) {
        //分页条件
        PageHelper.startPage(page, limit);
        //获取当前用户信息
        User currentUser = (User) SecurityUtils.getSubject().getPrincipal();
        List<Book> ls = bookService.getAll(userName, bookName, categoryId, currentUser.getRoleId() == 0 ? null : currentUser.getId());
        PageInfo<Book> pageInfo = new PageInfo<>(ls, limit);
        return new ResultPage(0, (int) pageInfo.getTotal(), pageInfo.getList());
    }

    //首页点击榜数据展示
    @RequestMapping("/listClickRank")
    public Result listClickRank(String num) {
        LambdaQueryWrapper<Book> query = new LambdaQueryWrapper<>();
        query.eq(Book::getStatus, 1)
                .orderByDesc(Book::getHits)
                .last("limit " + num);
        return Result.success(bookService.list(query));
    }

    //展示书籍详情
    @RequestMapping("/getBookDetail/{bookId}")
    public ModelAndView getBookDetail(@PathVariable String bookId) {
    
        ModelAndView mv = new ModelAndView();
        //作品信息
        Book book = bookService.getById(bookId);

        try {
            //点击量+1
            LambdaUpdateWrapper<Book> updateWrapper = new LambdaUpdateWrapper<>();
            updateWrapper
                    .set(Book::getHits, book.getHits() + 1)
                    .eq(Book::getId, bookId);
            bookService.update(updateWrapper);
        } catch (Exception e) {
            e.printStackTrace();
        }
        
        Category category = categoryService.getOne(book.getCategoryId());
        book.setCategoryName(category.getName());
        mv.addObject("book", book);

        //评论信息
        LambdaQueryWrapper<Comment> queryWrapper = new LambdaQueryWrapper<>();
        queryWrapper
                .eq(Comment::getBookId, bookId);
        List<Comment> commentList = commentService.list(queryWrapper);
        for (Comment comment : commentList) {
            User user = userService.getById(comment.getUserId());
            comment.setUserName(user == null ? "历史用户" : user.getName());
        }
        mv.addObject("commentList", commentList);

        //评分
        mv.addObject("mark", markService.selectAvg(bookId));
        mv.setViewName("/index/bookDetail.html");
        return mv;
    }

    //全部作品页面
    @RequestMapping("/bookList")
    public ModelAndView bookList() {
        ModelAndView mv = new ModelAndView();
        mv.setViewName("/index/bookList.html");
        return mv;
    }

    //条件分页获取分类
    @RequestMapping("/searchByPage")
    public Result searchByPage(@RequestParam(value = "keyword", required = false) String keyWord,
                                @RequestParam(value = "catId", required = false) String categoryId,
                                @RequestParam(value = "curr") Integer page,
                                @RequestParam(value = "limit") Integer limit) {
        //分页条件
        PageHelper.startPage(page, limit);
        //获取当前用户信息
        User currentUser = (User) SecurityUtils.getSubject().getPrincipal();
        List<Book> ls = bookService.getAllIndex(keyWord, categoryId);
        PageInfo<Book> pageInfo = new PageInfo<>(ls, limit);
        return Result.success(pageInfo);
    }

    //排行榜页面
    @RequestMapping("/bookRankPage")
    public ModelAndView bookRankPage() {
        ModelAndView mv = new ModelAndView();
        mv.setViewName("/index/bookRank.html");
        return mv;
    }

    //排行榜数据展示
    @RequestMapping("/bookRankList")
    public Result bookRankList(String type) {
        List<Book> ls = null;
        LambdaQueryWrapper<Book> queryWrapper = new LambdaQueryWrapper<>();
        queryWrapper.eq(Book::getStatus, 1)
                .last("limit 30");
        if ("0".equals(type)) {
            //点击榜
            queryWrapper.orderByDesc(Book::getHits);
            ls = bookService.list(queryWrapper);
            for (Book book : ls) {
                Category category = categoryService.getOne(book.getCategoryId());

                Double mark = markService.selectAvg(book.getId());
                BigDecimal b = new BigDecimal(mark);
                book.setMark(b.setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue());
                book.setCategoryName(category.getName());
            }
        } else if ("1".equals(type)){
            //收藏榜
            queryWrapper.orderByDesc(Book::getCollectNum);
            ls = bookService.list(queryWrapper);
            for (Book book : ls) {
                Category category = categoryService.getOne(book.getCategoryId());
                Double mark = markService.selectAvg(book.getId());
                BigDecimal b = new BigDecimal(mark);
                book.setMark(b.setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue());
                book.setCategoryName(category.getName());
            }
        } else {
            //评分榜
            ls = bookService.list(queryWrapper);
            for (Book book : ls) {
                //分类
                Category category = categoryService.getOne(book.getCategoryId());
                book.setCategoryName(category.getName());
                //评分
                Double mark = markService.selectAvg(book.getId());
                BigDecimal b = new BigDecimal(mark);
                book.setMark(b.setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue());
            }
            Collections.sort(ls, (a, b) -> {
                return b.getMark().compareTo(a.getMark());
            });
        }
        return Result.success(ls);
    }

    //作家榜,根据作家的作品的收藏总数排序
    @RequestMapping("/authorRankList")
    public Result authorRankList() {
        LambdaQueryWrapper<User> queryWrapper = new LambdaQueryWrapper<>();
        queryWrapper
                .eq(User::getStatus, 1)
                .eq(User::getRoleId, 1)
                .last("limit 30");
        List<User> ls = userService.list(queryWrapper);

        for (User user : ls) {
            Integer collectNum = bookService.getCollectNum(user.getId());
            user.setAllCollectNums(collectNum == null ? 0 : collectNum);
        }

        Collections.sort(ls, (a, b)->{
            return b.getAllCollectNums() - a.getAllCollectNums();
        });

        return Result.success(ls);
    }

}

package com.controller;

import java.io.File;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import javax.servlet.http.HttpServletRequest;

import org.apache.commons.lang3.StringUtils;
import org.json.JSONObject;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.ResourceUtils;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import com.annotation.IgnoreAuth;
import com.baidu.aip.face.AipFace;
import com.baidu.aip.face.MatchRequest;
import com.baidu.aip.util.Base64Util;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.entity.ConfigEntity;
import com.service.CommonService;
import com.service.ConfigService;
import com.utils.BaiduUtil;
import com.utils.FileUtil;
import com.utils.R;
import com.utils.CommonUtil;
/**
 * 通用接口
 */
@RestController
public class CommonController{
	@Autowired
	private CommonService commonService;

    private static AipFace client = null;
    
    @Autowired
    private ConfigService configService;    
	/**
	 * 获取table表中的column列表(联动接口)
	 * @param table
	 * @param column
	 * @return
	 */
	@IgnoreAuth
	@RequestMapping("/option/{tableName}/{columnName}")
	public R getOption(@PathVariable("tableName") String tableName, @PathVariable("columnName") String columnName,@RequestParam(required = false) String conditionColumn,@RequestParam(required = false) String conditionValue,String level,String parent) {
		Map<String, Object> params = new HashMap<String, Object>();
		params.put("table", tableName);
		params.put("column", columnName);
		if(StringUtils.isNotBlank(level)) {
			params.put("level", level);
		}
		if(StringUtils.isNotBlank(parent)) {
			params.put("parent", parent);
		}
        if(StringUtils.isNotBlank(conditionColumn)) {
            params.put("conditionColumn", conditionColumn);
        }
        if(StringUtils.isNotBlank(conditionValue)) {
            params.put("conditionValue", conditionValue);
        }
		List<String> data = commonService.getOption(params);
		return R.ok().put("data", data);
	}
	
	/**
	 * 根据table中的column获取单条记录
	 * @param table
	 * @param column
	 * @return
	 */
	@IgnoreAuth
	@RequestMapping("/follow/{tableName}/{columnName}")
	public R getFollowByOption(@PathVariable("tableName") String tableName, @PathVariable("columnName") String columnName, @RequestParam String columnValue) {
		Map<String, Object> params = new HashMap<String, Object>();
		params.put("table", tableName);
		params.put("column", columnName);
		params.put("columnValue", columnValue);
		Map<String, Object> result = commonService.getFollowByOption(params);
		return R.ok().put("data", result);
	}
	
	/**
	 * 修改table表的sfsh状态
	 * @param table
	 * @param map
	 * @return
	 */
	@RequestMapping("/sh/{tableName}")
	public R sh(@PathVariable("tableName") String tableName, @RequestBody Map<String, Object> map) {
		map.put("table", tableName);
		commonService.sh(map);
		return R.ok();
	}
	
	/**
	 * 获取需要提醒的记录数
	 * @param tableName
	 * @param columnName
	 * @param type 1:数字 2:日期
	 * @param map
	 * @return
	 */
	@IgnoreAuth
	@RequestMapping("/remind/{tableName}/{columnName}/{type}")
	public R remindCount(@PathVariable("tableName") String tableName, @PathVariable("columnName") String columnName, 
						 @PathVariable("type") String type,@RequestParam Map<String, Object> map) {
		map.put("table", tableName);
		map.put("column", columnName);
		map.put("type", type);
		
		if(type.equals("2")) {
			SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
			Calendar c = Calendar.getInstance();
			Date remindStartDate = null;
			Date remindEndDate = null;
			if(map.get("remindstart")!=null) {
				Integer remindStart = Integer.parseInt(map.get("remindstart").toString());
				c.setTime(new Date()); 
				c.add(Calendar.DAY_OF_MONTH,remindStart);
				remindStartDate = c.getTime();
				map.put("remindstart", sdf.format(remindStartDate));
			}
			if(map.get("remindend")!=null) {
				Integer remindEnd = Integer.parseInt(map.get("remindend").toString());
				c.setTime(new Date());
				c.add(Calendar.DAY_OF_MONTH,remindEnd);
				remindEndDate = c.getTime();
				map.put("remindend", sdf.format(remindEndDate));
			}
		}
		
		int count = commonService.remindCount(map);
		return R.ok().put("count", count);
	}
	
	/**
	 * 单列求和
	 */
	@IgnoreAuth
	@RequestMapping("/cal/{tableName}/{columnName}")
	public R cal(@PathVariable("tableName") String tableName, @PathVariable("columnName") String columnName) {
		Map<String, Object> params = new HashMap<String, Object>();
		params.put("table", tableName);
		params.put("column", columnName);
		Map<String, Object> result = commonService.selectCal(params);
		return R.ok().put("data", result);
	}
	
	/**
	 * 分组统计
	 */
	@IgnoreAuth
	@RequestMapping("/group/{tableName}/{columnName}")
	public R group(@PathVariable("tableName") String tableName, @PathVariable("columnName") String columnName) {
		Map<String, Object> params = new HashMap<String, Object>();
		params.put("table", tableName);
		params.put("column", columnName);
		List<Map<String, Object>> result = commonService.selectGroup(params);
		SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
		for(Map<String, Object> m : result) {
			for(String k : m.keySet()) {
				if(m.get(k) instanceof Date) {
					m.put(k, sdf.format((Date)m.get(k)));
				}
			}
		}
		return R.ok().put("data", result);
	}
	
	/**
	 * (按值统计)
	 */
	@IgnoreAuth
	@RequestMapping("/value/{tableName}/{xColumnName}/{yColumnName}")
	public R value(@PathVariable("tableName") String tableName, @PathVariable("yColumnName") String yColumnName, @PathVariable("xColumnName") String xColumnName) {
		Map<String, Object> params = new HashMap<String, Object>();
		params.put("table", tableName);
		params.put("xColumn", xColumnName);
		params.put("yColumn", yColumnName);
		List<Map<String, Object>> result = commonService.selectValue(params);
		SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
		for(Map<String, Object> m : result) {
			for(String k : m.keySet()) {
				if(m.get(k) instanceof Date) {
					m.put(k, sdf.format((Date)m.get(k)));
				}
			}
		}
		return R.ok().put("data", result);
	}

	/**
 	 * (按值统计)时间统计类型
	 */
	@IgnoreAuth
	@RequestMapping("/value/{tableName}/{xColumnName}/{yColumnName}/{timeStatType}")
	public R valueDay(@PathVariable("tableName") String tableName, @PathVariable("yColumnName") String yColumnName, @PathVariable("xColumnName") String xColumnName, @PathVariable("timeStatType") String timeStatType) {
		Map<String, Object> params = new HashMap<String, Object>();
		params.put("table", tableName);
		params.put("xColumn", xColumnName);
		params.put("yColumn", yColumnName);
		params.put("timeStatType", timeStatType);
		List<Map<String, Object>> result = commonService.selectTimeStatValue(params);
		SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
		for(Map<String, Object> m : result) {
			for(String k : m.keySet()) {
				if(m.get(k) instanceof Date) {
					m.put(k, sdf.format((Date)m.get(k)));
				}
			}
		}
		return R.ok().put("data", result);
	}
	


}

评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值