基于javaweb的SSM+Mavenit设备固定资产管理系统(java+ssm+thymeleaf+html+mysql+maven)

运行环境

Java≥8、MySQL≥5.7、Tomcat≥8

开发工具

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

适用

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

功能说明

120023192402

130023192402

150023192402

160023192402

170023192402

基于javaweb的SSM+Mavenit设备固定资产管理系统(java+ssm+thymeleaf+html+mysql+maven)

一、项目简述

功能包括: 用户登录,设备管理,设备指派,贝附信息,信息公告, 信息维护,系统管理,图表统计等等功能。

二、项目运行

环境配置: Jdk1.8 + Tomcat8.5 + mysql + Eclispe (IntelliJ IDEA,Eclispe,MyEclispe,Sts 都支持)

项目技术: JSP +Spring + SpringMVC + MyBatis + html+ css + JavaScript + JQuery + Ajax + layui+ maven等等。

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
@RequestMapping("/account")
public class AccountController {
//自动注入服务类
@Autowired
private AccountService accountService;

/**
* 管理员账户信息
* @return
*/
@GetMapping("/admins")
public String listAdmins(ModelMap map){
List<AccountDTO> adminList = accountService.listAccountByLevel(2);
List<AccountDTO> superAdminList = accountService.listAccountByLevel(1);
adminList.addAll(superAdminList);
map.put("adminsList", adminList);
return "system::table-refresh";
}

/**
* 获取所有账户信息
* @param map
* @return
*/
@GetMapping("/list")
public String listAccounts(ModelMap map){
List<AccountDTO> accountList = accountService.listAccount();
map.put("accountDTOList", accountList);
return "account::table-refresh";
}

/**
* 通过用户名称搜索用户
* @param map
* @param userName
* @return
*/
@GetMapping("/list/{userName}")
public String listAccountsByUserName(ModelMap map,@PathVariable("userName")String userName){
List<AccountDTO> accountList = accountService.listAccountByName(userName);
map.put("accountDTOList", accountList);
return "account::table-refresh";
}
/**
* 添加管理员页面
* @param map
* @return
*/
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
        for (FileItem item:list
) {
if(item.isFormField()){//普通表单项

} else{
String fileName = item.getName()+UUID.randomUUID();
//完成文件上传
item.write(new File(path,fileName));
//删除临时文件
//item.delete();
return deviceService.fileRead(path+"/"+fileName);
}
}
return null;
}

}
package cn.cqu.controller;



/**
* 页面跳转管理控制器
*/
@Controller
public class indexController {
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
    return findMap(list);
}

/**
* 根据品牌统计设备数量
* @param monthStr
* @return
*/
@Override
public Map staDeviceByBrand(String monthStr) {
List<HashMap<String, Object>> list = deviceDao.staDeviceByBrand(monthStr);
return findMap(list);
}

/**
* 根据部门统计设备数量
* @param monthStr
* @return
*/
@Override
public Map staDeviceByOrg(String monthStr) {
List<HashMap<String, Object>> list = deviceDao.staDeviceByOrg(monthStr);
return findMap(list);
}

/**
* 根据状态统计设备数量
*
* @param monthStr
* @return
*/
@Override
public Map staDeviceByStatus(String monthStr) {
List<HashMap<String, Object>> list = deviceDao.staDeviceByStatus(monthStr);
Map resMap = list.get(0);
int countUser = accountDao.listAccount().size();
resMap.put("countUser",countUser);
Long stop =(Long)resMap.get("total")-(Long)resMap.get("running");
resMap.put("stop",stop);
return resMap;
}

/**
* 识别文件
*
* @param filePath
* @return
*/
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
}

/**
* 根据uuid删除账户
* @param uuid
* @return
*/
@DeleteMapping("/{uuid}")
@ResponseBody
public int deleteAccount(@PathVariable("uuid")String uuid){
return accountService.deleteAccountById(uuid);
}

/**
* 修改账户密码
* @param uuid
* @param password
* @return
*/
@PutMapping("/password")
@ResponseBody
public int updatePassword(String uuid, String password){
return accountService.updatePasswordByid(uuid,password);
}

/**
* 修改账户状态
* @param uuid
* @param status
* @return
*/
@PutMapping("/status")
@ResponseBody
public int updateStatus(String uuid,int status){
return accountService.updateStatusByid(uuid,status);
}

/**
* 更改管理员
* @return
*/
@PutMapping("/admins")
@ResponseBody
public int updateDevOwner(HttpServletRequest request){
String[] groups = request.getParameter("groups").split(",");
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
        return organizationService.insertOrganization(organization);
}

/**
* 删除组织
* @param orgId
* @return
*/
@DeleteMapping("/{orgId}")
@ResponseBody
public int delteOrganizationByid(@PathVariable("orgId") String orgId){
return organizationService.deleteOrganizationById(orgId);
}

/**
* 修改组织名称
* @param organization
* @return
*/
@PutMapping
@ResponseBody
public int updateDeviceType(Organization organization){
return organizationService.updateOrganizationName(organization);
}

/**
* 获取组织树
* @return
*/
@GetMapping("/tree")
@ResponseBody
public OrganizationDTO getOrganizationTree(){
return organizationService.getOrgTree();
}

}
package cn.cqu.service;



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
    }
ExcelExportUtil.downloadExcelFile(response,sheetName,headers,dataList,fileName);
}

/**
* 按用户名筛选设备
* @param dataList
* @param userName
* @return
*/
public List<DeviceDTO> selectDeviceDTObyUserName(List<DeviceDTO> dataList,String userName) {
if (dataList != null) {
Iterator iterator = dataList.iterator();
while (iterator.hasNext()) {
DeviceDTO deviceDTO = (DeviceDTO) iterator.next();
String userNameList = deviceDTO.getUserNameList();
if (!userNameList.contains(userName)) {
iterator.remove();
}
}
}
return dataList;
}

/**
* 根据类型统计设备数量
* @param monthStr
* @return
*/
@Override
public Map staDeviceByType(String monthStr) {
List<HashMap<String, Object>> list = deviceDao.staDeviceByType(monthStr);
return findMap(list);
}

/**
* 根据品牌统计设备数量
* @param monthStr
* @return
*/


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