资金维护

This commit is contained in:
zhangjun 2018-09-26 16:42:11 +08:00
parent 4487fbfbbd
commit 42bec653c9
2 changed files with 69 additions and 0 deletions

View File

@ -224,6 +224,8 @@
<attribute name="current_interest_money" label="当期利息费用(当月)" type="STRING" length="32"/>
<attribute name="cumulative_interest_money" label="累计利息费用(投放日至当月)" type="STRING" length="32"/>
<attribute name="CONTRACT_NO" label="合同编号" type="STRING" length="32"/>
<attribute name="BUSINESSTYPE" label="项目所属业务部门" type="STRING" length="32"/>
<attribute name="LEASE_ACC_NAME" label="投放主题" type="STRING" length="32"/>
<attribute name="INPUTUSERID" label="登记人" type="STRING" length="32"/>
<attribute name="INPUTORGID" label="登记部门" type="STRING" length="32"/>
<attribute name="INPUTTIME" label="登记时间" type="STRING" length="32"/>

View File

@ -0,0 +1,67 @@
package com.tenwa.lease.app.quartzmession;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.UUID;
import org.quartz.Job;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import com.amarsoft.are.jbo.BizObject;
import com.amarsoft.are.jbo.BizObjectManager;
import com.amarsoft.are.jbo.JBOException;
import com.amarsoft.are.jbo.JBOFactory;
import com.amarsoft.are.jbo.JBOTransaction;
import com.amarsoft.are.util.StringFunction;
import com.amarsoft.awe.util.Transaction;
import com.base.util.QuartzUtil;
import com.tenwa.comm.util.jboutil.DataOperatorUtil;
import com.tenwa.reckon.util.Conn;
import jbo.app.tenwa.customer.LB_TEST;
import jbo.com.tenwa.entity.comm.own.LC_SOURCE_OF_FUNDS;
public class LBTESTinfo implements Job{
@Override
public void execute(JobExecutionContext arg0) throws JobExecutionException {
String startime = StringFunction.getTodayNow();
Object userId = arg0.getTrigger().getJobDataMap().get("CurUserId");
String curUserId = userId == null? "system" : userId.toString();
try {
JBOTransaction tx = JBOFactory.createJBOTransaction();
BizObjectManager LCBizObjectManager =JBOFactory.getBizObjectManager(LC_SOURCE_OF_FUNDS.CLASS_NAME,tx);
Transaction Sqlca = null;
Sqlca = Transaction.createTransaction(tx);
String insertSql="INSERT INTO LC_SOURCE_OF_FUNDS (id, contract_no, businesstype, lease_acc_name)"+
"(SELECT REPLACE(UUID(), '-', '') AS id,"+
"lci.contract_no AS contract_no,"+
"CASE lci.businesstype WHEN '2' THEN '汽车类传统' WHEN '3' THEN '传统类' ELSE '汽车类' END AS businesstype,"+
"CASE WHEN lci.businesstype='1' THEN oo.own_name ELSE oi.own_name END AS lease_acc_name FROM"+
"lb_contract_info lci "+
"LEFT JOIN LB_LESSOR_INFO lit"+
" ON lci.id = lit.contract_id"+
"LEFT JOIN OWN_INFO oi "+
"ON lit.lessor = oi.own_number"+
"LEFT JOIN OWN_INFO oo ON 1=1 AND oo.id='50ffe19bbff24153ac3406a3b4f5e40d'"+
"WHERE lci.contract_status >= '31' "+
"AND lci.contract_no NOT IN "+
"(SELECT IFNULL(contract_no, '') AS contract_no FROM LC_SOURCE_OF_FUNDS))";
Sqlca.executeSQL(insertSql);
tx.commit();
QuartzUtil.insertLog(startime, "com.tenwa.lease.app.quartzmession.LBTESTinfo", "success", "成功", curUserId);
} catch (Exception e) {
QuartzUtil.insertLog(startime, "com.tenwa.lease.app.quartzmession.LBTESTinfo", "error", "失败", curUserId);
e.printStackTrace();
}
}
}