package com.changhong.epc.rely.api.epc.system;
|
|
import com.alibaba.fastjson.TypeReference;
|
import com.changhong.epc.bean.count.MeInfo;
|
import com.changhong.epc.bean.tenant.system.ErrSystemMsg;
|
import com.changhong.epc.bean.tenant.system.MasterErrMsg;
|
import com.changhong.epc.constter.base.BaseConst;
|
import com.changhong.epc.constter.system.SystemClients;
|
import com.changhong.epc.constter.system.run.EpcRestInterface;
|
import com.changhong.epc.constter.tenant.TenantUrlConst;
|
import com.changhong.epc.rely.api.epc.BaseApi;
|
import com.iemsoft.framework.cloud.core.base.ResMsg;
|
import com.iemsoft.framework.cloud.core.thread.ThreadData;
|
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;
|
|
/**
|
* 系统错误api
|
*/
|
@Service
|
public class ErrSystemApi extends BaseApi implements SystemClients {
|
|
/**
|
* 添加主数据缺失错误信息
|
* @param mdCode
|
* @param mdName
|
* @param params
|
* @return
|
*/
|
public ErrSystemMsg insertMasterErrMsg(String mdCode, String mdName, List<MeInfo> params){
|
ResMsg<ErrSystemMsg> resMsg =
|
(ResMsg<ErrSystemMsg>)
|
SpringUtil.getBean(SERVER_TENANT.getBeanName(), RestInterface.class)
|
.post(TenantUrlConst.REST_TENANT_ERRSYSTEMMSG_BILLMSG_INSTER
|
, new MasterErrMsg(mdCode, mdName, params
|
,ThreadData.get(BaseConst.ORDER_CODE)
|
,ThreadData.get(BaseConst.FORMID)
|
,ThreadData.get(BaseConst.DATA_ROW_NUM))
|
, new TypeReference<ResMsg<ErrSystemMsg>>(){}.getType()
|
, EpcRestInterface.getEpcHeads()
|
);
|
assertSuccess(resMsg);
|
return JSONTool.toObj(JSONTool.toJson(resMsg.getData()), ErrSystemMsg.class);
|
}
|
|
}
|