package com.engine.htxc.document.dao;

import weaver.interfaces.htsc.GlobatTools.JAVATools;

import java.util.Collections;
import java.util.List;

/**
 * @author K1810050
 */
public class DocTemplateDao {
    public static List findSgFileIdByTemplateNos(List<String> templateNos){
        if(null==templateNos||templateNos.isEmpty()){
            return Collections.emptyList();
        }
        String sql = " SELECT " +
                " c.fileid,b.mbbh,b.mbmc,b.yqsyxt,b.bb as bbh" +
                " FROM " +
                " docimagefile a ,uf_wdzx b,imagefile c " +
                " where " +
                " a.docid=b.wj and a.imagefileid=c.imagefileid and b.zt=1 and b.mbbh in ('" +
                String.join("','", templateNos) +
                "' )";

        return JAVATools.GetTableToListMap(sql, null);
    }
}
