——————————DescriptionStart——————————
运行环境
Java≥8、MySQL≥5.7、Tomcat≥8
开发工具
eclipse/idea/myeclipse/sts等均可配置运行
适用
课程设计,大作业,毕业设计,项目练习,学习演示等
功能说明







基于javaweb的SSM+Maven物流后台管理系统(java+mysql+ssm+jsp)
emp1 123456
emp2 123456
emp3 123456
——————————CodeStart——————————
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46
| }
@RequestMapping("/list") public String list(Model model){ List<Store> list = storeService.list(); model.addAttribute("list",list); return "store-list"; }
@RequestMapping("/tosave") public String tosave(Model model){ List<Area> list = areaService.list(); model.addAttribute("list",list); return "store-add"; } @RequestMapping("/save") @ResponseBody public String save(Store store){ try { storeService.save(store); return "true"; } catch (Exception e) { e.printStackTrace(); return "false"; } }
@RequestMapping("outStore") @ResponseBody public String outStore(String oid, int cid, HttpSession session){ try { Employee employee=(Employee)session.getAttribute("USER_SESSION"); int eid = employee.getEid(); int sid = employee.getStore().getSid(); storeService.updateOutStore(oid,cid,sid,eid); return "true"; } catch (Exception e) { e.printStackTrace(); return "false"; } }
@RequestMapping("inStore") @ResponseBody
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45
| if ( actionType == null || !ActionMap.mapping.containsKey( actionType ) ) { return new BaseState( false, AppInfo.INVALID_ACTION ).toJSONString(); } if ( this.configManager == null || !this.configManager.valid() ) { return new BaseState( false, AppInfo.CONFIG_ERROR ).toJSONString(); } State state = null; int actionCode = ActionMap.getType( this.actionType ); Map<String, Object> conf = null; switch ( actionCode ) { case ActionMap.CONFIG: return this.configManager.getAllConfig().toString(); case ActionMap.UPLOAD_IMAGE: case ActionMap.UPLOAD_SCRAWL: case ActionMap.UPLOAD_VIDEO: case ActionMap.UPLOAD_FILE: conf = this.configManager.getConfig( actionCode ); state = new Uploader( request, conf ).doExec(); break; case ActionMap.CATCH_IMAGE: conf = configManager.getConfig( actionCode ); String[] list = this.request.getParameterValues( (String)conf.get( "fieldName" ) ); state = new ImageHunter( conf ).capture( list ); break; case ActionMap.LIST_IMAGE: case ActionMap.LIST_FILE: conf = configManager.getConfig( actionCode ); int start = this.getStartIndex(); state = new FileManager( conf ).listFile( start ); break; } return state.toJSONString(); }
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44
| } return "false"; }
private void addCookie(HttpServletResponse response,String username){ Cookie cookie=new Cookie("username",username); cookie.setPath("/"); cookie.setMaxAge(60*60*24*7); response.addCookie(cookie); }
@RequestMapping("/tologin") public String tologin(){ return "login"; }
@RequestMapping("/change") public String change(HttpSession session){ session.removeAttribute("USER_SESSION"); return "login"; }
@RequestMapping("/logout") public String logout(HttpSession session,HttpServletResponse response){ session.removeAttribute("USER_SESSION"); Cookie cookie=new Cookie("username",null); cookie.setPath("/"); cookie.setMaxAge(0); response.addCookie(cookie); return "login"; }
@RequestMapping("/tosave") public String tosave(){ return "admin-add"; }
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43
| if ( this.configManager == null || !this.configManager.valid() ) { return new BaseState( false, AppInfo.CONFIG_ERROR ).toJSONString(); } State state = null; int actionCode = ActionMap.getType( this.actionType ); Map<String, Object> conf = null; switch ( actionCode ) { case ActionMap.CONFIG: return this.configManager.getAllConfig().toString(); case ActionMap.UPLOAD_IMAGE: case ActionMap.UPLOAD_SCRAWL: case ActionMap.UPLOAD_VIDEO: case ActionMap.UPLOAD_FILE: conf = this.configManager.getConfig( actionCode ); state = new Uploader( request, conf ).doExec(); break; case ActionMap.CATCH_IMAGE: conf = configManager.getConfig( actionCode ); String[] list = this.request.getParameterValues( (String)conf.get( "fieldName" ) ); state = new ImageHunter( conf ).capture( list ); break; case ActionMap.LIST_IMAGE: case ActionMap.LIST_FILE: conf = configManager.getConfig( actionCode ); int start = this.getStartIndex(); state = new FileManager( conf ).listFile( start ); break; } return state.toJSONString(); }
public int getStartIndex () {
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
| }
@RequestMapping("/sendlist") public String sendlist(Model model){ List<OrderInfo> list = orderInfoService.listByStats(1); model.addAttribute("list",list); return "order-send"; }
@RequestMapping("/updateReceivere") @ResponseBody public String updateReceivere(String onum, HttpSession session){ try { orderInfoService.updateReceivere(onum,session); return "true"; } catch (Exception e) { e.printStackTrace(); return "false"; } }
@RequestMapping("/updateSend") @ResponseBody public String updateSend(String onum, HttpSession session){ try { orderInfoService.updateSend(onum,session); return "true"; } catch (Exception e) { e.printStackTrace(); return "false"; } }
@RequestMapping("/count") @ResponseBody public String count(){ List<DataResult> count = orderInfoService.count(); return JSON.toJSONString(count); }
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
|
@RequestMapping("inStore") @ResponseBody public String inStore(String oid, HttpSession session){ try { Employee employee=(Employee)session.getAttribute("USER_SESSION"); int eid = employee.getEid(); int sid = employee.getStore().getSid(); storeService.updateInStore(oid,sid,eid); return "true"; } catch (Exception e) { e.printStackTrace(); return "false"; } }
}
@RequestMapping("/car") @Controller public class CarController {
@Autowired private CarService carService; @Autowired private StoreService storeService;
@RequestMapping("/list")
|
——————————PayStart——————————
项目链接:
https://javayms.github.io?id=011723490309201dp
https://javayms.pages.dev?id=011723490309201dp