日期:2014-05-18 浏览次数:20654 次
@RequestMapping("/containerList/save")
public ModelAndView saveContainer(HttpServletRequest request,
@RequestParam(value ="pUid") String pUid,
@RequestParam(value="op") String op,
ModelMap modelMap,
@RequestParam(value="fgdd2") String fgdd,
@RequestParam(value="taskId") String taskId){
ModelAndView mav = new ModelAndView();
LmcsDischarge tmpDischarge = null;
mav.addAllObjects(modelMap);
modelMap.put("msg", "保存成功!");
if(op !=null && "save".equals(op)){
if(fgdd != null && !"".equals(fgdd)) {
tmpDischarge = dischargeService.getDischargeById(fgdd);
if(tmpDischarge !=null){
//更新任务逻辑
workTaskService.updateFGDDByTaskID(taskId, fgdd);
}else{
//重复校验
modelMap.put("msg", "放柜地点编码不存在,请重新输入!");
}
}
}
modelMap.put("pUid", pUid);
//mav.setViewName("forward:/workflow/container/containerList");
return mav;
return new ModelAndView("DummyRedirect");//换成你想跳转的页面
然后在view.xml里定义bean
<bean id="DummyRedirect"
class="org.springframework.web.servlet.view.RedirectView">
<property name="url" value="DummyRedirectPage.htm" />
</bean>
同时,servlet.xml里定义
<bean class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping">
<property name="mappings">