——————————DescriptionStart——————————
运行环境 Java≥8、MySQL≥5.7、Tomcat≥8
开发工具 eclipse/idea/myeclipse/sts等均可配置运行
适用 课程设计,大作业,毕业设计,项目练习,学习演示等
功能说明
基于javaweb的SSM+Maven医药信息管理系统(java+ssm+maven+html+easyui+mysql)
项目介绍
该系统共七个功能模块:查询模块、录入模块、删除模块、修改模块、浏览模块、打印模块和用户管理模块。 系统只有一个超级管理员,可以创建系统用户并进行权限管理,其他用户没有用户管理权限,只有其他权限。 不同的用户可以进入不同的模块进行相应操作。 管理员角色包含以下功能: 登录,信息查询,信息录入,信息删除,信息修改,信息浏览,打印报表,用户管理,权限管理,系统帮助等功能。 用户角色包含以下功能: 管理员只设置了查询功能,一些说明等功能。
环境需要
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项目:是;
技术栈
后端:Spring+SpringMVC+Mybatis 2. 前端:HTML+CSS+JavaScript+easyui
使用说明
使用Navicat或者其它工具,在mysql中创建对应名称的数据库,并导入项目的sql文件; 2. 使用IDEA/Eclipse/MyEclipse导入项目,Eclipse/MyEclipse导入时,若为maven项目请选择maven; 若为maven项目,导入成功后请执行maven clean;maven install命令,然后运行; 3. 将项目中jdbc.properties配置文件中的数据库配置改为自己的配置; 4. 运行项目,输入localhost:8080/ 登录 管理员账号:admir 密码:1234 用户账号:test 密码:1201
——————————CodeStart——————————
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 54 Medicine medicine = medicineService.queryMedicineByMno(mno); return medicine; } @RequestMapping(value = "DeleteRows", produces = "text/html;charset=UTF-8") @ResponseBody public String deleteMedicineByRows (@RequestParam(value = "array[]") String[] array) { try { return medicineService.deleteMedicineByRows(array); } catch (Exception e) { return "操作异常,可能某些药品被顾客购买过," + "无法删该药品,请重新选择" ; } } @RequestMapping(value = "SaveMedicine", produces = "text/html;charset=UTF-8") @ResponseBody public String saveMedicine (Medicine medicine) { return medicineService.saveMedicine(medicine);
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 } } @RequestMapping(value = "ModifyAgency", produces = "text/html;charset=UTF-8") @ResponseBody public String modifyAgency (Agency agency) { return agencyService.modifyAgency(agency); } @RequestMapping("GetMessage") @ResponseBody public EasyUIResult queryAllAgency (@RequestParam(value = "page", defaultValue = "1") Integer page, @RequestParam(value = "rows", defaultValue = "5") Integer rows) { return this .agencyService.queryAllAgency(page, rows); } @RequestMapping(value = "SaveAgency", produces = "text/html;charset=UTF-8") @ResponseBody public String saveAgency (Agency agency) { return agencyService.saveAgency(agency); } @RequestMapping("GetAllAgency") @ResponseBody public java.util.List<Agency> getAllAgency () { java.util.List<Agency> allAgency = agencyService.getAllAgency(); return allAgency; } } package mms.controller;@RequestMapping("Client") @Controller public class ClientController { @Autowired
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 agency; } @RequestMapping(value = "DeleteAgency", produces = "text/html;charset=UTF-8") @ResponseBody public String deleteAgencyByAno (String ano) { return agencyService.deleteAgencyByAno(ano); } @RequestMapping(value = "DeleteRows", produces = "text/html;charset=UTF-8") @ResponseBody public String deleteAgencyByRows (@RequestParam(value = "array[]") String[] array) { try { return agencyService.deleteAgencyByRows(array); } catch (Exception e) { return "操作异常,,某些经办人处理过顾客信息,无法删除该经办人,请重新选择" ; } } @RequestMapping(value = "ModifyAgency", produces = "text/html;charset=UTF-8") @ResponseBody public String modifyAgency (Agency agency) { return agencyService.modifyAgency(agency); } @RequestMapping("GetMessage") @ResponseBody public EasyUIResult queryAllAgency (@RequestParam(value = "page", defaultValue = "1") Integer page, @RequestParam(value = "rows", defaultValue = "5") Integer rows) { return this .agencyService.queryAllAgency(page, rows); } @RequestMapping(value = "SaveAgency", produces = "text/html;charset=UTF-8")
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 return "删除失败,可能是有客户购买此药," + "无法删除此药品" ; } return "删除成功" ; } public String modifyMedicine (Medicine medicine) { Medicine queryMedicineByMno = queryMedicineByMno(medicine.getMno()); if (queryMedicineByMno != null ) { if (queryMedicineByMno.getMid() != medicine.getMid()) return "这个药品编号已经存在,不能修改为这个编号" ; } try { medicineMapper.modifyMedicine(medicine); } catch (Exception e) { return "修改失败,可能是有客户购买此药," + "无法修改编号" ; } return "修改成功" ; } public List<Medicine> getAllMedicine () { List<Medicine> queryAllMedicine = medicineMapper.queryAllMedicine(); return queryAllMedicine; } public String deleteMedicineByRows (String[] array) { try { for (String mno : array) { medicineMapper.deleteMedicineByMno(mno); } } catch (Exception e) { throw new RuntimeException(); } return "删除成功" ; } public String queryMultiMedicine (Medicine medicine, HttpSession session) { try { List<Medicine> medicines = medicineMapper.queryMultiMedicine(medicine); session.setAttribute("medicines" , medicines); System.out.println(medicines);
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 @Service @Transactional public class MedicineService { @Autowired private MedicineMapper medicineMapper; public Medicine queryMedicineByMno (String mno) { Medicine medicine = medicineMapper.queryMedicineByMno(mno); return medicine; } public EasyUIResult queryAllMedicine (Integer page, Integer rows) { PageHelper.startPage(page, rows); List<Medicine> medicines = medicineMapper.queryAllMedicine(); PageInfo<Medicine> pageInfo = new PageInfo<Medicine>(medicines); return new EasyUIResult(pageInfo.getTotal(), medicines); } public String saveMedicine (Medicine medicine) { if (queryMedicineByMno(medicine.getMno()) != null ) { return "药品编号已经存在,请重新输入编号" ; } medicineMapper.saveMedicine(medicine); return "保存成功" ; }
——————————PayStart——————————
项目链接: https://javayms.github.io?id=161422272105200ao https://javayms.pages.dev?id=161422272105200ao