泛型转换
public <H, T> String exportShippingDocument(int sheetNum,List<H> head, List<T> list, String fileName, String tname) { for (T el : list) { if (el instanceof ShippingDocumentsListDto) { ShippingDocumentsListDto item = (ShippingDocumentsListDto)el; } } }