基于javaweb的SSM固定资产管理系统(java+ssm+jsp+jquery+bootstrap+mysql)

运行环境

Java≥8、MySQL≥5.7、Tomcat≥8

开发工具

eclipse/idea/myeclipse/sts等均可配置运行

适用

课程设计,大作业,毕业设计,项目练习,学习演示等

功能说明

452323431807

462323431807

472323431807

482323431807

492323431807

502323431807

基于javaweb的SSM固定资产管理系统(java+ssm+jsp+jquery+bootstrap+mysql)

项目介绍

该固定资产管理系统共包含三种角色,分别是:管理员、普通员工、部门管理人员,其功能如下:  1.管理员 系统登陆、管理员管理、部门管理、资产类型管理、员工信息管 理、采购申请管理、资产采购管理、资产发放管理、固定资产管 理、设备维修管理、资产报废管理、设备借用归还管理、  盘点信息 管理、盘盈信息统计、盘亏信息统计等功能。   2.普通员工 个人信息管理、修改密码、资产类型信息、采购申请信息、资产 接收信息、固定资产信息、设备借用归还信息、盘点信息等功能。   3.部门管理人员 工作人员管理、基础信息管理、采购申请管理、资产发放管理、 固定资产管理、设备借用归还管理、盘点管理等功能。   该系统功能完善、界面美观、操作简单、功能齐全、管理便捷,具 有很高的实际应用价值。

环境需要

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.是否Maven项目: 否;查看源码目录中是否包含pom.xml;若包含,则为maven项目,否则为非maven项目; 6.数据库:MySql 5.7/8.0等版本均可;

技术栈

后台框架:Spring、SpringMVC、Mbytes UI界面:JSP、jQuery 、BootStrap 数据库:MySQL

使用说明

  1. 使用Navicat或者其它工具,在mysql中创建对应名称的数据库,并导入项目的sql文件;

  2. 使用IDEA/Eclipse/MyEclipse导入项目,修改配置,运行项目;  

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
public String getDeptPwin(String number) {
String deptid = (String) this.getSession().getAttribute("deptid");
Pwin pwin = new Pwin();
pwin.setDeptid(deptid);
List<Pwin> pwinList = this.pwinService.getPwinByCond(pwin);
PageHelper.getUserPage(pwinList, "pwin", "getDeptPwin", 10, number, this.getRequest());
return "admin/xlistpwin";
}

@RequestMapping("getMyPwin.action")
public String getMyPwin(String number) {
String adminid = (String) this.getSession().getAttribute("adminid");
Pwin pwin = new Pwin();
pwin.setEmployid(adminid);
List<Pwin> pwinList = this.pwinService.getPwinByCond(pwin);
PageHelper.getUserPage(pwinList, "pwin", "getMyPwin", 10, number, this.getRequest());
return "admin/ylistpwin";
}

// 按条件查询数据 (模糊查询)
@RequestMapping("queryPwinByCond.action")
public String queryPwinByCond(String cond, String name, String number) {
Pwin pwin = new Pwin();
if (cond != null) {
if ("wno".equals(cond)) {
pwin.setWno(name);
}
if ("deptid".equals(cond)) {
pwin.setDeptid(name);
}
if ("equipmentid".equals(cond)) {
pwin.setEquipmentid(name);
}
if ("reason".equals(cond)) {
pwin.setReason(name);
}
if ("employid".equals(cond)) {
pwin.setEmployid(name);
}
if ("addtime".equals(cond)) {
pwin.setAddtime(name);
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
}

@RequestMapping("getMyScarp.action")
public String getMyScarp(String number) {
String adminid = (String) this.getSession().getAttribute("adminid");
Scarp scarp = new Scarp();
scarp.setEmployid(adminid);
List<Scarp> scarpList = this.scarpService.getScarpByCond(scarp);
PageHelper.getUserPage(scarpList, "scarp", "getMyScarp", 10, number, this.getRequest());
return "admin/ylistscarp";
}

// 按条件查询数据 (模糊查询)
@RequestMapping("queryScarpByCond.action")
public String queryScarpByCond(String cond, String name, String number) {
Scarp scarp = new Scarp();
if (cond != null) {
if ("deptid".equals(cond)) {
scarp.setDeptid(name);
}
if ("equipmentid".equals(cond)) {
scarp.setEquipmentid(name);
}
if ("reason".equals(cond)) {
scarp.setReason(name);
}
if ("employid".equals(cond)) {
scarp.setEmployid(name);
}
if ("addtime".equals(cond)) {
scarp.setAddtime(name);
}
if ("memo".equals(cond)) {
scarp.setMemo(name);
}
}

List<String> nameList = new ArrayList<String>();
List<String> valueList = new ArrayList<String>();
nameList.add(cond);
valueList.add(name);
PageHelper.getPage(this.scarpService.getScarpByLike(scarp), "scarp", nameList, valueList, 10, number, this.getRequest(), "query");
name = null;
cond = null;
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
		return String.valueOf(randString.charAt(num));
}
}














//
// 代做毕业设计 Struts2 SSH SSM ThinkPHP



//定义为控制器
@Controller
// 设置路径
@RequestMapping(value = "/dept", produces = "text/plain;charset=utf-8")
public class DeptController extends BaseController {
// @Autowired的作用是自动注入依赖的ServiceBean
@Autowired
private DeptService deptService;

// 准备添加数据
@RequestMapping("createDept.action")
public String createDept() {
return "admin/adddept";
}

// 添加数据
@RequestMapping("addDept.action")
public String addDept(Dept dept) {
dept.setAddtime(VeDate.getStringDateShort());
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
	return "redirect:/applyx/getAllApplyx.action";
}

// 通过主键删除数据
@RequestMapping("deleteBuy.action")
public String deleteBuy(String id) {
this.buyService.deleteBuy(id);
return "redirect:/buy/getAllBuy.action";
}

// 批量删除数据
@RequestMapping("deleteBuyByIds.action")
public String deleteBuyByIds() {
String[] ids = this.getRequest().getParameterValues("buyid");
if (ids != null) {
for (String buyid : ids) {
this.buyService.deleteBuy(buyid);
}
}
return "redirect:/buy/getAllBuy.action";
}

// 更新数据
@RequestMapping("updateBuy.action")
public String updateBuy(Buy buy) {
this.buyService.updateBuy(buy);
return "redirect:/buy/getAllBuy.action";
}

// 显示全部数据
@RequestMapping("getAllBuy.action")
public String getAllBuy(String number) {
List<Buy> buyList = this.buyService.getAllBuy();
PageHelper.getPage(buyList, "buy", null, null, 10, number, this.getRequest(), null);
return "admin/listbuy";
}

// 按条件查询数据 (模糊查询)
@RequestMapping("queryBuyByCond.action")
public String queryBuyByCond(String cond, String name, String number) {
Buy buy = new Buy();
if (cond != null) {
if ("applyxid".equals(cond)) {
buy.setApplyxid(name);
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53

private Random random = new Random();

/*
* 获得字体
*/
private Font getFont() {
return new Font("Fixedsys", Font.CENTER_BASELINE, 18);
}

/*
* 获得颜色
*/
private Color getRandColor(int fc, int bc) {
if (fc > 255)
fc = 255;
if (bc > 255)
bc = 255;
int r = fc + random.nextInt(bc - fc - 16);
int g = fc + random.nextInt(bc - fc - 14);
int b = fc + random.nextInt(bc - fc - 18);
return new Color(r, g, b);
}

/**
* 生成随机图片
*/
public void getRandcode(HttpServletRequest request, HttpServletResponse response) {
HttpSession session = request.getSession();
// BufferedImage类是具有缓冲区的Image类,Image类是用于描述图像信息的类
BufferedImage image = new BufferedImage(width, height, BufferedImage.TYPE_INT_BGR);
Graphics g = image.getGraphics();// 产生Image对象的Graphics对象,改对象可以在图像上进行各种绘制操作
g.fillRect(0, 0, width, height);
g.setFont(new Font("Times New Roman", Font.ROMAN_BASELINE, 18));
g.setColor(getRandColor(110, 133));
// 绘制干扰线
for (int i = 0; i <= lineSize; i++) {
drowLine(g);
}
// 绘制随机字符
String randomString = "";
for (int i = 1; i <= stringNum; i++) {
randomString = drowString(g, randomString, i);
}
// 将生成的随机字符串保存到session中,而jsp界面通过session.getAttribute("RANDOMCODEKEY"),
// 获得生成的验证码,然后跟用户输入的进行比较
session.removeAttribute(RANDOMCODEKEY);
session.setAttribute(RANDOMCODEKEY, randomString);
g.dispose();
try {
// 将内存中的图片通过流动形式输出到客户端
ImageIO.write(image, "JPEG", response.getOutputStream());
} catch (Exception e) {
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39


//定义为控制器
@Controller
// 设置路径
@RequestMapping(value = "/repair", produces = "text/plain;charset=utf-8")
public class RepairController extends BaseController {
// @Autowired的作用是自动注入依赖的ServiceBean
@Autowired
private RepairService repairService;
@Autowired
private DeptService deptService;
@Autowired
private EquipmentService equipmentService;
@Autowired
private EmployService employService;

// 准备添加数据
@RequestMapping("createRepair.action")
public String createRepair() {
String deptid = (String) this.getSession().getAttribute("deptid");
Equipment x = new Equipment();
x.setDeptid(deptid);
x.setStatus("正常");
List<Equipment> equipmentList = this.equipmentService.getEquipmentByCond(x);
this.getRequest().setAttribute("equipmentList", equipmentList);
return "admin/addrepair";
}

// 添加数据
@RequestMapping("addRepair.action")
public String addRepair(Repair repair) {
String deptid = (String) this.getSession().getAttribute("deptid");
String adminid = (String) this.getSession().getAttribute("adminid");
repair.setDeptid(deptid);
repair.setEmployid(adminid);
repair.setAddtime(VeDate.getStringDateShort());
this.repairService.insertRepair(repair);
return "redirect:/repair/createRepair.action";


项目链接:
https://javayms.github.io?id=580023051907201ak
https://javayms.pages.dev?id=580023051907201ak