起租后变更租金没有合同id

This commit is contained in:
tangfutang 2022-06-09 09:28:07 +08:00
parent 582848b2bf
commit 505ecd318e

View File

@ -0,0 +1,33 @@
package com.tenwa.reckon.copydata;
import com.amarsoft.awe.util.ASResultSet;
import com.amarsoft.awe.util.SqlObject;
import com.amarsoft.awe.util.Transaction;
import com.tenwa.flow.baseBussion.BaseBussiness;
/**
* 起租后方案信息变更租金计划表合同id为空
*
*
*/
public class CalcConditionUpdateRent extends BaseBussiness{
public Object run(Transaction Sqlca) throws Exception {
this.initBussinessParam(Sqlca);
String flowunid = this.getAttribute("ObjectNo").toString(); //获取流程编号
String contractId = this.getAttribute("ContractId").toString(); //获取合同编号
ASResultSet rs = Sqlca.getASResultSet(new SqlObject("select PROJECT_ID,PROJECT_PLAN_NUMBER ,CONTRACT_PLAN_NUMBER ,PAYMENT_NUMBER from lc_rent_plan where CONTRACT_ID ='"+contractId+"' and PLAN_LIST = '1' "));
if ( rs.next() ) {
SqlObject sql = new SqlObject("update lc_rent_plan_temp set "
+ " PROJECT_ID =:projectId,PROJECT_PLAN_NUMBER=:projectPlanNumber ,"
+ " CONTRACT_PLAN_NUMBER=:contractPlanNumber ,PAYMENT_NUMBER=:paymentNumber,CONTRACT_ID=:contractId "
+ " where FLOWUNID=:flowUnid ");
sql.setParameter("projectId", rs.getString( "PROJECT_ID" ) ).setParameter("projectPlanNumber", rs.getString( "PROJECT_PLAN_NUMBER" ) )
.setParameter("contractPlanNumber", rs.getString( "CONTRACT_PLAN_NUMBER" ) ).setParameter("paymentNumber", rs.getString( "PAYMENT_NUMBER" ) )
.setParameter("contractId", contractId ).setParameter("flowUnid", flowunid);
Sqlca.executeSQL(sql);
}
return "true";
}
}