From d014e5a62ded399474cc74ac4306cbb7195643e1 Mon Sep 17 00:00:00 2001 From: liuzhao Date: Mon, 15 Oct 2018 15:29:15 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B1=BD=E8=BD=A6=E6=A1=A3=E6=A1=88=E5=BD=92?= =?UTF-8?q?=E6=A1=A3=EF=BC=8C=E6=B3=95=E4=BA=BA=E5=AE=A2=E6=88=B7=E6=9D=83?= =?UTF-8?q?=E9=99=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Lessee/Company/CustomerCompanyList.jsp | 5 ++- .../MortgageFile/LbFileArchivingInfoTemp.jsp | 5 ++- .../CopyFileArchivingInfoTempToFormat.java | 30 +++++++++++++++ .../apzl/comm/FileArchivingInfoTemp.java | 38 +++++++++++++++++++ 4 files changed, 74 insertions(+), 4 deletions(-) create mode 100644 src_tenwa/com/tenwa/apzl/comm/CopyFileArchivingInfoTempToFormat.java create mode 100644 src_tenwa/com/tenwa/apzl/comm/FileArchivingInfoTemp.java diff --git a/WebContent/Tenwa/Customer/Lessee/Company/CustomerCompanyList.jsp b/WebContent/Tenwa/Customer/Lessee/Company/CustomerCompanyList.jsp index 3fb691de7..eb858f401 100644 --- a/WebContent/Tenwa/Customer/Lessee/Company/CustomerCompanyList.jsp +++ b/WebContent/Tenwa/Customer/Lessee/Company/CustomerCompanyList.jsp @@ -10,8 +10,9 @@ if(customerType==null)customerType=""; if(customerListTemplet==null)customerListTemplet=""; ASObjectModel doTemp = new ASObjectModel(customerListTemplet); - String otherWhere=DataRightManager.getRightCondition(CurUser,"O","cust"); -// doTemp.appendJboWhere(otherWhere); + //String otherWhere=DataRightManager.getRightCondition(CurUser,"O","cust"); + doTemp.appendJboWhere(" and O.inputuserid='"+userId+"'"); + //doTemp.appendJboWhere(otherWhere); //doTemp.setJboWhereWhenNoFilter("ct.custstatus = 'status02' "); ASObjectWindow dwTemp = new ASObjectWindow(CurPage,doTemp,request); dwTemp.setPageSize(20); diff --git a/WebContent/Tenwa/Lease/Flow/FileManager/MortgageFile/LbFileArchivingInfoTemp.jsp b/WebContent/Tenwa/Lease/Flow/FileManager/MortgageFile/LbFileArchivingInfoTemp.jsp index a2660ff14..6b8765166 100644 --- a/WebContent/Tenwa/Lease/Flow/FileManager/MortgageFile/LbFileArchivingInfoTemp.jsp +++ b/WebContent/Tenwa/Lease/Flow/FileManager/MortgageFile/LbFileArchivingInfoTemp.jsp @@ -7,6 +7,7 @@ */ String sPrevUrl = CurPage.getParameter("PrevUrl"); if(sPrevUrl == null) sPrevUrl = ""; + String flowunid = CurPage.getAttribute("ObjectNo"); String inputuserid = CurUser.getUserID(); String inputusername = CurUser.getUserName(); String inputorgid = CurOrg.getOrgID(); @@ -18,11 +19,11 @@ ASObjectWindow dwTemp = new ASObjectWindow(CurPage, doTemp,request); dwTemp.Style = "2";//freeform //dwTemp.ReadOnly = "-2";//只读模式 - dwTemp.genHTMLObjectWindow(CurPage.getParameter("SerialNo")); + dwTemp.genHTMLObjectWindow(flowunid); String sButtons[][] = { {"true","All","Button","保存","保存所有修改","as_save(0)","","","",""}, - {"true","All","Button","返回","返回列表","returnList()","","","",""} + //{"true","All","Button","返回","返回列表","returnList()","","","",""} }; sButtonPosition = "south"; %><%@ include file="/Frame/resources/include/ui/include_info.jspf"%> diff --git a/src_tenwa/com/tenwa/apzl/comm/CopyFileArchivingInfoTempToFormat.java b/src_tenwa/com/tenwa/apzl/comm/CopyFileArchivingInfoTempToFormat.java new file mode 100644 index 000000000..a416e52a1 --- /dev/null +++ b/src_tenwa/com/tenwa/apzl/comm/CopyFileArchivingInfoTempToFormat.java @@ -0,0 +1,30 @@ +package com.tenwa.apzl.comm; + +import java.util.HashMap; +import java.util.Map; +import java.util.UUID; + +import jbo.app.LB_FILE_ARCHIVING_INFO_TEMP; +import jbo.com.tenwa.lease.comm.LB_CONTRACT_INFO; + +import com.amarsoft.are.jbo.BizObject; +import com.amarsoft.are.jbo.BizObjectManager; +import com.amarsoft.are.jbo.JBOFactory; +import com.amarsoft.awe.util.Transaction; +import com.tenwa.comm.util.jboutil.DataOperatorUtil; +import com.tenwa.flow.baseBussion.BaseBussiness; + +public class CopyFileArchivingInfoTempToFormat extends BaseBussiness{ + @Override + public Object run(Transaction Sqlca) throws Exception { + this.initBussinessParam(Sqlca); + String contract_id = this.getAttribute("ContractId").toString(); + //String flowunid = this.getAttribute("ObjectNo").toString(); + + Map fromCondtion = new HashMap(); + fromCondtion.put("contract_id", contract_id); + + DataOperatorUtil.copySingleJBO("jbo.app.LB_FILE_ARCHIVING_INFO_TEMP", fromCondtion, "jbo.com.tenwa.lease.comm.LB_FILE_ARCHIVING_INFO", null, null, Sqlca); + return "true"; + } +} diff --git a/src_tenwa/com/tenwa/apzl/comm/FileArchivingInfoTemp.java b/src_tenwa/com/tenwa/apzl/comm/FileArchivingInfoTemp.java new file mode 100644 index 000000000..617cad3ab --- /dev/null +++ b/src_tenwa/com/tenwa/apzl/comm/FileArchivingInfoTemp.java @@ -0,0 +1,38 @@ +package com.tenwa.apzl.comm; + +import java.util.UUID; + +import jbo.app.LB_FILE_ARCHIVING_INFO_TEMP; +import jbo.com.tenwa.lease.comm.LB_CONTRACT_INFO; + +import com.amarsoft.are.jbo.BizObject; +import com.amarsoft.are.jbo.BizObjectManager; +import com.amarsoft.are.jbo.JBOFactory; +import com.amarsoft.awe.util.Transaction; +import com.tenwa.flow.baseBussion.BaseBussiness; + +public class FileArchivingInfoTemp extends BaseBussiness{ + @Override + public Object run(Transaction Sqlca) throws Exception { + this.initBussinessParam(Sqlca); + String contract_id = this.getAttribute("ContractId").toString(); + String flowunid = this.getAttribute("ObjectNo").toString(); + + //获取合同编号 + BizObject contractInfoObject = JBOFactory.createBizObjectQuery(LB_CONTRACT_INFO.CLASS_NAME, "id=:contract_id").setParameter("contract_id", contract_id).getSingleResult(false); + String contract_number = contractInfoObject.getAttribute("contract_number").toString(); + BizObjectManager fileArchivingManager = JBOFactory.getBizObjectManager(LB_FILE_ARCHIVING_INFO_TEMP.CLASS_NAME, Sqlca); + BizObject fileArchivingObject = fileArchivingManager.createQuery("contract_id=:contract_id").setParameter("contract_id", contract_id).getSingleResult(true); + if(fileArchivingObject == null){ + //新增插入flowunid和contract_id + BizObject bo = fileArchivingManager.newObject(); + String id = UUID.randomUUID().toString().replaceAll("-", ""); + bo.setAttributeValue("id", id); + bo.setAttributeValue("contract_id", contract_id); + bo.setAttributeValue("contract_number", contract_number); + bo.setAttributeValue("flowunid", flowunid); + fileArchivingManager.saveObject(bo); + } + return "true"; + } +}