apzl_leasing/calc/com/tenwa/reckon/help/CalcConditionCopyService.java

470 lines
25 KiB
Java
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

package com.tenwa.reckon.help;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import jbo.app.tenwa.calc.LC_CALC_CONDITION;
import jbo.app.tenwa.calc.LC_CALC_CONDITION_HIS;
import jbo.app.tenwa.calc.LC_CALC_CONDITION_TEMP;
import jbo.app.tenwa.calc.LC_CALC_PERIOD;
import jbo.app.tenwa.calc.LC_CALC_PERIOD_TEMP;
import jbo.app.tenwa.calc.LC_CALC_RULES;
import jbo.app.tenwa.calc.LC_CALC_RULES_TEMP;
import jbo.app.tenwa.calc.LC_CALC_SUBSECTION;
import jbo.app.tenwa.calc.LC_CALC_SUBSECTION_TEMP;
import jbo.app.tenwa.calc.LC_CASH_FLOW;
import jbo.app.tenwa.calc.LC_CASH_FLOW_HIS;
import jbo.app.tenwa.calc.LC_CASH_FLOW_TEMP;
import jbo.app.tenwa.calc.LC_CONTRACT_CASH_FLOW;
import jbo.app.tenwa.calc.LC_CONTRACT_CONDITION;
import jbo.app.tenwa.calc.LC_CONTRACT_FUND_PLAN;
import jbo.app.tenwa.calc.LC_CONTRACT_PERIOD;
import jbo.app.tenwa.calc.LC_CONTRACT_RENT_PLAN;
import jbo.app.tenwa.calc.LC_CONTRACT_RULES;
import jbo.app.tenwa.calc.LC_CONTRACT_SUBSECTION;
import jbo.app.tenwa.calc.LC_CUSTOMER_CASH_FLOW;
import jbo.app.tenwa.calc.LC_CUSTOMER_CONDITION;
import jbo.app.tenwa.calc.LC_CUSTOMER_FUND_PLAN;
import jbo.app.tenwa.calc.LC_CUSTOMER_PERIOD;
import jbo.app.tenwa.calc.LC_CUSTOMER_RENT_PLAN;
import jbo.app.tenwa.calc.LC_CUSTOMER_RULES;
import jbo.app.tenwa.calc.LC_CUSTOMER_SUBSECTION;
import jbo.app.tenwa.calc.LC_FUND_PLAN;
import jbo.app.tenwa.calc.LC_FUND_PLAN_TEMP;
import jbo.app.tenwa.calc.LC_PAY_CASH_FLOW;
import jbo.app.tenwa.calc.LC_PAY_RENT_PLAN;
import jbo.app.tenwa.calc.LC_PROJ_CASH_FLOW;
import jbo.app.tenwa.calc.LC_PROJ_CONDITION;
import jbo.app.tenwa.calc.LC_PROJ_FUND_PLAN;
import jbo.app.tenwa.calc.LC_PROJ_PERIOD;
import jbo.app.tenwa.calc.LC_PROJ_RENT_PLAN;
import jbo.app.tenwa.calc.LC_PROJ_RULES;
import jbo.app.tenwa.calc.LC_PROJ_SUBSECTION;
import jbo.app.tenwa.calc.LC_RENT_PLAN;
import jbo.app.tenwa.calc.LC_RENT_PLAN_HIS;
import jbo.app.tenwa.calc.LC_RENT_PLAN_TEMP;
import jbo.com.tenwa.entity.comm.flow.FLOW_BUSSINESS_OBJECT;
import jbo.com.tenwa.lease.comm.LB_CONTRACT_INFO_TEMP;
import jbo.com.tenwa.lease.comm.LB_PROJECT_INFO;
import jbo.com.tenwa.lease.comm.LC_CONDITION;
import jbo.com.tenwa.lease.comm.LC_CONDITION_TEMP;
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.JBOException;
import com.amarsoft.are.jbo.JBOFactory;
import com.amarsoft.are.jbo.JBOTransaction;
import com.tenwa.comm.exception.RecordNotFoundException;
import com.tenwa.comm.util.jboutil.DataOperatorUtil;
import com.tenwa.lease.flow.comm.service.LeaseFlowBaseService;
import com.tenwa.lease.flow.comm.service.ServiceOperatorEnum;
import com.tenwa.lease.flow.comm.serviceImp.LeaseFlowBaseServiceImp;
import com.tenwa.reckon.copydata.CalcRentCompare;
import com.tenwa.util.SerialNumberUtil;
public class CalcConditionCopyService {
//<2F>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD>۵<EFBFBD><DBB5><EFBFBD>ʱ<EFBFBD><CAB1>
public void custToTemp(String flowunid,String quotid,String planCName,String planCValue,JBOTransaction tx) throws JBOException, RecordNotFoundException, Exception{
Map<String,String> fromCondition=new HashMap<String, String>();
fromCondition.put("quot_id", quotid);
Map<String,String> otherProperty=new HashMap<String, String>();
otherProperty.put("FLOWUNID", flowunid);
otherProperty.put(planCName, planCValue);
Map<String,String> toCondition=new HashMap<String, String>();
toCondition.put(planCName, planCValue);
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
DataOperatorUtil.copyJBOSet(LC_CUSTOMER_CONDITION.CLASS_NAME, fromCondition,LC_CALC_CONDITION_TEMP.CLASS_NAME, toCondition, otherProperty, null, tx);
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
DataOperatorUtil.copyJBOSet(LC_CUSTOMER_RULES.CLASS_NAME, fromCondition,LC_CALC_RULES_TEMP.CLASS_NAME, toCondition, otherProperty, null, tx);
//<2F><><EFBFBD><EFBFBD><EFBFBD>ƻ<EFBFBD>
DataOperatorUtil.copyJBOSet(LC_CUSTOMER_RENT_PLAN.CLASS_NAME, fromCondition,LC_RENT_PLAN_TEMP.CLASS_NAME, toCondition, otherProperty, null, tx);
//<2F>ʽ<EFBFBD><CABD>ƻ<EFBFBD>
DataOperatorUtil.copyJBOSet(LC_CUSTOMER_FUND_PLAN.CLASS_NAME, fromCondition,LC_FUND_PLAN_TEMP.CLASS_NAME, toCondition, otherProperty, null, tx);
//<2F>ֽ<EFBFBD><D6BD><EFBFBD>
DataOperatorUtil.copyJBOSet(LC_CUSTOMER_CASH_FLOW.CLASS_NAME, fromCondition, LC_CASH_FLOW_TEMP.CLASS_NAME, toCondition, otherProperty, null, tx);
//<2F><>֪<EFBFBD><D6AA>
DataOperatorUtil.copyJBOSet(LC_CUSTOMER_PERIOD.CLASS_NAME, fromCondition, LC_CALC_PERIOD_TEMP.CLASS_NAME, toCondition, otherProperty, null, tx);
//<2F>ֶβ<D6B6><CEB2><EFBFBD>
DataOperatorUtil.copyJBOSet(LC_CUSTOMER_SUBSECTION.CLASS_NAME, fromCondition, LC_CALC_SUBSECTION_TEMP.CLASS_NAME, toCondition, otherProperty, null, tx);
}
//<2F><>ʱ<EFBFBD><CAB1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ŀ<EFBFBD><C4BF>
public void tempToProj(String flowunid,JBOTransaction tx) throws Exception{
BizObject flow=JBOFactory.createBizObjectQuery(FLOW_BUSSINESS_OBJECT.CLASS_NAME,"flow_unid=:flowunid").setParameter("flowunid", flowunid).getSingleResult(false);
String projid=flow.getAttribute("proj_id").getString();
Map<String,String> fromCondition=new HashMap<String, String>();
fromCondition.put("FLOWUNID", flowunid);
Map<String,String> toCondition=new HashMap<String, String>();
toCondition.put("PROJECT_ID", projid);
Map<String,String> otherProperty=new HashMap<String, String>();
otherProperty.put("project_id", projid);
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
DataOperatorUtil.copyJBOSet(LC_CALC_CONDITION_TEMP.CLASS_NAME, fromCondition,LC_PROJ_CONDITION.CLASS_NAME, toCondition, otherProperty, null, tx);
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
DataOperatorUtil.copyJBOSet(LC_CALC_RULES_TEMP.CLASS_NAME, fromCondition,LC_PROJ_RULES.CLASS_NAME, toCondition, otherProperty, null, tx);
//<2F><><EFBFBD><EFBFBD><EFBFBD>ƻ<EFBFBD>
DataOperatorUtil.copyJBOSet(LC_RENT_PLAN_TEMP.CLASS_NAME, fromCondition,LC_PROJ_RENT_PLAN.CLASS_NAME, toCondition, otherProperty, null, tx);
//<2F>ʽ<EFBFBD><CABD>ƻ<EFBFBD>
DataOperatorUtil.copyJBOSet(LC_FUND_PLAN_TEMP.CLASS_NAME, fromCondition,LC_PROJ_FUND_PLAN.CLASS_NAME, toCondition, otherProperty, null, tx);
//<2F>ֽ<EFBFBD><D6BD><EFBFBD>
DataOperatorUtil.copyJBOSet(LC_CASH_FLOW_TEMP.CLASS_NAME, fromCondition, LC_PROJ_CASH_FLOW.CLASS_NAME, toCondition, otherProperty, null, tx);
//<2F><>֪<EFBFBD><D6AA>
DataOperatorUtil.copyJBOSet(LC_CALC_PERIOD_TEMP.CLASS_NAME, fromCondition, LC_PROJ_PERIOD.CLASS_NAME, toCondition, otherProperty, null, tx);
//<2F>ֶβ<D6B6><CEB2><EFBFBD>
DataOperatorUtil.copyJBOSet(LC_CALC_SUBSECTION_TEMP.CLASS_NAME, fromCondition, LC_PROJ_SUBSECTION.CLASS_NAME, toCondition, otherProperty, null, tx);
//ǰ<><C7B0><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
DataOperatorUtil.copyJBOSet(LC_CONDITION_TEMP.CLASS_NAME, fromCondition, LC_CONDITION.CLASS_NAME, toCondition, otherProperty, null, tx);
}
//<2F><>Ŀ<EFBFBD><C4BF><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1>
public void porjToTemp(String flowunid,String projid,JBOTransaction tx) throws Exception{
Map<String,String> fromCondition=new HashMap<String, String>();
fromCondition.put("PROJECT_ID", projid);
Map<String,String> otherProperty=new HashMap<String, String>();
otherProperty.put("FLOWUNID", flowunid);
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
DataOperatorUtil.copyJBOSet(LC_PROJ_CONDITION.CLASS_NAME, fromCondition,LC_CALC_CONDITION_TEMP.CLASS_NAME, null, otherProperty, null, tx);
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
DataOperatorUtil.copyJBOSet(LC_PROJ_RULES.CLASS_NAME, fromCondition,LC_CALC_RULES_TEMP.CLASS_NAME, null, otherProperty, null, tx);
//<2F><><EFBFBD><EFBFBD><EFBFBD>ƻ<EFBFBD>
DataOperatorUtil.copyJBOSet(LC_PROJ_RENT_PLAN.CLASS_NAME, fromCondition,LC_RENT_PLAN_TEMP.CLASS_NAME, null, otherProperty, null, tx);
//<2F>ʽ<EFBFBD><CABD>ƻ<EFBFBD>
DataOperatorUtil.copyJBOSet(LC_PROJ_FUND_PLAN.CLASS_NAME, fromCondition,LC_FUND_PLAN_TEMP.CLASS_NAME, null, otherProperty, null, tx);
//<2F>ֽ<EFBFBD><D6BD><EFBFBD>
DataOperatorUtil.copyJBOSet(LC_PROJ_CASH_FLOW.CLASS_NAME, fromCondition, LC_CASH_FLOW_TEMP.CLASS_NAME, null, otherProperty, null, tx);
//<2F><>֪<EFBFBD><D6AA>
DataOperatorUtil.copyJBOSet(LC_PROJ_PERIOD.CLASS_NAME, fromCondition, LC_CALC_PERIOD_TEMP.CLASS_NAME, null, otherProperty, null, tx);
//<2F>ֶβ<D6B6><CEB2><EFBFBD>
DataOperatorUtil.copyJBOSet(LC_PROJ_SUBSECTION.CLASS_NAME, fromCondition, LC_CALC_SUBSECTION_TEMP.CLASS_NAME, null, otherProperty, null, tx);
//ǰ<><C7B0><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
DataOperatorUtil.copyJBOSet(LC_CONDITION.CLASS_NAME, fromCondition, LC_CONDITION_TEMP.CLASS_NAME, null, otherProperty, null, tx);
}
//<2F><>Ŀ<EFBFBD><C4BF><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͬ<EFBFBD><CDAC>ʱ<EFBFBD><CAB1>
public void projToContract(String flowunid,String projid,String contractid,JBOTransaction tx) throws Exception{
BizObject proj=JBOFactory.createBizObjectQuery(LB_PROJECT_INFO.CLASS_NAME,"id=:id").setParameter("id", projid).getSingleResult(false);
String project_id=proj.getAttribute("project_no").getString();//<2F><>Ŀ<EFBFBD><C4BF><EFBFBD><EFBFBD>
Map<String,String> fromCondition=new HashMap<String, String>();
fromCondition.put("PROJECT_ID", projid);
List<BizObject> list=DataOperatorUtil.getSetJBO(LC_PROJ_CONDITION.CLASS_NAME, fromCondition, tx);
Map<String,String> otherProperty=new HashMap<String, String>();
otherProperty.put("FLOWUNID", flowunid);
for(BizObject bo:list){
String projPlanNumber=bo.getAttribute("PROJECT_PLAN_NUMBER").getString();
String contractPlanNumber=projPlanNumber.replace(project_id, contractid);
fromCondition.clear();
fromCondition.put("PROJECT_ID", projid);
fromCondition.put("PROJECT_PLAN_NUMBER", projPlanNumber);
otherProperty.clear();
otherProperty.put("FLOWUNID", flowunid);
otherProperty.put("CONTRACT_PLAN_NUMBER", contractPlanNumber);
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
DataOperatorUtil.copyJBOSet(LC_PROJ_CONDITION.CLASS_NAME, fromCondition,LC_CALC_CONDITION_TEMP.CLASS_NAME, null, otherProperty, null, tx);
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
DataOperatorUtil.copyJBOSet(LC_PROJ_RULES.CLASS_NAME, fromCondition,LC_CALC_RULES_TEMP.CLASS_NAME, null, otherProperty, null, tx);
//<2F><><EFBFBD><EFBFBD><EFBFBD>ƻ<EFBFBD>
DataOperatorUtil.copyJBOSet(LC_PROJ_RENT_PLAN.CLASS_NAME, fromCondition,LC_RENT_PLAN_TEMP.CLASS_NAME, null, otherProperty, null, tx);
//<2F>ʽ<EFBFBD><CABD>ƻ<EFBFBD>
DataOperatorUtil.copyJBOSet(LC_PROJ_FUND_PLAN.CLASS_NAME, fromCondition,LC_FUND_PLAN_TEMP.CLASS_NAME, null, otherProperty, null, tx);
//<2F>ֽ<EFBFBD><D6BD><EFBFBD>
DataOperatorUtil.copyJBOSet(LC_PROJ_CASH_FLOW.CLASS_NAME, fromCondition, LC_CASH_FLOW_TEMP.CLASS_NAME, null, otherProperty, null, tx);
//<2F><>֪<EFBFBD><D6AA>
DataOperatorUtil.copyJBOSet(LC_PROJ_PERIOD.CLASS_NAME, fromCondition, LC_CALC_PERIOD_TEMP.CLASS_NAME, null, otherProperty, null, tx);
//<2F>ֶβ<D6B6><CEB2><EFBFBD>
DataOperatorUtil.copyJBOSet(LC_PROJ_SUBSECTION.CLASS_NAME, fromCondition, LC_CALC_SUBSECTION_TEMP.CLASS_NAME, null, otherProperty, null, tx);
otherProperty.clear();
otherProperty.put("FLOWUNID", flowunid);
otherProperty.put("PLAN_NUMBER", contractPlanNumber);
//<2F><><EFBFBD><EFBFBD>ǰ<EFBFBD><C7B0>
DataOperatorUtil.copyJBOSet(LC_PAY_CONDTION.CLASS_NAME, fromCondition, LC_PAY_CONDTION_TEMP.CLASS_NAME, null, otherProperty, null, tx);
}
}
//<2F><>ͬ<EFBFBD><CDAC> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>ʱ <20><><EFBFBD><EFBFBD>ʽ
public void tempToContractOne(String flowunid,String contractid,JBOTransaction tx) throws Exception{
BizObject contract=JBOFactory.createBizObjectQuery(LB_CONTRACT_INFO_TEMP.CLASS_NAME,"flowunid=:flowunid").setParameter("flowunid", flowunid).getSingleResult(false);
String paymentNumber=SerialNumberUtil.getPlannumber(contract.getAttribute("CONTRACT_NO").getString(),"pay_process", tx);
Map<String,String> fromCondition=new HashMap<String, String>();
fromCondition.put("FLOWUNID", flowunid);
Map<String,String> toCondition=new HashMap<String, String>();
toCondition.put("contract_id", contractid);
Map<String,String> otherProperty=new HashMap<String, String>();
otherProperty.put("contract_id", contractid);
otherProperty.put("PAYMENT_NUMBER", paymentNumber);
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
DataOperatorUtil.copyJBOSet(LC_CALC_CONDITION_TEMP.CLASS_NAME, fromCondition,LC_CONTRACT_CONDITION.CLASS_NAME, toCondition, otherProperty, null, tx);
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
DataOperatorUtil.copyJBOSet(LC_CALC_RULES_TEMP.CLASS_NAME, fromCondition,LC_CONTRACT_RULES.CLASS_NAME, toCondition, otherProperty, null, tx);
//<2F><><EFBFBD><EFBFBD><EFBFBD>ƻ<EFBFBD>
DataOperatorUtil.copyJBOSet(LC_RENT_PLAN_TEMP.CLASS_NAME, fromCondition,LC_CONTRACT_RENT_PLAN.CLASS_NAME, toCondition, otherProperty, null, tx);
//<2F>ʽ<EFBFBD><CABD>ƻ<EFBFBD>
DataOperatorUtil.copyJBOSet(LC_FUND_PLAN_TEMP.CLASS_NAME, fromCondition,LC_CONTRACT_FUND_PLAN.CLASS_NAME, toCondition, otherProperty, null, tx);
//<2F>ֽ<EFBFBD><D6BD><EFBFBD>
DataOperatorUtil.copyJBOSet(LC_CASH_FLOW_TEMP.CLASS_NAME, fromCondition, LC_CONTRACT_CASH_FLOW.CLASS_NAME, toCondition, otherProperty, null, tx);
//<2F><>֪<EFBFBD><D6AA>
DataOperatorUtil.copyJBOSet(LC_CALC_PERIOD_TEMP.CLASS_NAME, fromCondition, LC_CONTRACT_PERIOD.CLASS_NAME, toCondition, otherProperty, null, tx);
//<2F>ֶβ<D6B6><CEB2><EFBFBD>
DataOperatorUtil.copyJBOSet(LC_CALC_SUBSECTION_TEMP.CLASS_NAME, fromCondition, LC_CONTRACT_SUBSECTION.CLASS_NAME, toCondition, otherProperty, null, tx);
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
DataOperatorUtil.copyJBOSet(LC_CALC_CONDITION_TEMP.CLASS_NAME, fromCondition,LC_CALC_CONDITION.CLASS_NAME, toCondition, otherProperty, null, tx);
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
DataOperatorUtil.copyJBOSet(LC_CALC_RULES_TEMP.CLASS_NAME, fromCondition,LC_CALC_RULES.CLASS_NAME, toCondition, otherProperty, null, tx);
//<2F><><EFBFBD><EFBFBD><EFBFBD>ƻ<EFBFBD>
DataOperatorUtil.copyJBOSet(LC_RENT_PLAN_TEMP.CLASS_NAME, fromCondition,LC_PAY_RENT_PLAN.CLASS_NAME, toCondition, otherProperty, null, tx);
//<2F>ʽ<EFBFBD><CABD>ƻ<EFBFBD>
DataOperatorUtil.copyJBOSet(LC_FUND_PLAN_TEMP.CLASS_NAME, fromCondition,LC_FUND_PLAN.CLASS_NAME, toCondition, otherProperty, null, tx);
//<2F>ֽ<EFBFBD><D6BD><EFBFBD>
DataOperatorUtil.copyJBOSet(LC_CASH_FLOW_TEMP.CLASS_NAME, fromCondition, LC_PAY_CASH_FLOW.CLASS_NAME, toCondition, otherProperty, null, tx);
//<2F><>֪<EFBFBD><D6AA>
DataOperatorUtil.copyJBOSet(LC_CALC_PERIOD_TEMP.CLASS_NAME, fromCondition, LC_CALC_PERIOD.CLASS_NAME, toCondition, otherProperty, null, tx);
//<2F>ֶβ<D6B6><CEB2><EFBFBD>
DataOperatorUtil.copyJBOSet(LC_CALC_SUBSECTION_TEMP.CLASS_NAME, fromCondition, LC_CALC_SUBSECTION.CLASS_NAME, toCondition, otherProperty, null, tx);
//<2F><><EFBFBD><EFBFBD>ǰ<EFBFBD><C7B0>
LeaseFlowBaseService service=new LeaseFlowBaseServiceImp();
service.copyOrLoadPayCondtionInfo(tx, fromCondition,toCondition,otherProperty, ServiceOperatorEnum.TempToFormal,null);
HandlingApportionManager.setSingleHandlingApportion(flowunid,contractid,paymentNumber,tx);
}
//<2F><>ͬ<EFBFBD><CDAC> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>ʱ <20><><EFBFBD><EFBFBD>ʽ
public void tempToContractMany(String flowunid,String contractid,JBOTransaction tx) throws Exception{
Map<String,String> fromCondition=new HashMap<String, String>();
fromCondition.put("FLOWUNID", flowunid);
Map<String,String> toCondition=new HashMap<String, String>();
toCondition.put("contract_id", contractid);
Map<String,String> otherProperty=new HashMap<String, String>();
otherProperty.put("contract_id", contractid);
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
DataOperatorUtil.copyJBOSet(LC_CALC_CONDITION_TEMP.CLASS_NAME, fromCondition,LC_CONTRACT_CONDITION.CLASS_NAME, toCondition, otherProperty, null, tx);
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
DataOperatorUtil.copyJBOSet(LC_CALC_RULES_TEMP.CLASS_NAME, fromCondition,LC_CONTRACT_RULES.CLASS_NAME, toCondition, otherProperty, null, tx);
//<2F><><EFBFBD><EFBFBD><EFBFBD>ƻ<EFBFBD>
DataOperatorUtil.copyJBOSet(LC_RENT_PLAN_TEMP.CLASS_NAME, fromCondition,LC_CONTRACT_RENT_PLAN.CLASS_NAME, toCondition, otherProperty, null, tx);
//<2F>ʽ<EFBFBD><CABD>ƻ<EFBFBD>
DataOperatorUtil.copyJBOSet(LC_FUND_PLAN_TEMP.CLASS_NAME, fromCondition,LC_CONTRACT_FUND_PLAN.CLASS_NAME, toCondition, otherProperty, null, tx);
//<2F>ֽ<EFBFBD><D6BD><EFBFBD>
DataOperatorUtil.copyJBOSet(LC_CASH_FLOW_TEMP.CLASS_NAME, fromCondition, LC_CONTRACT_CASH_FLOW.CLASS_NAME, toCondition, otherProperty, null, tx);
//<2F><>֪<EFBFBD><D6AA>
DataOperatorUtil.copyJBOSet(LC_CALC_PERIOD_TEMP.CLASS_NAME, fromCondition, LC_CONTRACT_PERIOD.CLASS_NAME, toCondition, otherProperty, null, tx);
//<2F>ֶβ<D6B6><CEB2><EFBFBD>
DataOperatorUtil.copyJBOSet(LC_CALC_SUBSECTION_TEMP.CLASS_NAME, fromCondition, LC_CONTRACT_SUBSECTION.CLASS_NAME, toCondition, otherProperty, null, tx);
//<2F><><EFBFBD><EFBFBD>ǰ<EFBFBD><C7B0>
LeaseFlowBaseService service=new LeaseFlowBaseServiceImp();
service.copyOrLoadPayCondtionInfo(tx, fromCondition,toCondition,otherProperty, ServiceOperatorEnum.TempToFormal,null);
}
//<2F><>ͬ<EFBFBD><CDAC>ʽ<EFBFBD><CABD><EFBFBD><EFBFBD>ʱ
public void contractTotemp(String flowunid,String contractid,JBOTransaction tx) throws Exception{
Map<String,String> fromCondition=new HashMap<String, String>();
fromCondition.put("contract_id", contractid);
Map<String,String> otherProperty=new HashMap<String, String>();
otherProperty.put("FLOWUNID", flowunid);
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
DataOperatorUtil.copyJBOSet(LC_CONTRACT_CONDITION.CLASS_NAME, fromCondition,LC_CALC_CONDITION_TEMP.CLASS_NAME, null, otherProperty, null, tx);
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
DataOperatorUtil.copyJBOSet(LC_CONTRACT_RULES.CLASS_NAME, fromCondition,LC_CALC_RULES_TEMP.CLASS_NAME, null, otherProperty, null, tx);
//<2F><><EFBFBD><EFBFBD><EFBFBD>ƻ<EFBFBD>
DataOperatorUtil.copyJBOSet(LC_CONTRACT_RENT_PLAN.CLASS_NAME, fromCondition,LC_RENT_PLAN_TEMP.CLASS_NAME, null, otherProperty, null, tx);
//<2F>ʽ<EFBFBD><CABD>ƻ<EFBFBD>
DataOperatorUtil.copyJBOSet(LC_CONTRACT_FUND_PLAN.CLASS_NAME, fromCondition,LC_FUND_PLAN_TEMP.CLASS_NAME, null, otherProperty, null, tx);
//<2F>ֽ<EFBFBD><D6BD><EFBFBD>
DataOperatorUtil.copyJBOSet(LC_CONTRACT_CASH_FLOW.CLASS_NAME, fromCondition, LC_CASH_FLOW_TEMP.CLASS_NAME, null, otherProperty, null, tx);
//<2F><>֪<EFBFBD><D6AA>
DataOperatorUtil.copyJBOSet(LC_CONTRACT_PERIOD.CLASS_NAME, fromCondition, LC_CALC_PERIOD_TEMP.CLASS_NAME, null, otherProperty, null, tx);
//<2F>ֶβ<D6B6><CEB2><EFBFBD>
DataOperatorUtil.copyJBOSet(LC_CONTRACT_SUBSECTION.CLASS_NAME, fromCondition, LC_CALC_SUBSECTION_TEMP.CLASS_NAME, null, otherProperty, null, tx);
}
//<2F><>ʱ<EFBFBD><CAB1>Ͷ<EFBFBD><CDB6>
public void tempToPay(String flowunid,String paymentNumber,JBOTransaction tx) throws Exception{
BizObject flow=JBOFactory.createBizObjectQuery(FLOW_BUSSINESS_OBJECT.CLASS_NAME,"flow_unid=:flowunid").setParameter("flowunid", flowunid).getSingleResult(false);
String contractid=flow.getAttribute("contract_id").getString();
Map<String,String> fromCondition=new HashMap<String, String>();
fromCondition.put("PAYMENT_NUMBER", paymentNumber);
fromCondition.put("flowunid", flowunid);
Map<String,String> toCondition=new HashMap<String, String>();
toCondition.put("PAYMENT_NUMBER", paymentNumber);
Map<String,String> otherProperty=new HashMap<String, String>();
otherProperty.put("contract_id", contractid);
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
DataOperatorUtil.copyJBOSet(LC_CALC_CONDITION_TEMP.CLASS_NAME, fromCondition,LC_CALC_CONDITION.CLASS_NAME, toCondition, otherProperty, null, tx);
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
DataOperatorUtil.copyJBOSet(LC_CALC_RULES_TEMP.CLASS_NAME, fromCondition,LC_CALC_RULES.CLASS_NAME, toCondition, otherProperty, null, tx);
//<2F><><EFBFBD><EFBFBD><EFBFBD>ƻ<EFBFBD>
DataOperatorUtil.copyJBOSet(LC_RENT_PLAN_TEMP.CLASS_NAME, fromCondition,LC_PAY_RENT_PLAN.CLASS_NAME, toCondition, otherProperty, null, tx);
//<2F>ʽ<EFBFBD><CABD>ƻ<EFBFBD>
DataOperatorUtil.copyJBOSet(LC_FUND_PLAN_TEMP.CLASS_NAME, fromCondition,LC_FUND_PLAN.CLASS_NAME, toCondition, otherProperty, null, tx);
//<2F>ֽ<EFBFBD><D6BD><EFBFBD>
DataOperatorUtil.copyJBOSet(LC_CASH_FLOW_TEMP.CLASS_NAME, fromCondition, LC_PAY_CASH_FLOW.CLASS_NAME, toCondition, otherProperty, null, tx);
//<2F><>֪<EFBFBD><D6AA>
DataOperatorUtil.copyJBOSet(LC_CALC_PERIOD_TEMP.CLASS_NAME, fromCondition, LC_CALC_PERIOD.CLASS_NAME, toCondition, otherProperty, null, tx);
//<2F>ֶβ<D6B6><CEB2><EFBFBD>
DataOperatorUtil.copyJBOSet(LC_CALC_SUBSECTION_TEMP.CLASS_NAME, fromCondition, LC_CALC_SUBSECTION.CLASS_NAME, toCondition, otherProperty, null, tx);
HandlingApportionManager.setHandlingApportion(flowunid,contractid,paymentNumber,tx);
}
//Ͷ<>ŵ<EFBFBD><C5B5><EFBFBD>ʱ
public void payToTemp(String flowunid,String paymentNumber,JBOTransaction tx) throws Exception{
Map<String,String> fromCondition=new HashMap<String, String>();
fromCondition.put("PAYMENT_NUMBER", paymentNumber);
Map<String,String> otherProperty=new HashMap<String, String>();
otherProperty.put("FLOWUNID", flowunid);
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
DataOperatorUtil.copyJBOSet(LC_CALC_CONDITION.CLASS_NAME, fromCondition,LC_CALC_CONDITION_TEMP.CLASS_NAME, null, otherProperty, null, tx);
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
DataOperatorUtil.copyJBOSet(LC_CALC_RULES.CLASS_NAME, fromCondition,LC_CALC_RULES_TEMP.CLASS_NAME, null, otherProperty, null, tx);
//<2F><><EFBFBD><EFBFBD><EFBFBD>ƻ<EFBFBD>
DataOperatorUtil.copyJBOSet(LC_PAY_RENT_PLAN.CLASS_NAME, fromCondition,LC_RENT_PLAN_TEMP.CLASS_NAME, null, otherProperty, null, tx);
//<2F>ʽ<EFBFBD><CABD>ƻ<EFBFBD>
DataOperatorUtil.copyJBOSet(LC_FUND_PLAN.CLASS_NAME, fromCondition,LC_FUND_PLAN_TEMP.CLASS_NAME, null, otherProperty, null, tx);
//<2F>ֽ<EFBFBD><D6BD><EFBFBD>
DataOperatorUtil.copyJBOSet(LC_PAY_CASH_FLOW.CLASS_NAME, fromCondition, LC_CASH_FLOW_TEMP.CLASS_NAME, null, otherProperty, null, tx);
//<2F><>֪<EFBFBD><D6AA>
DataOperatorUtil.copyJBOSet(LC_CALC_PERIOD.CLASS_NAME, fromCondition, LC_CALC_PERIOD_TEMP.CLASS_NAME, null, otherProperty, null, tx);
//<2F>ֶβ<D6B6><CEB2><EFBFBD>
DataOperatorUtil.copyJBOSet(LC_CALC_SUBSECTION.CLASS_NAME, fromCondition, LC_CALC_SUBSECTION_TEMP.CLASS_NAME, null, otherProperty, null, tx);
}
//<2F><>ʱ<EFBFBD><CAB1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
public void tempToOnhire(String flowunid,String paymentNumber,String contractid,JBOTransaction tx) throws Exception{
Map<String,String> fromCondition=new HashMap<String, String>();
fromCondition.put("FLOWUNID", flowunid);
fromCondition.put("PAYMENT_NUMBER", paymentNumber);
Map<String,String> toCondition=new HashMap<String, String>();
toCondition.put("PAYMENT_NUMBER", paymentNumber);
Map<String,String> otherProperty=new HashMap<String, String>();
otherProperty.put("contract_id", contractid);
CalcRentCompare com=new CalcRentCompare();
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
DataOperatorUtil.copyJBOSet(LC_CALC_CONDITION_TEMP.CLASS_NAME, fromCondition,LC_CALC_CONDITION.CLASS_NAME, toCondition, otherProperty, null, tx);
//<2F><><EFBFBD><EFBFBD><EFBFBD>ƻ<EFBFBD>
DataOperatorUtil.copyJBOSet(LC_RENT_PLAN_TEMP.CLASS_NAME, fromCondition,LC_RENT_PLAN.CLASS_NAME, toCondition, otherProperty, com, tx);
//<2F>ʽ<EFBFBD><CABD>ƻ<EFBFBD>
DataOperatorUtil.copyJBOSet(LC_FUND_PLAN_TEMP.CLASS_NAME, fromCondition, LC_FUND_PLAN.CLASS_NAME, toCondition, otherProperty, null, tx);
//<2F>ֽ<EFBFBD><D6BD><EFBFBD>
DataOperatorUtil.copyJBOSet(LC_CASH_FLOW_TEMP.CLASS_NAME, fromCondition, LC_CASH_FLOW.CLASS_NAME, toCondition, otherProperty, null, tx);
//HandlingApportionManager.setHandlingApportion(flowunid,contractid,paymentNumber,tx);
}
//<2F><><EFBFBD><EFBFBD><E2B5BD>ʱ
public void onhireToTemp(String flowunid,String paymentNumber,JBOTransaction tx) throws Exception{
Map<String,String> fromCondition=new HashMap<String, String>();
fromCondition.put("PAYMENT_NUMBER", paymentNumber);
Map<String,String> otherProperty=new HashMap<String, String>();
otherProperty.put("FLOWUNID", flowunid);
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
DataOperatorUtil.copyJBOSet(LC_CALC_CONDITION.CLASS_NAME, fromCondition,LC_CALC_CONDITION_TEMP.CLASS_NAME, null, otherProperty, null, tx);
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
DataOperatorUtil.copyJBOSet(LC_CALC_RULES.CLASS_NAME, fromCondition,LC_CALC_RULES_TEMP.CLASS_NAME, null, otherProperty, null, tx);
//<2F><><EFBFBD><EFBFBD><EFBFBD>ƻ<EFBFBD>
DataOperatorUtil.copyJBOSet(LC_RENT_PLAN.CLASS_NAME, fromCondition,LC_RENT_PLAN_TEMP.CLASS_NAME, null, otherProperty, null, tx);
//<2F>ʽ<EFBFBD><CABD>ƻ<EFBFBD>
DataOperatorUtil.copyJBOSet(LC_FUND_PLAN.CLASS_NAME, fromCondition,LC_FUND_PLAN_TEMP.CLASS_NAME, null, otherProperty, null, tx);
//<2F>ֽ<EFBFBD><D6BD><EFBFBD>
DataOperatorUtil.copyJBOSet(LC_CASH_FLOW.CLASS_NAME, fromCondition, LC_CASH_FLOW_TEMP.CLASS_NAME, null, otherProperty, null, tx);
//<2F><>֪<EFBFBD><D6AA>
DataOperatorUtil.copyJBOSet(LC_CALC_PERIOD.CLASS_NAME, fromCondition, LC_CALC_PERIOD_TEMP.CLASS_NAME, null, otherProperty, null, tx);
//<2F>ֶβ<D6B6><CEB2><EFBFBD>
DataOperatorUtil.copyJBOSet(LC_CALC_SUBSECTION.CLASS_NAME, fromCondition, LC_CALC_SUBSECTION_TEMP.CLASS_NAME, null, otherProperty, null, tx);
}
//<2F><><EFBFBD><EFBFBD><E2B5BD>ʱ
public void onhireToTempList(String flowunid,String contractid,JBOTransaction tx) throws Exception{
Map<String,String> fromCondition=new HashMap<String, String>();
fromCondition.put("contract_id", contractid);
Map<String,String> otherProperty=new HashMap<String, String>();
otherProperty.put("FLOWUNID", flowunid);
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
DataOperatorUtil.copyJBOSet(LC_CALC_CONDITION.CLASS_NAME, fromCondition,LC_CALC_CONDITION_TEMP.CLASS_NAME, null, otherProperty, null, tx);
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
DataOperatorUtil.copyJBOSet(LC_CALC_RULES.CLASS_NAME, fromCondition,LC_CALC_RULES_TEMP.CLASS_NAME, null, otherProperty, null, tx);
//<2F><><EFBFBD><EFBFBD><EFBFBD>ƻ<EFBFBD>
DataOperatorUtil.copyJBOSet(LC_RENT_PLAN.CLASS_NAME, fromCondition,LC_RENT_PLAN_TEMP.CLASS_NAME, null, otherProperty, null, tx);
//<2F>ʽ<EFBFBD><CABD>ƻ<EFBFBD>
List<BizObject> funds=DataOperatorUtil.getSetJBO(LC_FUND_PLAN.CLASS_NAME, fromCondition, tx);
Map<String,String> from=new HashMap<String, String>();
Map<String,String> other=new HashMap<String, String>();
other.putAll(otherProperty);
for(BizObject fund:funds){
from.put("id", fund.getAttribute("id").getString());
other.put("p_id", fund.getAttribute("id").getString());
other.put("OPERATION_STATUS", "opera_after");
DataOperatorUtil.copyJBOSet(LC_FUND_PLAN.CLASS_NAME, from,LC_FUND_PLAN_TEMP.CLASS_NAME, null, other, null, tx);
}
//<2F>ֽ<EFBFBD><D6BD><EFBFBD>
DataOperatorUtil.copyJBOSet(LC_CASH_FLOW.CLASS_NAME, fromCondition, LC_CASH_FLOW_TEMP.CLASS_NAME, null, otherProperty, null, tx);
//<2F><>֪<EFBFBD><D6AA>
DataOperatorUtil.copyJBOSet(LC_CALC_PERIOD.CLASS_NAME, fromCondition, LC_CALC_PERIOD_TEMP.CLASS_NAME, null, otherProperty, null, tx);
//<2F>ֶβ<D6B6><CEB2><EFBFBD>
DataOperatorUtil.copyJBOSet(LC_CALC_SUBSECTION.CLASS_NAME, fromCondition, LC_CALC_SUBSECTION_TEMP.CLASS_NAME, null, otherProperty, null, tx);
}
//<2F><><EFBFBD><EFBFBD><EFBFBD>ƻ<EFBFBD><C6BB><EFBFBD>ʷ
public void onhireToHis(String flowunid,String paymentNumber,JBOTransaction tx) throws Exception{
Map<String,String> fromCondition=new HashMap<String, String>();
fromCondition.put("payment_number", paymentNumber);
Map<String,String> other=new HashMap<String, String>();
other.put("flowunid", flowunid);
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
DataOperatorUtil.copyJBOSet(LC_CALC_CONDITION.CLASS_NAME, fromCondition,LC_CALC_CONDITION_HIS.CLASS_NAME, null, other, null, tx);
//<2F><><EFBFBD><EFBFBD><EFBFBD>ƻ<EFBFBD>
DataOperatorUtil.copyJBOSet(LC_RENT_PLAN.CLASS_NAME, fromCondition,LC_RENT_PLAN_HIS.CLASS_NAME, null, other, null, tx);
//<2F>ֽ<EFBFBD><D6BD><EFBFBD>
DataOperatorUtil.copyJBOSet(LC_CASH_FLOW.CLASS_NAME, fromCondition, LC_CASH_FLOW_HIS.CLASS_NAME, null, other, null, tx);
}
}