资源简介
实施例公开了一种智能拼车的方法及系统,包括获取拼车信息,并将所述拼车信息发送至处理装置;其中,所述拼车信息包括目的地信息及剩余座位数信息;所述处理装置将所述拼车信息进行显示前处理,并将处理后的拼车信息发送至显示装置;所述显示装置接收所述处理后的拼车信息,并将所述处理后的拼车信息在车体外部进行显示,从而使有拼车需求的人及时知道车辆的目的地信息及剩余座位数信息,若与本人所要到的地点顺路并且有剩余座位时,可以拼车,从而提高汽车使用效率,减少汽车数量
代码片段和文件信息
package com.cars.controller;
import java.util.List;
import java.util.UUID;
import javax.servlet.http.HttpServletRequest;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;
import com.cars.model.Carpassengerapply;
import com.cars.services.applyServices;
import com.cars.services.carOwnerService;
import com.cars.services.passengerService;
@Controller
public class ApplyController {
@Autowired
private carOwnerService carOwnerService;
@Autowired
private passengerService passengerService;
@Autowired
private applyServices applyServices;
// 车主申请
@RequestMapping(“/carOwnerApply.do“)
private String carOwnerinsertApply(HttpServletRequest request
Carpassengerapply carpassengerapply) {
carpassengerapply.setApplypassengerid(request.getParameter(“ppid“));
carpassengerapply.setApplypassengername(request.getParameter(“ppname“));
carpassengerapply.setApplycarownerid(request.getSession()
.getAttribute(“userid“).toString());
carpassengerapply.setApplycarownername(request.getSession()
.getAttribute(“username“).toString());
if (applyServices.insertSelective(carpassengerapply) == 1) {
return “carownermain“;
} else {
return “index“;
}
}
// 乘客申请
@RequestMapping(“/passengerApply.do“)
private String passengerinsertApply(HttpServletRequest request
Carpassengerapply carpassengerapply) {
carpassengerapply.setApplycarownerid(request.getParameter(“cpid“));
carpassengerapply.setApplycarownername(request.getParameter(“cpname“));
carpassengerapply.setApplypassengerid(request.getSession()
.getAttribute(“userid“).toString());
carpassengerapply.setApplypassengername(request.getSession()
.getAttribute(“username“).toString());
if (applyServices.insertSelective(carpassengerapply) == 1) {
return “passengermain“;
} else {
return “index“;
}
}
// 车主查看申请
@RequestMapping(“/carownerLookApply“)
private ModelAndView lookApply(HttpServletRequest request) {
String Username = request.getSession().getAttribute(“username“)
.toString();
List list = applyServices
.selectByPrimaryKname(Username);
ModelAndView model = new ModelAndView(“carLookApply“);
model.addobject(“lookapplylist“ list);
return model;
}
// 乘客查看申请
@RequestMapping(“/PassengerlookApply“)
private ModelAndView PassengerlookApply(HttpServletRequest request) {
String Username = request.getSession().getAttribute(“username“)
.toString();
List list = applyServices
.selectByPrimaryKPname(Username);
ModelAndView model = new ModelAndView(“passengerLookApply“);
model.addobject(“lookapplylist“ list);
return model;
}
//车主同意申请
@RequestMapping(“/carAgreePassenger“)
private String carAgreepassen(HttpServletRequest reques
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2017-09-25 10:31 carSharing\
文件 1357 2017-09-25 10:30 carSharing\.classpath
文件 1369 2017-09-25 10:30 carSharing\.project
目录 0 2017-09-25 10:31 carSharing\.settings\
文件 639 2017-09-25 10:30 carSharing\.settings\.jsdtscope
文件 78 2017-09-25 10:30 carSharing\.settings\com.genuitec.eclipse.migration.prefs
文件 876 2017-09-25 10:30 carSharing\.settings\org.eclipse.core.resources.prefs
文件 430 2017-09-25 10:30 carSharing\.settings\org.eclipse.jdt.core.prefs
文件 90 2017-09-25 10:30 carSharing\.settings\org.eclipse.m2e.core.prefs
文件 779 2017-09-25 10:30 carSharing\.settings\org.eclipse.wst.common.component
文件 296 2017-09-25 10:30 carSharing\.settings\org.eclipse.wst.common.project.facet.core.xm
文件 49 2017-09-25 10:30 carSharing\.settings\org.eclipse.wst.jsdt.ui.superType.container
文件 6 2017-09-25 10:30 carSharing\.settings\org.eclipse.wst.jsdt.ui.superType.name
文件 50 2017-09-25 10:30 carSharing\.settings\org.eclipse.wst.validation.prefs
文件 402 2017-09-25 10:30 carSharing\.settings\testjsp
文件 82 2017-09-25 10:30 carSharing\.settings\Unti
文件 5965 2017-09-25 10:30 carSharing\pom.xm
目录 0 2017-09-25 10:31 carSharing\src\
目录 0 2017-09-25 10:31 carSharing\src\main\
目录 0 2017-09-25 10:31 carSharing\src\main\java\
目录 0 2017-09-25 10:31 carSharing\src\main\java\com\
目录 0 2017-09-25 10:31 carSharing\src\main\java\com\cars\
目录 0 2017-09-25 10:31 carSharing\src\main\java\com\cars\controller\
文件 4562 2017-09-25 10:30 carSharing\src\main\java\com\cars\controller\ApplyController.java
文件 5425 2017-09-25 10:30 carSharing\src\main\java\com\cars\controller\CarownerController.java
文件 4772 2017-09-25 10:30 carSharing\src\main\java\com\cars\controller\PassengerController.java
文件 3511 2017-09-25 10:30 carSharing\src\main\java\com\cars\controller\UserController.java
文件 2895 2017-09-25 10:30 carSharing\src\main\java\com\cars\controller\UserInfocontroller.java
目录 0 2017-09-25 10:31 carSharing\src\main\java\com\cars\dao\
文件 590 2017-09-25 10:30 carSharing\src\main\java\com\cars\dao\CarownerpublishMapper.java
文件 668 2017-09-25 10:30 carSharing\src\main\java\com\cars\dao\CarpassengerapplyMapper.java
............此处省略297个文件信息
评论
共有 条评论