package com.changhong.epc.form.service.budget.impl; import com.changhong.epc.bean.form.FormType; import com.changhong.epc.bean.tenant.cost.budgetlog.IBillCostLog; import com.changhong.epc.bean.tenant.cost.budgetlog.MoneyBudgetLog; import com.changhong.epc.constter.system.SystemClients; import com.changhong.epc.constter.system.run.EpcRestInterface; import com.changhong.epc.constter.tenant.TenantUrlConst; import com.iemsoft.framework.cloud.core.base.ResMsg; import com.iemsoft.framework.cloud.core.tools.SpringUtil; import com.iemsoft.framework.cloud.ribbon.RestInterface; public class RecordLog implements SystemClients{ public static Object getPostRest(String url,Object parm){ RestInterface restInterface = SpringUtil.getBean(SERVER_TENANT.getBeanName(), RestInterface.class); Object data = restInterface.post(url, parm, ResMsg.class, EpcRestInterface.getEpcHeads()).getData(); return data; } /** * 记录扩展日志 * @param budgetLog */ public static void recordExtendLog(MoneyBudgetLog budgetLog){ getPostRest(TenantUrlConst.REST_TENANT_COST_RECORDLOG_YS, budgetLog); } public static void recordFormUpdateLog(FormType formType, IBillCostLog billCostLog){ switch (formType) { case YS: getPostRest(TenantUrlConst.REST_TENANT_COST_RECORDLOG_YS, billCostLog); break; case SQ: getPostRest(TenantUrlConst.REST_TENANT_COST_RECORDLOG_SQ, billCostLog); break; case BX: getPostRest(TenantUrlConst.REST_TENANT_COST_RECORDLOG_BX, billCostLog); break; default: break; } } }