/** * 添加页面跳转 * @param model */
@RequiresPermissions("tcc:yyxx:add")
@RequestMapping(value = "create" , method = RequestMethod.GET)
public String create(Model model) {
Map<String,Object> yyxxdj = new HashMap<>();
ShiroRealm.ShiroUser sessionuser= UserUtil.getCurrentShiroUser();
model.addAttribute("yyxxdj", yyxxdj);
model.addAttribute("action", "create");
model.addAttribute("usertype",UserUtil.getCurrentShiroUser().getUsertype());
return "tcc/yyxx/form";
}
/**
* 添加
* @param fsm,model
*/
@RequiresPermissions("tcc:yyxx:add")
@RequestMapping(value = "create")
@ResponseBody
public String create(@Valid AppointmenInformationEntity fsm, Model model)throws Exception {
String datasuccess="success";
ShiroRealm.ShiroUser sessionuser= UserUtil.getCurrentShiroUser();
Timestamp t= DateUtils.getSysTimestamp();
fsm.setS1(t);
fsm.setS2(t);
fsm.setS3(0);
fsm.setCompanyid(sessionuser.getTransportcompanyid());
AppointmenInformationService.addInfo(fsm);
return datasuccess;
}