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.CreateVoucherInsuranceForCarTradition; import com.tenwa.voucher.CreateVoucherProcess.CreateVoucherInsuranceSettlement; import com.tenwa.voucher.CreateVoucherProcess.CreateVoucherMonthSettlement; import com.tenwa.voucher.CreateVoucherProcess.CreateVoucherRentIncome; 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{ InsertVoucherRentIncome ivri=new InsertVoucherRentIncome(); ivri.execute(); CreateVoucherInsuranceSettlement cvis=new CreateVoucherInsuranceSettlement(); cvis.CreateVoucher("PZ2018072100000054");//保险理赔 -收到理赔保险费--回租 cvis.CreateVoucher("PZ2018080200000064");//保险理赔 -记录理赔保险费--直租 // 汽车类传统 CreateVoucherInsuranceForCarTradition cvift = new CreateVoucherInsuranceForCarTradition(); cvift.CreateVoucher("PZ2018092500000221");//保险理赔 -收到理赔保险费--回租 cvift.CreateVoucher("PZ2018100900000273");//保险理赔 -收到理赔保险费--直租 // 传统 cvift.CreateVoucher("PZ2018092500000189");//保险理赔 -收到理赔保险费--回租 cvift.CreateVoucher("PZ2018100900000274");//保险理赔 -收到理赔保险费--直租 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); } } }