package com.changhong.epc.admin.service.sysCost;
|
|
import com.alibaba.fastjson.TypeReference;
|
import com.changhong.epc.bean.count.system.SystemMathExtend;
|
import com.changhong.epc.bean.tenant.master.MasterValue;
|
import com.changhong.epc.constter.system.run.EpcRestInterface;
|
import com.iemsoft.framework.cloud.core.base.ResMsg;
|
import com.iemsoft.framework.cloud.core.tools.JSONTool;
|
import com.iemsoft.framework.cloud.core.tools.SpringUtil;
|
import com.iemsoft.framework.cloud.ribbon.RestInterface;
|
import org.springframework.stereotype.Service;
|
|
import java.util.List;
|
import java.util.Map;
|
|
import static com.changhong.epc.constter.system.SystemClients.SERVER_TENANT;
|
import static com.changhong.epc.constter.tenant.TenantUrlConst.REST_TENANT_COSTOPTION_SELECT;
|
import static com.changhong.epc.constter.tenant.TenantUrlConst.REST_TENANT_SYSTEM_MATH_SYSTEMMATH_SELECTLISTS;
|
import static com.changhong.epc.rely.api.epc.BaseApi.assertSuccess;
|
|
|
@Service
|
public class SystemExtend {
|
/**
|
* 系统参数查询api
|
*/
|
public List<SystemMathExtend> getSystemExtend() {
|
ResMsg<List<SystemMathExtend>> resMsg =
|
(ResMsg<List<SystemMathExtend>>)
|
SpringUtil.getBean(SERVER_TENANT.getBeanName(), RestInterface.class)
|
.post(REST_TENANT_SYSTEM_MATH_SYSTEMMATH_SELECTLISTS
|
,null
|
, new TypeReference<ResMsg<List<SystemMathExtend>>>() {
|
}.getType()
|
, EpcRestInterface.getEpcHeads());
|
assertSuccess(resMsg);
|
return JSONTool.toList(JSONTool.toJson(resMsg.getData()), SystemMathExtend.class);
|
}
|
|
/**
|
* 费用查询
|
* @return
|
*/
|
public List<Map<String,String>> getCost() {
|
ResMsg<List<Map<String,String>>> resMsg =
|
(ResMsg<List<Map<String,String>>>)
|
SpringUtil.getBean(SERVER_TENANT.getBeanName(), RestInterface.class)
|
.post(REST_TENANT_COSTOPTION_SELECT
|
,null
|
, new TypeReference<ResMsg<List<Map<String,String>>>>() {
|
}.getType()
|
, EpcRestInterface.getEpcHeads());
|
assertSuccess(resMsg);
|
return resMsg.getData();
|
}
|
}
|