package weaver.interfaces.htsc.gwlc;

import com.alibaba.fastjson.JSONObject;
import weaver.conn.RecordSet;
import weaver.general.BaseBean;
import weaver.general.GCONST;
import weaver.general.Util;
import weaver.hrm.User;
import weaver.interfaces.workflow.action.Action;
import weaver.soa.workflow.request.RequestInfo;




public class sendNewSignetAction implements Action {

    public String getDetailid() {
        return detailid;
    }

    public void setDetailid(String detailid) {
        this.detailid = detailid;
    }

    private   String detailid;


    public String getSignetdetailid() {
        return Signetdetailid;
    }

    public void setSignetdetailid(String signetdetailid) {
        Signetdetailid = signetdetailid;
    }

    private   String Signetdetailid;

    @Override
    public String execute(RequestInfo requestInfo)
    {


        RecordSet rs = new RecordSet();
        String requestid = requestInfo.getRequestid();
     //   User usr= requestInfo.getRequestManager().getUser();
        //  User usr=new User(13723);
        String requestname=requestInfo.getRequestManager().getRequestname();

    //  usr=new net.qiyuesuo.sdk.bean.user.User()
        new BaseBean().writeLog("系统办结玩之后触发用印流程！！！");
        new BaseBean().writeLog("requestid："+requestid);
        // String detailid= requestInfo.g
        boolean message =false;
        if(!"".equals(requestid))
        {
            try{
                sendNewSignet sendNewSignet = new sendNewSignet();
                message = sendNewSignet.createFwToOldSignet(Util.getIntValue(requestid),Util.getIntValue(detailid),Signetdetailid ,requestname);

                if(message){
                        return Action.SUCCESS;
                }else{
                    //失败
                    return Action.FAILURE_AND_CONTINUE;
                }
            }catch (Exception e){
                new BaseBean().writeLog("测试返回数据："+message);
                     return Action.SUCCESS;
            }
        }
        return Action.SUCCESS;
    }



}
