package weaver.interfaces.htsc.jgxt;

import com.engine.common.util.ServiceUtil;
import com.engine.htsc.jgxt.service.imp.JgxtSendMessageImp;
import weaver.conn.RecordSet;
import weaver.interfaces.htsc.GlobatTools.JAVATools;
import weaver.interfaces.workflow.action.Action;
import weaver.soa.workflow.request.RequestInfo;

import java.util.HashMap;
import java.util.Map;

public class JgxtSendMessage implements Action {

    @Override
    public String execute(RequestInfo requestInfo) {

        JAVATools.SetCmdwritelog("监管协同流程","判断消息是否需要发送");
        RecordSet rs = new RecordSet();
        String requestid = requestInfo.getRequestid();
        String requestname=requestInfo.getRequestManager().getRequestname();
        String tablename=requestInfo.getRequestManager().getBillTableName();
        Map<String,Object> map=new HashMap<>();
        map.put("requestid",requestid);
        map.put("requestname",requestname);
        map.put("tablename",tablename);
        ServiceUtil.getService(JgxtSendMessageImp.class).sendmessage(map);
        //失败的情况不影响流程正常走向
        return Action.SUCCESS;
    }


}
