SSM+Vue+Element-UI实现员工工资管理系统

目录

前言介绍

系统展示

前台 

管理员功能

部门信息管理

打卡考勤管理

请假信息管理

工资信息管理

员工绩效管理

员工功能

打卡考勤管理 

请假信息管理

工资信息管理

员工绩效管理 

部分核心代码

工资信息

上传文件

前言介绍

随着科学技术的飞速发展,各行各业都在努力与现代先进技术接轨,通过科技手段提高自身的优势;对于网上办公自动化当然也不能排除在外,随着网络技术的不断成熟,带动了网上办公自动化系统,它彻底改变了过去传统的管理方式,不仅使服务管理难度变低了,还提升了管理的灵活性。这种个性化的平台特别注重交互协调与管理的相互配合,激发了管理人员的创造性与主动性,对网上办公自动化系统而言非常有利。

本系统采用的数据库是Mysql,使用java技术开发,运行环境使用Tomcat服务器,IDEA是本系统的开发平台。在设计过程中,充分保证了系统代码的良好可读性、实用性、易扩展性、通用性、便于后期维护、操作方便以及页面简洁等特点。

系统采用了Java技术SSM框架,前端使用 element-ui 组件库,选择MySQL作为系统的数据库,开发工具选择 idea来进行系统的设计。基本实现了在线小说阅读平台应有的主要功能模块,本系统有以下功能:

(1)前台:首页、公司公告、留言反馈、个人中心、后台管理、在线沟通。 

(2)管理员:首页、个人中心、部门信息管理、员工管理、打卡考勤管理、请假信息管理、补助金申请管理、工资信息管理、考勤扣款管理、员工绩效管理、留言板管理、系统管理。

(3)员工:首页、个人中心、打卡考勤管理、请假信息管理、补助金申请管理、工资信息管理、考勤扣款管理、员工绩效管理。

系统展示

前台 

管理员功能

部门信息管理

打卡考勤管理

请假信息管理

工资信息管理

员工绩效管理

员工功能

打卡考勤管理 

请假信息管理

工资信息管理

员工绩效管理 

部分核心代码

工资信息

/**
 * 工资信息
 * 后端接口
 * @author 
 * @email 
 * @date 2021-02-04 21:05:51
 */
@RestController
@RequestMapping("/gongzixinxi")
public class GongzixinxiController {
    @Autowired
    private GongzixinxiService gongzixinxiService;
    
 
 
    /**
     * 后端列表
     */
    @RequestMapping("/page")
    public R page(@RequestParam Map<String, Object> params,GongzixinxiEntity gongzixinxi, HttpServletRequest request){
 
		String tableName = request.getSession().getAttribute("tableName").toString();
		if(tableName.equals("yuangong")) {
			gongzixinxi.setGonghao((String)request.getSession().getAttribute("username"));
		}
        EntityWrapper<GongzixinxiEntity> ew = new EntityWrapper<GongzixinxiEntity>();
		PageUtils page = gongzixinxiService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, gongzixinxi), params), params));
        return R.ok().put("data", page);
    }
    
    /**
     * 前端列表
     */
    @RequestMapping("/list")
    public R list(@RequestParam Map<String, Object> params,GongzixinxiEntity gongzixinxi, HttpServletRequest request){
        EntityWrapper<GongzixinxiEntity> ew = new EntityWrapper<GongzixinxiEntity>();
		PageUtils page = gongzixinxiService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, gongzixinxi), params), params));
        return R.ok().put("data", page);
    }
 
	/**
     * 列表
     */
    @RequestMapping("/lists")
    public R list( GongzixinxiEntity gongzixinxi){
       	EntityWrapper<GongzixinxiEntity> ew = new EntityWrapper<GongzixinxiEntity>();
      	ew.allEq(MPUtil.allEQMapPre( gongzixinxi, "gongzixinxi")); 
        return R.ok().put("data", gongzixinxiService.selectListView(ew));
    }
 
	 /**
     * 查询
     */
    @RequestMapping("/query")
    public R query(GongzixinxiEntity gongzixinxi){
        EntityWrapper< GongzixinxiEntity> ew = new EntityWrapper< GongzixinxiEntity>();
 		ew.allEq(MPUtil.allEQMapPre( gongzixinxi, "gongzixinxi")); 
		GongzixinxiView gongzixinxiView =  gongzixinxiService.selectView(ew);
		return R.ok("查询工资信息成功").put("data", gongzixinxiView);
    }
	
    /**
     * 后端详情
     */
    @RequestMapping("/info/{id}")
    public R info(@PathVariable("id") Long id){
        GongzixinxiEntity gongzixinxi = gongzixinxiService.selectById(id);
        return R.ok().put("data", gongzixinxi);
    }
 
    /**
     * 前端详情
     */
    @RequestMapping("/detail/{id}")
    public R detail(@PathVariable("id") Long id){
        GongzixinxiEntity gongzixinxi = gongzixinxiService.selectById(id);
        return R.ok().put("data", gongzixinxi);
    }
    
 
 
 
    /**
     * 后端保存
     */
    @RequestMapping("/save")
    public R save(@RequestBody GongzixinxiEntity gongzixinxi, HttpServletRequest request){
    	gongzixinxi.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
    	//ValidatorUtils.validateEntity(gongzixinxi);
 
        gongzixinxiService.insert(gongzixinxi);
        return R.ok();
    }
    
    /**
     * 前端保存
     */
    @RequestMapping("/add")
    public R add(@RequestBody GongzixinxiEntity gongzixinxi, HttpServletRequest request){
    	gongzixinxi.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
    	//ValidatorUtils.validateEntity(gongzixinxi);
 
        gongzixinxiService.insert(gongzixinxi);
        return R.ok();
    }
 
    /**
     * 修改
     */
    @RequestMapping("/update")
    public R update(@RequestBody GongzixinxiEntity gongzixinxi, HttpServletRequest request){
        //ValidatorUtils.validateEntity(gongzixinxi);
        gongzixinxiService.updateById(gongzixinxi);//全部更新
        return R.ok();
    }
    
 
    /**
     * 删除
     */
    @RequestMapping("/delete")
    public R delete(@RequestBody Long[] ids){
        gongzixinxiService.deleteBatchIds(Arrays.asList(ids));
        return R.ok();
    }
    
    /**
     * 提醒接口
     */
	@RequestMapping("/remind/{columnName}/{type}")
	public R remindCount(@PathVariable("columnName") String columnName, HttpServletRequest request, 
						 @PathVariable("type") String type,@RequestParam Map<String, Object> map) {
		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));
			}
		}
		
		Wrapper<GongzixinxiEntity> wrapper = new EntityWrapper<GongzixinxiEntity>();
		if(map.get("remindstart")!=null) {
			wrapper.ge(columnName, map.get("remindstart"));
		}
		if(map.get("remindend")!=null) {
			wrapper.le(columnName, map.get("remindend"));
		}
 
		String tableName = request.getSession().getAttribute("tableName").toString();
		if(tableName.equals("yuangong")) {
			wrapper.eq("gonghao", (String)request.getSession().getAttribute("username"));
		}
 
		int count = gongzixinxiService.selectCount(wrapper);
		return R.ok().put("count", count);
	}
	
 
 
}

上传文件

/**
 * 上传文件映射表
 */
@RestController
@RequestMapping("file")
@SuppressWarnings({"unchecked","rawtypes"})
public class FileController{
	@Autowired
    private ConfigService configService;
	/**
	 * 上传文件
	 */
	@RequestMapping("/upload")
	public R upload(@RequestParam("file") MultipartFile file, String type,HttpServletRequest request) throws Exception {
		if (file.isEmpty()) {
			throw new EIException("上传文件不能为空");
		}
		String fileExt = file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf(".")+1);
		String fileName = new Date().getTime()+"."+fileExt;
		File dest = new File(request.getSession().getServletContext().getRealPath("/upload")+"/"+fileName);
		file.transferTo(dest);
		if(StringUtils.isNotBlank(type) && type.equals("1")) {
			ConfigEntity configEntity = configService.selectOne(new EntityWrapper<ConfigEntity>().eq("name", "faceFile"));
			if(configEntity==null) {
				configEntity = new ConfigEntity();
				configEntity.setName("faceFile");
				configEntity.setValue(fileName);
			} else {
				configEntity.setValue(fileName);
			}
			configService.insertOrUpdate(configEntity);
		}
		return R.ok().put("file", fileName);
	}
	
	/**
	 * 下载文件
	 */
	@IgnoreAuth
	@RequestMapping("/download")
	public void download(@RequestParam String fileName, HttpServletRequest request, HttpServletResponse response) {
		try {
			File file = new File(request.getSession().getServletContext().getRealPath("/upload")+"/"+fileName);
			if (file.exists()) {
				response.reset();
				response.setHeader("Content-Disposition", "attachment; filename=\"" + fileName+"\"");
				response.setHeader("Cache-Control", "no-cache");
				response.setHeader("Access-Control-Allow-Credentials", "true");
				response.setContentType("application/octet-stream; charset=UTF-8");
				IOUtils.write(FileUtils.readFileToByteArray(file), response.getOutputStream());
			}
 
		} catch (IOException e) {
			e.printStackTrace();
		}
	}
	
}

gitCode源码获取入口icon-default.png?t=N7T8https://gitcode.com/yuanmadd/ymgg/blob/main/README.md?init=initTree

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值