ssm固定资产管理系统源码和论文167
开发工具:idea 或eclipse
数据库mysql5.7+
数据库链接工具:navcat,小海豚等
技术:ssm
- 本课题国内外状况,说明选题依据和意义
- 课题意义
随着当前经济社会快速发展以及互联网技术的不断突破,作为我国企业的重 要战略资产和经济命脉,资产能够使得企业在竞争情况下获得最佳的业绩和目标。 作为横跨管理科学和计算机技术两门学科的交界产业,资产管理促进了知识管理, 知识管理可以协助企业完成实现资产管理的预订目标。这些资产管理数据以企业 的宝贵无形资产的形式储存在知识库、数据库以及文件柜或管理者信息库中。企 业管理者越来越重视资产管理系统的运用和实践。企业资产数据库中存在各种IT和基础设施设备,各种设备之间缺乏明显的关 联性。目前大多数企业对于资产的管理模式仅通过管理人员的记忆式的管理。由于企业硬件设备众多,且涉及到的运维组室复杂。小组之间多种运维资料缺乏联系,无法很好地涵盖数据中心整体规划,以及当前和长效的企业硬件设备和软件的运维,会让企业对于资产的管理工作越发难以进行。在各组之间,存在信息无法有效沟通的问题。仅依据网络资产,继续向该机柜添加设备,导致系统运行安全性严重减低。
资产管理系统是运用信息系统和计算机技术,全方位、多层次地监控和管理资产,并能够实时的对管理数据进行运维和流动,以达到提高企业部门的组织机构的应变能力、创新能力,以及不断提升企业生产效率和工作技能,从而可以全面地增强企业的竞争能力。
- 国外研究现状
固定资产的管理面临的问题对于国内外的众多企业、高校等单位都是一样 的,所以早在上个世纪的时候,国外的专家、学者、技术研发人员就从不同的方面对固定资产管理系统进行过研究。首先从固定资产管理的理论来说,较早进行相关研究的是以美国等西方国家为典型的,这些国家提出了应用于固定资产管理的可持续发展管理理论、贯穿资产生命周期的生命周期管理理论等管理理论,为固定资产的管理模式、运行模式等形成提供了理论基础。前期由此而开发很多单机版的资产管理系统帮助国外的企业进行日常的固定资产管理工作。从固定资产发展的方向来说,国外较早提出要注重资产管理数据的安全性,保护资产数据不被篡改和恶意使用,注重资产的可靠性,保证资产的来源是正确无误的;基于这些目的就要搭建专门的管理信息系统面向复杂度不同的各类资产管理工作,并建构监管体系,制定固定资产管理的长期规划,从整体上提高效率,把风险降到最低。从固定资产管理的系统研究来说,从早期的单机版系统到目前的以网络化为主的很多跨平台的固定资产管理系统,系统的研究逐渐深入,应用的领域和行业越来越多,如国外的斯坦福大学、美国通用、花旗集团、帝国理工学院都很早使用或者研发了固定资产或者设备管理系统。此外国外还涌现了很多优秀的产品,如由IT的优秀企业IBM公司开发的MAXIM管理系统,由加拿大蒙特利尔城市IFCS公司开发的Senergy产品。前者属于一种商品化的软件开发品,能够帮助用户进行固定资产的预防性维修管理,还能够对资产进行售后维护的记录和管理,所以面向的对象大多是企业用户;系统中建立了台帐对所有类型的资产进行信息管理,以维修线索作为固定资产的过程线索,完成设备维修申请的提交、申请的审批和执行申请整个过程;同时还提供了采购流程、预算流程和供应商管理等内容,涵盖的内容较多,保证固定资产的库存率不高,实现对各类资源的优化配置。
package com.controller;
import java.text.SimpleDateFormat;
import com.alibaba.fastjson.JSONObject;
import java.util.*;
import com.entity.BaofeiEntity;
import com.service.BaofeiService;
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.ZichanEntity;
import com.service.ZichanService;
import com.entity.view.ZichanView;
import com.utils.PageUtils;
import com.utils.R;
/**
* 资产
* 后端接口
* @author
* @email
* @date 2021-04-06
*/
@RestController
@Controller
@RequestMapping("/zichan")
public class ZichanController {
private static final Logger logger = LoggerFactory.getLogger(ZichanController.class);
@Autowired
private ZichanService zichanService;
@Autowired
private BaofeiService baofeiService;
@Autowired
private TokenService tokenService;
@Autowired
private DictionaryService dictionaryService;
//级联表service
/**
* 后端列表
*/
@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 = zichanService.queryPage(params);
//字典表数据转换
List<ZichanView> list =(List<ZichanView>)page.getList();
for(ZichanView 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);
ZichanEntity zichan = zichanService.selectById(id);
if(zichan !=null){
//entity转view
ZichanView view = new ZichanView();
BeanUtils.copyProperties( zichan , view );//把实体数据重构到view中
//修改对应字典表字段
dictionaryService.dictionaryConvert(view);
return R.ok().put("data", view);
}else {
return R.error(511,"查不到数据");
}
}
/**
* 后端保存
*/
@RequestMapping("/save")
public R save(@RequestBody ZichanEntity zichan, HttpServletRequest request){
logger.debug("save方法:,,Controller:{},,zichan:{}",this.getClass().getName(),zichan.toString());
Wrapper<ZichanEntity> queryWrapper = new EntityWrapper<ZichanEntity>()
.eq("zichan_name", zichan.getZichanName())
.eq("zichan_types", zichan.getZichanTypes())
.eq("bumen_types", zichan.getBumenTypes())
.eq("zichan_guige", zichan.getZichanGuige())
.eq("zichan_changjia", zichan.getZichanChangjia())
.eq("zichan_baoyang", zichan.getZichanBaoyang())
;
logger.info("sql语句:"+queryWrapper.getSqlSegment());
ZichanEntity zichanEntity = zichanService.selectOne(queryWrapper);
if(zichanEntity==null){
zichan.setCreateTime(new Date());
// String role = String.valueOf(request.getSession().getAttribute("role"));
// if("".equals(role)){
// zichan.set
// }
zichanService.insert(zichan);
return R.ok();
}else {
return R.error(511,"表中有相同数据");
}
}
/**
* 后端修改
*/
@RequestMapping("/update")
public R update(@RequestBody ZichanEntity zichan, HttpServletRequest request){
logger.debug("update方法:,,Controller:{},,zichan:{}",this.getClass().getName(),zichan.toString());
//根据字段查询是否有相同数据
Wrapper<ZichanEntity> queryWrapper = new EntityWrapper<ZichanEntity>()
.notIn("id",zichan.getId())
.andNew()
.eq("zichan_name", zichan.getZichanName())
.eq("zichan_types", zichan.getZichanTypes())
.eq("bumen_types", zichan.getBumenTypes())
.eq("zichan_guige", zichan.getZichanGuige())
.eq("zichan_changjia", zichan.getZichanChangjia())
.eq("zichan_baoyang", zichan.getZichanBaoyang())
;
logger.info("sql语句:"+queryWrapper.getSqlSegment());
ZichanEntity zichanEntity = zichanService.selectOne(queryWrapper);
if(zichanEntity==null){
// String role = String.valueOf(request.getSession().getAttribute("role"));
// if("".equals(role)){
// zichan.set
// }
zichanService.updateById(zichan);//根据id更新
return R.ok();
}else {
return R.error(511,"表中有相同数据");
}
}
/**
* 删除
*/
@RequestMapping("/delete")
public R delete(Integer ids){
ZichanEntity zichan = zichanService.selectById(ids);
if(zichan == null){
return R.error();
}
BaofeiEntity baofei = new BaofeiEntity();
baofei.setCreateTime(new Date());
baofei.setInsertTime(new Date());
baofei.setZichanName(zichan.getZichanName());
boolean insert = baofeiService.insert(baofei);
if(insert){
boolean b = zichanService.deleteBatchIds(Arrays.asList(ids));
if(b){
return R.ok();
}
}
return R.error();
}
}
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.BaofeiEntity;
import com.service.BaofeiService;
import com.entity.view.BaofeiView;
import com.utils.PageUtils;
import com.utils.R;
/**
* 资产报废
* 后端接口
* @author
* @email
* @date 2021-04-06
*/
@RestController
@Controller
@RequestMapping("/baofei")
public class BaofeiController {
private static final Logger logger = LoggerFactory.getLogger(BaofeiController.class);
@Autowired
private BaofeiService baofeiService;
@Autowired
private TokenService tokenService;
@Autowired
private DictionaryService dictionaryService;
//级联表service
/**
* 后端列表
*/
@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 = baofeiService.queryPage(params);
//字典表数据转换
List<BaofeiView> list =(List<BaofeiView>)page.getList();
for(BaofeiView 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);
BaofeiEntity baofei = baofeiService.selectById(id);
if(baofei !=null){
//entity转view
BaofeiView view = new BaofeiView();
BeanUtils.copyProperties( baofei , view );//把实体数据重构到view中
//修改对应字典表字段
dictionaryService.dictionaryConvert(view);
return R.ok().put("data", view);
}else {
return R.error(511,"查不到数据");
}
}
/**
* 后端保存
*/
@RequestMapping("/save")
public R save(@RequestBody BaofeiEntity baofei, HttpServletRequest request){
logger.debug("save方法:,,Controller:{},,baofei:{}",this.getClass().getName(),baofei.toString());
Wrapper<BaofeiEntity> queryWrapper = new EntityWrapper<BaofeiEntity>()
.eq("zichan_name", baofei.getZichanName())
;
logger.info("sql语句:"+queryWrapper.getSqlSegment());
BaofeiEntity baofeiEntity = baofeiService.selectOne(queryWrapper);
if(baofeiEntity==null){
baofei.setInsertTime(new Date());
baofei.setCreateTime(new Date());
// String role = String.valueOf(request.getSession().getAttribute("role"));
// if("".equals(role)){
// baofei.set
// }
baofeiService.insert(baofei);
return R.ok();
}else {
return R.error(511,"表中有相同数据");
}
}
/**
* 后端修改
*/
@RequestMapping("/update")
public R update(@RequestBody BaofeiEntity baofei, HttpServletRequest request){
logger.debug("update方法:,,Controller:{},,baofei:{}",this.getClass().getName(),baofei.toString());
//根据字段查询是否有相同数据
Wrapper<BaofeiEntity> queryWrapper = new EntityWrapper<BaofeiEntity>()
.notIn("id",baofei.getId())
.andNew()
.eq("zichan_name", baofei.getZichanName())
;
logger.info("sql语句:"+queryWrapper.getSqlSegment());
BaofeiEntity baofeiEntity = baofeiService.selectOne(queryWrapper);
if(baofeiEntity==null){
// String role = String.valueOf(request.getSession().getAttribute("role"));
// if("".equals(role)){
// baofei.set
// }
baofeiService.updateById(baofei);//根据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());
baofeiService.deleteBatchIds(Arrays.asList(ids));
return R.ok();
}
}