package com.engine.htsc.payment.util;

import com.engine.htsc.payment.enums.HsType;
import com.engine.htsc.payment.pojo.CostAccountDto;
import com.engine.htsc.payment.service.impl.SettlePaymentCommand;
import com.engine.htsc.subpayment.enums.SubPay;
import org.apache.commons.lang3.StringUtils;
import weaver.general.BaseBean;

/**
 * 核算方法工厂
 * K1810012
 */
public class HsFactory extends BaseBean {

	public CostAccountDto getHsService(String requestId, String id) {
		if (StringUtils.isEmpty(requestId) || StringUtils.isEmpty(id)) {
			writeLog("@获取核算数据失败,原因:requestId或id为空");
			writeLog("@requestId:" + requestId + "@id:" + id);
			return null;
		}
		BizUtils bu = new BizUtils();
		SettlePaymentCommand settlePaymentCommand = new SettlePaymentCommand();
		if (HsType.ZBPTBX.getId().equals(id)) {
			return bu.generateCommonReimbData(requestId, HsType.ZBPTBX.getType());
		}
		if (HsType.ZBCLBX.getId().equals(id)) {
			return bu.generateTravelReimbData(requestId, HsType.ZBCLBX.getType());
		}
		if (HsType.CGSCFK.getId().equals(id)) {
			return settlePaymentCommand.generateCommonReimbData(requestId, HsType.CGSCFK.getType());
		}
		return null;
	}
}
