赞
踩
基于javaweb+mysql的ssm校园快递物流管理系统(java+jsp+ssm+javabean+mysql+tomcat)
运行环境
Java≥8、MySQL≥5.7、Tomcat≥8
开发工具
eclipse/idea/myeclipse/sts等均可配置运行
适用
课程设计,大作业,毕业设计,项目练习,学习演示等
功能说明
内容:源码+数据库脚本+论文
本系统采用SSM框架和MySQL数据库进行开发实现。
本系统实现了三大模块:
管理员模块具备快递人员管理、物流订单管理、取件发件管理以及系统其他配置功能;
用户模块具备发布代取件、送件信息管理、评价功能和查询订单功能等;
快递员模块具备物流订单管理功能和公告功能。
管理员
用户
快递员
技术框架
JavaBean JSP SSM(Spring SpringMVC MyBatis) MySQL Bootstrap JavaScript CSS
基于javaweb+mysql的SSM校园快递物流管理系统(java+jsp+ssm+javabean+mysql+tomcat)
* @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"; }
/** * 添加信息保存 */ @RequestMapping(value = "/save.action") public String save(Gonggao gonggao, Model model, HttpServletRequest request, HttpServletResponse response, HttpSession session) { gonggaoDao.insert(gonggao); return "redirect:/gonggao/list.action"; } /** * 保存修改信息 */ @RequestMapping(value = "/update.action") public String update(Gonggao gonggao, Model model, HttpServletRequest request, HttpServletResponse response) { gonggaoDao.update(gonggao); return "redirect:/gonggao/list.action"; } /** * 删除通过主键 * @return */ @RequestMapping(value = "/del.action") public String delete(Integer id, Model model, HttpServletRequest request, HttpServletResponse response) { // 真正删除 gonggaoDao.deleteById(id); // 状态删除 // Gonggao gonggao = gonggaoDao.load(id); // load.setDel(1); // gonggaoDao.update(load); return "redirect:/gonggao/list.action"; } // --------------------------------------- 华丽分割线------------------------------------------------------// /** * 分页查询 返回list json(通过对象) * @param request
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 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"; }
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(通过对象)
@Controller @RequestMapping(value = "/user") public class UserController extends BaseController{ /** * 依赖注入 start dao/=== */ @Autowired private UserDaoImpl userDao; public UserDaoImpl getUserDao() { return userDao; } public void setUserDao(UserDaoImpl userDao) { this.userDao = userDao; } // --------------------------------------- 华丽分割线 ------------------------------// /** * 分页查询 返回list对象(通过对象) * @param request * @param response * @return */ @RequestMapping(value = "/list.action") public String list(User user, Model model, HttpServletRequest request, HttpServletResponse response, HttpSession session) { Pager<User> pagers = userDao.findByEntity(user); model.addAttribute("pagers", pagers); return "admin/user/user_list"; } /** * 跳转添加页面 */ @RequestMapping(value = "/add.action") public String add(Model model, HttpServletRequest request, HttpServletResponse response, HttpSession session) { return "admin/user/user_add"; } /** * 跳至修改页面 * * @return */ @RequestMapping(value = "/edit.action")
} // --------------------------------------- 华丽分割线------------------------------------------------------// /** * 分页查询 返回list json(通过对象) * * @param request * @param response * @return */ @RequestMapping(value = "/findByObj.json", produces = MediaType.APPLICATION_JSON_VALUE, method = RequestMethod.POST) @ResponseBody public String findByObjByEntity(Admin admin, Model model, HttpServletRequest request, HttpServletResponse response) { // 分页查询 Pager<Admin> pagers = adminDao.findByEntity(admin); JSONObject jsonObject = JsonUtil2.getJsonObject(); jsonObject.put("pagers", pagers); jsonObject.put("obj", admin); return jsonObject.toString(); } } @Controller @RequestMapping(value = "/user") public class UserController extends BaseController{ /** * 依赖注入 start dao/=== */ @Autowired private UserDaoImpl userDao; public UserDaoImpl getUserDao() { return userDao; }
// gonggaoDao.update(load); return "redirect:/gonggao/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(Gonggao gonggao, Model model, HttpServletRequest request, HttpServletResponse response) { // 分页查询 Pager<Gonggao> pagers = gonggaoDao.findByEntity(gonggao); JSONObject jsonObject = JsonUtil2.getJsonObject(); jsonObject.put("pagers", pagers); jsonObject.put("obj", gonggao); return jsonObject.toString(); } // --------------------------------------- 华丽分割线------------------------------ // } @Controller @RequestMapping(value = "/yuangong") public class YuangongController extends BaseController{ /** * 依赖注入 start dao/=== */ @Autowired
/** * 添加信息保存 */ @RequestMapping(value = "/save.action") public String save(Gonggao gonggao, Model model, HttpServletRequest request, HttpServletResponse response, HttpSession session) { gonggaoDao.insert(gonggao); return "redirect:/gonggao/list.action"; } /** * 保存修改信息 */ @RequestMapping(value = "/update.action") public String update(Gonggao gonggao, Model model, HttpServletRequest request, HttpServletResponse response) { gonggaoDao.update(gonggao); return "redirect:/gonggao/list.action"; } /** * 删除通过主键 * @return */ @RequestMapping(value = "/del.action") public String delete(Integer id, Model model, HttpServletRequest request, HttpServletResponse response) { // 真正删除 gonggaoDao.deleteById(id); // 状态删除 // Gonggao gonggao = gonggaoDao.load(id); // load.setDel(1); // gonggaoDao.update(load); return "redirect:/gonggao/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(Gonggao gonggao, Model model, HttpServletRequest request, HttpServletResponse response) { // 分页查询 Pager<Gonggao> pagers = gonggaoDao.findByEntity(gonggao); JSONObject jsonObject = JsonUtil2.getJsonObject(); jsonObject.put("pagers", pagers); jsonObject.put("obj", gonggao); return jsonObject.toString(); }
{ Yuangong user = new Yuangong(); user.setLoginname(userName); user.setPwd(userPw); Pager<Yuangong> pagers = yuangongDao.findByEntity(user); if (pagers.getTotal() == 0) { request.setAttribute("msg", "用户名或者密码错误!"); return "login"; } else { user = (Yuangong) pagers.getDatas().get(0); session.setAttribute("userType", 1); session.setAttribute("yuangong", user); return "admin/index"; } } if (userType == 2)//用户登录 { User user = new User(); user.setLoginname(userName); user.setPwd(userPw); Pager<User> pagers = userDao.findByEntity(user); if (pagers.getTotal() == 0) { request.setAttribute("msg", "用户名或者密码错误!"); return "login"; } else { user = (User) pagers.getDatas().get(0); session.setAttribute("userType", 2); session.setAttribute("user", user); return "admin/index"; } } return "admin/index"; } }
/** * 添加信息保存 */ @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) {
@RequestMapping(value = "/list.action") public String list(Yuangong yuangong, Model model, HttpServletRequest request, HttpServletResponse response, HttpSession session) { Pager<Yuangong> pagers = yuangongDao.findByEntity(yuangong); model.addAttribute("pagers", pagers); return "admin/yuangong/yuangong_list"; } /** * 跳转添加页面 */ @RequestMapping(value = "/add.action") public String add(Model model, HttpServletRequest request, HttpServletResponse response, HttpSession session) { return "admin/yuangong/yuangong_add"; } /** * 跳至修改页面 * * @return */ @RequestMapping(value = "/edit.action") public String edit(Integer id, Model model) { Yuangong bean = yuangongDao.load(id); model.addAttribute("bean", bean); return "admin/yuangong/yuangong_edit"; } /** * 添加信息保存 */ @RequestMapping(value = "/save.action") public String save(Yuangong yuangong, Model model, HttpServletRequest request, HttpServletResponse response, HttpSession session) { yuangongDao.insert(yuangong); return "redirect:/yuangong/list.action"; } /** * 保存修改信息 */ @RequestMapping(value = "/update.action") public String update(Yuangong yuangong, Model model, HttpServletRequest request, HttpServletResponse response) { yuangongDao.update(yuangong); return "redirect:/yuangong/list.action"; } /** * 删除通过主键 * @return */ @RequestMapping(value = "/del.action") public String delete(Integer id, Model model, HttpServletRequest request, HttpServletResponse response) { // 真正删除
private YuangongDaoImpl yuangongDao; public YuangongDaoImpl getYuangongDao() { return yuangongDao; } public void setYuangongDao(YuangongDaoImpl yuangongDao) { this.yuangongDao = yuangongDao; } // --------------------------------------- 华丽分割线 ------------------------------// /** * 分页查询 返回list对象(通过对象) * @param request * @param response * @return */ @RequestMapping(value = "/list.action") public String list(Yuangong yuangong, Model model, HttpServletRequest request, HttpServletResponse response, HttpSession session) { Pager<Yuangong> pagers = yuangongDao.findByEntity(yuangong); model.addAttribute("pagers", pagers); return "admin/yuangong/yuangong_list"; } /** * 跳转添加页面 */ @RequestMapping(value = "/add.action") public String add(Model model, HttpServletRequest request, HttpServletResponse response, HttpSession session) { return "admin/yuangong/yuangong_add"; } /** * 跳至修改页面 * * @return */ @RequestMapping(value = "/edit.action") public String edit(Integer id, Model model) { Yuangong bean = yuangongDao.load(id); model.addAttribute("bean", bean); return "admin/yuangong/yuangong_edit"; } /** * 添加信息保存 */ @RequestMapping(value = "/save.action") public String save(Yuangong yuangong, Model model, HttpServletRequest request, HttpServletResponse response, HttpSession session) { yuangongDao.insert(yuangong); return "redirect:/yuangong/list.action"; }
* * @version 1.0 * @deprecated 跳转添加页面 */ @RequestMapping(value = "/add.action") public String add(Model model, HttpServletRequest request, HttpServletResponse response, HttpSession session) { return "admin/admin/admin_add"; } /** * @return * @version 1.0 * @deprecated 跳至修改页面 */ @RequestMapping(value = "/edit.action") public String edit(Integer id, Model model) { Admin bean = adminDao.load(id); model.addAttribute("bean", bean); return "admin/admin/admin_edit"; } /** * @version 1.0 * @deprecated 添加信息保存 */ @RequestMapping(value = "/save.action") public String save(Admin admin, Model model, HttpServletRequest request, HttpServletResponse response, HttpSession session) { adminDao.insert(admin); return "redirect:/admin/list.action"; } /** * @version 1.0 * @deprecated 保存修改信息 */ @RequestMapping(value = "/update.action") public String update(Admin admin, Model model, HttpServletRequest request, HttpServletResponse response) { adminDao.update(admin); return "redirect:/admin/list.action"; } /**
} /** * 跳至修改页面 * * @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"; } /** * 保存修改信息
// userDao.update(load); return "redirect:/user/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(User user, Model model, HttpServletRequest request, HttpServletResponse response) { // 分页查询 Pager<User> pagers = userDao.findByEntity(user); JSONObject jsonObject = JsonUtil2.getJsonObject(); jsonObject.put("pagers", pagers); jsonObject.put("obj", user); return jsonObject.toString(); } // --------------------------------------- 华丽分割线------------------------------ // } @Controller
/** * 跳转添加页面 */ @RequestMapping(value = "/add.action") public String add(Model model, HttpServletRequest request, HttpServletResponse response, HttpSession session) { return "admin/yuangong/yuangong_add"; } /** * 跳至修改页面 * * @return */ @RequestMapping(value = "/edit.action") public String edit(Integer id, Model model) { Yuangong bean = yuangongDao.load(id); model.addAttribute("bean", bean); return "admin/yuangong/yuangong_edit"; } /** * 添加信息保存 */ @RequestMapping(value = "/save.action") public String save(Yuangong yuangong, Model model, HttpServletRequest request, HttpServletResponse response, HttpSession session) { yuangongDao.insert(yuangong); return "redirect:/yuangong/list.action"; } /** * 保存修改信息 */ @RequestMapping(value = "/update.action") public String update(Yuangong yuangong, Model model, HttpServletRequest request, HttpServletResponse response) { yuangongDao.update(yuangong); return "redirect:/yuangong/list.action"; } /** * 删除通过主键 * @return */ @RequestMapping(value = "/del.action") public String delete(Integer id, Model model, HttpServletRequest request, HttpServletResponse response) { // 真正删除 yuangongDao.deleteById(id); // 状态删除
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。