基于javaweb+mysql的ssm药品进货销售仓储信息管理系统(java+ssm+js+html+jsp+mysql)

基于javaweb+mysql的ssm药品进货销售仓储信息管理系统(java+ssm+js+html+jsp+mysql)

运行环境

Java≥8、MySQL≥5.7、Tomcat≥8

开发工具

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

适用

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

功能说明

基于javaweb+mysql的SSM药品进货销售仓储信息管理系统(java+ssm+js+html+jsp+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版本;

技术栈

  1. 后端:Spring+SpringMVC+Mybatis 2. 前端:HTML+CSS+JavaScript+jsp

使用说明

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

return result;

/**

* 添加用户

* @param user 用户信息

* @return Map 返回相关状态及信息

* @throws Exception 异常

*/

@RequestMapping(value = {"addUser", "registerUser"})

public @ResponseBody

Map<String, Object> addUser(@RequestBody User user) throws Exception {

int addCount = userService.addUser(user);

Map<String, Object> result = new HashMap<String, Object>();

if (addCount > 0) {

result.put("state", "success");

result.put("result", medicines);

} else {

result.put("state", "fail");

result.put("reason", null);

return result;

/**

* 获取指定ID的药品信息

* @param medicineIds String[] 药品ID数组

* @return Map 返回相关状态及信息

* @throws Exception 异常

*/

@RequestMapping(value = "getSomeMedicine")


public @ResponseBody

Map<String, String> login(HttpServletRequest request, @RequestParam(value = "username", defaultValue = "") String username,

@RequestParam(value = "password", defaultValue = "") String password) throws Exception {

System.out.println("username: " + username + ", password: " + password);

User user = userService.loginCheck(username, password);

Map<String, String> resultMap =new HashMap<String, String>();

if (user != null) {

request.getSession().setAttribute("userid", user.getUid());

request.getSession().setAttribute("username", user.getUsername());

request.getSession().setAttribute("identity", "user");

resultMap.put("state", "success");

} else {

resultMap.put("state", "fail");

List<Admin> adminList = adminService.getLimitAdmin(offset, limit);

Map<String, Object> result = new HashMap<String, Object>();

if (adminList.size() > 0) {

result.put("state", "success");

result.put("result", adminList);

} else {

result.put("state", "fail");

result.put("reason", null);

return result;

/**

* 根据管理员ID更新管理员信息


public @ResponseBody

Map<String, Object> deleteSomeMedicine(@RequestParam(value = "medicineIds[]") String[] medicineIds) throws Exception {

int deleteNum = medicineService.deleteSomeMedicine(medicineIds);

Map<String, Object> result = new HashMap<String, Object>();

if (deleteNum > 0) {

result.put("state", "success");

result.put("result", deleteNum);

} else {

result.put("state", "fail");

result.put("reason", null);

return result;

/**

* 添加药品

* @param userIds 用户ID数组

* @return Map 返回相关状态及信息

* @throws Exception 异常

*/

@RequestMapping(value = "getSomeUser")

public @ResponseBody

Map<String, Object> getSomeUser(@RequestParam(value = "userIds[]") String[] userIds) throws Exception {

List<User> users = userService.getSomeUser(userIds);

Map<String, Object> result = new HashMap<String, Object>();

if (users.size() > 0) {

result.put("state", "success");

result.put("result", users);

} else {

} else {

result.put("state", "fail");

result.put("reason", null);

return result;

/**

* 获取药品总量

* @return Map 返回相关状态及信息

* @throws Exception 异常

*/

@RequestMapping(value = "getMedicineCount")

public @ResponseBody

Map<String, Object> getMedicineCount() throws Exception {

public @ResponseBody

Map<String, Object> addAdmin(@RequestBody Admin admin) throws Exception {

int addCount = adminService.addAdmin(admin);

Map<String, Object> result = new HashMap<String, Object>();

if (addCount > 0) {

result.put("state", "success");

result.put("result", addCount);

} else {

result.put("state", "fail");

result.put("reason", 0);

return result;

/**

* 根据管理员ID更新用户密码


result.put("reason", null);

return result;

/**

* 添加管理员

* @param admin 用户信息

* @return Map 返回相关状态及信息

* @throws Exception 异常

*/

@RequestMapping(value = "addAdmin")

public @ResponseBody

Map<String, Object> addAdmin(@RequestBody Admin admin) throws Exception {

int addCount = adminService.addAdmin(admin);


*/

@RequestMapping(value = "getLimitUser")

public @ResponseBody

Map<String, Object> getLimitUser(@RequestParam(value = "offset") int offset,

@RequestParam(value = "limit") int limit) throws Exception {

List<User> userList = userService.getLimitUser(offset, limit);

Map<String, Object> result = new HashMap<String, Object>();

if (userList.size() > 0) {

result.put("state", "success");

result.put("result", userList);

} else {

result.put("state", "fail");

result.put("reason", null);
Map<String, Object> addMedicine(@RequestBody Medicine medicine) throws Exception {

int addCount = medicineService.addMedicine(medicine);

Map<String, Object> result = new HashMap<String, Object>();

if (addCount > 0) {

result.put("state", "success");

result.put("result", addCount);

} else {

result.put("state", "fail");

result.put("reason", 0);

return result;

/**

* 药品图片上传

* @param medicinePic 药品图片

* @return Map 返回相关状态及信息

return result;

/**

* 根据药品ID数组删除一些药品信息

* @param medicineIds 药品ID数组

* @return Map 返回相关状态及信息

* @throws Exception 异常

*/

@RequestMapping(value = "deleteSomeMedicine")

public @ResponseBody

Map<String, Object> deleteSomeMedicine(@RequestParam(value = "medicineIds[]") String[] medicineIds) throws Exception {

int deleteNum = medicineService.deleteSomeMedicine(medicineIds);

Map<String, Object> result = new HashMap<String, Object>();

if (deleteNum > 0) {

@RequestParam(value = "limit") int limit) throws Exception {

List<Admin> adminList = adminService.getLimitAdmin(offset, limit);

Map<String, Object> result = new HashMap<String, Object>();

if (adminList.size() > 0) {

result.put("state", "success");

result.put("result", adminList);

} else {

result.put("state", "fail");

result.put("reason", null);

return result;

/**

* 根据管理员ID更新管理员信息


* @param offset 偏移量

* @param limit 限制返回条数

* @return Map 返回相关状态及信息

* @throws Exception 异常

*/

@RequestMapping(value = "getLimitUser")

public @ResponseBody

Map<String, Object> getLimitUser(@RequestParam(value = "offset") int offset,

@RequestParam(value = "limit") int limit) throws Exception {

List<User> userList = userService.getLimitUser(offset, limit);

Map<String, Object> result = new HashMap<String, Object>();

if (userList.size() > 0) {


Map<String, Object> result = new HashMap<String, Object>();

if (addCount > 0) {

result.put("state", "success");

result.put("result", addCount);

} else {

result.put("state", "fail");

result.put("reason", 0);

return result;

/**

* 根据管理员ID更新用户密码

* @param uid 管理员ID

* @param originalPasswd 原密码

* @param newPasswd 新密码

* @param medicineIds String[] 药品ID数组

* @return Map 返回相关状态及信息

* @throws Exception 异常

*/

@RequestMapping(value = "getSomeMedicine")

public @ResponseBody

Map<String, Object> getSomeMedicine(@RequestParam(value = "medicineIds[]") String[] medicineIds) throws Exception {

List<Medicine> medicines = medicineService.getSomeMedicine(medicineIds);

Map<String, Object> result = new HashMap<String, Object>();

if (medicines.size() > 0) {

result.put("state", "success");

result.put("result", medicines);

} else {

请添加图片描述
请添加图片描述
请添加图片描述
请添加图片描述
请添加图片描述
请添加图片描述
请添加图片描述

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值