apzl_leasing/src_tenwa/com/tenwa/flow/fund/flowpayment/CopyPayConditionToTemp.java
2018-06-03 22:26:41 +08:00

36 lines
1.3 KiB
Java

package com.tenwa.flow.fund.flowpayment;
import java.util.List;
import java.util.Map;
import jbo.app.tenwa.calc.LC_CALC_CONDITION;
import jbo.com.tenwa.lease.comm.LC_PAY_CONDTION;
import jbo.com.tenwa.lease.comm.LC_PAY_CONDTION_TEMP;
import com.amarsoft.are.jbo.BizObject;
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;
/**
* 拷贝付款前提数据到临时表
* @author zhulh
*
*/
public class CopyPayConditionToTemp extends BaseBussiness{
public Object run(Transaction Sqlca) throws Exception{
this.initBussinessParam(Sqlca.getTransaction());
String contract_id = (String)this.getAttribute("ContractId");
List<BizObject> bos = JBOFactory.getBizObjectManager(LC_CALC_CONDITION.CLASS_NAME).createQuery("contract_id='"+contract_id+"'").getResultList(false);
for(BizObject b:bos){
Map<String,String>fromCondtion=this.getDefaultTempToFormalFromCondtion();
fromCondtion.put("payment_number", b.getAttribute("payment_number").toString());
Map<String,String>otherProperty=this.getDefaultOtherProperty();
DataOperatorUtil.copyJBOSet(LC_PAY_CONDTION.CLASS_NAME, fromCondtion,LC_PAY_CONDTION_TEMP.CLASS_NAME, null, otherProperty,null, Sqlca);
}
String sMessage="true";
return sMessage;
}
}