请问如何在执行完保存这个方法之后再执行进入页面的方法进行查询呢???
//---建设项目情况---start
/**
* 进入建设项目业务页面
* @param nmSqbId 报件主键
* @return
*/
@At("/constructionSituation")
@Ok("jsp:jsp.work.designRequire.constructionSituation")
public Map<String, Object> toConstructionSituation(@Param("nmSqbId")Integer nmSqbId){
Map<String, Object> result = new HashMap<String, Object>();
QfgProjectInfo projectInfo = dao.fetch(QfgProjectInfo.class, nmSqbId);
QfgDesignRequire designRequire = dao.fetch(QfgDesignRequire.class, nmSqbId);
Criteria cri = Cnd.cri();
cri.where().andEquals("nmSqbId", nmSqbId);
cri.getOrderBy().asc("qfgRightId");
List<QfgRightInfo> rightInfoList = dao.query(QfgRightInfo.class, cri);
result.put("nmSqbId", nmSqbId);
result.put("projectInfo", projectInfo);
result.put("designRequire", designRequire);
result.put("rightInfoList", rightInfoList);
return result;
}
/**
* 保存建设情况
* @param projectInfo 项目总表
* @param designRequire 规划要求
* @param session
* @return
*/
@At("/saveCS")
@Ok("jsp:jsp.work.designRequire.constructionSituation")
public Object saveConstructionSituation(@Param("::projectInfo.")QfgProjectInfo projectInfo,@Param("::designRequire.")QfgDesignRequire designRequire,HttpSession session){
NutMap map = new NutMap();
if(projectInfo.getNmSqbId()==null||designRequire.getNmSqbId()==null){
return map.setv("ok", false);
}
QfgProjectInfo oldProjectInfo = dao.fetch(QfgProjectInfo.class,projectInfo.getNmSqbId());
QfgDesignRequire oldDesignRequire = dao.fetch(QfgDesignRequire.class,designRequire.getNmSqbId());
try {
if(oldProjectInfo==null){
//土地类型
projectInfo.setStLandType("3");
//默认未生成xml
projectInfo.setStIfGenXml("0");
//业务类型
projectInfo.setStBusCode("WD_TJ_XB");
wondersDao.fastInsert(projectInfo, session);//此处使用fastInsert方法,避免报件主键被自动生成的序列覆盖
}else{
projectInfo.setDtUpdateDate(new Date());
projectInfo.setNmUpdateUser(UserUtils.getUserIdFromSession(session));
Daos.ext(dao, FieldFilter.locked(QfgProjectInfo.class,
"^stIfGenXml|stApproveNode|stIfFinish|stReservationNum|stBusCode|stLandType|stProjectId|dtInsertDate|nmInsertUser$")).update(projectInfo);
//wondersDao.update(projectInfo, session);
}
} catch (Exception e) {
e.printStackTrace();
return map.setv("ok", false);
}
try {
if(oldDesignRequire==null){
wondersDao.insert(designRequire, session);
}else{
wondersDao.update(designRequire, session);
}
} catch (Exception e) {
e.printStackTrace();
return map.setv("ok", false);
}
return map.setv("ok", true).setv("nmSqbId", projectInfo.getNmSqbId());
}