From f813f14c57594e2e69702626e309257b1db42b1c Mon Sep 17 00:00:00 2001 From: tenwaPC Date: Wed, 7 Nov 2018 13:39:03 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BA=86=20=E4=B8=9A?= =?UTF-8?q?=E5=8A=A1=E7=94=B3=E8=AF=B7=20=E6=9F=A5=E7=9C=8B=E5=9B=BE?= =?UTF-8?q?=E7=89=87=20=E4=B8=8B=E4=B8=80=E9=A1=B5=EF=BC=8C=E5=85=B6?= =?UTF-8?q?=E4=BB=96=20=E6=B5=81=E7=A8=8B=E6=88=96=E8=80=85=E5=8A=9F?= =?UTF-8?q?=E8=83=BD=E9=A1=B5=E9=9D=A2=E5=8F=AF=E8=83=BD=E4=B8=8D=E9=80=9A?= =?UTF-8?q?=E7=94=A8=EF=BC=8C=E5=8F=AF=E4=BB=A5=E4=BB=BF=E7=85=A7=E7=9D=80?= =?UTF-8?q?=E6=94=B9=E4=B8=80=E4=B8=8B=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- WebContent/Tenwa/Comm/DocList/PayDocList.jsp | 4 +- WebContent/Tenwa/Comm/DocList/showImage.jsp | 67 +++++++++++--- .../tenwa/doc/action/DocListInitAction.java | 88 +++++++++++++++++++ 3 files changed, 147 insertions(+), 12 deletions(-) diff --git a/WebContent/Tenwa/Comm/DocList/PayDocList.jsp b/WebContent/Tenwa/Comm/DocList/PayDocList.jsp index ef267708a..4521218af 100644 --- a/WebContent/Tenwa/Comm/DocList/PayDocList.jsp +++ b/WebContent/Tenwa/Comm/DocList/PayDocList.jsp @@ -185,8 +185,8 @@ function showWord(id,name){ } function showImage(id,name){ var sUrl="/Tenwa/Comm/DocList/showImage.jsp"; - var param="attrid="+id; - AsDialog.PopView(sUrl,param,"dialogWidth=480px;dialogHeight=400px;",function(message){ + var param="attrid="+id+"&flowunid=<%=flowunid%>"; + AsDialog.PopView(sUrl,param,"dialogWidth=1080px;dialogHeight=500px;",function(message){ },name); } diff --git a/WebContent/Tenwa/Comm/DocList/showImage.jsp b/WebContent/Tenwa/Comm/DocList/showImage.jsp index 9d46bac85..d9e52e6ff 100644 --- a/WebContent/Tenwa/Comm/DocList/showImage.jsp +++ b/WebContent/Tenwa/Comm/DocList/showImage.jsp @@ -1,5 +1,6 @@ <%@ page contentType="text/html; charset=GBK"%> <%@page import="com.amarsoft.awe.res.JspfText"%> +<%@ page import="com.tenwa.doc.action.DocListInitAction" %> <%@include file="/Frame/page/jspf/include/jsp_runtime_context.jspf" %><%@page import="com.amarsoft.web.dw.*"%><%@include file="/Frame/page/jspf/include/jsp_sqlca_head.jspf" %> @@ -32,9 +33,22 @@ top.status="<%=LanguageManager.getSystemLanguage(CurUser.getLanguage(), JspfText <% String compClientID = request.getParameter("CompClientID"); String attrid = CurPage.getParameter("attrid"); + String flowunid = CurPage.getParameter("flowunid"); + String projectid = CurPage.getParameter("projectid"); + String docClassItemno = CurPage.getParameter("docClassItemno"); + String objecttype = CurPage.getParameter("objecttype"); + List Imagelist = new ArrayList(); + if(flowunid!=null&&Imagelist.size()==0){ + Imagelist=DocListInitAction.nextImagebyFlowunid(flowunid,docClassItemno,objecttype); + } +// if(projectid!=null&&Imagelist.size()==0){ +// Imagelist=DocListInitAction.nextImagebyProjectId(projectid,docClassItemno,objecttype); +// } + int imageattridv = 0; + int index = 0; %> - +
-
    -
  • -
  • -
+
    + <% + if(Imagelist.size()>0){ + for(String imageattrid:Imagelist){ + imageattridv++; + if(imageattrid.equals(attrid)){ + index=imageattridv; + } + %> +
  • + <% + } + }else{ + index=1; + %> +
  • + <% + } + %> +
+ <%@ include file="/IncludeEnd.jsp"%> \ No newline at end of file diff --git a/src_core/com/tenwa/doc/action/DocListInitAction.java b/src_core/com/tenwa/doc/action/DocListInitAction.java index 7003ca4f6..6bd403b53 100644 --- a/src_core/com/tenwa/doc/action/DocListInitAction.java +++ b/src_core/com/tenwa/doc/action/DocListInitAction.java @@ -6,6 +6,7 @@ import java.io.FileInputStream; import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStream; +import java.util.ArrayList; import java.util.List; import java.util.Map; import java.util.Properties; @@ -348,4 +349,91 @@ public class DocListInitAction { return null; } } + @SuppressWarnings({"unchecked"}) + public static List nextImagebyFlowunid(String flowunid,String docClassItemno,String objecttype) throws Exception{ + List list = new ArrayList(); + BizObjectManager bomLDR = JBOFactory.getBizObjectManager(LB_DOCRELATIVE.CLASS_NAME); + BizObjectManager bomLDL = JBOFactory.getBizObjectManager(LB_DOCLIBRARY.CLASS_NAME); + BizObjectManager bomLDA = JBOFactory.getBizObjectManager(LB_DOCATTRIBUTE.CLASS_NAME); + BizObject boLDR = null; + List boListLDR = null; + if(objecttype!=null){ + if(objecttype!=""){ + boLDR = bomLDR.createQuery("flow_unid =:flowunid and objecttype=:objecttype") + .setParameter("flowunid", flowunid) + .setParameter("objecttype", objecttype) + .getSingleResult(false); + }else{ + boLDR = bomLDR.createQuery("flow_unid =:flowunid and objecttype is null") + .setParameter("flowunid", flowunid) + .getSingleResult(false); + } + }else{ + boListLDR = bomLDR.createQuery("flow_unid =:flowunid") + .setParameter("flowunid", flowunid) + .getResultList(false); + } + if(boLDR!=null){ + String relative_id = boLDR.getAttribute("id").getString(); + List boLDL = new ArrayList(); + if(docClassItemno!=null){ + String[] itemnos=docClassItemno.split(","); + String s=""; + for(int i=0;i0){ + s=s.substring(0, s.length()-1); + } + docClassItemno=s; + boLDL = bomLDL.createQuery("relative_id=:relative_id and doc_Class_Itemno in("+docClassItemno+") order by serial_num").setParameter("relative_id", relative_id).setParameter("docClassItemno", docClassItemno).getResultList(false); + }else{ + boLDL = bomLDL.createQuery("relative_id=:relative_id order by serial_num").setParameter("relative_id", relative_id).getResultList(false); + } + for(BizObject bol:boLDL){ + String library_id = bol.getAttribute("id").getString(); + List boLDA = bomLDA.createQuery("library_id=:library_id and content_type LIKE '%image%'").setParameter("library_id", library_id).getResultList(false); + if(boLDA.size()>0){ + for(BizObject bo:boLDA){ + // LM_NC_VERIFICATION + String attrid = bo.getAttribute("id").getString(); + list.add(attrid); + } + } + } + } + if(boListLDR!=null){ + String docClassItemnov= ""; + for(BizObject bolr:boListLDR){ + String relative_id = bolr.getAttribute("id").getString(); + List boLDL = new ArrayList(); + if(docClassItemno!=null){ + String[] itemnos=docClassItemno.split(","); + String s=""; + for(int i=0;i0){ + s=s.substring(0, s.length()-1); + } + docClassItemnov=s; + boLDL = bomLDL.createQuery("relative_id=:relative_id and doc_Class_Itemno in("+docClassItemnov+") order by serial_num").setParameter("relative_id", relative_id).getResultList(false); + }else{ + boLDL = bomLDL.createQuery("relative_id=:relative_id order by serial_num").setParameter("relative_id", relative_id).getResultList(false); + } + for(BizObject bol:boLDL){ + String library_id = bol.getAttribute("id").getString(); + List boLDA = bomLDA.createQuery("library_id=:library_id and content_type LIKE '%image%'").setParameter("library_id", library_id).getResultList(false); + if(boLDA.size()>0){ + for(BizObject bo:boLDA){ + // LM_NC_VERIFICATION + String attrid = bo.getAttribute("id").getString(); + list.add(attrid); + } + } + } + } + } + return list; + } }