package nc.bs.arap.pay.bgtask;

import java.util.Map;

import nc.bs.arap.bill.bgtask.AbstractNC63F4F5ToNCCF2F3;
import nc.bs.arap.pay.bgtask.process.NC63F5ToNCCF3MakeBillProcess;
import nc.bs.pub.pa.PreAlertObject;
import nc.bs.pub.pa.PreAlertReturnType;
import nc.bs.pub.taskcenter.BgWorkingContext;
import nc.bs.pub.taskcenter.IBackgroundWorkPlugin;
import nc.log.arap.bill.WYNCCARAPLogger;
import nc.vo.pub.BusinessException;

/**
 * @Description: 后台任务【拉取NC633内转付[F5-Cxx-2 内部单位转账（付方）]->NCC付款单[F3-Cxx-D01 付款单（内转）]】
 * 
 * @author 谢文如 【碧桂园物业NCC】
 * @date 2020-11-23
 * @version with NCC V2005
 */
@SuppressWarnings({"deprecation"})
public class PullNC63F5ToNCCF3TaskPlugin extends AbstractNC63F4F5ToNCCF2F3 implements IBackgroundWorkPlugin {
	
	@Override
	public PreAlertObject executeTask(BgWorkingContext context) throws BusinessException {
		String returnObj = "";
		Map<String,Integer> map = null;
		try {
			map = super.execute(new NC63F5ToNCCF3MakeBillProcess(), context);
		} catch (Exception e) {
			e.printStackTrace();
			WYNCCARAPLogger.log("PullNC63F5ToNCCF3TaskPlugin", "后台任务拉取NC63内转付生成NCC付款单(内转)", e, "");
			returnObj = "异常："+ e.getMessage();
		}
		returnObj = super.returnResultMsg(map,returnObj);
		PreAlertObject retObj = new PreAlertObject();
		retObj.setReturnType(PreAlertReturnType.RETURNMESSAGE);
		retObj.setMsgTitle("后台任务拉取NC63内转付生成NCC付款单(内转)");
		retObj.setReturnObj(returnObj);
		context.setLogStr(returnObj);
		return retObj;
	}
	
}