新增经销商变更审核临时到正式脚本方法
This commit is contained in:
parent
a467f64193
commit
006b26ce71
@ -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<String,String> fromCondtion = new HashMap<String, String>();
|
||||
fromCondtion.put(DISTRIBUTOR_INFO_TEMP.FLOWUNID, flowunid);
|
||||
Map<String,String> toCondtion = new HashMap<String, String>();
|
||||
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;
|
||||
}
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user