保证金抵扣
This commit is contained in:
parent
bc621156dd
commit
b8d4f65234
@ -6,45 +6,44 @@ import java.util.Map;
|
||||
|
||||
import jbo.app.tenwa.calc.LC_FUND_INCOME;
|
||||
import jbo.app.tenwa.calc.LC_FUND_INCOME_TEMP;
|
||||
import jbo.app.tenwa.calc.LC_RENT_INCOME;
|
||||
import jbo.app.tenwa.calc.LC_RENT_INCOME_TEMP;
|
||||
|
||||
import com.amarsoft.are.jbo.BizObject;
|
||||
import com.amarsoft.are.jbo.BizObjectManager;
|
||||
import com.amarsoft.are.jbo.JBOFactory;
|
||||
import com.amarsoft.are.util.StringFunction;
|
||||
import com.amarsoft.awe.util.SqlObject;
|
||||
import com.amarsoft.awe.util.Transaction;
|
||||
import com.amarsoft.biz.bizlet.Bizlet;
|
||||
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;
|
||||
/**
|
||||
* 拷贝资金付款数据到正式表(实际付款通过)
|
||||
* 保证金抵扣拷贝收付数据临时表到正式表
|
||||
* @author zhulh
|
||||
*
|
||||
*/
|
||||
|
||||
public class CopyFundIncomeTempToFormal extends BaseBussiness{
|
||||
public class CopyFundIncomeTempToFormal extends Bizlet{
|
||||
public Object run(Transaction Sqlca) throws Exception{
|
||||
this.initBussinessParam(Sqlca.getTransaction());
|
||||
String sFlowUnid = (String)this.getAttribute("ObjectNo");
|
||||
BizObjectManager bomLFIT = JBOFactory.getBizObjectManager(LC_FUND_INCOME_TEMP.CLASS_NAME);
|
||||
Sqlca.join(bomLFIT);
|
||||
bomLFIT.createQuery("update O set is_flowing='1' where flowunid=:FLOWUNID").setParameter("FLOWUNID", sFlowUnid).executeUpdate();
|
||||
List<BizObject> bos = bomLFIT.createQuery("flowunid=:flowunid").setParameter("flowunid", sFlowUnid).getResultList(false);
|
||||
if(bos.size() > 0){
|
||||
for(BizObject bo:bos){
|
||||
Map<String,String> fromCondition = new HashMap<String,String>();
|
||||
fromCondition.put("INCOME_ID", bo.getAttribute("INCOME_ID").getString());
|
||||
Map<String,String> toCondition = new HashMap<String,String>();
|
||||
toCondition.put("ID", bo.getAttribute("INCOME_ID").getString());
|
||||
Map<String,String> otherProperty = new HashMap<String,String>();
|
||||
otherProperty.put("FLOWUNID", "");
|
||||
String payType = bo.getAttribute("PAY_TYPE").getString();
|
||||
if("pay_type_out".equals(payType)){
|
||||
otherProperty.put("PAY_STATUS", "have_paid");
|
||||
}else{
|
||||
otherProperty.put("PAY_STATUS", "");
|
||||
otherProperty.put("ROLL_BACK", "0");
|
||||
}
|
||||
DataOperatorUtil.copySingleJBO(LC_FUND_INCOME_TEMP.CLASS_NAME, fromCondition,LC_FUND_INCOME.CLASS_NAME, toCondition, otherProperty,Sqlca.getTransaction());
|
||||
}
|
||||
String flowunid = (String)this.getAttribute("ObjectNo");
|
||||
SqlObject so = new SqlObject("update lc_rent_income_temp set is_flowing='1' where flowunid='"+flowunid+"'");
|
||||
Sqlca.executeSQL(so);
|
||||
so = new SqlObject("update lc_fund_income_temp set is_flowing='1' where flowunid='"+flowunid+"'");
|
||||
Sqlca.executeSQL(so);
|
||||
List<BizObject> bos = JBOFactory.getBizObjectManager(LC_FUND_INCOME_TEMP.CLASS_NAME).createQuery("flowunid=:flowunid").setParameter("flowunid", flowunid).getResultList(false);
|
||||
for(BizObject bo:bos){
|
||||
Map<String,String> fromCondition = new HashMap<String,String>();
|
||||
fromCondition.put("ID", bo.getAttribute("ID").getString());
|
||||
Map<String,String> otherProperty = new HashMap<String,String>();
|
||||
otherProperty.put("FLOWUNID", "");
|
||||
otherProperty.put("PAY_STATUS", "have_paid");
|
||||
String deductionID = DataOperatorUtil.copySingleJBO(LC_FUND_INCOME_TEMP.CLASS_NAME, fromCondition,LC_FUND_INCOME.CLASS_NAME, null, otherProperty,Sqlca.getTransaction());
|
||||
fromCondition.clear();
|
||||
otherProperty.clear();
|
||||
fromCondition.put("DEDUCTION_ID", bo.getAttribute("ID").getString());
|
||||
otherProperty.put("DEDUCTION_ID", deductionID);
|
||||
DataOperatorUtil.copySingleJBO(LC_RENT_INCOME_TEMP.CLASS_NAME, fromCondition,LC_RENT_INCOME.CLASS_NAME, null, otherProperty,Sqlca.getTransaction());
|
||||
}
|
||||
String sMessage="true";
|
||||
return sMessage;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user