39 lines
1.3 KiB
Java
39 lines
1.3 KiB
Java
package com.tenwa.lease.app.quartzmession;
|
|
|
|
import org.quartz.Job;
|
|
import org.quartz.JobExecutionContext;
|
|
import org.quartz.JobExecutionException;
|
|
import com.amarsoft.are.util.StringFunction;
|
|
import com.base.util.QuartzUtil;
|
|
import com.tenwa.voucher.CreateVoucherProcess.InsertVoucherRentCompensatory;
|
|
import com.tenwa.voucher.CreateVoucherProcess.InsertVoucherRentIncome;
|
|
/**
|
|
* 生成卡扣凭证明细-定时任务
|
|
* @author xiezhiwen
|
|
*/
|
|
public class CreateVoucherRentIncomeMission 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{
|
|
// 代偿凭证
|
|
InsertVoucherRentCompensatory ivrc = new InsertVoucherRentCompensatory();
|
|
ivrc.execute();
|
|
|
|
// 卡扣凭证及代偿反冲凭证
|
|
InsertVoucherRentIncome ivri=new InsertVoucherRentIncome();
|
|
ivri.execute();
|
|
|
|
QuartzUtil.insertLog(startime,"com.tenwa.comm.message.controller.BusinessCancelJob", "success", "成功", curUserId);
|
|
} catch (Exception e) {
|
|
QuartzUtil.insertLog(startime,"com.tenwa.comm.message.controller.BusinessCancelJob", "error", "失败", curUserId);
|
|
}
|
|
}
|
|
|
|
}
|