@Action("merger2Team") // 请求入径为/absale/team/merger2Team.action public void merger2Team() { try { TeamMixInfoBean teamMixInfoBean = this.entity; // TeamMixInfoBean teamMixInfoBean = test1(); Long baseTid = teamMixInfoBean.getTid(); Long otherTid = teamMixInfoBean.getMergerTid(); // List<ObjRelationBean> rb = new ArrayList<ObjRelationBean>();//代码走查 add by guojian at // 2010-11-5 for 去除警告 /** *************** 从入参获取数据,写入到t1,t2,根据业务,如有需要,则添加rb **************** */ if (service.merger2Team(baseTid, otherTid)) { Struts2Utils.renderJson(ExtjsHelper.toJsonObjectResult(new Info(true, "修改成功!"))); } else { Struts2Utils.renderJson(ExtjsHelper.toJsonObjectResult(new Info(false, "修改失败!"))); } } catch (ServiceException se) { logger.error( "com.isoftstone.framework.modules.web.team.TZeamMainAction.java.merger2Team():" + se.getMessage(), se); // 代码走查 add by guojian at 2010-11-5 for log4j Struts2Utils.renderJson( ExtjsHelper.toJsonObjectResult(new Info(false, "数据验证,服务层异常!" + se.getMessage()))); } catch (Exception e) { logger.error( "com.isoftstone.framework.modules.web.team.TZeamMainAction.java.merger2Team():" + e.getMessage()); // 代码走查 add by guojian at 2010-11-5 for log4j Struts2Utils.renderJson(ExtjsHelper.toJsonObjectResult(new Info(false, e.getMessage()))); } }
@Action("modifyTeamMixInfo") // 请求入径为/absale/team/modifyTeamMixInfo.action public void modifyTeamMixInfo() { try { TeamMixInfoBean teamMixInfoBean = this.entity; // TeamMixInfoBean teamMixInfoBean = test1(); TeamBaseBean t1 = new TeamBaseBean(); t1.setTid(teamMixInfoBean.getTid()); t1.setTeamName(teamMixInfoBean.getTeamName()); t1.setCreateDate(teamMixInfoBean.getCreateDate()); TeamNatureBean t2 = new TeamNatureBean(); t2.setTid(teamMixInfoBean.getTid()); t2.setAddr(teamMixInfoBean.getAddr()); t2.setPostalCode(teamMixInfoBean.getPostalCode()); t2.setPhone(teamMixInfoBean.getPhone()); t2.setFax(teamMixInfoBean.getFax()); List<ObjRelationBean> rb = new ArrayList<ObjRelationBean>(); /** *************** 从入参获取数据,写入到t1,t2,根据业务,如有需要,则添加rb **************** */ if (service.updateTeamMixInfo(t1, t2, rb.toArray(new ObjRelationBean[0]))) { Struts2Utils.renderJson(ExtjsHelper.toJsonObjectResult(new Info(true, "修改成功!"))); } else { Struts2Utils.renderJson(ExtjsHelper.toJsonObjectResult(new Info(false, "修改失败!"))); } } catch (ServiceException se) { logger.error( "com.isoftstone.framework.modules.web.team.TZeamMainAction.java.modifyTeamMixInfo():" + se.getMessage(), se); // 代码走查 add by guojian at 2010-11-5 for log4j Struts2Utils.renderJson( ExtjsHelper.toJsonObjectResult(new Info(false, "数据验证,服务层异常!" + se.getMessage()))); } catch (Exception e) { logger.error( "com.isoftstone.framework.modules.web.team.TeamMainAction.java.modifyTeamMixInfo():" + e.getMessage()); // 代码走查 add by guojian at 2010-11-5 for log4j Struts2Utils.renderJson(ExtjsHelper.toJsonObjectResult(new Info(false, e.getMessage()))); } }