批量下载,新增业务申请时修改存量客户的名字
This commit is contained in:
parent
9661bea66f
commit
9a07941f48
@ -237,9 +237,10 @@ function deleteFile(id){
|
||||
heping();
|
||||
}
|
||||
function downloadZipFile(){
|
||||
var objectType="<%=sObjectType%>";
|
||||
var projectId="<%=projectId%>";
|
||||
var classItemnos="<%=classItemno%>";
|
||||
var sParams="projectId="+projectId+",classItemnos="+classItemnos;
|
||||
var sParams="projectId="+projectId+",classItemnos="+classItemnos+",objectType="+objectType;
|
||||
var ids = RunJavaMethodTrans("com.tenwa.doc.action.DocListAction","getLibraryIds",sParams);
|
||||
var filePath="<%=CurConfig.getConfigure("FileSavePath")%>";
|
||||
var param="&flowunid=<%=flowunid%>&type=<%=type%>&ids="+ids;
|
||||
|
||||
@ -44,6 +44,8 @@ public class DocListAction {
|
||||
|
||||
public String projectId;
|
||||
|
||||
public String objectType;
|
||||
|
||||
|
||||
public String deleteFile(JBOTransaction tx) throws Exception{
|
||||
if(attId==null||attId==""){
|
||||
@ -198,7 +200,7 @@ public class DocListAction {
|
||||
String itemnos = classItemnos.replace("@", ",");
|
||||
String sql = "SELECT O.ID from O "
|
||||
+ " left join jbo.app.tenwa.doc.LB_DOCRELATIVE rela on rela.id=O.relative_Id"
|
||||
+ " where rela.proj_id='"+projectId+"' and rela.objecttype='BusinessApplyFlow'"
|
||||
+ " where rela.proj_id='"+projectId+"' and rela.objecttype='"+objectType+"'"
|
||||
+ " and O.doc_Class_Itemno in ("+itemnos+")"
|
||||
+ " ORDER BY DOC_CLASS_ITEMNO,Serial_Num";
|
||||
BizObjectManager relaBm = JBOFactory
|
||||
@ -223,6 +225,13 @@ public class DocListAction {
|
||||
}
|
||||
|
||||
|
||||
public String getObjectType() {
|
||||
return objectType;
|
||||
}
|
||||
|
||||
public void setObjectType(String objectType) {
|
||||
this.objectType = objectType;
|
||||
}
|
||||
|
||||
public String getClassItemnos() {
|
||||
return classItemnos;
|
||||
|
||||
@ -47,7 +47,7 @@ public class LBCustomerRelaTempToFormalBusiness extends BaseBussiness {
|
||||
//String certType = this.getAttribute("certType").toString();
|
||||
String certType = this.getAttribute("certtype").toString();
|
||||
//String certId = this.getAttribute("certNo").toString();
|
||||
String certId = this.getAttribute("certid").toString();
|
||||
String certId = this.getAttribute("certid").toString();
|
||||
BizObjectManager bomCT1 = JBOFactory.getBizObjectManager(CUSTOMER_CERT.CLASS_NAME,Sqlca);
|
||||
BizObjectManager bomCTT1 = JBOFactory.getBizObjectManager(CUSTOMER_TYPE.CLASS_NAME,Sqlca); //客户类型临时表
|
||||
List<BizObject> boCT1 = bomCT1.createQuery("certtype='"+certType+"' and certid='"+certId+"'").getResultList(false);
|
||||
@ -85,17 +85,32 @@ public class LBCustomerRelaTempToFormalBusiness extends BaseBussiness {
|
||||
fromCondtion.put("flowunid",flowunid);
|
||||
BizObject cibo = DataOperatorUtil.getJBOBySQL("flowunid=:flowunid", LB_UNION_LESSEE_TEMP.CLASS_NAME, fromCondtion, Sqlca);
|
||||
String custid2 = cibo.getAttribute("customer_id").toString();
|
||||
String custName = cibo.getAttribute("customer_name").toString();
|
||||
fromCondtion.put("customerid", custid2);//区别担保人和承租人
|
||||
otherProperty.clear();
|
||||
otherProperty.put("customerid", CustId1);
|
||||
DataOperatorUtil.copySingleJBO(CUSTOMER_INFO_TEMP.CLASS_NAME, fromCondtion, CUSTOMER_INFO.CLASS_NAME, otherProperty, otherProperty, Sqlca);
|
||||
otherProperty.put("customerid", CustId1);
|
||||
|
||||
//ÐÞ¸ÄCUSTOMER_INFO¡¢CUSTOMER_CERT
|
||||
Map<String,String>infoProperty=new HashMap<String, String>();
|
||||
infoProperty.put("customerid", CustId1);
|
||||
infoProperty.put("customername", custName);
|
||||
//ÐÞ¸ÄCUSTOMER_PERSON
|
||||
Map<String,String>personProperty=new HashMap<String, String>();
|
||||
personProperty.put("customerid", CustId1);
|
||||
personProperty.put("FULLNAME", custName);
|
||||
//¸üÐÂCUSTOMER_COMPANY
|
||||
Map<String,String>companyProperty=new HashMap<String, String>();
|
||||
companyProperty.put("customerid", CustId1);
|
||||
companyProperty.put("enterprisename", custName);
|
||||
|
||||
DataOperatorUtil.copySingleJBO(CUSTOMER_INFO_TEMP.CLASS_NAME, fromCondtion, CUSTOMER_INFO.CLASS_NAME, otherProperty, infoProperty, Sqlca);
|
||||
if("03".equals(this.getAttribute("CustomerType"))){ // 自然人
|
||||
DataOperatorUtil.copySingleJBO(CUSTOMER_PERSON_TEMP.CLASS_NAME, fromCondtion, CUSTOMER_PERSON.CLASS_NAME, otherProperty, otherProperty, Sqlca);
|
||||
DataOperatorUtil.copySingleJBO(CUSTOMER_PERSON_TEMP.CLASS_NAME, fromCondtion, CUSTOMER_PERSON.CLASS_NAME, otherProperty, personProperty, Sqlca);
|
||||
}else{
|
||||
DataOperatorUtil.copySingleJBO(CUSTOMER_COMPANY_TEMP.CLASS_NAME, fromCondtion, CUSTOMER_COMPANY.CLASS_NAME, otherProperty, otherProperty, Sqlca);
|
||||
DataOperatorUtil.copySingleJBO(CUSTOMER_COMPANY_TEMP.CLASS_NAME, fromCondtion, CUSTOMER_COMPANY.CLASS_NAME, otherProperty, companyProperty, Sqlca);
|
||||
}
|
||||
DataOperatorUtil.copySingleJBO(CUSTOMER_ADDRESS_TEMP.CLASS_NAME, fromCondtion, CUSTOMER_ADDRESS.CLASS_NAME, otherProperty, otherProperty, Sqlca);
|
||||
DataOperatorUtil.copySingleJBO(CUSTOMER_CERT_TEMP.CLASS_NAME, fromCondtion, CUSTOMER_CERT.CLASS_NAME, otherProperty, otherProperty, Sqlca);
|
||||
DataOperatorUtil.copySingleJBO(CUSTOMER_CERT_TEMP.CLASS_NAME, fromCondtion, CUSTOMER_CERT.CLASS_NAME, otherProperty, infoProperty, Sqlca);
|
||||
// DataOperatorUtil.copySingleJBO(CUSTOMER_FAMILY_TEMP.CLASS_NAME, fromCondtion, CUSTOMER_FAMILY.CLASS_NAME, otherProperty, otherProperty, Sqlca);
|
||||
DataOperatorUtil.copySingleJBO(CUSTOMER_TYPE_TEMP.CLASS_NAME, fromCondtion, CUSTOMER_TYPE.CLASS_NAME, otherProperty, otherProperty, Sqlca);
|
||||
/* CustomerCompare cc= new CustomerCompare();
|
||||
|
||||
@ -0,0 +1,41 @@
|
||||
package com.tenwa.lease.flow.project.commbusiness;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
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;
|
||||
import com.tenwa.lease.flow.comm.service.LeaseFlowBaseService;
|
||||
import com.tenwa.lease.flow.comm.service.ServiceOperatorEnum;
|
||||
import com.tenwa.lease.flow.comm.serviceImp.LeaseFlowBaseServiceImp;
|
||||
|
||||
import jbo.com.tenwa.lease.comm.LB_UNION_LESSEE;
|
||||
import jbo.com.tenwa.lease.comm.LB_UNION_LESSEE_TEMP;
|
||||
|
||||
/**
|
||||
* 业务申请结束更新承租人表客户名称
|
||||
* @author dong
|
||||
*
|
||||
*/
|
||||
public class UpdateLbUnionLesseeCustomerName extends BaseBussiness {
|
||||
|
||||
@Override
|
||||
public Object run(Transaction Sqlca) throws Exception {
|
||||
this.initBussinessParam(Sqlca);
|
||||
LeaseFlowBaseService service=new LeaseFlowBaseServiceImp();
|
||||
Map<String,String>fromCondtion=new HashMap<String,String>();
|
||||
String flowunid = this.getAttribute("FlowUnid").toString();
|
||||
fromCondtion.put("flowunid",flowunid);
|
||||
BizObject cibo = DataOperatorUtil.getJBOBySQL("flowunid=:flowunid", LB_UNION_LESSEE_TEMP.CLASS_NAME, fromCondtion, Sqlca);
|
||||
String customerid = cibo.getAttribute("customer_id").toString();
|
||||
String customername = cibo.getAttribute("customer_name").toString();
|
||||
BizObjectManager bm=JBOFactory.getBizObjectManager(LB_UNION_LESSEE.CLASS_NAME,Sqlca);
|
||||
bm.createQuery("update O set customer_name='"+customername+"' where customer_id='"+customerid+"'").executeUpdate();
|
||||
String sMessage="true";
|
||||
return sMessage;
|
||||
}
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user