31 lines
1.3 KiB
Java
31 lines
1.3 KiB
Java
package com.tenwa.flow.rent.copyrent;
|
|
import java.util.List;
|
|
|
|
import jbo.app.tenwa.calc.LC_RENT_INCOME_TEMP;
|
|
import jbo.app.tenwa.calc.LC_RENT_PLAN;
|
|
|
|
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.flow.baseBussion.BaseBussiness;
|
|
|
|
public class InsertRentPlanStatus extends BaseBussiness{
|
|
public Object run(Transaction Sqlca) throws Exception{
|
|
this.initBussinessParam(Sqlca.getTransaction());
|
|
String flowunid = (String)this.getAttribute("ObjectNo");
|
|
List<BizObject> boLRITs=JBOFactory.createBizObjectQuery(LC_RENT_INCOME_TEMP.CLASS_NAME,"flowunid=:flowunid").setParameter("flowunid", flowunid).getResultList(false);
|
|
BizObjectManager bomLRP = JBOFactory.getBizObjectManager(LC_RENT_PLAN.CLASS_NAME, Sqlca.getTransaction());
|
|
for(int i=0;i<boLRITs.size();i++){
|
|
BizObject boLRIT = boLRITs.get(i);
|
|
String contractId = boLRIT.getAttribute("CONTRACT_ID").toString();
|
|
String planList = boLRIT.getAttribute("PLAN_LIST").toString();
|
|
bomLRP.createQuery("update O set COLLECT_STATUS='ÍøÒøÊÕ¿î',COLLECT_MSG='ÍøÒøÊÕ¿î' where CONTRACT_ID=:CONTRACT_ID and PLAN_LIST=:PLAN_LIST")
|
|
.setParameter("CONTRACT_ID", contractId).setParameter("PLAN_LIST", planList).executeUpdate();
|
|
|
|
}
|
|
String sMessage="true";
|
|
return sMessage;
|
|
}
|
|
}
|