新增实际放款第三步发起脚本将起租日变更为放款日

This commit is contained in:
tenwa666 2019-04-22 18:13:00 +08:00
parent 695687fd7a
commit 4ed734c341

View File

@ -0,0 +1,36 @@
package com.tenwa.voucher.CreateVoucherProcess.CreateVoucherMethodSettle;
import java.sql.SQLException;
import java.util.List;
import java.util.Map;
import com.amarsoft.awe.util.Transaction;
import com.amarsoft.dict.als.cache.CacheLoaderFactory;
import com.tenwa.comm.util.jboutil.DataOperatorUtil;
import com.tenwa.flow.baseBussion.BaseBussiness;
import com.tenwa.voucher.CreateVoucherProcess.CreateVoucherIncomeForTradition;
import com.tenwa.voucher.CreateVoucherProcess.CreateVoucherRentIncomeTradition;
/**
* 传统/汽车类传统网银收款生成凭证
* @author xiezhiwen
*/
public class UpdateStartDateforHireDate extends BaseBussiness {
@Override
public Object run(Transaction Sqlca) throws Exception {
this.initBussinessParam(Sqlca);
String FlowUnid=this.getAttribute("FlowUnid").toString();
String userid = this.getAttribute("CurUserID").toString();
// 查询资金实收临时表, 获取合同号和实收日期
String selectSql="SELECT CONTRACT_ID,CASE WHEN (FACT_DATE IS NOT NULL OR FACT_DATE !='') THEN FACT_DATE ELSE DATE_FORMAT(NOW(),'%Y-%m-%d') END AS FACT_DATE FROM LC_FUND_INCOME_TEMP WHERE FEE_TYPE='feetype10' AND FLOWUNID='"+FlowUnid+"'";
List<Map<String,String>> dataList=DataOperatorUtil.getDataBySql(Sqlca, selectSql, null);
String CONTRACT_ID=dataList.get(0).get("CONTRACT_ID");
String FACT_DATE=dataList.get(0).get("FACT_DATE");
// 通过合同id将实收日期update为商务条件表起租日
String updSql="UPDATE LC_CALC_CONDITION SET START_DATE='"+FACT_DATE+"' WHERE CONTRACT_ID='"+CONTRACT_ID+"'";
Sqlca.executeSQL(updSql);
Sqlca.commit();
return "true";
}
}