基于javaweb的SSM+Maven医疗药品采购系统(java+ssm+jsp+jquery+h-ui+mysql)

运行环境

Java≥8、MySQL≥5.7、Tomcat≥8

开发工具

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

适用

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

功能说明

540023532402

550023532402

560023532402

570023532402

580023532402

590023532402

基于javaweb的SSM+Maven医疗药品采购系统(java+ssm+jsp+jquery+h-ui+mysql)

项目介绍

ssm医疗药品采购系统。主要功能有: 用户管理:管理员列表; 采购管理:采购列表; 药品出库:药品出库; 库存管理:库存统计; 数据维护:药品列表、仓库列表、供应商列表;

环境需要

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版本;

技术栈

  1. 后端:Spring SpringMVC MyBatis 2. 前端:JSP+jQuery+h-ui

使用说明

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

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
private static Logger logger = Logger.getLogger(PurchaseOrderController.class);

@Autowired
private PurchaseOrderService purchaseOrderService;
@Autowired
private SupplierService supplierService;
@Autowired
private RepertoryService repertoryService;
@Autowired
private DrugService drugService;

@RequestMapping("/list")
public String list(Model model) {
return "purchaseorder/list";
}

@SuppressWarnings("rawtypes")
@RequestMapping("/findByPage")
public String findByPage(PurchaseOrder purchaseOrder, Model model) {
PaginationVO paginationVO = purchaseOrderService.getPurchaseOrderListWithPage(purchaseOrder);
model.addAttribute("list", paginationVO.getList());
model.addAttribute("total", paginationVO.getTotal());
model.addAttribute("pageNo", paginationVO.getPageNo());
model.addAttribute("totalPageSize", paginationVO.getTotalPageSize());
return "purchaseorder/page";
}

@RequestMapping("/add")
public String add(Model model) {
model.addAttribute("drugs", drugService.getDrugList());
model.addAttribute("suppliers", supplierService.getSupplierList());
model.addAttribute("repertorys", repertoryService.getRepertoryList());
return "purchaseorder/add";
}

@ResponseBody
@RequestMapping("/save")
public String save(PurchaseOrder purchaseOrder) {
try {
purchaseOrderService.savePurchaseOrder(purchaseOrder);
} catch (Exception e) {
logger.error(e.getMessage(), e);
return "0";
}
return "1";
}

@RequestMapping("edit")
public String edit(Integer id, Model model) {
PurchaseOrder purchaseOrder = purchaseOrderService.getPurchaseOrderById(id);
model.addAttribute("obj", purchaseOrder);
model.addAttribute("drugs", drugService.getDrugList());
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 add(Model model) {
model.addAttribute("drugs", drugService.getDrugList());
model.addAttribute("suppliers", supplierService.getSupplierList());
model.addAttribute("repertorys", repertoryService.getRepertoryList());
return "purchaseorder/add";
}

@ResponseBody
@RequestMapping("/save")
public String save(PurchaseOrder purchaseOrder) {
try {
purchaseOrderService.savePurchaseOrder(purchaseOrder);
} catch (Exception e) {
logger.error(e.getMessage(), e);
return "0";
}
return "1";
}

@RequestMapping("edit")
public String edit(Integer id, Model model) {
PurchaseOrder purchaseOrder = purchaseOrderService.getPurchaseOrderById(id);
model.addAttribute("obj", purchaseOrder);
model.addAttribute("drugs", drugService.getDrugList());
model.addAttribute("suppliers", supplierService.getSupplierList());
model.addAttribute("repertorys", repertoryService.getRepertoryList());
return "purchaseorder/edit";
}

@ResponseBody
@RequestMapping("/update")
public String update(PurchaseOrder purchaseOrder) {
try {
purchaseOrderService.updatePurchaseOrder(purchaseOrder);
} catch (Exception e) {
logger.error(e.getMessage(), e);
return "0";
}
return "1";
}

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
		} catch (Exception e) {
logger.error(e.getMessage(), e);
return "0";
}
return "1";
}
}
package edu.nxu.mdps.controller;



/**
* @company: 宁夏大学
*/
@Controller
@RequestMapping("supplier")
public class SupplierController {

private static Logger logger = Logger.getLogger(SupplierController.class);

@Autowired
private SupplierService supplierService;

@RequestMapping("/list")
public String list(Model model) {
model.addAttribute("list", supplierService.getSupplierList());
return "supplier/list";
}

@RequestMapping("/add")
public String add() {
return "supplier/add";
}
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("output")
public class OutputController {

private static Logger logger = Logger.getLogger(OutputController.class);

@Autowired
private PurchaseOrderService purchaseOrderService;
@Autowired
private OutputService outputService;

@RequestMapping("/list")
public String list() {
return "output/list";
}

@SuppressWarnings("rawtypes")
@RequestMapping("/findByPage")
public String findByPage(PurchaseOrder purchaseOrder, Model model) {
PaginationVO paginationVO = purchaseOrderService.getPurchaseOrderListWithPage(purchaseOrder);
model.addAttribute("list", paginationVO.getList());
model.addAttribute("total", paginationVO.getTotal());
model.addAttribute("pageNo", paginationVO.getPageNo());
model.addAttribute("totalPageSize", paginationVO.getTotalPageSize());
return "output/page";
}

@ResponseBody
@RequestMapping("/update")
public String update(Output output) {
try {
outputService.updateOutput(output);
} catch (Exception e) {
logger.error(e.getMessage(), e);
return "0";
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


/**
* @company: 宁夏大学
*/
@Controller
@RequestMapping("user")
public class UserController {

private static Logger logger = Logger.getLogger(UserController.class);

@Autowired
private UserService userService;

@RequestMapping("pwd")
public String pwd() {
return "pwd";
}

@ResponseBody
@RequestMapping("updatePwd")
public Map<String, Object> updatePwd(HttpServletRequest request, User user) {
Map<String, Object> map = new HashMap<String, Object>();
map.put("code", "1");
User u = (User) request.getSession().getAttribute(Constants.SESSION_LONGIN_USER);
if (StringUtils.isEmpty(u)) {
map.put("code", "0");
map.put("msg", "当前登录状态已经失效,请重新登录!");
return map;
}
user.setId(u.getId());
userService.updateUser(user);
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
	@RequestMapping("/download")
public String download(Model model, HttpServletRequest request) {
model.addAttribute("time", new Date());
model.addAttribute("ip", PubUtil.getIpAddr(request));
return "download";
}

/**
* 退出操作
*/
@RequestMapping("logout")
public String logout(HttpServletRequest request) {
request.getSession().removeAttribute(Constants.SESSION_LONGIN_USER);
request.getSession().invalidate();
return "login";
}
}
package edu.nxu.mdps.controller;



/**
* @company: 宁夏大学
*/
@Controller
@RequestMapping("repertory")
public class RepertoryController {

private static Logger logger = Logger.getLogger(RepertoryController.class);

@Autowired
private RepertoryService repertoryService;

@RequestMapping("/list")
public String list(Model model) {
model.addAttribute("list", repertoryService.getRepertoryList());
return "repertory/list";
}

@RequestMapping("/add")


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