|
我正在做一个会议室管理的程序,利用代码生成的代码进行改造,改动如下:
1. 对Controller的goAdd增加如下代码
/**
* 会议室预订管理新增页面跳转
*
* @return
*/
@RequestMapping(params = "goAdd")
public ModelAndView goAdd(JformHysglEntity jformHysgl, HttpServletRequest req) {
if (StringUtil.isNotEmpty(jformHysgl.getId())) {
jformHysgl = jformHysglService.getEntity(JformHysglEntity.class, jformHysgl.getId());
req.setAttribute("jformHysglPage", jformHysgl);
}
//以下为增加代码
TSUser me = ResourceUtil.getSessionUserName();
jformHysgl.setSqr(me.getUserName());
jformHysgl.setSqDept(me.getTSDepart().getDepartname());
req.setAttribute("jformHysglPage", jformHysgl);
System.out.println(req.getAttribute("jformHysglPage"));
//以上为增加代码
return new ModelAndView("org/jeecgframework/web/bjsat/hysgl/jformHysgl-add");
}
2. 对jformHysgl-add.jsp增加代码
<input ... value='${jformHysglPage.sqr}'....>
|
|