日期:2014-05-19 浏览次数:20735 次
@RequestMapping("/{modelName}.do")
public ModelAndView addObject(
@ModelAttribute("workLog") WorkLog workLog,
@ModelAttribute("workPlan") WorkPlan workPlan,
@ModelAttribute("approvalProcess") ApprovalProcess approvalProcess,
@PathVariable("modelName") String modelName,
@RequestParam(value = "op", required = false, defaultValue = "") String op,
@RequestParam(value = "id", required = false, defaultValue = "") Integer id) {
ModelAndView mav = new ModelAndView();
log.info("==============" + modelName + "==" + op + "==" + id);
HashMap inputMap = new HashMap();
HashMap outputMap = new HashMap();
Object obj=new Object();
if (!op.equals("")) {
switch (op) {
case "add":
inputMap.put("modelName", modelName);
inputMap.put("object",this.getObject(modelName));
log.info("Ltime=============================="+workLog.getlTime());
obj = this.addObject(inputMap, outputMap);
mav.addObject("return_obj", obj);
mav.setViewName(this.getTargetUrl(modelName));
private Object getObject(String modelName) {
Object object =new Object();
return object;
}