<%@ page contentType="text/html; charset=GBK"%><%@ include file="/IncludeBeginMD.jsp"%><% /* * Content: 查看审批详情 * Input Param: * ObjectType: 对象类型 * CreditApply: 申请 * ApproveApply: 最终审批意见 * PutOutApply: 出帐 * ObjectNo: 对象编号 * FlowNo:流程号 * PhaseNo:阶段号 * History Log: zywei 2006/02/22 增加查看自己签署的意见(背靠背签署) */ //获取页面参数 String sObjectType = CurPage.getParameter("ObjectType"); String sObjectNo= CurPage.getParameter("ObjectNo"); String sCurFlowNo = CurPage.getParameter("FlowNo"); String sCurPhaseNo = CurPage.getParameter("PhaseNo"); //将空值转化为空字符串 if(sObjectType==null)sObjectType=""; if(sObjectNo==null)sObjectNo=""; if(sCurFlowNo==null)sCurFlowNo=""; if(sCurPhaseNo==null)sCurPhaseNo=""; String sSql,sOpinionRightType="",sOpinionRightPhases="",sOpinionRightRoles="",sTempPrivilegePhases="",sPhaseAction=""; boolean bRolePrivilege = false; //哪些阶段能看 boolean bPhasePrivilege = false;// boolean bPhaseMatch = false;//判断当前意见所处阶段是否在对应的特权阶段 String sFlowNo = "", sPhaseNo = ""; String sSelfOpinionPhase = "", sSelfOpinion = ""; String sPhaseName = "", sUserName = "", sOrgName = ""; String sBeginTime = "", sEndTime = ""; int iCountRecord=0;//用于判断记录是否有审批意见 BizObjectManager fmManager = JBOFactory.getBizObjectManager("jbo.sys.FLOW_MODEL"); BizObjectManager foManager = JBOFactory.getBizObjectManager("jbo.sys.FLOW_OPINION"); BizObjectManager ftManager = JBOFactory.getBizObjectManager("jbo.sys.FLOW_TASK"); //获取仅查看自己签署的意见所对应的阶段 BizObject fmBo = fmManager.createQuery(" select Attribute6 from O where FlowNo =:FlowNo and PhaseNo =:PhaseNo ") .setParameter("FlowNo",sCurFlowNo).setParameter("PhaseNo",sCurPhaseNo).getSingleResult(false); if(fmBo!=null) sSelfOpinionPhase = fmBo.getAttribute("Attribute6").getString(); //获取仅查看自己签署的意见信息 if(!StringX.isEmpty(sSelfOpinionPhase)){ sSql = " select FO.PhaseOpinion,O.PhaseName,O.UserName, O.OrgName,O.BeginTime,O.EndTime "+ " from O,jbo.sys.FLOW_OPINION FO where O.Serialno=FO.SerialNo "+ " and (FO.PhaseOpinion is not null) and FO.InputUser =:InputUser "+ " and O.ObjectNo=:ObjectNo and O.ObjectType=:ObjectType"+ " and O.FlowNo =:FlowNo and O.PhaseNo=:PhaseNo order by O.BeginTime desc "; BizObject opinion = ftManager.createQuery(sSql).setParameter("InputUser",CurUser.getUserID()).setParameter("ObjectNo",sObjectNo) .setParameter("ObjectType",sObjectType).setParameter("FlowNo",sCurFlowNo).setParameter("PhaseNo",sCurPhaseNo) .getSingleResult(false); if(opinion!=null){ sSelfOpinion = opinion.getAttribute("PhaseOpinion").getString(); sPhaseName = opinion.getAttribute("PhaseName").getString(); sUserName = opinion.getAttribute("UserName").getString(); sOrgName = opinion.getAttribute("OrgName").getString(); sBeginTime = opinion.getAttribute("BeginTime").getString(); sEndTime = opinion.getAttribute("EndTime").getString(); iCountRecord = iCountRecord + 1; } } //各级人员意见保存在 FLOW_OPINION 中 ,如果需要显示一些其他意见需要修改签署意见界面进行配套 //FLOW_MODEL添加的读于意见查看权限的判断,通过 Attribute2, sSql = " select O.serialno,O.FlowNo,O.PhaseNo,O.PhaseName,O.UserName,O.OrgName,O.PhaseAction,O.BeginTime, "+ " O.EndTime,O.PhaseChoice,FO.PhaseOpinion,FO.PhaseOpinion1,FO.PhaseOpinion2,FO.PhaseOpinion3, "+ " FM.Attribute3 as v.OpinionRightType,FM.Attribute4 as v.OpinionRightPhases,FM.Attribute5 as v.OpinionRightRoles "+ " ,v.getUserName(fo.inputuser) as v.optionUser,v.getOrgName(fo.inputorg) as v.optionOrg,fo.inputtime from O,jbo.sys.FLOW_OPINION FO,jbo.sys.FLOW_MODEL FM "+ " where O.Serialno=FO.SerialNo and O.FlowNo=FM.FlowNo and O.PhaseNo=FM.PhaseNo "+ " and (FO.PhaseOpinion is not null) and O.ObjectNo=:ObjectNo and O.ObjectType=:ObjectType "; if(sSelfOpinionPhase.equals("")){ sSql += " ORDER BY O.BeginTime desc, O.SerialNo "; }else{ sSql += " and O.PhaseNo <> :PhaseNo ORDER BY O.BeginTime desc,O.SerialNo"; } List opinionList = ftManager.createQuery(sSql).setParameter("ObjectNo",sObjectNo) .setParameter("ObjectType",sObjectType).setParameter("PhaseNo",sSelfOpinionPhase).getResultList(false); %> 审批详情 <% for (BizObject opinionBo : opinionList){ sOpinionRightType = opinionBo.getAttribute("OpinionRightType").getString(); //查看意见方式 all_except(排除一些阶段) none_except(选择一些阶段) sOpinionRightPhases = opinionBo.getAttribute("OpinionRightPhases").getString();//不同查看意见方式对应的阶段 sOpinionRightRoles = opinionBo.getAttribute("OpinionRightRoles").getString(); //意见查看特权角色 sPhaseAction = opinionBo.getAttribute("PhaseAction").getString(); //将空值转化为空字符串 if(sOpinionRightType == null) sOpinionRightType = ""; if(sOpinionRightType.length()==0){sOpinionRightType="all_except";} if(sOpinionRightPhases == null) sOpinionRightPhases = ""; if(sOpinionRightRoles == null) sOpinionRightRoles = ""; if(sPhaseAction == null) sPhaseAction = ""; //1、判断该用户是否拥有特权角色 if(sOpinionRightRoles.equals("")) bRolePrivilege = false; else{ ArrayList roles = CurUser.getRoleTable(); for(int i=0;i=0){ bRolePrivilege = true; break; } } } //2、判断当前意见所处阶段是否在模型对应的特权阶段 if(sOpinionRightPhases.equals("")) bPhaseMatch = false; else{ int iCountPhases = StringFunction.getSeparateSum(sOpinionRightPhases,","); String sTempFlowPhase,sTempFlow,sTempPhase; for(int i=0;i <% } %>
步骤名称:')"><%=DataConvert.toString(opinionBo.getAttribute("PhaseName").getString())%>   处理人:<%=DataConvert.toString(opinionBo.getAttribute("optionUser").getString())%>   处理人所属机构:<%=DataConvert.toString(opinionBo.getAttribute("optionOrg").getString())%>   意见填写时间:<%=DataConvert.toString(opinionBo.getAttribute("inputtime").getString())%>  
收到时间:<%=DataConvert.toString(opinionBo.getAttribute("BeginTime").getString())%> 完成时间:<%=DataConvert.toString(opinionBo.getAttribute("EndTime").getString())%>
 
<% //如果没有意见或者没有找到对应的对象,则自动关闭 if (iCountRecord==0||sObjectNo.equals("")){ %> 目前此业务还没有您可以查看的审批意见! <% } %> <%@ include file="/IncludeEnd.jsp"%>