文章目录
- 物流快递管理系统
- 一、系统演示
- 二、项目介绍
- 三、13000字论文参考
- 四、系统部分页面展示
- 五、部分代码展示
- 六、底部获取项目源码和万字论文参考(9.9¥带走)
物流快递管理系统
一、系统演示
校园物流快递管理系统
二、项目介绍
主要技术:Java、Spring、SpringMVC、Mybatis、jsp
开发环境
JAVA版本:JDK1.8
数据库:MySQL
运行工具:IDEA、Eclipse都可运行
有三个角色
管理员功能模块:具备快递人员管理、物流订单管理、取件发件管理以及系统其他配置功能;
快递员功能模块:具备物流订单管理功能和公告功能
用户功能模块:具备发布代取件、送件信息管理、评价功能和查询订单功能等;
项目技术
语言:java
框架:Spring、SpringMVC、Mybatis
三、13000字论文参考
四、系统部分页面展示
五、部分代码展示
package com.gssm.controller;
import java.io.Serializable;
import java.util.Collection;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;
import java.util.Set;
import net.sf.json.JSONArray;
import net.sf.json.JSONObject;
import net.sf.json.JsonConfig;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.gssm.util.HttpConstants;
import com.gssm.util.JsonDateValueProcessor;
/**
* Controller基类
*/
public class BaseController {
protected Logger logger = LoggerFactory.getLogger(this.getClass());
protected final static String DATE_FORMATE = "yyyy-MM-dd";
/**
* 返回服务端处理结果
*
* @param obj
* 服务端输出对象
* @return 输出处理结果给前段JSON格式数据
*/
public String responseResult(Object obj) {
JSONObject jsonObj = null;
if (obj != null) {
logger.info("后端返回对象:{}", obj);
JsonConfig jsonConfig = new JsonConfig();
jsonConfig.registerJsonValueProcessor(Date.class, new JsonDateValueProcessor());
jsonObj = JSONObject.fromObject(obj, jsonConfig);
logger.info("后端返回数据:" + jsonObj);
}
logger.info("输出结果:{}", jsonObj.toString());
return jsonObj.toString();
}
/**
* 返回成功
*
* @param obj
* 输出对象
* @return 输出成功的JSON格式数据
*/
public String responseSuccess(Object obj) {
JSONObject jsonObj = null;
if (obj != null) {
logger.info("后端返回对象:{}", obj);
JsonConfig jsonConfig = new JsonConfig();
jsonConfig.registerJsonValueProcessor(Date.class, new JsonDateValueProcessor());
jsonObj = JSONObject.fromObject(obj, jsonConfig);
}
logger.info("输出结果:{}", jsonObj.toString());
return jsonObj.toString();
}
/**
* 返回成功
*
* @param obj
* 输出对象
* @return 输出成功的JSON格式数据
*/
public String responseArraySuccess(Object obj) {
JSONArray jsonObj = null;
if (obj != null) {
logger.info("后端返回对象:{}", obj);
JsonConfig jsonConfig = new JsonConfig();
jsonConfig.registerJsonValueProcessor(Date.class, new JsonDateValueProcessor());
jsonObj = JSONArray.fromObject(obj, jsonConfig);
logger.info("后端返回数据:" + jsonObj);
}
logger.info("输出结果:{}", jsonObj.toString());
return jsonObj.toString();
}
/**
* 返回成功
*
* @param obj
* 输出对象
* @return 输出成功的JSON格式数据
*/
public String responseSuccess(Object obj, String msg) {
JSONObject jsonObj = null;
JSONObject jsonObj2 = null;
if (obj != null) {
logger.info("后端返回对象:{}", obj);
JsonConfig jsonConfig = new JsonConfig();
//jsonConfig.registerJsonValueProcessor(Date.class, new JsonDateValueProcessor());
jsonObj = JSONObject.fromObject(obj);
jsonObj2 = new JSONObject();
jsonObj2.put("datas", jsonObj);
jsonObj2.put("message", msg);
logger.info("后端返回数据:" + jsonObj2);
}
logger.info("输出结果:{}", jsonObj2.toString());
return jsonObj2.toString();
}
/**
* 返回失败
*
* @param errorMsg
* 错误信息
* @return 输出失败的JSON格式数据
*/
public String responseFail(String errorMsg) {
JSONObject jsonObj = new JSONObject();
jsonObj.put(HttpConstants.RESPONSE_RESULT_FLAG_ISERROR, true);
jsonObj.put(HttpConstants.SERVICE_RESPONSE_RESULT_MSG, errorMsg);
logger.info("输出结果:{}", jsonObj.toString());
return jsonObj.toString();
}
// 下面是判断null的操作
public boolean isEmpty(String str) {
return (null == str) || (str.trim().length() <= 0);
}
public boolean isEmpty(Character cha) {
return (null == cha) || cha.equals(' ');
}
public boolean isEmpty(Object obj) {
return (null == obj);
}
public boolean isEmpty(Object[] objs) {
return (null == objs) || (objs.length <= 0);
}
public boolean isEmpty(Collection<?> obj) {
return (null == obj) || obj.isEmpty();
}
public boolean isEmpty(Set<?> set) {
return (null == set) || set.isEmpty();
}
public boolean isEmpty(Serializable obj) {
return null == obj;
}
public boolean isEmpty(Map<?, ?> map) {
return (null == map) || map.isEmpty();
}
/**
*
* 获得map
* @return
*/
public Map<String,Object> getMap(){
return new HashMap<String,Object>();
}
}
package com.gssm.controller;
import java.io.File;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import net.sf.json.JSONObject;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import com.gssm.dao.DqorderDaoImpl;
import com.gssm.entity.Dqorder;
import com.gssm.entity.Order;
import com.gssm.util.JsonUtil2;
import com.gssm.util.Pager;
@Controller
@RequestMapping(value = "/dqorder")
public class DqorderController extends BaseController{
/**
* 依赖注入 start dao/===
*/
@Autowired
private DqorderDaoImpl dqorderDao;
public DqorderDaoImpl getDqorderDao() {
return dqorderDao;
}
public void setDqorderDao(DqorderDaoImpl dqorderDao) {
this.dqorderDao = dqorderDao;
}
// --------------------------------------- 华丽分割线 ------------------------------//
/**
* 分页查询 返回list对象(通过对象)
* @param request
* @param response
* @return
*/
@RequestMapping(value = "/list.action")
public String list(Dqorder dqorder, Model model, HttpServletRequest request, HttpServletResponse response, HttpSession session) {
Pager<Dqorder> pagers = dqorderDao.findByEntity(dqorder);
model.addAttribute("pagers", pagers);
return "admin/dqorder/dqorder_list";
}
/**
* 分页查询 返回list对象(通过对象)
* @param request
* @param response
* @return
*/
@RequestMapping(value = "/list2.action")
public String list2(Dqorder dqorder, Model model, HttpServletRequest request, HttpServletResponse response, HttpSession session) {
Pager<Dqorder> pagers = dqorderDao.findByEntity(dqorder);
model.addAttribute("pagers", pagers);
return "admin/dqorder/dqorder_list2";
}
/**
* 分页查询 返回list对象(通过对象)
* @param request
* @param response
* @return
*/
@RequestMapping(value = "/list3.action")
public String list3(Dqorder dqorder, Model model, HttpServletRequest request, HttpServletResponse response, HttpSession session) {
Pager<Dqorder> pagers = dqorderDao.findByEntity(dqorder);
model.addAttribute("pagers", pagers);
return "admin/dqorder/dqorder_list3";
}
/**
* 跳转添加页面
*/
@RequestMapping(value = "/add.action")
public String add(Model model, HttpServletRequest request, HttpServletResponse response, HttpSession session) {
return "admin/dqorder/dqorder_add";
}
/**
* 跳至修改页面
*
* @return
*/
@RequestMapping(value = "/edit.action")
public String edit(Integer id, Model model) {
Dqorder bean = dqorderDao.load(id);
model.addAttribute("bean", bean);
return "admin/dqorder/dqorder_edit";
}
/**
* 跳至修改页面
*
* @return
*/
@RequestMapping(value = "/pingjia1.action")
public String pingjia1(Integer id, Model model) {
Dqorder bean = dqorderDao.load(id);
model.addAttribute("bean", bean);
return "admin/dqorder/dqorder_pingjia1";
}
/**
* 跳至修改页面
*
* @return
*/
@RequestMapping(value = "/pingjia2.action")
public String pingjia2(Integer id, Model model) {
Dqorder bean = dqorderDao.load(id);
model.addAttribute("bean", bean);
return "admin/dqorder/dqorder_pingjia2";
}
/**
* 添加信息保存
*/
@RequestMapping(value = "/save.action")
public String save(Dqorder dqorder, Model model, HttpServletRequest request, HttpServletResponse response, HttpSession session) {
dqorderDao.insert(dqorder);
model.addAttribute("msg", "订单创建成功");
return "common/succ";
}
/**
* 保存修改信息
*/
@RequestMapping(value = "/update1.action")
public String update1(Dqorder dqorder, Model model, HttpServletRequest request, HttpServletResponse response) {
Dqorder dqordertt = new Dqorder();
dqordertt.setYid(dqorder.getYid());
dqordertt.setYname(dqorder.getYname());
Pager<Dqorder> pagers = dqorderDao.findByEntity1(dqordertt);
if(pagers.getDatas().size() > 0){
model.addAttribute("msg", "用户评分太低不能接单");
return "common/succ";
}
dqorderDao.update(dqorder);
model.addAttribute("msg", "操作成功");
return "common/succ";
}
/**
* 保存修改信息
*/
@RequestMapping(value = "/update.action")
public String update(Dqorder dqorder, Model model, HttpServletRequest request, HttpServletResponse response) {
dqorderDao.update(dqorder);
// return "redirect:/dqorder/list.action";
model.addAttribute("msg", "操作成功");
return "common/succ";
}
/**
* 删除通过主键
* @return
*/
@RequestMapping(value = "/del.action")
public String delete(Integer id, Model model, HttpServletRequest request, HttpServletResponse response) {
// 真正删除
dqorderDao.deleteById(id);
// 状态删除
// Dqorder dqorder = dqorderDao.load(id);
// load.setDel(1);
// dqorderDao.update(load);
return "redirect:/dqorder/list.action";
}
// --------------------------------------- 华丽分割线------------------------------------------------------//
/**
* 分页查询 返回list json(通过对象)
* @param request
* @param response
* @return
*/
@RequestMapping(value = "/findByObj.json", produces = MediaType.APPLICATION_JSON_VALUE, method = RequestMethod.POST)
@ResponseBody
public String findByObjByEntity(Dqorder dqorder, Model model, HttpServletRequest request, HttpServletResponse response) {
// 分页查询
Pager<Dqorder> pagers = dqorderDao.findByEntity(dqorder);
JSONObject jsonObject = JsonUtil2.getJsonObject();
jsonObject.put("pagers", pagers);
jsonObject.put("obj", dqorder);
return jsonObject.toString();
}
package com.gssm.controller;
import java.io.File;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import net.sf.json.JSONObject;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import com.gssm.dao.OrderDaoImpl;
import com.gssm.entity.Order;
import com.gssm.util.JsonUtil2;
import com.gssm.util.Pager;
@Controller
@RequestMapping(value = "/order")
public class OrderController extends BaseController{
/**
* 依赖注入 start dao/===
*/
@Autowired
private OrderDaoImpl orderDao;
public OrderDaoImpl getOrderDao() {
return orderDao;
}
public void setOrderDao(OrderDaoImpl orderDao) {
this.orderDao = orderDao;
}
// --------------------------------------- 华丽分割线 ------------------------------//
/**
* 分页查询 返回list对象(通过对象)
* @param request
* @param response
* @return
*/
@RequestMapping(value = "/list.action")
public String list(Order order, Model model, HttpServletRequest request, HttpServletResponse response, HttpSession session) {
Pager<Order> pagers = orderDao.findByEntity(order);
model.addAttribute("pagers", pagers);
return "admin/order/order_list";
}
/**
* 跳转添加页面
*/
@RequestMapping(value = "/add.action")
public String add(Model model, HttpServletRequest request, HttpServletResponse response, HttpSession session) {
return "admin/order/order_add";
}
/**
* 跳至修改页面
*
* @return
*/
@RequestMapping(value = "/edit.action")
public String edit(Integer id, Model model) {
Order bean = orderDao.load(id);
model.addAttribute("bean", bean);
return "admin/order/order_edit";
}
/**
* 添加信息保存
*/
@RequestMapping(value = "/save.action")
public String save(Order order, Model model, HttpServletRequest request, HttpServletResponse response, HttpSession session) {
orderDao.insert(order);
model.addAttribute("msg", "订单创建成功");
return "common/succ";
}
/**
* 保存修改信息
*/
@RequestMapping(value = "/update.action")
public String update(Order order, Model model, HttpServletRequest request, HttpServletResponse response) {
orderDao.update(order);
model.addAttribute("msg", "订单修改成功");
return "common/succ";
}
/**
* 删除通过主键
* @return
*/
@RequestMapping(value = "/del.action")
public String delete(Integer id, Model model, HttpServletRequest request, HttpServletResponse response) {
// 真正删除
orderDao.deleteById(id);
// 状态删除
// Order order = orderDao.load(id);
// load.setDel(1);
// orderDao.update(load);
// return "redirect:/order/list.action";
model.addAttribute("msg", "订单删除成功");
return "common/succ";
}
// --------------------------------------- 华丽分割线------------------------------------------------------//
/**
* 分页查询 返回list json(通过对象)
* @param request
* @param response
* @return
*/
@RequestMapping(value = "/findByObj.json", produces = MediaType.APPLICATION_JSON_VALUE, method = RequestMethod.POST)
@ResponseBody
public String findByObjByEntity(Order order, Model model, HttpServletRequest request, HttpServletResponse response) {
// 分页查询
Pager<Order> pagers = orderDao.findByEntity(order);
JSONObject jsonObject = JsonUtil2.getJsonObject();
jsonObject.put("pagers", pagers);
jsonObject.put("obj", order);
return jsonObject.toString();
}
六、底部获取项目源码和万字论文参考(9.9¥带走)
有问题,或者需要协助调试运行项目的也可以