1.还原担保单位从正式到临时和从临时到正式的拷表操作。
This commit is contained in:
parent
062687f21f
commit
7415c2d2bd
@ -1,68 +1,31 @@
|
||||
package com.tenwa.lease.flow.project.commbusiness;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import jbo.app.tenwa.customer.CUSTOMER_PERSON;
|
||||
import jbo.app.tenwa.customer.CUSTOMER_PERSON_TEMP;
|
||||
import jbo.com.tenwa.lease.comm.LB_GUARANTEE_UNIT;
|
||||
import jbo.com.tenwa.lease.comm.LB_GUARANTEE_UNIT_TEMP;
|
||||
|
||||
import com.amarsoft.app.lc.workflow.action.GetFlowAction;
|
||||
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;
|
||||
|
||||
public class LBGuaranteeUnitFormalToTempBusiness extends BaseBussiness {
|
||||
|
||||
@Override
|
||||
public Object run(Transaction Sqlca) throws Exception {
|
||||
this.initBussinessParam(Sqlca);
|
||||
String flowUnid=this.getAttribute("ObjectNo").toString();
|
||||
String ProjectId=this.getAttribute("ProjectId").toString();
|
||||
// Map map=GetFlowAction.getFlowParamByFlowUnidAndTransaction(flowUnid,Sqlca);
|
||||
// LeaseFlowBaseService service=new LeaseFlowBaseServiceImp();
|
||||
// Map<String,String>fromCondtion=this.getDefaultFormalToTempFromCondtion();
|
||||
// if(map.containsKey("IsMakeContract")){
|
||||
// fromCondtion.put("CONTRACT_ID", "");
|
||||
// }
|
||||
// Map<String,String>otherProperty=this.getDefaultOtherProperty();
|
||||
// service.copyOrLoadGuaranteeUnit(Sqlca, fromCondtion, null, otherProperty, ServiceOperatorEnum.FormalToTemp, null);
|
||||
|
||||
Map<String,String> fromCondtion = new HashMap<String,String>();
|
||||
Map<String,String> otherProperty = new HashMap<String,String>();
|
||||
BizObjectManager lgut = JBOFactory.getBizObjectManager(LB_GUARANTEE_UNIT.CLASS_NAME,Sqlca);
|
||||
List<BizObject> lguts = lgut.createQuery("select * from O where DATA_STATE='guarantee' and PROJECT_ID=:projectid")
|
||||
.setParameter("projectid", ProjectId).getResultList(false);
|
||||
for (BizObject lgu:lguts) {
|
||||
if(fromCondtion.size()>0){
|
||||
fromCondtion.clear();
|
||||
}
|
||||
if(otherProperty.size()>0){
|
||||
otherProperty.clear();
|
||||
}
|
||||
fromCondtion.put("id",lgu.getAttribute("id").toString());
|
||||
otherProperty.put("FLOWUNID", flowUnid);
|
||||
DataOperatorUtil.copySingleJBO(LB_GUARANTEE_UNIT.CLASS_NAME, fromCondtion, LB_GUARANTEE_UNIT_TEMP.CLASS_NAME, null, otherProperty, Sqlca);
|
||||
if(fromCondtion.size()>0){
|
||||
fromCondtion.clear();
|
||||
}
|
||||
if(otherProperty.size()>0){
|
||||
otherProperty.clear();
|
||||
}
|
||||
fromCondtion.put("CUSTOMERID",lgu.getAttribute("ASSUROR").toString());
|
||||
otherProperty.put("FLOWUNID", flowUnid);
|
||||
DataOperatorUtil.copySingleJBO(CUSTOMER_PERSON.CLASS_NAME, fromCondtion, CUSTOMER_PERSON_TEMP.CLASS_NAME, null, otherProperty, Sqlca);
|
||||
}
|
||||
|
||||
String sMessage="true";
|
||||
return sMessage;
|
||||
}
|
||||
package com.tenwa.lease.flow.project.commbusiness;
|
||||
|
||||
import java.util.HashMap;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import com.amarsoft.app.lc.workflow.action.GetFlowAction;
|
||||
import com.amarsoft.awe.util.Transaction;
|
||||
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;
|
||||
|
||||
public class LBGuaranteeUnitFormalToTempBusiness extends BaseBussiness {
|
||||
|
||||
@Override
|
||||
public Object run(Transaction Sqlca) throws Exception {
|
||||
this.initBussinessParam(Sqlca);
|
||||
String flowUnid=this.getAttribute("ObjectNo").toString();
|
||||
Map map=GetFlowAction.getFlowParamByFlowUnidAndTransaction(flowUnid,Sqlca);
|
||||
LeaseFlowBaseService service=new LeaseFlowBaseServiceImp();
|
||||
Map<String,String>fromCondtion=this.getDefaultFormalToTempFromCondtion();
|
||||
if(map.containsKey("IsMakeContract")){
|
||||
fromCondtion.put("CONTRACT_ID", "");
|
||||
}
|
||||
Map<String,String>otherProperty=this.getDefaultOtherProperty();
|
||||
service.copyOrLoadGuaranteeUnit(Sqlca, fromCondtion, null, otherProperty, ServiceOperatorEnum.FormalToTemp, null);
|
||||
String sMessage="true";
|
||||
return sMessage;
|
||||
}
|
||||
}
|
||||
@ -1,80 +1,25 @@
|
||||
package com.tenwa.lease.flow.project.commbusiness;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
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_PERSON;
|
||||
import jbo.app.tenwa.customer.CUSTOMER_PERSON_TEMP;
|
||||
import jbo.com.tenwa.lease.comm.LB_GUARANTEE_UNIT;
|
||||
import jbo.com.tenwa.lease.comm.LB_GUARANTEE_UNIT_TEMP;
|
||||
|
||||
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;
|
||||
|
||||
public class LBGuaranteeUnitTempToFormalBusiness extends BaseBussiness {
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public Object run(Transaction Sqlca) throws Exception {
|
||||
/*this.initBussinessParam(Sqlca);
|
||||
LeaseFlowBaseService service=new LeaseFlowBaseServiceImp();
|
||||
Map<String,String>fromCondtion=this.getDefaultTempToFormalFromCondtion();
|
||||
Map<String,String>toCondtion=this.getDefaultTempToFormalToCondtion();
|
||||
Map<String,String>otherProperty=this.getDefaultOtherProperty();
|
||||
service.copyOrLoadGuaranteeUnit(Sqlca, fromCondtion, toCondtion, otherProperty, ServiceOperatorEnum.TempToFormal, null);
|
||||
*/
|
||||
this.initBussinessParam(Sqlca);
|
||||
String flowunid = this.getAttribute("ObjectNo").toString();
|
||||
Map<String,String> fromCondtion = new HashMap<String,String>();
|
||||
Map<String,String> otherProperty = new HashMap<String,String>();
|
||||
BizObjectManager lgut = JBOFactory.getBizObjectManager(LB_GUARANTEE_UNIT_TEMP.CLASS_NAME,Sqlca);
|
||||
//担保人从临时表导正式表
|
||||
List<BizObject> lguts = lgut.createQuery("select * from O left join jbo.app.tenwa.customer.CUSTOMER_PERSON_TEMP cpt "
|
||||
+ "on O.ASSUROR=cpt.CUSTOMERID where O.flowunid=:flowUnid and O.DATA_STATE='guarantee'")
|
||||
.setParameter("flowUnid", flowunid).getResultList(false);
|
||||
for (BizObject lgu:lguts) {
|
||||
if(fromCondtion.size()>0){
|
||||
fromCondtion.clear();
|
||||
}
|
||||
fromCondtion.put("id",lgu.getAttribute("id").toString());
|
||||
DataOperatorUtil.copySingleJBO(LB_GUARANTEE_UNIT_TEMP.CLASS_NAME, fromCondtion, LB_GUARANTEE_UNIT.CLASS_NAME, null, null, Sqlca);
|
||||
if(fromCondtion.size()>0){
|
||||
fromCondtion.clear();
|
||||
}
|
||||
fromCondtion.put("CUSTOMERID",lgu.getAttribute("ASSUROR").toString());
|
||||
DataOperatorUtil.copySingleJBO(CUSTOMER_PERSON_TEMP.CLASS_NAME, fromCondtion, CUSTOMER_PERSON.CLASS_NAME, null, null, Sqlca);
|
||||
}
|
||||
//共同申请人从
|
||||
List<BizObject> lgutc = lgut.createQuery("select * from O where O.flowunid=:flowUnid and O.DATA_STATE='guarantee'")
|
||||
.setParameter("flowUnid", flowunid).getResultList(false);
|
||||
for (BizObject lgu:lguts) {
|
||||
if(fromCondtion.size()>0){
|
||||
fromCondtion.clear();
|
||||
}
|
||||
fromCondtion.put("id",lgu.getAttribute("id").toString());
|
||||
DataOperatorUtil.copySingleJBO(LB_GUARANTEE_UNIT_TEMP.CLASS_NAME, fromCondtion, LB_GUARANTEE_UNIT.CLASS_NAME, null, null, Sqlca);
|
||||
if(fromCondtion.size()>0){
|
||||
fromCondtion.clear();
|
||||
}
|
||||
fromCondtion.put("CUSTOMERID",lgu.getAttribute("ASSUROR").toString());
|
||||
fromCondtion.put("flowunid",flowunid);
|
||||
DataOperatorUtil.copySingleJBO(CUSTOMER_PERSON_TEMP.CLASS_NAME, fromCondtion, CUSTOMER_PERSON.CLASS_NAME, null, null, Sqlca);
|
||||
DataOperatorUtil.copySingleJBO(CUSTOMER_CERT_TEMP.CLASS_NAME, fromCondtion, CUSTOMER_CERT.CLASS_NAME, null, null, Sqlca);
|
||||
DataOperatorUtil.copySingleJBO(CUSTOMER_ADDRESS_TEMP.CLASS_NAME, fromCondtion, CUSTOMER_ADDRESS.CLASS_NAME, null, null, Sqlca);
|
||||
}
|
||||
String sMessage="true";
|
||||
return sMessage;
|
||||
}
|
||||
package com.tenwa.lease.flow.project.commbusiness;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import com.amarsoft.awe.util.Transaction;
|
||||
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;
|
||||
|
||||
public class LBGuaranteeUnitTempToFormalBusiness extends BaseBussiness {
|
||||
|
||||
@Override
|
||||
public Object run(Transaction Sqlca) throws Exception {
|
||||
this.initBussinessParam(Sqlca);
|
||||
LeaseFlowBaseService service=new LeaseFlowBaseServiceImp();
|
||||
Map<String,String>fromCondtion=this.getDefaultTempToFormalFromCondtion();
|
||||
Map<String,String>toCondtion=this.getDefaultTempToFormalToCondtion();
|
||||
Map<String,String>otherProperty=this.getDefaultOtherProperty();
|
||||
service.copyOrLoadGuaranteeUnit(Sqlca, fromCondtion, toCondtion, otherProperty, ServiceOperatorEnum.TempToFormal, null);
|
||||
String sMessage="true";
|
||||
return sMessage;
|
||||
}
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user