直接上代码
/**
* 费用报销数据 保存
* @param model
* @return
*/
@RequestMapping(value ="/save_apply_fee",method=RequestMethod.POST)
public String home(FormtableMain35 formtableMain35,Model model,String redirectUrl,String userid,String workflowid,RedirectAttributes modelParam) {
modelParam.addAttribute("userid", userid);
modelParam.addAttribute("workflowid", workflowid);
ObjectMapper mapper = new ObjectMapper();
String jsonObject = null;
try {
try {
jsonObject = mapper.writeValueAsString(formtableMain35);
modelParam.addAttribute("jsonObject", jsonObject);
} catch (JsonProcessingException e) {
e.printStackTrace();
}
//HttpHelper.doPost2(redirectUrl, jsonObject);
} catch (Exception e) {
e.printStackTrace();
}
return "redirect:"+redirectUrl;
}