Java项目:SpringBoot企业固定资产管理系统

作者主页:夜未央5788

 简介:Java领域优质创作者、Java项目、学习资料、技术互助

文末获取源码

项目介绍

本项目分为管理员与游客两种角色,
超级管理员角色包含以下功能:
管理员登录,借还管理,资产添加,资产总览,借还报表,用户管理,角色管理,权限管理,资源类型,网点管理等功能。

游客角色包含以下功能:
游客首页-广告页等功能。
由于本程序规模不大,可供课程设计,毕业设计学习演示之用
 

PS:左上角WEB控制台点击进去管理页面,需要注意的是,管理员可以在后台添加无数个角色和权限,所以这个不是一个单角色的系统。

环境需要

1.运行环境:最好是java jdk 1.8,我们在这个平台上运行的。其他版本理论上也可以。
2.IDE环境:IDEA,Eclipse,Myeclipse都可以。推荐IDEA;
3.tomcat环境:Tomcat 7.x,8.x,9.x版本均可
4.硬件环境:windows 7/8/10 1G内存以上;或者 Mac OS; 

5.数据库:MySql 5.7版本;

6.是否Maven项目:是;

技术栈

1. 后端:springboot, mybatis, shiro

2. 前端:HTML+CSS+JavaScript+VUE

使用说明

1. 使用Navicat或者其它工具,在mysql中创建对应名称的数据库,并导入项目的sql文件;
2. 使用IDEA/Eclipse/MyEclipse导入项目,Eclipse/MyEclipse导入时,若为maven项目请选择maven;
若为maven项目,导入成功后请执行maven clean;maven install命令,然后运行;
3. 将项目中config/application.properties配置文件中的数据库配置改为自己的配置;
4. 运行项目,输入http://localhost:8080/ 登录

管理员账号/密码:admin/123456

运行截图

 

 

 

 

 

 

代码相关

网点管理控制器

@Api("网点管理")
@RestController
@RequestMapping("/point")
@RequiresPermissions(value = {"system-administrator-permission","sys:point"},logical = Logical.OR)
public class PointController {

    @Autowired
    private PointService pointService;

    @ApiOperation(value = "添加网点")
    @PostMapping("/add")
    public ResultDto<Object> add(@RequestBody Point point){
        return pointService.add(point);
    }

    @ApiOperation(value = "删除网点")
    @DeleteMapping("/delete/{id}")
    public ResultDto<Object> deleteById(@PathVariable("id") Long id) throws AssetException {
        return pointService.deleteById(id);
    }

    @ApiOperation(value = "更新网点")
    @PutMapping("/update")
    public ResultDto<Object> update(@RequestBody Point point) {
        return pointService.update(point);
    }

    @ApiOperation(value = "网点列表")
    @GetMapping("/list")
    public ResultDto<PageDto<Point>> getList(PointDto dto){
        return pointService.getList(dto);
    }

    @ApiOperation(value = "网点树")
    @GetMapping("/tree")
    public ResultDto<List<Point>> getPointTree(){
        return pointService.getResultTree();
    }

    @ApiOperation(value = "获取网点")
    @GetMapping("/map")
    public ResultDto<List<KeyValue>> getMapByPid(@RequestParam("pid") Long pid) throws AssetException {
        return pointService.getMapByPid(pid);
    }

    @ApiOperation(value = "获取网点")
    @GetMapping("/get")
    public ResultDto<List<Point>> getPointByPid(@RequestParam(value = "pid",required = false) Long pid){
        return pointService.getResultTreeNodesByPid(pid);
    }

    @ApiOperation(value = "获取网点")
    @GetMapping("/get/{id}")
    public ResultDto<Point> getPointById(@PathVariable("id") Long id){
        return pointService.getResultTreeEntityById(id);
    }

    @ApiOperation(value = "获取网点")
    @GetMapping("/root/query")
    public ResultDto<List<Point>> getQueryRootPoint(){
        ResultDto<List<Point>> result = new ResultDto<>(ResultCode.SUCCESS);
        result.setObject(pointService.getQueryRootPoint());
        return result;
    }

    @ApiOperation(value = "刷新网点缓存数据")
    @PostMapping("/refresh")
    public ResultDto<List<Point>> refresh(){
        ResultDto<List<Point>> result = new ResultDto<>(ResultCode.SUCCESS);
        pointService.refreshTreeData();
        return result;
    }

}

 过滤器

@Configuration
public class ShiroConfig {

    @Bean
    public SimpleCookie rememberMeCookie(){
        SimpleCookie simpleCookie = new SimpleCookie("rememberMe");
        simpleCookie.setMaxAge(2592000);
        return simpleCookie;
    }

    @Bean
    public CookieRememberMeManager rememberMeManager(){
        CookieRememberMeManager cookieRememberMeManager = new CookieRememberMeManager();
        cookieRememberMeManager.setCookie(rememberMeCookie());
        cookieRememberMeManager.setCipherKey(Base64.decode("bWluZS1hc3NldC1rZXk6QQ=="));
        return cookieRememberMeManager;
    }

    @Bean
    public Realm shiroRealm() {
        return new ShiroRealm();
    }

    @Bean
    public DefaultWebSecurityManager securityManager(Realm realm) {
        DefaultWebSecurityManager sm = new DefaultWebSecurityManager();
        sm.setRealm(realm);
        sm.setRememberMeManager(rememberMeManager());
        return sm;
    }

    @Bean
    public ShiroFilterFactoryBean shiroFilterFactoryBean(DefaultWebSecurityManager sm) {
        ShiroFilterFactoryBean shiroFilter = new ShiroFilterFactoryBean();
        shiroFilter.setLoginUrl("/login");
        shiroFilter.setSuccessUrl("/index");
        shiroFilter.setUnauthorizedUrl("/forbidden");
        Map<String, String> filterChainDefinitionMapping = new LinkedHashMap<>();

        filterChainDefinitionMapping.put("/", "anon");
        filterChainDefinitionMapping.put("/error", "anon");
        filterChainDefinitionMapping.put("/init", "anon");
        filterChainDefinitionMapping.put("/about", "anon");
        filterChainDefinitionMapping.put("/public/**", "anon");
        filterChainDefinitionMapping.put("/css/**", "anon");
        filterChainDefinitionMapping.put("/example/**", "anon");
        filterChainDefinitionMapping.put("/font-awesome/**", "anon");
        filterChainDefinitionMapping.put("/fonts/**", "anon");
        filterChainDefinitionMapping.put("/img/**", "anon");
        filterChainDefinitionMapping.put("/js/**", "anon");
        filterChainDefinitionMapping.put("/static/**", "anon");

        filterChainDefinitionMapping.put("/**", "authc");

        shiroFilter.setFilterChainDefinitionMap(filterChainDefinitionMapping);
        shiroFilter.setSecurityManager(sm);

        Map<String, Filter> filters = new HashMap<>();
        filters.put("authc", new MyFormAuthenticationFilter());
        filters.put("perms", new MyPermissionsAuthorizationFilter());

        shiroFilter.setFilters(filters);
        return shiroFilter;
    }

    @Bean
    public AuthorizationAttributeSourceAdvisor getAuthorizationAttributeSourceAdvisor(SecurityManager securityManager){
        AuthorizationAttributeSourceAdvisor advisor = new MyAuthorizationAttributeSourceAdvisor();
        advisor.setSecurityManager(securityManager);
        return advisor;
    }

}

如果也想学习本系统,下面领取。回复:066springboot

3.1基本信息管理 设备类型信息管理:设备类型信息包括(ID,名称)可以通过对类型编号(ID)或类型名称查询设备类型信息,并可以对这些信息进行添加,一般不删除,当该设备类型没有对应的设备信息时,可以删除,购置新的设备类型时可对设备类型信息进行添加。 设备基本信息管理:设备基本信息包括(设备编号,设备名称,设备型号,设备分类,所属部门,购买价格,折旧成本,购买日期,状态,报废日期,注销日期,设备数量)可以通过设备名或部门对设备的这些信息进行查询。 部门信息:部门信息包括部门编号,名称 3.2日常事务管理 设备添加:设备购置信息包括设备编号,设备型号,设备名称,所属类型,所属部门,购买价格,折旧价,购买日期,数量等,购入新设备时,应该完成对设备的添加。 删除设备:将删除本条设备的所有信息 借出借入管理:包括设备信息,借出借入部门 设备报废信息管理:设备报废信息包括设备编号,设备型号,设备名称,所属类型,所属部门,购买价格,折旧价,购买日期,报废日期等 3.3系统管理 管理员管理:(ID,名称,密码,权限类型,备注)包括系统管理员的添加,删除,赋予操作权限,取消操作权限,锁定用户,解除锁定,普通管理员只可以修改自己的密码,超级管理员不能修改普通管理员的密码其余操作都由超级管理员完成。 修改密码:登录系统的用户可以根据需要修改自己的密码 权限管理:超级管理员可以设置一般用户的操作权限。
评论 4
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

夜未央5788

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值