zm
2020-05-18 a18bfacbf56b401f6e0fdae8710fbca4df8cff77
commit | author | age
a18bfa 1 package com.changhong.epc.rely.api.epc.tenant;
Z 2
3 import com.alibaba.fastjson.TypeReference;
4 import com.changhong.epc.bean.tenant.norm.SuppStander;
5 import com.changhong.epc.bean.tenant.norm.extend.SuppStanderExtend;
6 import com.changhong.epc.constter.system.SystemClients;
7 import com.changhong.epc.constter.system.run.EpcRestInterface;
8 import com.changhong.epc.constter.tenant.TenantUrlConst;
9 import com.changhong.epc.rely.api.epc.BaseApi;
10 import com.iemsoft.framework.cloud.core.base.ResMsg;
11 import com.iemsoft.framework.cloud.core.tools.JSONTool;
12 import com.iemsoft.framework.cloud.core.tools.SpringUtil;
13 import com.iemsoft.framework.cloud.ribbon.RestInterface;
14 import org.springframework.stereotype.Service;
15
16 import java.util.List;
17
18 /**
19  * 补助标准查询api
20  */
21 @Service
22 public class SuppStanderApi extends BaseApi implements SystemClients, TenantUrlConst {
23
24     public List<SuppStanderExtend> getSuppStanderExtend(Integer ctId){
25         ResMsg<List<SuppStanderExtend>> resMsg =
26                 (ResMsg<List<SuppStanderExtend>>)
27                         SpringUtil.getBean(SERVER_TENANT.getBeanName(), RestInterface.class)
28                         .post(REST_TENANT_NORMTYPE_SELECT
29                             , SuppStander.of(ctId)
30                             , new TypeReference<ResMsg<List<SuppStanderExtend>>>(){}.getType()
31                             , EpcRestInterface.getEpcHeads()
32                         );
33         assertSuccess(resMsg);
34         return JSONTool.toList(JSONTool.toJson(resMsg.getData()), SuppStanderExtend.class);
35     }
36
37 }