⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 position_update.jsp

📁 非常完整的Java开发的网络办公系统
💻 JSP
字号:
<%@ page errorPage="/vnex/ErrorPage.jsp" %>
<%@ page import="com.vnex.intranet.organization.value.*"%>
<%@ page import="com.vnex.intranet.organization.proxy.*"%>
<jsp:useBean id="positionProxyBean" scope="Application" class="com.vnex.intranet.organization.proxy.PositionProxyBean" />
<jsp:useBean id="duvalue" scope="request" class="com.vnex.intranet.organization.value.DutyValueBean" />
<jsp:useBean id="idList" scope="page" class="com.vnex.intranet.pub.IdList" />


<jsp:setProperty name="duvalue" property="dutyId" />
<jsp:setProperty name="duvalue" property="dutyTitle" />
<jsp:setProperty name="duvalue" property="description" />
<jsp:setProperty name="duvalue" property="demandSkill" />
<jsp:setProperty name="duvalue" property="checkStandard" />
<jsp:setProperty name="duvalue" property="divisionId" />
<jsp:setProperty name="idList" property="ids" />
<%

String divisionName = request.getParameter("divisionName");
positionProxyBean.modifyDuty(duvalue);

	int did = duvalue.getDutyId();

	ArrayList array = (ArrayList)positionProxyBean.getPrivilegesByDuty(did);
	ArrayList current = null;
	int[] ids =idList.getIds();
	if (ids !=null)
	{
		current = new ArrayList();
		for(int i=0;i<ids.length;i++)
		{
			PrivilegeValueBean pinfo = new PrivilegeValueBean();
			pinfo.setPrivilegeId(ids[i]);
			current.add(pinfo);
		}
	}	
	
	if (array !=null && current !=null)
	{
	
		
		ArrayList middle = new ArrayList();
		middle.addAll(current);
		current.removeAll(array);
		array.removeAll(middle);
	}

	if (current!=null)
	{
	
		int[] idsnew = new int[current.size()];	
		for(int i=0;i<current.size();i++)
		{
			idsnew[i] = ((PrivilegeValueBean)current.get(i)).getPrivilegeId();
		}
		positionProxyBean.addPrivilege(idsnew,1,did);
	}
	if (array!=null)
	{
	
		int[] idsremove = new int[array.size()];
		for(int j=0;j<array.size();j++)
		{
			idsremove[j] = ((PrivilegeValueBean)array.get(j)).getPrivilegeId();	
		}
		positionProxyBean.removePrivileges(idsremove,did);
	}

	String link="/mainctrl/organization/getAllPosition?id=" + duvalue.getDivisionId() + "&name=" + divisionName; 
%>
	<jsp:forward page="<%=link%>" /> 

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -