| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233 |
- package com.kingdee.eas.custom.shuiyou.uitls;
- import com.kingdee.bos.framework.ejb.EJBRemoteException;
- import com.kingdee.bos.util.BOSObjectType;
- import java.rmi.RemoteException;
- import com.kingdee.bos.framework.AbstractBizCtrl;
- import com.kingdee.bos.orm.template.ORMObject;
- import com.kingdee.bos.Context;
- import com.kingdee.eas.custom.shuiyou.uitls.*;
- import com.kingdee.bos.BOSException;
- import java.util.Map;
- import com.kingdee.eas.custom.shuiyou.interfacelog.LogInfoInfo;
- import com.kingdee.eas.custom.shuiyou.interfaceiog.LogInfoInfo;
- import java.lang.String;
- import com.kingdee.eas.custom.shuiyou.task.TaskCatalogEnum;
- import com.kingdee.bos.framework.*;
- import cn.hutool.core.lang.Snowflake;
- import com.kingdee.bos.util.*;
- public class SYUtilsFacade extends AbstractBizCtrl implements ISYUtilsFacade
- {
- public SYUtilsFacade()
- {
- super();
- registerInterface(ISYUtilsFacade.class, this);
- }
- public SYUtilsFacade(Context ctx)
- {
- super(ctx);
- registerInterface(ISYUtilsFacade.class, this);
- }
- public BOSObjectType getType()
- {
- return new BOSObjectType("A069618E");
- }
- private SYUtilsFacadeController getController() throws BOSException
- {
- return (SYUtilsFacadeController)getBizController();
- }
- /**
- *签名-User defined method
- *@param param 需要签名的参数
- *@return
- */
- public String getSignature(String param) throws BOSException
- {
- try {
- return getController().getSignature(getContext(), param);
- }
- catch(RemoteException err) {
- throw new EJBRemoteException(err);
- }
- }
- /**
- *初始化配置-User defined method
- *@param filePath 配置文件地址
- */
- public void initConfig(String filePath) throws BOSException
- {
- try {
- getController().initConfig(getContext(), filePath);
- }
- catch(RemoteException err) {
- throw new EJBRemoteException(err);
- }
- }
- /**
- *写入日志-User defined method
- *@param logInfo 日志对象
- *@return
- */
- public LogInfoInfo log(LogInfoInfo logInfo) throws BOSException
- {
- try {
- return getController().log(getContext(), logInfo);
- }
- catch(RemoteException err) {
- throw new EJBRemoteException(err);
- }
- }
- /**
- *获取配置文件参数-User defined method
- *@return
- */
- public Map getConfig() throws BOSException
- {
- try {
- return getController().getConfig(getContext());
- }
- catch(RemoteException err) {
- throw new EJBRemoteException(err);
- }
- }
- /**
- *[description]该任务会循环调用,直到返回成功状态[%description][invokedemo][%invokedemo][returndesc]任务id[%returndesc]-User defined method
- *@param url 请求地址
- *@param requestId 请求id
- *@param osfServiceName 请求成功时回调
- *@param backParam 回调osf服务时会一并当成参数传入
- *@param catalog 任务类型
- *@return
- */
- public String backTask(String url, String requestId, String osfServiceName, String backParam, TaskCatalogEnum catalog) throws BOSException
- {
- try {
- return getController().backTask(getContext(), url, requestId, osfServiceName, backParam, catalog);
- }
- catch(RemoteException err) {
- throw new EJBRemoteException(err);
- }
- }
- /**
- *post请求-User defined method
- *@param url url
- *@param param jsonStr参数
- *@return
- */
- public String post(String url, String param) throws BOSException
- {
- try {
- return getController().post(getContext(), url, param);
- }
- catch(RemoteException err) {
- throw new EJBRemoteException(err);
- }
- }
- /**
- *get请求-User defined method
- *@param url url
- *@param param jsonStr参数
- *@return
- */
- public String get(String url, String param) throws BOSException
- {
- try {
- return getController().get(getContext(), url, param);
- }
- catch(RemoteException err) {
- throw new EJBRemoteException(err);
- }
- }
- /**
- *签名-User defined method
- *@param propt 配置文件Map
- *@param paramMap 参数Map
- *@return
- */
- public String getSignature(Map propt, Map paramMap) throws BOSException
- {
- try {
- return getController().getSignature(getContext(), propt, paramMap);
- }
- catch(RemoteException err) {
- throw new EJBRemoteException(err);
- }
- }
- /**
- *任务执行一次,不管成功失败-User defined method
- *@param osfServiceName osf服务名称
- *@param param 参数
- *@param catalog 任务类型
- *@param taskPreId 前置任务没有完成,任务不会执行。
- *@return
- */
- public String addTask(String osfServiceName, String param, TaskCatalogEnum catalog, String taskPreId) throws BOSException
- {
- try {
- return getController().addTask(getContext(), osfServiceName, param, catalog, taskPreId);
- }
- catch(RemoteException err) {
- throw new EJBRemoteException(err);
- }
- }
- /**
- *删除任务,如果该任务有前置任务或者后置任务,则前置任务或者后置任务也会被删除。-User defined method
- *@param taskId 任务id
- *@return
- */
- public boolean delTask(String taskId) throws BOSException
- {
- try {
- return getController().delTask(getContext(), taskId);
- }
- catch(RemoteException err) {
- throw new EJBRemoteException(err);
- }
- }
- /**
- *获取全局的雪花对象-User defined method
- *@return
- */
- public Snowflake getSnowflake() throws BOSException
- {
- try {
- return getController().getSnowflake(getContext());
- }
- catch(RemoteException err) {
- throw new EJBRemoteException(err);
- }
- }
- /**
- *获取业务编码-User defined method
- *@return
- */
- public String getBizNo() throws BOSException
- {
- try {
- return getController().getBizNo(getContext());
- }
- catch(RemoteException err) {
- throw new EJBRemoteException(err);
- }
- }
- /**
- *任务执行一次,不管成功失败-User defined method
- *@param osfServiceName osf服务名称
- *@param param 参数
- *@param catalog 任务类型
- *@param taskPreId 前置任务没有完成,任务不会执行。
- *@param sourceBillId 来源单据的id
- *@return
- */
- public String addTask(String osfServiceName, String param, TaskCatalogEnum catalog, String taskPreId, String sourceBillId) throws BOSException
- {
- try {
- return getController().addTask(getContext(), osfServiceName, param, catalog, taskPreId, sourceBillId);
- }
- catch(RemoteException err) {
- throw new EJBRemoteException(err);
- }
- }
- }
|