package com.engine.htsc.itxqglpt.cmd;

import com.engine.common.biz.AbstractCommonCommand;
import com.engine.common.entity.BizLogContext;
import com.engine.core.interceptor.CommandContext;
import weaver.conn.RecordSet;
import weaver.general.BaseBean;
import weaver.general.Util;

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

/**
 * @Title: ecology-9
 * @Company: 泛微软件
 * @author: K1810039
 * @version: 1.0
 * @CreateDate: 2022-08-19
 * @Description: IT需求管理平台流程
 * @ModifyLog:
 **/
public class itxqglptXxjsbCmd extends AbstractCommonCommand<Map<String, Object>> {

    public itxqglptXxjsbCmd(Map<String, Object> params) {
        this.params = params;
    }

    @Override
    public BizLogContext getLogContext() {
        return null;
    }

    @Override
    public Map<String, Object> execute(CommandContext commandContext) {

        RecordSet rs = new RecordSet();
        BaseBean bb = new BaseBean();
        bb.writeLog( "in=================ItxqlcLdspCmd" );
        Map<String, Object> apimap = new HashMap<String, Object>();

        String requestid = Util.null2String(params.get("requestid"));
        int isldsp = 0;
        try{

            String sql = " select * from workflow_requestlog where requestid=" + requestid +
                         " and nodeid in(select id from workflow_nodebase where unnumber in('itxqglpt_xxjsbfzr','itxqglpt_xxjsr'))";
            rs.execute(sql);
            if(rs.next()){
                isldsp++;
            }

        }catch (Exception e){
            bb.writeLog("e:"+e);
        }
        apimap.put("isldsp",isldsp+"");
        return apimap;
    }

    public static void main(String[] args) {


    }

}
