commit | author | age
|
a18bfa
|
1 |
package com.changhong.epc.rely.api.epc.system; |
Z |
2 |
|
|
3 |
import com.alibaba.fastjson.TypeReference; |
|
4 |
import com.changhong.epc.bean.count.MeInfo; |
|
5 |
import com.changhong.epc.bean.tenant.system.ErrSystemMsg; |
|
6 |
import com.changhong.epc.bean.tenant.system.MasterErrMsg; |
|
7 |
import com.changhong.epc.constter.base.BaseConst; |
|
8 |
import com.changhong.epc.constter.system.SystemClients; |
|
9 |
import com.changhong.epc.constter.system.run.EpcRestInterface; |
|
10 |
import com.changhong.epc.constter.tenant.TenantUrlConst; |
|
11 |
import com.changhong.epc.rely.api.epc.BaseApi; |
|
12 |
import com.iemsoft.framework.cloud.core.base.ResMsg; |
|
13 |
import com.iemsoft.framework.cloud.core.thread.ThreadData; |
|
14 |
import com.iemsoft.framework.cloud.core.tools.JSONTool; |
|
15 |
import com.iemsoft.framework.cloud.core.tools.SpringUtil; |
|
16 |
import com.iemsoft.framework.cloud.ribbon.RestInterface; |
|
17 |
import org.springframework.stereotype.Service; |
|
18 |
|
|
19 |
import java.util.List; |
|
20 |
|
|
21 |
/** |
|
22 |
* 系统错误api |
|
23 |
*/ |
|
24 |
@Service |
|
25 |
public class ErrSystemApi extends BaseApi implements SystemClients { |
|
26 |
|
|
27 |
/** |
|
28 |
* 添加主数据缺失错误信息 |
|
29 |
* @param mdCode |
|
30 |
* @param mdName |
|
31 |
* @param params |
|
32 |
* @return |
|
33 |
*/ |
|
34 |
public ErrSystemMsg insertMasterErrMsg(String mdCode, String mdName, List<MeInfo> params){ |
|
35 |
ResMsg<ErrSystemMsg> resMsg = |
|
36 |
(ResMsg<ErrSystemMsg>) |
|
37 |
SpringUtil.getBean(SERVER_TENANT.getBeanName(), RestInterface.class) |
|
38 |
.post(TenantUrlConst.REST_TENANT_ERRSYSTEMMSG_BILLMSG_INSTER |
|
39 |
, new MasterErrMsg(mdCode, mdName, params |
|
40 |
,ThreadData.get(BaseConst.ORDER_CODE) |
|
41 |
,ThreadData.get(BaseConst.FORMID) |
|
42 |
,ThreadData.get(BaseConst.DATA_ROW_NUM)) |
|
43 |
, new TypeReference<ResMsg<ErrSystemMsg>>(){}.getType() |
|
44 |
, EpcRestInterface.getEpcHeads() |
|
45 |
); |
|
46 |
assertSuccess(resMsg); |
|
47 |
return JSONTool.toObj(JSONTool.toJson(resMsg.getData()), ErrSystemMsg.class); |
|
48 |
} |
|
49 |
|
|
50 |
} |