commit | author | age
|
a18bfa
|
1 |
package com.changhong.epc.admin.service.sysCost; |
Z |
2 |
|
|
3 |
import com.alibaba.fastjson.TypeReference; |
|
4 |
import com.changhong.epc.bean.count.system.SystemMathExtend; |
|
5 |
import com.changhong.epc.bean.tenant.master.MasterValue; |
|
6 |
import com.changhong.epc.constter.system.run.EpcRestInterface; |
|
7 |
import com.iemsoft.framework.cloud.core.base.ResMsg; |
|
8 |
import com.iemsoft.framework.cloud.core.tools.JSONTool; |
|
9 |
import com.iemsoft.framework.cloud.core.tools.SpringUtil; |
|
10 |
import com.iemsoft.framework.cloud.ribbon.RestInterface; |
|
11 |
import org.springframework.stereotype.Service; |
|
12 |
|
|
13 |
import java.util.List; |
|
14 |
import java.util.Map; |
|
15 |
|
|
16 |
import static com.changhong.epc.constter.system.SystemClients.SERVER_TENANT; |
|
17 |
import static com.changhong.epc.constter.tenant.TenantUrlConst.REST_TENANT_COSTOPTION_SELECT; |
|
18 |
import static com.changhong.epc.constter.tenant.TenantUrlConst.REST_TENANT_SYSTEM_MATH_SYSTEMMATH_SELECTLISTS; |
|
19 |
import static com.changhong.epc.rely.api.epc.BaseApi.assertSuccess; |
|
20 |
|
|
21 |
|
|
22 |
@Service |
|
23 |
public class SystemExtend { |
|
24 |
/** |
|
25 |
* 系统参数查询api |
|
26 |
*/ |
|
27 |
public List<SystemMathExtend> getSystemExtend() { |
|
28 |
ResMsg<List<SystemMathExtend>> resMsg = |
|
29 |
(ResMsg<List<SystemMathExtend>>) |
|
30 |
SpringUtil.getBean(SERVER_TENANT.getBeanName(), RestInterface.class) |
|
31 |
.post(REST_TENANT_SYSTEM_MATH_SYSTEMMATH_SELECTLISTS |
|
32 |
,null |
|
33 |
, new TypeReference<ResMsg<List<SystemMathExtend>>>() { |
|
34 |
}.getType() |
|
35 |
, EpcRestInterface.getEpcHeads()); |
|
36 |
assertSuccess(resMsg); |
|
37 |
return JSONTool.toList(JSONTool.toJson(resMsg.getData()), SystemMathExtend.class); |
|
38 |
} |
|
39 |
|
|
40 |
/** |
|
41 |
* 费用查询 |
|
42 |
* @return |
|
43 |
*/ |
|
44 |
public List<Map<String,String>> getCost() { |
|
45 |
ResMsg<List<Map<String,String>>> resMsg = |
|
46 |
(ResMsg<List<Map<String,String>>>) |
|
47 |
SpringUtil.getBean(SERVER_TENANT.getBeanName(), RestInterface.class) |
|
48 |
.post(REST_TENANT_COSTOPTION_SELECT |
|
49 |
,null |
|
50 |
, new TypeReference<ResMsg<List<Map<String,String>>>>() { |
|
51 |
}.getType() |
|
52 |
, EpcRestInterface.getEpcHeads()); |
|
53 |
assertSuccess(resMsg); |
|
54 |
return resMsg.getData(); |
|
55 |
} |
|
56 |
} |