package com.engine.htsc.jjhyy.dao;

import com.engine.integration.util.StringUtils;
import weaver.general.Util;
import weaver.interfaces.htsc.GlobatTools.JAVATools;

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

/**
 * @author K1810015
 * @version 1.0.0
 * @ClassName JjhyybaseDao.java
 * @createTime 2022年03月18日 10:41:00
 */
public class JjhyybaseDao {

    /**
     * @title getdetailnumber
     * @author K1810015
     * @updateTime 2022/3/18 10:59
     * @Remark  获取文件表是合同并且合同编号为空的数据
     * @throws
     */
    public static List<Map<String,Object>> getdetailnumber(Map<String,Object> map){
        String requestid= Util.null2String(map.get("requestid"));
        String tablename= Util.null2String(map.get("tablename"));
        if(StringUtils.isBlank(requestid) || StringUtils.isBlank(tablename)){
            return null;
        }
        String sql="select dt.* from "+tablename+"_dt7 dt left join  "+tablename+" t on dt.mainid=t.id "+
        " where dt.sfsht=1 and ( dt.htbh is  null or dt.htbh ='') ";
        Map<String,String> wheremap=new HashMap<>(1);
        wheremap.put("t.requestid",requestid);
        return JAVATools.GetTableToListMap(sql,wheremap);

    }
}
