apzl_leasing/src_tenwa/com/tenwa/lease/app/quartzmession/CreateVoucherRentIncomeMission.java
2022-02-24 10:59:28 +08:00

41 lines
1.4 KiB
Java

package com.tenwa.lease.app.quartzmession;
import org.quartz.DisallowConcurrentExecution;
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
*/
@DisallowConcurrentExecution
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.lease.app.quartzmession.CreateVoucherRentIncomeMission", "success", "成功", curUserId);
} catch (Exception e) {
QuartzUtil.insertLog(startime,"com.tenwa.lease.app.quartzmession.CreateVoucherRentIncomeMission", "error", "失败", curUserId);
}
}
}