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





基于javaweb的SSM车牌识别停车场管理系统(java+ssm+mysql+jsp+OCR)
登录:
admin 123456
功能:车牌监控识别(进场)、车辆管理、停车管理、缴费管理等
本项目使用的是腾讯云的文字识别(OCR)服务
——————————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 47
| finance.setFinanceType(2); finance.setOprTime(new Date()); finance.setUserName(user.getUserName()); finance.setRemark("【"+carNo+"】:出场,扣款:"+carFee+"元" ); finance.setTotalMoney(carFee); dbService.financeAdd(finance); carInfo.setRemainMoney(-finance.getTotalMoney()); dbService.updateMoney(carInfo); } json.put("msg","【"+carNo+"】:出场,扣款:"+carFee+"元" ); } }else{ remark="包月停车"; car.setFinanceType(1); if(c==null){ car.setCarFee(0); car.setInPic(inPic); car.setInTime(sdf.format(new Date())); car.setRemark(remark); car.setStatus(0); dbService.carIn(car); json.put("msg","包月车【"+carNo+"】:入场" ); }else{ car.setCarFee(0); car.setStatus(2); car.setOutPic(inPic); car.setOutTime(sdf.format(new Date())); car.setRemark(remark); car.setCarId(c.getCarId()); dbService.carOut(car); if(carInfo.getDiffDate()>0){ json.put("msg","包月车【"+carNo+"】:出场,还剩"+carInfo.getDiffDate()+"天" ); }else{ json.put("msg","包月车【"+carNo+"】:出场,请及时缴费" ); } } } }else{ json.put("errorCode", resp.getRet()); json.put("msg", "车牌识别失败"); } } return json; }
|
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 47 48 49 50 51 52 53
| public void carIn(CarVo car){ carDAO.carIn(car); }
@Transactional public void carOut(CarVo car){ carDAO.carOut(car); }
@Transactional public List<CarVo> findAll(CarVo car){ return carDAO.findAll(car); } @Transactional public int count(CarVo carVo,PageObject pager){ return carDAO.count(carVo, pager); } @Transactional public List<CarVo> findByCarNo(CarVo carVo,PageObject pager){ return carDAO.findByCarNo(carVo,pager); }
public CarVo findByStatus(CarVo car){ return carDAO.findByStatus(car); }
@Transactional public void reg(UserVo user){ userDAO.reg(user); }
@Transactional public void pwd(UserVo user){ userDAO.pwd(user); }
@Transactional public List<UserVo> userList(){ return userDAO.userList(); }
@Transactional public void updStatus(UserVo user){ userDAO.updStatus(user); }
@Transactional public UserVo login(UserVo user){ return userDAO.login(user); }
@Transactional
|
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
|
@Service public class DbService { @Resource UserDAO userDAO; @Resource CarDAO carDAO; @Resource SysSetDAO sysDAO; @Resource CarInfoDAO carInfoDAO; @Resource FinanceDAO financeDAO; @Transactional public void carIn(CarVo car){ carDAO.carIn(car); } @Transactional public void carOut(CarVo car){ carDAO.carOut(car); } @Transactional public List<CarVo> findAll(CarVo car){ return carDAO.findAll(car); } @Transactional public int count(CarVo carVo,PageObject pager){ return carDAO.count(carVo, pager); } @Transactional public List<CarVo> findByCarNo(CarVo carVo,PageObject pager){ return carDAO.findByCarNo(carVo,pager); } public CarVo findByStatus(CarVo car){
|
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
| public void setShoufeiMoney(float shoufeiMoney) { this.shoufeiMoney = shoufeiMoney; } }
public class UserVo implements Serializable{
private String userId; private String password; private String userName; private String mobile; private int status; public String getUserId() { return userId; } public void setUserId(String userId) { this.userId = userId; } public String getPassword() { return password; } public void setPassword(String password) { this.password = password; } public String getUserName() { return userName; } public void setUserName(String userName) { this.userName = userName; } public String getMobile() { return mobile; } public void setMobile(String mobile) { this.mobile = mobile; } public int getStatus() { return status; } public void setStatus(int status) { this.status = status; } }
|
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
| return "login"; }
@RequestMapping(value = "/login", method = RequestMethod.POST) public String login(HttpServletRequest request, Model model) { String msg = ""; HttpSession session = request.getSession(); if (session.getAttribute("rand") == null) { return "login"; } String loginName = request.getParameter("loginName"); String password = request.getParameter("password"); String randCode = request.getParameter("randCode");
String rand = session.getAttribute("rand").toString(); rand = rand.toUpperCase(); randCode = randCode.toUpperCase(); if (!rand.equals(randCode)) { msg = "验证码错误"; model.addAttribute("msg", msg); return "login"; } UserVo user = new UserVo(); user.setUserId(loginName); user.setPassword(password); user = dbService.login(user); if (user == null) { msg = "用户名或密码错误"; model.addAttribute("msg", msg); return "login"; } if(user.getStatus()==0){ msg = "该用户已被禁止登陆"; model.addAttribute("msg", msg); return "login"; } session.setAttribute("userinfo", user); if(request.getServletContext().getAttribute("sysSet")==null){ SysSetVo sysSet = dbService.getSet(); request.getServletContext().setAttribute("sysSet", sysSet);
|
——————————PayStart——————————
项目链接:
https://javayms.github.io?id=222323142309201fq
https://javayms.pages.dev?id=222323142309201fq