<%@ page contentType="text/html; charset=GBK"%> <%@ include file="/IncludeBeginMD.jsp"%> <%/*~BEGIN~可编辑区~[Editable=true;CodeAreaID=List00;Describe=注释区;]~*/%> <% /* Content: 五级分类查看意见页面 Input Param: ObjectType: 五级分类对象类型("Classify") ObjectNo:五级分类申请流水号 FlowNo:流程名 PhaseNo:当前阶段号 */ %> <%/*~END~*/%> <% //获取页面参数:五级分类对象类型("Classify"),五级分类申请流水号,流程名,阶段名 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 = ""; //人工认定理由 String sSelfOpinion = ""; //阶段名称 String sPhaseName = ""; //处理人 String sUserName = "", sOrgName = ""; //收到时间 String sBeginTime = "", sEndTime = ""; //客户名称 String sCustomerName = ""; //模型分类结果 String sModeResult = ""; //人工认定结果 String sSelfOpinionReason = ""; int iTermYear = 0, iTermMonth = 0, iTermDay = 0; //用于判断记录是否有审批意见 int iCountRecord=0; //用于标记行数 int iRow=0,jRow=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.CustomerName, getItemName('ClassifyResult',FO.PhaseOpinion) as v.PhaseOpinion, getItemName('ClassifyResult',FO.PhaseOpinion1) as v.PhaseOpinion1, FO.PhaseOpinion2, " + // " 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 "; 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){ sCustomerName = opinion.getAttribute("CustomerName").getString(); sSelfOpinion = opinion.getAttribute("PhaseOpinion2").getString(); sModeResult = opinion.getAttribute("PhaseOpinion1").getString(); sSelfOpinionReason = 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 FO.CustomerName, O.FlowNo,O.PhaseNo,O.PhaseName,O.UserName,O.OrgName,O.PhaseAction, "+ " O.BeginTime,O.EndTime,O.PhaseChoice, getItemName('ClassifyResult',FO.PhaseOpinion) as v.PhaseOpinion, getItemName('ClassifyResult',FO.PhaseOpinion1) as v.PhaseOpinion1,FO.PhaseOpinion2, "+ " FM.Attribute3 as v.OpinionRightType,FM.Attribute4 as v.OpinionRightPhases,FM.Attribute5 as v.OpinionRightRoles "+ " 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(StringX.isEmpty(sSelfOpinionPhase)){ sSql += " ORDER BY O.SerialNo"; }else{ sSql += " and O.PhaseNo <> :PhaseNo ORDER BY 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(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("UserName").getString())%>>
处理人所属机构:<%=DataConvert.toString(opinionBo.getAttribute("OrgName").getString())%>> 客户名称:<%=DataConvert.toString(opinionBo.getAttribute("CustomerName").getString())%>>
模型分类结果:<%=DataConvert.toString(opinionBo.getAttribute("PhaseOpinion1").getString())%>> 人工认定结果:<%=DataConvert.toString(opinionBo.getAttribute("PhaseOpinion").getString())%>>
收到时间:<%=DataConvert.toString(opinionBo.getAttribute("BeginTime").getString())%>> 完成时间:<%=DataConvert.toString(opinionBo.getAttribute("EndTime").getString())%>>
> >
 
<% //如果没有意见或者没有找到对应的对象,则自动关闭 if (iCountRecord==0||sObjectNo.equals("")){ %> 目前此业务还没有您可以查看的审批意见! <% } %> <%@ include file="/IncludeEnd.jsp"%>