package weaver.interfaces.htsc.lhhtsq;

import com.weaver.general.BaseBean;
import weaver.general.Util;
import weaver.interfaces.htsc.GlobatTools.JAVATools;
import weaver.interfaces.htsc.comInfo.PropBean;
import weaver.interfaces.workflow.action.Action;
import weaver.soa.workflow.request.RequestInfo;

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

/**
 * @author xf
 * @version 1.0.0
 * @ClassName nodelastaction.java
 * @createTime 2021年12月10日 19:10:00
 */
public class LhhtrejectDataAction extends BaseBean implements Action {

    @Override
    public String execute(RequestInfo requestInfo) {
        String src = requestInfo.getRequestManager().getSrc();
        String requestid= Util.null2String(requestInfo.getRequestid());
        String talbename=Util.null2String(requestInfo.getRequestManager().getBillTableName());


        JAVATools.SetCmdwritelog("lhht",src);
        if(src.equals("reject")) {//退回
            updatestr(talbename,requestid);
        }
        return Action.SUCCESS;
    }
    private  void updatestr(String tablename,String requestid){
       Map<String,String> updatemap=new HashMap<>();

        updatemap.put("sfzd","1");
        Map<String,String> wheremap=new HashMap<>();
        wheremap.put("requestid",requestid);
        JAVATools.Updatesql(updatemap,tablename,wheremap);

    }




}
