修改业务申请BUG

This commit is contained in:
luojian 2018-07-24 15:34:36 +08:00
parent 07f6537f85
commit 0c6f5b32fc
2 changed files with 30 additions and 19 deletions

View File

@ -4,12 +4,18 @@ import java.util.HashMap;
import java.util.List;
import java.util.Map;
import jbo.app.tenwa.customer.CUSTOMER_ACCOUNT;
import jbo.app.tenwa.customer.CUSTOMER_ACCOUNT_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_COMPANY;
import jbo.app.tenwa.customer.CUSTOMER_COMPANY_TEMP;
import jbo.app.tenwa.customer.CUSTOMER_FAMILY;
import jbo.app.tenwa.customer.CUSTOMER_FAMILY_TEMP;
import jbo.app.tenwa.customer.CUSTOMER_INFO;
import jbo.app.tenwa.customer.CUSTOMER_INFO_TEMP;
import jbo.app.tenwa.customer.CUSTOMER_PERSON;
import jbo.app.tenwa.customer.CUSTOMER_PERSON_TEMP;
import jbo.com.tenwa.lease.comm.LB_GUARANTEE_UNIT;
@ -30,24 +36,27 @@ public class LBCustomerRelaTempToFormalBusiness extends BaseBussiness {
this.initBussinessParam(Sqlca);
Map<String,String>fromCondtion=new HashMap<String, String>();
fromCondtion.put("flowunid",this.getAttribute("FlowUnid").toString());
List<BizObject> unionList= DataOperatorUtil.getSetJBO(LB_UNION_LESSEE_TEMP.CLASS_NAME, fromCondtion, Sqlca);
List<BizObject> unitList=DataOperatorUtil.getSetJBO(LB_GUARANTEE_UNIT_TEMP.CLASS_NAME, fromCondtion, Sqlca);
DataOperatorUtil.copyJBOSet(CUSTOMER_INFO_TEMP.CLASS_NAME, fromCondtion,CUSTOMER_INFO.CLASS_NAME, null, null,null, Sqlca);
List<BizObject> unionList= DataOperatorUtil.getSetJBO(CUSTOMER_INFO_TEMP.CLASS_NAME, fromCondtion, Sqlca);
Map<String,String>toCondtion=new HashMap<String, String>();
CustomerCompare cc=new CustomerCompare();
for(BizObject union:unionList){
fromCondtion.clear();
fromCondtion.put("customerid", union.getAttribute("customer_id").getString());
fromCondtion.put("customerid", union.getAttribute("customerid").getString());
fromCondtion.put("flowunid",this.getAttribute("FlowUnid").toString());
toCondtion.clear();
toCondtion.put("customerid", union.getAttribute("customer_id").getString());
DataOperatorUtil.copyJBOSet(CUSTOMER_PERSON_TEMP.CLASS_NAME, fromCondtion, CUSTOMER_PERSON.CLASS_NAME, toCondtion, null, cc, Sqlca);
toCondtion.put("customerid", union.getAttribute("customerid").getString());
if("03".equals(union.getAttribute(CUSTOMER_INFO_TEMP.CUSTOMERTYPE).toString())){
DataOperatorUtil.copyJBOSet(CUSTOMER_PERSON_TEMP.CLASS_NAME, fromCondtion, CUSTOMER_PERSON.CLASS_NAME, toCondtion, null, cc, Sqlca);
}else{
DataOperatorUtil.copyJBOSet(CUSTOMER_COMPANY_TEMP.CLASS_NAME, fromCondtion, CUSTOMER_COMPANY.CLASS_NAME, toCondtion, null, cc, Sqlca);
}
DataOperatorUtil.copyJBOSet(CUSTOMER_CERT_TEMP.CLASS_NAME, fromCondtion, CUSTOMER_CERT.CLASS_NAME, toCondtion, null, cc, Sqlca);
DataOperatorUtil.copyJBOSet(CUSTOMER_FAMILY_TEMP.CLASS_NAME, fromCondtion, CUSTOMER_FAMILY.CLASS_NAME, toCondtion, null, cc, Sqlca);
DataOperatorUtil.copyJBOSet(CUSTOMER_ADDRESS_TEMP.CLASS_NAME, fromCondtion, CUSTOMER_ADDRESS.CLASS_NAME, toCondtion, null, cc, Sqlca);
}
for(BizObject unit:unitList){
//List<BizObject> unitList=DataOperatorUtil.getSetJBO(LB_GUARANTEE_UNIT_TEMP.CLASS_NAME, fromCondtion, Sqlca);
/* for(BizObject unit:unitList){
fromCondtion.clear();
fromCondtion.put("id",unit.getAttribute("id").toString());
DataOperatorUtil.copySingleJBO(LB_GUARANTEE_UNIT_TEMP.CLASS_NAME, fromCondtion, LB_GUARANTEE_UNIT.CLASS_NAME, null, null, Sqlca);
@ -61,7 +70,7 @@ public class LBCustomerRelaTempToFormalBusiness extends BaseBussiness {
DataOperatorUtil.copyJBOSet(CUSTOMER_CERT_TEMP.CLASS_NAME, fromCondtion, CUSTOMER_CERT.CLASS_NAME, toCondtion, null, cc, Sqlca);
DataOperatorUtil.copyJBOSet(CUSTOMER_FAMILY_TEMP.CLASS_NAME, fromCondtion, CUSTOMER_FAMILY.CLASS_NAME, toCondtion, null, cc, Sqlca);
DataOperatorUtil.copyJBOSet(CUSTOMER_ADDRESS_TEMP.CLASS_NAME, fromCondtion, CUSTOMER_ADDRESS.CLASS_NAME, toCondtion, null, cc, Sqlca);
}
}*/
String sMessage="true";
return sMessage;

View File

@ -3,8 +3,16 @@ package com.tenwa.lease.flow.project.commbusiness;
import java.util.HashMap;
import java.util.Map;
import jbo.app.tenwa.customer.CUSTOMER_ACCOUNT;
import jbo.app.tenwa.customer.CUSTOMER_ACCOUNT_TEMP;
import jbo.app.tenwa.customer.CUSTOMER_FAMILY;
import jbo.app.tenwa.customer.CUSTOMER_FAMILY_TEMP;
import jbo.com.tenwa.lease.comm.LB_GUARANTEE_UNIT;
import jbo.com.tenwa.lease.comm.LB_GUARANTEE_UNIT_HIS;
import com.amarsoft.awe.util.Transaction;
import com.tenwa.comm.util.date.DateAssistant;
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;
@ -20,24 +28,18 @@ public class LBProjectIntoTempToFormalCarBusiness extends BaseBussiness {
this.initBussinessParam(Sqlca);
LeaseFlowBaseService service=new LeaseFlowBaseServiceImp();
Map<String,String>fromCondtion=this.getDefaultTempToFormalFromCondtion();
Map<String,String>toCondtion=new HashMap<String,String>();
toCondtion.put("PROJECT_NO", this.getAttribute("FlowKey").toString());
Map<String,String>otherProperty=new HashMap<String,String>();
otherProperty.put("flowunid", this.getAttribute("FlowUnid").toString());
otherProperty.put("id", this.getAttribute("ProjectId").toString());
String currentdate = DateAssistant.getToday();//²åÈëÉóÅú½áÊøÊ±¼äÁ÷³Ì
otherProperty.put("end_date", currentdate);
String status = null;
//String result = Sqlca.getString("select fo.phasechoice from flow_task ft,flow_opinion fo where ft.relativeobjectno=fo.serialno and fo.phasechoice = 'disagree' and ft.relativeobjectno IS NOT NULL and ft.objectno='"+this.getAttribute("FlowUnid").toString()+"'");
//if("disagree".equals(result)){
//status = "101";
//}else {
status = "13";
//}
otherProperty.put("project_status", status);
service.copyOrLoadProjectInfo(Sqlca, fromCondtion, toCondtion,otherProperty, ServiceOperatorEnum.TempToFormal);
service.copyOrLoadGuaranteeUnit(Sqlca, fromCondtion, null,null, ServiceOperatorEnum.TempToFormal, null);
DataOperatorUtil.copyJBOSet(CUSTOMER_FAMILY_TEMP.CLASS_NAME, fromCondtion,CUSTOMER_FAMILY.CLASS_NAME, null, null,null, Sqlca);
DataOperatorUtil.copyJBOSet(CUSTOMER_ACCOUNT_TEMP.CLASS_NAME, fromCondtion,CUSTOMER_ACCOUNT.CLASS_NAME, null, null,null, Sqlca);
String sMessage="true";
return sMessage;
}