修改担保人的保存方法
This commit is contained in:
parent
9386616a23
commit
d627a14664
@ -22,7 +22,8 @@
|
||||
ASObjectModel doTemp = new ASObjectModel(sTempletNo);
|
||||
doTemp.setDefaultValue("ASSUROR", customerid);
|
||||
doTemp.setDefaultValue("PROJECT_ID", ProjectId);
|
||||
doTemp.setDefaultValue("PAYACCOUNT", sFlowUnid);//½«flowunid´«ÈëCUSTOMER_PERSON_TEMP±£´æ
|
||||
doTemp.setDefaultValue("FLOWUNID", sFlowUnid);
|
||||
doTemp.setDefaultValue("DATA_STATE", "guarantee");//标记该数据是担保人信息
|
||||
ASObjectWindow dwTemp = new ASObjectWindow(CurPage, doTemp,request);
|
||||
dwTemp.Style = "2";//freeform
|
||||
//dwTemp.ReadOnly = "-2";//只读模式
|
||||
@ -55,7 +56,7 @@
|
||||
function goBack(){
|
||||
//要跳转的url
|
||||
var url="/Tenwa/Lease/Flow/Comm/LBGuaranteeUnit/LBGuaranteePerUnitList.jsp";
|
||||
var sparam="FlowUnid="+getItemValue(0,0,"PAYACCOUNT")+"&RightType="+'<%=RightType%>';
|
||||
var sparam="FlowUnid="+getItemValue(0,0,"FLOWUNID")+"&RightType="+'<%=RightType%>';
|
||||
AsControl.OpenView(url,sparam,"_self","");
|
||||
}
|
||||
|
||||
|
||||
@ -63,6 +63,7 @@
|
||||
String sTempletNo = "LBGuaranteeUnitInfoTemp_Car";//--Ä£°åºÅ--
|
||||
ASObjectModel doTemp = new ASObjectModel(sTempletNo);
|
||||
doTemp.setDefaultValue("ASSUROR", customerid);
|
||||
doTemp.setDefaultValue("DATA_STATE", "common");//标记该数据是共同申请人
|
||||
doTemp.setHtmlEvent("CERTID","onChange","changeCertid");
|
||||
//doTemp.setHtmlEvent("DRIVERLICENSE","onchange","checkDriver");
|
||||
//doTemp.setDDDWJbo("ASSURE_METHOD","jbo.sys.CODE_LIBRARY,itemno,itemname,codeno='GuaranteeType' and itemno in ("+s+") ");
|
||||
|
||||
@ -17,8 +17,6 @@ public class LBGuarantorPerUnitHandler extends CommonHandler{
|
||||
BizObjectManager cpt = JBOFactory.getBizObjectManager(CUSTOMER_PERSON_TEMP.CLASS_NAME, tx);
|
||||
BizObject ci = cpt.newObject();
|
||||
ci.setAttributeValue("CUSTOMERID", bo.getAttribute("ASSUROR").getString());
|
||||
ci.setAttributeValue("FLOWUNID", bo.getAttribute("PAYACCOUNT").getString());
|
||||
ci.setAttributeValue("PAYACCOUNT", bo.getAttribute("PAYACCOUNT").getString());
|
||||
ci.setAttributeValue("FULLNAME", bo.getAttribute("FULLNAME").getString());
|
||||
ci.setAttributeValue("SEX", bo.getAttribute("SEX").getString());
|
||||
ci.setAttributeValue("CERTTYPE", bo.getAttribute("CERTTYPE").getString());
|
||||
|
||||
@ -46,11 +46,13 @@ public class LBCustomerRelaProjToContractBusiness extends BaseBussiness {
|
||||
}
|
||||
for(BizObject unit:unitList){
|
||||
fromCondtion.clear();
|
||||
fromCondtion.put("customerid", unit.getAttribute("ASSUROR").getString());
|
||||
DataOperatorUtil.copyJBOSet(CUSTOMER_PERSON.CLASS_NAME, fromCondtion, CUSTOMER_PERSON_TEMP.CLASS_NAME, null, other, null, Sqlca);
|
||||
DataOperatorUtil.copyJBOSet(CUSTOMER_CERT.CLASS_NAME, fromCondtion, CUSTOMER_CERT_TEMP.CLASS_NAME, null, other, null, Sqlca);
|
||||
DataOperatorUtil.copyJBOSet(CUSTOMER_FAMILY.CLASS_NAME, fromCondtion, CUSTOMER_FAMILY_TEMP.CLASS_NAME, null, other, null, Sqlca);
|
||||
DataOperatorUtil.copyJBOSet(CUSTOMER_ADDRESS.CLASS_NAME, fromCondtion, CUSTOMER_ADDRESS_TEMP.CLASS_NAME, null, other, null, Sqlca);
|
||||
if(!("guarantee".equals(unit.getAttribute("DATA_STATE").toString()))){
|
||||
fromCondtion.put("customerid", unit.getAttribute("ASSUROR").getString());
|
||||
DataOperatorUtil.copyJBOSet(CUSTOMER_PERSON.CLASS_NAME, fromCondtion, CUSTOMER_PERSON_TEMP.CLASS_NAME, null, other, null, Sqlca);
|
||||
DataOperatorUtil.copyJBOSet(CUSTOMER_CERT.CLASS_NAME, fromCondtion, CUSTOMER_CERT_TEMP.CLASS_NAME, null, other, null, Sqlca);
|
||||
DataOperatorUtil.copyJBOSet(CUSTOMER_FAMILY.CLASS_NAME, fromCondtion, CUSTOMER_FAMILY_TEMP.CLASS_NAME, null, other, null, Sqlca);
|
||||
DataOperatorUtil.copyJBOSet(CUSTOMER_ADDRESS.CLASS_NAME, fromCondtion, CUSTOMER_ADDRESS_TEMP.CLASS_NAME, null, other, null, Sqlca);
|
||||
}
|
||||
}
|
||||
|
||||
String sMessage="true";
|
||||
|
||||
@ -1,11 +1,20 @@
|
||||
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;
|
||||
@ -17,14 +26,38 @@ public class LBGuaranteeUnitFormalToTempBusiness extends BaseBussiness {
|
||||
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", "");
|
||||
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();
|
||||
}
|
||||
fromCondtion.put("CUSTOMERID",lgu.getAttribute("ASSUROR").toString());
|
||||
DataOperatorUtil.copySingleJBO(CUSTOMER_PERSON.CLASS_NAME, fromCondtion, CUSTOMER_PERSON_TEMP.CLASS_NAME, null, null, Sqlca);
|
||||
}
|
||||
Map<String,String>otherProperty=this.getDefaultOtherProperty();
|
||||
service.copyOrLoadGuaranteeUnit(Sqlca, fromCondtion, null, otherProperty, ServiceOperatorEnum.FormalToTemp, null);
|
||||
|
||||
String sMessage="true";
|
||||
return sMessage;
|
||||
}
|
||||
|
||||
@ -37,18 +37,14 @@ public class LBGuaranteeUnitTempToFormalBusiness extends BaseBussiness {
|
||||
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 cpt.flowunid=:flowUnid")
|
||||
+ "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();
|
||||
}
|
||||
if(otherProperty.size()>0){
|
||||
otherProperty.clear();
|
||||
}
|
||||
fromCondtion.put("id",lgu.getAttribute("id").toString());
|
||||
otherProperty.put("DATA_STATE","guarantee");
|
||||
DataOperatorUtil.copySingleJBO(LB_GUARANTEE_UNIT_TEMP.CLASS_NAME, fromCondtion, LB_GUARANTEE_UNIT.CLASS_NAME, null, otherProperty, Sqlca);
|
||||
DataOperatorUtil.copySingleJBO(LB_GUARANTEE_UNIT_TEMP.CLASS_NAME, fromCondtion, LB_GUARANTEE_UNIT.CLASS_NAME, null, null, Sqlca);
|
||||
if(fromCondtion.size()>0){
|
||||
fromCondtion.clear();
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user