From 4e37d776d6b1cc96b99d625a9a65df221de85bfa Mon Sep 17 00:00:00 2001 From: zhanglei Date: Thu, 10 Dec 2020 17:58:36 +0800 Subject: [PATCH] =?UTF-8?q?=E5=90=88=E5=90=8C=E6=92=A4=E9=94=80=E6=B5=81?= =?UTF-8?q?=E7=A8=8B=E6=9F=A5=E8=AF=A2=E6=94=BE=E6=AC=BE=E7=94=B3=E8=AF=B7?= =?UTF-8?q?=E5=B7=B2=E6=92=A4=E9=94=80=E7=9A=84=E8=B5=84=E6=96=99=E6=B8=85?= =?UTF-8?q?=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Tenwa/Comm/DocList/PayDocListFkBak.jsp | 254 ++++++++++++++++++ .../com/tenwa/doc/cache/DocListCache.java | 45 ++++ 2 files changed, 299 insertions(+) create mode 100644 WebContent/Tenwa/Comm/DocList/PayDocListFkBak.jsp diff --git a/WebContent/Tenwa/Comm/DocList/PayDocListFkBak.jsp b/WebContent/Tenwa/Comm/DocList/PayDocListFkBak.jsp new file mode 100644 index 000000000..d7d8fab35 --- /dev/null +++ b/WebContent/Tenwa/Comm/DocList/PayDocListFkBak.jsp @@ -0,0 +1,254 @@ +<%@ page contentType="text/html; charset=GBK"%> +<%@ include file="/Frame/resources/include/include_begin_simplelist.jspf"%> +<%@ page import="com.tenwa.doc.action.DocListInitAction" %> +<%@ page import="com.amarsoft.app.lc.workflow.action.GetFlowAction" %> +<%@ page import="com.amarsoft.app.util.ProductParamUtil" %> +<%@ page import="jbo.com.tenwa.entity.comm.flow.FLOW_BUSSINESS_OBJECT" %> +<% + /* + Author: undefined 2016-09-01 + Content: + History Log: + */ + String objectno = CurPage.getParameter("FlowUnid"); + String flowunid=""; + String contractId = CurPage.getParameter("ContractId"); + String projectId = CurPage.getParameter("ProjectId"); + System.out.println("contractId=" + contractId); + //将空值转化为空字符串 + BizObjectManager fbo = JBOFactory.getBizObjectManager(FLOW_BUSSINESS_OBJECT.CLASS_NAME); + + String sSql = " select ldl.flow_unid " + + " from LB_DOCLIBRARY ld " + + " LEFT JOIN LB_DOCRELATIVE ldl on ld.relative_id=ldl.id " + + " where ldl.proj_id='"+ projectId +"' and ldl.objecttype='FundPaymentCarFlow' and ldl.flow_unid <> '"+objectno+"' " + + " GROUP BY ldl.flow_unid "; + ASResultSet rs = null; + rs = Sqlca.getASResultSet(sSql); + while (rs.next()) { + flowunid = DataConvert.toString(rs.getString("flow_unid")); + } + rs.getStatement().close(); + + String flowstate=CurPage.getParameter("flowstate"); + String CustomerType=CurPage.getParameter("CustomerType"); + String carAttributes=CurPage.getParameter("carAttributes");//获取车类型 + if(flowunid==""||flowunid==null){ + flowunid="flowunid"; + } + + BizObject flow=GetFlowAction.getFlowBussinessObject(flowunid);//流程对象 + + String sObjectType = "FlowPayDocListDelete";//付款申请 + + String ishistory=CurPage.getParameter("IsHistory"); + String nodeNo=CurPage.getParameter("NodeNo"); + String RightType= "ReadOnly"; + String username=CurUser.getUserName(); + String phaseNo = CurPage.getParameter("PhaseNo"); + String apply = CurPage.getParameter("ApplyType"); + + String type= "fundPay"; + if(type==null)type=""; + + List list = ProductParamUtil.getProductDocInfo(CurPage.getParameter("ProductId"),"PRD0412");//方案类型 + String types=""; + String docList=""; + for(int i=0;i map=(Map)list.get(i); + if(sObjectType.equals(map.get("FLOW_INFO").toString())){ + types=map.get("TYPE").toString(); + if("SingleRow".equals(types)){ + docList=map.get("DOCLIST").toString(); + }else{ + List l=(List)map.get("DOCCONFIG"); + docList=l.toString(); + } + } + } + String docClassItemno=docList; + + String[] itemnos=docClassItemno.split(","); + String s=""; + String classItemno =""; + for(int i=0;i0){ + s=s.substring(0, s.length()-1); + classItemno = s.replace(",", "@"); + } + String compClientID = request.getParameter("CompClientID"); + + ASObjectModel doTemp = new ASObjectModel("FlowPayDocListDelete"); + doTemp.setVisible("operation", false); +// String otherWhere = "and rela.proj_id='"+ projectId +"'and rela.flow_unid='"+ flowunid +"' and rela.objecttype='FundPaymentCarFlow'"; +// String otherWhere = and rela.proj_id='4e0962e029a8473492f784732a004e2e' and (rela.contract_id='' or rela.contract_id is null or rela.contract_id='d6bd7d316ea24b7bbfad1bc9f83b2b56') ; + String otherWhere = "and rela.proj_id='"+ projectId +"' and rela.objecttype='FundPaymentCarFlow'"; + doTemp.appendJboWhere(otherWhere); + doTemp.setLockCount(2); + ASObjectWindow dwTemp = new ASObjectWindow(CurPage,doTemp,request); + dwTemp.Style="1"; //--设置为Grid风格-- + dwTemp.ReadOnly = "1";//只读模式 + isShowButton=false; + dwTemp.setPageSize(500); + dwTemp.genHTMLObjectWindow(flowunid); + //0、是否展示 1、 权限控制 2、 展示类型 3、按钮显示名称 4、按钮解释文字 5、按钮触发事件代码 6、 7、 8、 9、图标,CSS层叠样式 10、风格 + String sButtons[][] =null; + + sButtons=new String[][]{ + {"true","","Button","保存","保存所有修改","saveRecord()","","","",""}, + {"true","","Button","批量下载","批量下载","downloadZipFile()","","","","btn_icon_down"}, + }; + +%> + +<%@include file="/Frame/resources/include/ui/include_list.jspf"%> + +<%@ include file="/Frame/resources/include/include_end.jspf"%> \ No newline at end of file diff --git a/src_core/com/tenwa/doc/cache/DocListCache.java b/src_core/com/tenwa/doc/cache/DocListCache.java index 12462fc39..3e038943e 100644 --- a/src_core/com/tenwa/doc/cache/DocListCache.java +++ b/src_core/com/tenwa/doc/cache/DocListCache.java @@ -13,6 +13,51 @@ import com.amarsoft.dict.als.manage.NameManager; public class DocListCache { + public static String getDeleteFile(String libraryid) throws Exception{ + + @SuppressWarnings("unchecked") + List list=JBOFactory.getBizObjectManager("jbo.app.tenwa.doc.LB_DOCATTRIBUTE").createQuery("Library_Id=:libraryid ").setParameter("libraryid", libraryid).getResultList(false); + + StringBuffer sb=new StringBuffer(); + sb.append("{"); + for(int i=0;i=0){ + sb.append("\"image\":\""+true+"\","); + }else{ + sb.append("\"image\":\""+false+"\","); + } + if(type.indexOf("application/msword")>=0||type.indexOf("application/vnd.openxmlformats-officedocument.wordprocessingml.document")>=0||type.indexOf("application/vnd.ms-excel")>=0||type.indexOf("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet")>=0){ + sb.append("\"word\":\""+true+"\","); + }else{ + sb.append("\"word\":\""+false+"\","); + } + if(type.indexOf("application/pdf")>=0){ + sb.append("\"pdf\":\""+true+"\","); + }else{ + sb.append("\"pdf\":\""+false+"\","); + } + sb.append("\"id\":\""+bo.getAttribute("id").getString()+"\","); + sb.append("\"objecttype\":\""+bo.getAttribute("objecttype").getString()+"\","); + sb.append("\"filename\":\""+bo.getAttribute("FileName").getString()+"\","); + sb.append("\"inputtime\":\""+bo.getAttribute("inputtime").getString()+"\","); + sb.append("\"inputuser\":\""+NameManager.getUserName(bo.getAttribute("InputUserId").getString())+"\","); + sb.append("\"content_type\":\""+bo.getAttribute("content_type").getString()+"\","); + sb.append("\"filepath\":\""+bo.getAttribute("filepath").getString()+"\","); + sb.append("\"FileSize\":\""+bo.getAttribute("FileSize").getString()+"\""); + + sb.append("},"); + } + if(sb.length()>1){ + sb.deleteCharAt(sb.length() - 1); + } + sb.append("}"); + + return sb.toString(); + } + public static String getFile(String libraryid) throws Exception{ @SuppressWarnings("unchecked")