From 006b26ce714696927f3be5bc9e0067b527bd4b72 Mon Sep 17 00:00:00 2001 From: jianghongdong Date: Thu, 26 Jul 2018 18:52:45 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E7=BB=8F=E9=94=80=E5=95=86?= =?UTF-8?q?=E5=8F=98=E6=9B=B4=E5=AE=A1=E6=A0=B8=E4=B8=B4=E6=97=B6=E5=88=B0?= =?UTF-8?q?=E6=AD=A3=E5=BC=8F=E8=84=9A=E6=9C=AC=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...DistributorInfoChangeToFormalBusiness.java | 57 +++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 src_tenwa/com/tenwa/lease/flow/project/commbusiness/DistributorInfoChangeToFormalBusiness.java diff --git a/src_tenwa/com/tenwa/lease/flow/project/commbusiness/DistributorInfoChangeToFormalBusiness.java b/src_tenwa/com/tenwa/lease/flow/project/commbusiness/DistributorInfoChangeToFormalBusiness.java new file mode 100644 index 000000000..26d4c7fd5 --- /dev/null +++ b/src_tenwa/com/tenwa/lease/flow/project/commbusiness/DistributorInfoChangeToFormalBusiness.java @@ -0,0 +1,57 @@ +package com.tenwa.lease.flow.project.commbusiness; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import jbo.app.tenwa.calc.LC_FUND_INCOME_TEMP; +import jbo.app.tenwa.customer.CUSTOMER_ADDRESS; +import jbo.app.tenwa.customer.CUSTOMER_ADDRESS_TEMP; +import jbo.app.tenwa.customer.CUSTOMER_CERT; +import jbo.app.tenwa.customer.CUSTOMER_CERT_TEMP; +import jbo.app.tenwa.customer.CUSTOMER_FAMILY; +import jbo.app.tenwa.customer.CUSTOMER_FAMILY_TEMP; +import jbo.app.tenwa.customer.CUSTOMER_PERSON; +import jbo.app.tenwa.customer.CUSTOMER_PERSON_TEMP; +import jbo.app.tenwa.customer.DISTRIBUTOR_INFO; +import jbo.app.tenwa.customer.DISTRIBUTOR_INFO_TEMP; +import jbo.com.tenwa.lease.comm.LB_GUARANTEE_UNIT; +import jbo.com.tenwa.lease.comm.LB_GUARANTEE_UNIT_TEMP; +import jbo.com.tenwa.lease.comm.LB_UNION_LESSEE; +import jbo.com.tenwa.lease.comm.LB_UNION_LESSEE_TEMP; +import jbo.sys.ORG_INFO; + +import com.amarsoft.app.util.ASOrgObject; +import com.amarsoft.are.jbo.BizObject; +import com.amarsoft.are.jbo.BizObjectManager; +import com.amarsoft.are.jbo.JBOFactory; +import com.amarsoft.are.lang.DataElement; +import com.amarsoft.are.util.StringFunction; +import com.amarsoft.awe.util.Transaction; +import com.amarsoft.context.ASUser; +import com.tenwa.comm.util.jboutil.DataOperatorUtil; +import com.tenwa.flow.baseBussion.BaseBussiness; +import com.tenwa.lease.flow.project.businessapply.CustomerCompare; +import com.tenwa.lease.flow.project.businessapply.DistributorCompare; + +public class DistributorInfoChangeToFormalBusiness extends BaseBussiness { + + @Override + public Object run(Transaction Sqlca) throws Exception { + this.initBussinessParam(Sqlca); + String flowunid = this.getAttribute("ObjectNo").toString(); + String dno = this.getAttribute("distributor_no").toString(); + Map fromCondtion = new HashMap(); + fromCondtion.put(DISTRIBUTOR_INFO_TEMP.FLOWUNID, flowunid); + Map toCondtion = new HashMap(); + toCondtion.put(DISTRIBUTOR_INFO_TEMP.DISTRIBUTOR_NO,dno); + BizObject ditbo = JBOFactory.getBizObjectManager(DISTRIBUTOR_INFO_TEMP.CLASS_NAME).createQuery("flowunid=:flowunid").setParameter("flowunid",flowunid).getSingleResult(false); + String orgname = ditbo.getAttribute(DISTRIBUTOR_INFO_TEMP.DISTRIBUTOR_NAME).getString(); + String orgid = ditbo.getAttribute(DISTRIBUTOR_INFO_TEMP.ORGID).getString(); + DataOperatorUtil.copySingleJBO(DISTRIBUTOR_INFO_TEMP.CLASS_NAME, fromCondtion, DISTRIBUTOR_INFO.CLASS_NAME, toCondtion, null, Sqlca); + BizObjectManager PM=JBOFactory.getBizObjectManager(ORG_INFO.CLASS_NAME,Sqlca); + PM.createQuery("UPDATE o set orgname=:orgname where ORGID=:orgid").setParameter("orgname",orgname).setParameter("orgid", orgid).executeUpdate(); + String sMessage="true"; + return sMessage; + } +} \ No newline at end of file