package com.engine.htxc.eseal.dao;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;

import com.engine.htxc.commonutil.db.DbTools;
import com.engine.integration.util.StringUtils;

/**
 * <p>
 * 对手方用印相关查询
 * </p>
 * 
 * @author K1810015
 * @version 1.0.0
 * @ClassName counterpartySignerDao.java
 * @createTime 2022年07月29日 00:25:00
 */
public class CounterpartySignerDao {

    private static String tablename = "uf_dsfgl";

    public static List<Map<String, Object>> getdatabyid(String bm) {
        List<Map<String, Object>> list = new ArrayList<>();
        if (StringUtils.isBlank(bm)) {
            return list;
        }
        String sql = "select * from " + tablename + " where 1=1 and dsfbm in ("
            + Arrays.stream(bm.split(",")).distinct().map(item -> "\'" + item + "\'").collect(Collectors.joining(","))
            + ")";
        return new DbTools().getSqlToList(sql);
    }
}
