项目介绍
现代经济快节奏发展以及不断完善升级的信息化技术,让传统数据信息的管理升级为软件存储,归纳,集中处理数据信息的管理方式。本网上药品售卖系统就是在这样的大环境下诞生,其可以帮助管理者在短时间内处理完毕庞大的数据信息,使用这种软件工具可以帮助管理人员提高事务处理效率,达到事半功倍的效果。此网上药品售卖系统利用当下成熟完善的SSM框架,使用跨平台的可开发大型商业网站的Java语言,以及最受欢迎的RDBMS应用软件之一的Mysql数据库进行程序开发.网上药品售卖系统的开发根据操作人员需要设计的界面简洁美观,在功能模块布局上跟同类型网站保持一致,程序在实现基本要求功能时,也为数据信息面临的安全问题提供了一些实用的解决方案。可以说该程序在帮助管理者高效率地处理工作事务的同时,也实现了数据信息的整体化,规范化与自动化。
在分析并得出使用者对程序的功能要求时,就可以进行程序设计了。如图4.2展示的就是管理员功能结构图,管理员主要负责填充图书和其类别信息,并对已填充的数据进行维护,包括修改与删除,管理员也需要审核老师注册信息,发布公告信息,管理自助租房信息等。
开发环境
编程语言:Java
数据库 :Mysql
系统架构:B/S
后端框架:SSM
编译工具:idea或者eclipse,jdk1.8,maven
支持定做:java/php/python/android/小程序ue/爬虫/c#/asp.net
系统实现
5.1用户信息管理
如图5.1显示的就是用户信息管理页面,此页面提供给管理员的功能有:用户信息的查询管理,可以删除用户信息、修改用户信息、新增用户信息,
还进行了对客户名称的模糊查询的条件
图5.1 用户信息管理页面
5.2 药品信息管理
如图5.2显示的就是药品信息管理页面,此页面提供给管理员的功能有:查看已发布的药品信息数据,修改药品信息,药品信息作废,即可删除。
图5.2 药品信息管理页面
5.3药品类型管理
如图5.3显示的就是药品类型管理页面,此页面提供给管理员的功能有:根据药品类型进行条件查询,还可以对药品类型进行新增、修改、查询操作等等。
图5.3 药品类型管理页面
5.1新闻信息管理
如图5.4显示的就是新闻信息管理页面,此页面提供给管理员的功能有:根据新闻信息进行新增、修改、查询操作等等。
图5.4 新闻信息管理页面
核心代码
package com.controller;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Calendar;
import java.util.Map;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Date;
import java.util.List;
import javax.servlet.http.HttpServletRequest;
import com.utils.ValidatorUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.annotation.IgnoreAuth;
import com.entity.YaopinEntity;
import com.entity.view.YaopinView;
import com.service.YaopinService;
import com.service.TokenService;
import com.utils.PageUtils;
import com.utils.R;
import com.utils.MPUtil;
import com.utils.CommonUtil;
/**
* 药品
* 后端接口
* @author
* @email
* @date
*/
@RestController
@RequestMapping("pin")
public class YaopinController {
@Autowired
private YaopinService yaopinService;
/**
* 后端列表
*/
@RequestMapping("/page")
public R page(@RequestParam Map<String, Object> params,YaopinEntity yaopin, HttpServletRequest request){
EntityWrapper<YaopinEntity> ew = new EntityWrapper<YaopinEntity>();
PageUtils page = yaopinService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, yaopin), params), params));
request.setAttribute("data", page);
return R.ok().put("data", page);
}
/**
* 前端列表
*/
@IgnoreAuth
@RequestMapping("st")
public R list(@RequestParam Map<String, Object> params,YaopinEntity yaopin, HttpServletRequest request){
EntityWrapper<YaopinEntity> ew = new EntityWrapper<YaopinEntity>();
PageUtils page = yaopinService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, yaopin), params), params));
request.setAttribute("data", page);
return R.ok().put("data", page);
}
/**
* 列表
*/
@RequestMapping("sts")
public R list( YaopinEntity yaopin){
EntityWrapper<YaopinEntity> ew = new EntityWrapper<YaopinEntity>();
ew.allEq(MPUtil.allEQMapPre( yaopin, "yaopin"));
return R.ok().put("data", yaopinService.selectListView(ew));
}
/**
* 查询
*/
@RequestMapping("/query")
public R query(YaopinEntity yaopin){
EntityWrapper< YaopinEntity> ew = new EntityWrapper< YaopinEntity>();
ew.allEq(MPUtil.allEQMapPre( yaopin, "yaopin"));
YaopinView yaopinView = yaopinService.selectView(ew);
return R.ok("查询药品成功").put("data", yaopinView);
}
/**
* 后端详情
*/
@RequestMapping("/info/{id}")
public R info(@PathVariable("id") String id){
YaopinEntity yaopin = yaopinService.selectById(id);
yaopin.setClicknum(yaopin.getClicknum()+1);
yaopin.setClicktime(new Date());
yaopinService.updateById(yaopin);
return R.ok().put("data", yaopin);
}
/**
* 前端详情
*/
@IgnoreAuth
@RequestMapping("/detail/{id}")
public R detail(@PathVariable("id") String id){
YaopinEntity yaopin = yaopinService.selectById(id);
yaopin.setClicknum(yaopin.getClicknum()+1);
yaopin.setClicktime(new Date());
yaopinService.updateById(yaopin);
return R.ok().put("data", yaopin);
}
/**
* 后端保存
*/
@RequestMapping("ve")
public R save(@RequestBody YaopinEntity yaopin, HttpServletRequest request){
yaopin.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
//ValidatorUtils.validateEntity(yaopin);
yaopinService.insert(yaopin);
return R.ok();
}
/**
* 前端保存
*/
@RequestMapping("/add")
public R add(@RequestBody YaopinEntity yaopin, HttpServletRequest request){
yaopin.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
//ValidatorUtils.validateEntity(yaopin);
yaopinService.insert(yaopin);
return R.ok();
}
/**
* 修改
*/
@RequestMapping("/update")
public R update(@RequestBody YaopinEntity yaopin, HttpServletRequest request){
//ValidatorUtils.validateEntity(yaopin);
yaopinService.updateById(yaopin);//全部更新
return R.ok();
}
/**
* 删除
*/
@RequestMapping("/delete")
public R delete(@RequestBody Long[] ids){
yaopinService.deleteBatchIds(Arrays.asList(ids));
return R.ok();
}
/**
* 提醒接口
*/
@RequestMapping("/remind/{columnName}/{type}")
public R remindCount(@PathVariable("columnName") String columnName, HttpServletRequest request,
@PathVariable("type") String type,@RequestParam Map<String, Object> map) {
map.put("column", columnName);
map.put("type", type);
if(type.equals("2")) {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
Calendar c = Calendar.getInstance();
Date remindStartDate = null;
Date remindEndDate = null;
if(map.get("remindstart")!=null) {
Integer remindStart = Integer.parseInt(map.get("remindstart").toString());
c.setTime(new Date());
c.add(Calendar.DAY_OF_MONTH,remindStart);
remindStartDate = c.getTime();
map.put("remindstart", sdf.format(remindStartDate));
}
if(map.get("remindend")!=null) {
Integer remindEnd = Integer.parseInt(map.get("remindend").toString());
c.setTime(new Date());
c.add(Calendar.DAY_OF_MONTH,remindEnd);
remindEndDate = c.getTime();
map.put("remindend", sdf.format(remindEndDate));
}
}
Wrapper<YaopinEntity> wrapper = new EntityWrapper<YaopinEntity>();
if(map.get("remindstart")!=null) {
wrapper.ge(columnName, map.get("remindstart"));
}
if(map.get("remindend")!=null) {
wrapper.le(columnName, map.get("remindend"));
}
int count = yaopinService.selectCount(wrapper);
return R.ok().put("count", count);
}
/**
* 前端智能排序
*/
@IgnoreAuth
@RequestMapping("/autoSort")
public R autoSort(@RequestParam Map<String, Object> params,YaopinEntity yaopin, HttpServletRequest request,String pre){
EntityWrapper<YaopinEntity> ew = new EntityWrapper<YaopinEntity>();
Map<String, Object> newMap = new HashMap<String, Object>();
Map<String, Object> param = new HashMap<String, Object>();
Iterator<Map.Entry<String, Object>> it = param.entrySet().iterator();
while (it.hasNext()) {
Map.Entry<String, Object> entry = it.next();
String key = entry.getKey();
String newKey = entry.getKey();
if (pre.endsWith(".")) {
newMap.put(pre + newKey, entry.getValue());
} else if (StringUtils.isEmpty(pre)) {
newMap.put(newKey, entry.getValue());
} else {
newMap.put(pre + "." + newKey, entry.getValue());
}
}
params.put("sort", "clicknum");
params.put("order", "desc");
PageUtils page = yaopinService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, yaopin), params), params));
return R.ok().put("data", page);
}
}
论文参考
目 录
目 录 III
1 绪论 1
1.1 研究背景 1
1.2 目的和意义 1
1.3 论文结构安排 2
2 相关技术 3
2.1 SSM框架介绍 3
2.2 B/S结构介绍 3
2.3 Mysql数据库介绍 4
3 系统分析 6
3.1 系统可行性分析 6
3.1.1 技术可行性分析 6
3.1.2 经济可行性分析 6
3.1.3 运行可行性分析 6
3.2 系统性能分析 7
3.2.1 易用性指标 7
3.2.2 可扩展性指标 7
3.2.3 健壮性指标 7
3.2.4 安全性指标 8
3.3 系统流程分析 8
3.3.1 操作流程分析 8
3.3.2 登录流程分析 9
3.3.3 信息添加流程分析 10
3.3.4 信息删除流程分析 11
4 系统设计 12
4.1 系统概要设计 12
4.2 系统功能结构设计 12
4.3 数据库设计 13
4.3.1 数据库E-R图设计 13
4.3.2 数据库表结构设计 14
5 系统实现 17
5.1用户信息管理 17
5.2 药品信息管理 17
5.3药品类型管理 18
5.1新闻信息管理 19
6 系统测试 19
6.1 系统测试的特点 20
6.2 系统功能测试 20
6.2.1 登录功能测试 20
6.2.2 添加类别功能测试 20
6.3 测试结果分析 21
结 论 22
致 谢 23
参考文献 24