📄 qxglrolembean.java
字号:
return null;
}
QXGLroleReqEvent req = new QXGLroleReqEvent();
QXGLroleVO roleVO = new QXGLroleVO();
roleVO.setJsDm((new Integer(this.jsDm)).intValue());
req.setDealMethod("getRoleByJsDm");
req.setRoleVO(roleVO);
try {
ISsglyService service = new SsglyDelegate();
ResponseEvent resp = service.invokeTask(req);
QXGLroleResEvent resEvent = (QXGLroleResEvent) resp;
roleVO = resEvent.getRoleVO();
this.jsMc = roleVO.getJsMc();
this.jsDesc = roleVO.getJsDesc();
this.jgjc = roleVO.getJgjc();
this.swjgDm = roleVO.getSwjgDm();
// 把功能代码列表写入字符串中。
ArrayList gnDmList = roleVO.getGnDmList();
StringBuffer sb = new StringBuffer();
for (int i = 0; i < gnDmList.size(); i++) {
sb.append((String) gnDmList.get(i));
sb.append(",");
}
sb.setLength(sb.length() - 1);
this.selectedGnDm = sb.toString();
} catch (Exception e) {
e.printStackTrace();
throw new Exception(VIEW_ROLE_EXCEPTION);
}
this.isCanUpdate = 1;
return null;
}
public String resetData() {
this.jsMc = null;
this.jsDesc = null;
this.jgjc = null;
this.swjgDm = null;
this.selectedGnDm = null;
this.jsDm = null;
this.isCanUpdate = 0;
return null;
}
public String addRole() throws Exception {
/*
System.out.println("jsMc = " + this.jsMc);
System.out.println("jsDesc = " + this.jsDesc);
System.out.println("jgjc = " + this.jgjc);
System.out.println("swjgDm = " + this.swjgDm);
System.out.println("selectedGnDm = " + this.selectedGnDm);
*/
// 客户端已经做了数据检查。
if (this.jsMc == null || "".equals(this.jsMc)) {
return null;
}
if (this.swjgDm == null || "".equals(this.swjgDm)) {
return null;
}
if (selectedGnDm == null || "".equals(selectedGnDm)) {
return null;
}
String[] gnDmArray = selectedGnDm.split(",");
ArrayList gnDmList = new ArrayList();
for (int i = 0; i < gnDmArray.length; i++) {
if (gnDmArray[i] != null && !"".equals(gnDmArray[i])) {
gnDmList.add(gnDmArray[i]);
}
}
QXGLroleReqEvent req = new QXGLroleReqEvent();
QXGLroleVO roleVO = new QXGLroleVO();
roleVO.setJsMc(this.jsMc);
roleVO.setJsDesc(this.jsDesc);
roleVO.setJgjc(this.jgjc);
roleVO.setSwjgDm(this.swjgDm);
roleVO.setGnDmList(gnDmList);
req.setDealMethod("addRole");
req.setRoleVO(roleVO);
String result;
try {
ISsglyService service = new SsglyDelegate();
ResponseEvent resp = service.invokeTask(req);
result = resp.getRepCode();
if (result.equals("0")) {
this.messageScript = "alert('XXQXGL-026:增加角色成功!');";
} else {
this.messageScript = "alert('XXGY-004:操作失败!');";
}
} catch (Exception e) {
e.printStackTrace();
throw new Exception(ADD_ROLE_EXCEPTION);
}
// 刷新角色列表数据
roleList = this.refreshRoleListInQx();
// 清空输入数据
this.resetData();
return null;
}
public String updateRole() throws Exception {
/*
System.out.println("jsMc = " + this.jsMc);
System.out.println("jsDesc = " + this.jsDesc);
System.out.println("jgjc = " + this.jgjc);
System.out.println("swjgDm = " + this.swjgDm);
System.out.println("selectedGnDm = " + this.selectedGnDm);
System.out.println("jsDm = " + this.jsDm);
*/
// 客户端已经做了数据检查。
if (this.jsDm == null || "".equals(this.jsDm)) {
return null;
}
if (this.jsMc == null || "".equals(this.jsMc)) {
return null;
}
if (this.swjgDm == null || "".equals(this.swjgDm)) {
return null;
}
if (selectedGnDm == null || "".equals(selectedGnDm)) {
return null;
}
String[] gnDmArray = selectedGnDm.split(",");
ArrayList gnDmList = new ArrayList();
for (int i = 0; i < gnDmArray.length; i++) {
if (gnDmArray[i] != null && !"".equals(gnDmArray[i])) {
gnDmList.add(gnDmArray[i]);
}
}
QXGLroleReqEvent req = new QXGLroleReqEvent();
QXGLroleVO roleVO = new QXGLroleVO();
roleVO.setJsMc(this.jsMc);
roleVO.setJsDesc(this.jsDesc);
roleVO.setJgjc(this.jgjc);
roleVO.setSwjgDm(this.swjgDm);
roleVO.setJsDm((new Integer(this.jsDm)).intValue());
roleVO.setGnDmList(gnDmList);
req.setDealMethod("updateRole");
req.setRoleVO(roleVO);
String result;
try {
ISsglyService service = new SsglyDelegate();
ResponseEvent resp = service.invokeTask(req);
result = resp.getRepCode();
if (result.equals("0")) {
this.messageScript = "alert('XXQXGL-028:修改角色成功!');";
} else {
this.messageScript = "alert('XXGY-004:操作失败!');";
}
} catch (Exception e) {
e.printStackTrace();
throw new Exception(UPDATE_ROLE_EXCEPTION);
}
// 刷新角色列表数据
roleList = this.refreshRoleListInQx();
return null;
}
public String deleteRole() throws Exception {
if (this.jsDm == null || "".equals(this.jsDm)) {
return null;
}
QXGLroleReqEvent req = new QXGLroleReqEvent();
QXGLroleVO roleVO = new QXGLroleVO();
roleVO.setJsDm((new Integer(this.jsDm)).intValue());
req.setDealMethod("deleteRole");
req.setRoleVO(roleVO);
String result;
try {
ISsglyService service = new SsglyDelegate();
ResponseEvent resp = service.invokeTask(req);
result = resp.getRepCode();
if (result.equals("0")) {
this.messageScript = "alert('XXQXGL-030:删除角色成功!');";
} else {
this.messageScript = "alert('XXGY-004:操作失败!');";
}
} catch (Exception e) {
e.printStackTrace();
throw new Exception(DELETE_ROLE_EXCEPTION);
}
// 刷新角色列表数据
roleList = this.refreshRoleListInQx();
// 清空输入数据
this.resetData();
return null;
}
public void setJsMc(String jsMc) {
this.jsMc = jsMc;
}
public void setJsDesc(String jsDesc) {
this.jsDesc = jsDesc;
}
public void setJgjc(String jgjc) {
this.jgjc = jgjc;
}
public void setSwjgDm(String swjgDm) {
this.swjgDm = swjgDm;
}
public void setSelectedGnDm(String selectedGnDm) {
this.selectedGnDm = selectedGnDm;
}
public void setJsDm(String jsDm) {
this.jsDm = jsDm;
}
public void setIsCanUpdate(int isCanUpdate) {
this.isCanUpdate = isCanUpdate;
}
private void jbInit() throws Exception {
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -