基于Java的物流公司管理系统设计,该项目为本人的课题项目,记录一下。
SpringBoot+maven+adminlte+Mysql
如有同课题的同学,只仅作参考!
不提供数据库sql文件,白嫖党勿扰!
博主联系方式:liumce1@163.com
一、报告目录(仅作参考)
二、项目简介
通过对该物流企业的结构调查,对物流管理系统进行需求分析,采用MySQL数据库,同时设计了该物流系统的数据库结构,在系统的功能实现上,以J2EE技术为基础,基于Spring模式的(Spring+Mybatis+SpringBoot)框架,可以适应多层次的Web应用系统的设计和需求,采用AJAX的页面局部技术,实现了该前端用户查询、用户下单、接单员接单以及后端对订单管理,中转站管理的核心功能模块。该系统中的各个功能模块的设计均基于物流企业的特点,用户和管理员的计算机操作水平,易于使用、操作。
三、 关键技术
根据项目业务需求和实际设计考量,该系统将使用以下系统开发运行环境:
-
运行环境:Windows 7或更高版本的操作系统
- 开发环境:JDK8
- 开发工具:IntelliJ IDEA
- 数据库:MySQL MariaDb 10.2
- 框架:Spring Boot + Mybatis + Maven BootStrap+Adminlt
四、总体设计
...
五、功能实现
六、数据库
七、答辩问题及相关代码
1.权限操作怎么做的?
2.如何判断订单如何可中转?
3.系统分为几个角色,各角色各有什么功能
/**
* 拦截所有参数
*
* @author liumce
*
*/
@SuppressWarnings("rawtypes")
public class ParameterMap extends HashMap implements Map {
/**
*
*/
private static final long serialVersionUID = 1L;
Map map = null;
HttpServletRequest request;
public ParameterMap() {
map = new HashMap();
}
public ParameterMap(Page page) {
Map<String, Object> pageMap = new HashMap<String, Object>();
pageMap.put("currentPage", page.getCurrentPage());
pageMap.put("totalPage", page.getTotalPage());
pageMap.put("totalResult", page.getTotalResult());
pageMap.put("showCount", page.getShowCount());
map = pageMap;
}
@SuppressWarnings("unchecked")
public ParameterMap(HttpServletRequest request) {
this.request = request;
try {
request.setCharacterEncoding("utf-8");
} catch (UnsupportedEncodingException e) {
e.printStackTrace();
}
Map Proerties = request.getParameterMap();
Map returnMap = new HashMap();
Iterator entries = Proerties.entrySet().iterator();
Entry entry;
while (entries.hasNext()) {
String name = "";
String value = "";
entry = (Entry) entries.next();
name = (String) entry.getKey();
Object valueObject = entry.getValue();
if (valueObject == null) {
value = "";
} else if (valueObject instanceof String[]) {
String[] values = (String[]) valueObject;
for (int i = 0; i < values.length; i++) {
value = values[i] + "," + value;
}
value = value.substring(0, value.length() - 1);
} else {
value = valueObject.toString();
}
returnMap.put(name, value);
}
returnMap.put("SessionID", request.getSession().getId());
map = returnMap;
}
@Override
public Object get(Object key) {
Object obj = null;
if (map.get(key) instanceof Object[]) {
Object[] arr = (Object[]) map.get(key);
obj = request == null ? arr : (request.getParameter((String) key) == null ? arr : arr[0]);
} else {
obj = map.get(key);
}
return obj;
}
public String getString(Object key) {
String str = "";
if (get(key) != null) {
str = String.valueOf(get(key));
}
return str;
}
@SuppressWarnings("unchecked")
@Override
public Object put(Object key, Object value) {
if (value == null) {
return map.put(key, "");
}
return map.put(key, value);
}
@SuppressWarnings("unchecked")
public Object putObject(Object key, Object value) {
return map.put(key, value);
}
@Override
public Object remove(Object key) {
return map.remove(key);
}
@Override
public void clear() {
map.clear();
}
@Override
public boolean containsKey(Object key) {
return map.containsKey(key);
}
@Override
public boolean containsValue(Object value) {
return map.containsValue(value);
}
@Override
public Set entrySet() {
return map.entrySet();
}
@Override
public boolean isEmpty() {
return map.isEmpty();
}
@Override
public Set keySet() {
return map.keySet();
}
@SuppressWarnings("unchecked")
@Override
public void putAll(Map m) {
map.putAll(m);
}
@Override
public int size() {
return map.size();
}
@Override
public Collection values() {
return map.values();
}
}
@Override
public Map<String, Object> add(ParameterMap pm,HttpSession session) {
try {
if(StringUtils.isEmpty(pm.getString("receive_date"))) {
pm.put("receive_date", DateUtil.getTime());
}
pm.put("create_time", DateUtil.getTime());
shipmentDao.addShipment(pm);
if("3".equals(pm.getString("status"))){
orderDao.editOrder(pm);
}
} catch (Exception e) {
e.printStackTrace();
log.error("add addShipment error", e);
return ReturnModel.getModel("error", "falied", null);
}
return ReturnModel.getModel("ok", "success", null);
}
public class UrlInterceptor implements HandlerInterceptor{
@Override
public void afterCompletion(HttpServletRequest arg0, HttpServletResponse arg1, Object arg2, Exception arg3)
throws Exception {
// TODO Auto-generated method stub
}
@Override
public void postHandle(HttpServletRequest request, HttpServletResponse response, Object obj, ModelAndView mv)
throws Exception {
//添加增删改查权限
if(mv != null){
mv.addObject(Const.SESSION_QX, request.getSession().getAttribute(Const.SESSION_QX));
}
}
@Override
public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object arg2) throws Exception {
try {
HttpSession session = request.getSession();
String path = request.getServletPath();
System.out.println("path="+path);
User user = (User) session.getAttribute(Const.SESSION_USER);
if(null == user || "".equals(user)){
response.sendRedirect("/");
return false;
}else{
path = path.substring(1, path.length());
boolean b = Jurisdiction.hasJurisdiction(path,session);
if(!b){
response.sendRedirect("/error/404");
return b;
}
}
} catch (Exception e) {
e.printStackTrace();
}
return true;
}
}
如果对您有帮助,请记得给我一个Star!!! 谢谢~ 后续更新请继续关注~
转载自原文链接, 如需删除请联系管理员。
原文链接:基于Java的物流公司管理系统项目记录,转载请注明来源!