大家好!我是岛上程序猿,感谢您阅读本文,欢迎一键三连哦。
💞当前专栏:Java毕业设计
精彩专栏推荐👇🏻👇🏻👇🏻
开发运行环境
- 框架:ssm
- JDK版本:JDK1.8
- 服务器:tomcat7
- 数据库:mysql 5.7
- 数据库工具:Navicat12
- 开发软件:eclipse/myeclipse/idea
- Maven包:Maven3.3.9
- 浏览器:谷歌浏览器
源码下载地址:
https://download.csdn.net/download/m0_46388260/89272320
论文目录
【如需全文请按文末获取联系】
一、项目简介
中小型企业财务管理系统是在MySQL中建立数据表保存信息,运用SSM框架和Java语言编写。并按照软件设计开发流程进行设计实现。系统具备友好性且功能完善。管理员管理职工和部门,管理企业资产,经营信息和职工薪资。职工查询和查看企业经营和企业资产信息,查看每月发放给职工的薪资。
二、系统设计
2.1软件功能模块设计
设计的管理员的详细功能见下图,管理员登录进入本人后台之后,管理职工和部门,管理企业资产,经营信息和职工薪资。
设计的职工的详细功能见下图,职工查询和查看企业经营和企业资产信息,查看每月发放给职工的薪资。
2.2数据库设计
(1)设计的薪资实体,其具备的属性见下图。
(2)设计的管理员实体,其具备的属性见下图。
(3)设计的职工实体,其具备的属性见下图。
(4)设计的资产实体,其具备的属性见下图。
(5)设计的各实体间关系见下图。
三、系统项目部分截图
3.1管理员功能实现
职工管理
管理员权限中的职工管理,其运行效果见下图。职工资料包括籍贯,民族,政治面貌,部门等信息,这些信息都需要管理员进行维护,比如修改,比如删除,新来的职工,管理员也需要登记其信息。
薪资管理
管理员权限中的薪资管理,其运行效果见下图。职工每月发放的薪资需要管理员登记和维护,管理员随时可以修改本页面的职工薪资数据。
经营管理
管理员权限中的经营管理,其运行效果见下图。管理员根据经营类型,或者时间段查询经营信息,可以编辑,删除经营信息。
3.2职工功能实现
薪资信息
职工权限中的薪资信息,其运行效果见下图。职工在本页面主要就是查看每月的薪资,可以根据月份查询薪资。
资产信息
职工权限中的资产信息,其运行效果见下图。职工查看固定资产,流动资产等资产类型的资产价值。
经营信息
职工权限中的经营信息,其运行效果见下图。职工查看企业经营的收入与支出类型的详情和金额信息,根据经营类型或时间段查询企业经营信息。
四、部分核心代码
package com.controller;
import java.text.SimpleDateFormat;
import com.alibaba.fastjson.JSONObject;
import java.util.*;
import org.springframework.beans.BeanUtils;
import javax.servlet.http.HttpServletRequest;
import org.springframework.web.context.ContextLoader;
import javax.servlet.ServletContext;
import com.service.TokenService;
import com.utils.StringUtil;
import java.lang.reflect.InvocationTargetException;
import com.service.DictionaryService;
import org.apache.commons.lang3.StringUtils;
import com.annotation.IgnoreAuth;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.entity.XinziEntity;
import com.service.XinziService;
import com.entity.view.XinziView;
import com.service.YonghuService;
import com.entity.YonghuEntity;
import com.utils.PageUtils;
import com.utils.R;
/**
* 薪资
* 后端接口
* @author
* @email
* @date 2021-03-12
*/
@RestController
@Controller
@RequestMapping("/xinzi")
public class XinziController {
private static final Logger logger = LoggerFactory.getLogger(XinziController.class);
@Autowired
private XinziService xinziService;
@Autowired
private TokenService tokenService;
@Autowired
private DictionaryService dictionaryService;
//级联表service
@Autowired
private YonghuService yonghuService;
/**
* 后端列表
*/
@RequestMapping("/page")
public R page(@RequestParam Map<String, Object> params, HttpServletRequest request){
logger.debug("page方法:,,Controller:{},,params:{}",this.getClass().getName(),JSONObject.toJSONString(params));
String role = String.valueOf(request.getSession().getAttribute("role"));
if(StringUtil.isNotEmpty(role) && "用户".equals(role)){
params.put("yonghuId",request.getSession().getAttribute("userId"));
}
PageUtils page = xinziService.queryPage(params);
//字典表数据转换
List<XinziView> list =(List<XinziView>)page.getList();
for(XinziView c:list){
//修改对应字典表字段
dictionaryService.dictionaryConvert(c);
}
return R.ok().put("data", page);
}
/**
* 后端详情
*/
@RequestMapping("/info/{id}")
public R info(@PathVariable("id") Long id){
logger.debug("info方法:,,Controller:{},,id:{}",this.getClass().getName(),id);
XinziEntity xinzi = xinziService.selectById(id);
if(xinzi !=null){
//entity转view
XinziView view = new XinziView();
BeanUtils.copyProperties( xinzi , view );//把实体数据重构到view中
//级联表
YonghuEntity yonghu = yonghuService.selectById(xinzi.getYonghuId());
if(yonghu != null){
BeanUtils.copyProperties( yonghu , view ,new String[]{ "id", "createDate"});//把级联的数据添加到view中,并排除id和创建时间字段
view.setYonghuId(yonghu.getId());
}
//修改对应字典表字段
dictionaryService.dictionaryConvert(view);
return R.ok().put("data", view);
}else {
return R.error(511,"查不到数据");
}
}
/**
* 后端保存
*/
@RequestMapping("/save")
public R save(@RequestBody XinziEntity xinzi, HttpServletRequest request){
logger.debug("save方法:,,Controller:{},,xinzi:{}",this.getClass().getName(),xinzi.toString());
Wrapper<XinziEntity> queryWrapper = new EntityWrapper<XinziEntity>()
.eq("yonghu_id", xinzi.getYonghuId())
.eq("month", xinzi.getMonth())
;
logger.info("sql语句:"+queryWrapper.getSqlSegment());
XinziEntity xinziEntity = xinziService.selectOne(queryWrapper);
if(xinziEntity==null){
xinzi.setCreateTime(new Date());
// String role = String.valueOf(request.getSession().getAttribute("role"));
// if("".equals(role)){
// xinzi.set
// }
xinziService.insert(xinzi);
return R.ok();
}else {
return R.error(511,"该员工本月已经工资记录");
}
}
/**
* 修改
*/
@RequestMapping("/update")
public R update(@RequestBody XinziEntity xinzi, HttpServletRequest request){
logger.debug("update方法:,,Controller:{},,xinzi:{}",this.getClass().getName(),xinzi.toString());
//根据字段查询是否有相同数据
Wrapper<XinziEntity> queryWrapper = new EntityWrapper<XinziEntity>()
.notIn("id",xinzi.getId())
.eq("yonghu_id", xinzi.getYonghuId())
.eq("month", xinzi.getMonth())
;
logger.info("sql语句:"+queryWrapper.getSqlSegment());
XinziEntity xinziEntity = xinziService.selectOne(queryWrapper);
if(xinziEntity==null){
// String role = String.valueOf(request.getSession().getAttribute("role"));
// if("".equals(role)){
// xinzi.set
// }
xinziService.updateById(xinzi);//根据id更新
return R.ok();
}else {
return R.error(511,"该员工本月已经工资记录");
}
}
/**
* 删除
*/
@RequestMapping("/delete")
public R delete(@RequestBody Integer[] ids){
logger.debug("delete:,,Controller:{},,ids:{}",this.getClass().getName(),ids.toString());
xinziService.deleteBatchIds(Arrays.asList(ids));
return R.ok();
}
}
获取源码或论文
如需对应的论文或源码,以及其他定制需求,也可以下方微信联系我。