Java毕业设计-基于SSM框架的固定资产管理系统项目实战(附源码+文档)

大家好!我是岛上程序猿,感谢您阅读本文,欢迎一键三连哦。

💞当前专栏:Java毕业设计

精彩专栏推荐👇🏻👇🏻👇🏻

🎀 Python毕业设计
🌎微信小程序毕业设计

开发运行环境

  • 框架:ssm
  • JDK版本:JDK1.8
  • 服务器:tomcat7
  • 数据库:mysql 5.7
  • 数据库工具:Navicat12
  • 开发软件:eclipse/myeclipse/idea
  • Maven包:Maven3.3.9
  • 浏览器:谷歌浏览器

源码下载地址:

https://download.csdn.net/download/m0_46388260/89272291

论文目录

【如需全文请按文末获取联系】
在这里插入图片描述
在这里插入图片描述

一、项目简介

固定资产管理系统是在MySQL中建立数据表保存信息,运用SSM框架和Java语言编写。并按照软件设计开发流程进行设计实现。系统具备友好性且功能完善。管理员管理资产,资产折旧,资产维修,资产报废等信息。员工查询资产,查询资产折旧,资产维修,资产报废信息。

二、系统设计

2.1软件功能模块设计

设计的管理员的详细功能见下图,管理员登录进入本人后台之后,管理资产,资产折旧,资产维修,资产报废等信息。
在这里插入图片描述
设计的员工的详细功能见下图,员工查询资产,查询资产折旧,资产维修,资产报废信息。
在这里插入图片描述

2.2数据库设计

(1)设计的资产折旧实体,其具备的属性见下图。
在这里插入图片描述
(2)设计的管理员实体,其具备的属性见下图。
在这里插入图片描述
(3)设计的员工实体,其具备的属性见下图。
在这里插入图片描述
(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.WeixiuEntity;

import com.service.WeixiuService;
import com.entity.view.WeixiuView;
import com.service.YonghuService;
import com.entity.YonghuEntity;
import com.service.ZichanService;
import com.entity.ZichanEntity;
import com.utils.PageUtils;
import com.utils.R;

/**
 * 资产维修
 * 后端接口
 * @author
 * @email
 * @date 2021-04-06
*/
@RestController
@Controller
@RequestMapping("/weixiu")
public class WeixiuController {
    private static final Logger logger = LoggerFactory.getLogger(WeixiuController.class);

    @Autowired
    private WeixiuService weixiuService;


    @Autowired
    private TokenService tokenService;
    @Autowired
    private DictionaryService dictionaryService;


    //级联表service
    @Autowired
    private YonghuService yonghuService;
    @Autowired
    private ZichanService zichanService;


    /**
    * 后端列表
    */
    @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"));
        }
        params.put("orderBy","id");
        PageUtils page = weixiuService.queryPage(params);

        //字典表数据转换
        List<WeixiuView> list =(List<WeixiuView>)page.getList();
        for(WeixiuView 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);
        WeixiuEntity weixiu = weixiuService.selectById(id);
        if(weixiu !=null){
            //entity转view
            WeixiuView view = new WeixiuView();
            BeanUtils.copyProperties( weixiu , view );//把实体数据重构到view中

            //级联表
            YonghuEntity yonghu = yonghuService.selectById(weixiu.getYonghuId());
            if(yonghu != null){
                BeanUtils.copyProperties( yonghu , view ,new String[]{ "id", "createDate"});//把级联的数据添加到view中,并排除id和创建时间字段
                view.setYonghuId(yonghu.getId());
            }
            //级联表
            ZichanEntity zichan = zichanService.selectById(weixiu.getZichanId());
            if(zichan != null){
                BeanUtils.copyProperties( zichan , view ,new String[]{ "id", "createDate"});//把级联的数据添加到view中,并排除id和创建时间字段
                view.setZichanId(zichan.getId());
            }
            //修改对应字典表字段
            dictionaryService.dictionaryConvert(view);
            return R.ok().put("data", view);
        }else {
            return R.error(511,"查不到数据");
        }

    }

    /**
    * 后端保存
    */
    @RequestMapping("/save")
    public R save(@RequestBody WeixiuEntity weixiu, HttpServletRequest request){
        logger.debug("save方法:,,Controller:{},,weixiu:{}",this.getClass().getName(),weixiu.toString());
        Wrapper<WeixiuEntity> queryWrapper = new EntityWrapper<WeixiuEntity>()
            .eq("zichan_id", weixiu.getZichanId())
            .eq("yonghu_id", weixiu.getYonghuId())
            ;
        logger.info("sql语句:"+queryWrapper.getSqlSegment());
        WeixiuEntity weixiuEntity = weixiuService.selectOne(queryWrapper);
        if(weixiuEntity==null){
            weixiu.setInsertTime(new Date());
            weixiu.setCreateTime(new Date());
        //  String role = String.valueOf(request.getSession().getAttribute("role"));
        //  if("".equals(role)){
        //      weixiu.set
        //  }
            weixiuService.insert(weixiu);
            return R.ok();
        }else {
            return R.error(511,"表中有相同数据");
        }
    }

    /**
    * 后端修改
    */
    @RequestMapping("/update")
    public R update(@RequestBody WeixiuEntity weixiu, HttpServletRequest request){
        logger.debug("update方法:,,Controller:{},,weixiu:{}",this.getClass().getName(),weixiu.toString());
        //根据字段查询是否有相同数据
        Wrapper<WeixiuEntity> queryWrapper = new EntityWrapper<WeixiuEntity>()
            .notIn("id",weixiu.getId())
            .andNew()
            .eq("zichan_id", weixiu.getZichanId())
            .eq("yonghu_id", weixiu.getYonghuId())
            ;
        logger.info("sql语句:"+queryWrapper.getSqlSegment());
        WeixiuEntity weixiuEntity = weixiuService.selectOne(queryWrapper);
        if(weixiuEntity==null){
            //  String role = String.valueOf(request.getSession().getAttribute("role"));
            //  if("".equals(role)){
            //      weixiu.set
            //  }
            weixiuService.updateById(weixiu);//根据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());
        weixiuService.deleteBatchIds(Arrays.asList(ids));
        return R.ok();
    }



}


获取源码或论文

如需对应的论文或源码,以及其他定制需求,也可以下方微信联系我。

  • 2
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值