|
@@ -85,18 +85,23 @@ public class MyExcelUtil {
|
|
|
List<Integer> mergeRowsIndex =new ArrayList<>();
|
|
|
//需要合并的列
|
|
|
List<Integer> mergeColumnIndex = new ArrayList<>();
|
|
|
+ Integer index = 0;
|
|
|
if(type == 0){
|
|
|
- Integer index = 13;
|
|
|
- if(obj2 != null){
|
|
|
- List<PriceListExcelVo> list = (List<PriceListExcelVo>)obj2;
|
|
|
- Integer i = 0;
|
|
|
- for (PriceListExcelVo excelVo : list) {
|
|
|
- mergeColumnIndex.add(index + i);
|
|
|
- i++;
|
|
|
- }
|
|
|
- }
|
|
|
+ index = 13;
|
|
|
mergeRowsIndex = Arrays.asList(1);
|
|
|
}
|
|
|
+ if(type == 1){
|
|
|
+ index = 42;
|
|
|
+ mergeRowsIndex = Arrays.asList(2);
|
|
|
+ }
|
|
|
+ if(obj2 != null){
|
|
|
+ List<PriceListExcelVo> list = (List<PriceListExcelVo>)obj2;
|
|
|
+ Integer i = 0;
|
|
|
+ for (PriceListExcelVo excelVo : list) {
|
|
|
+ mergeColumnIndex.add(index + i);
|
|
|
+ i++;
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
excelWriter = EasyExcel.write(localFile)
|
|
|
.withTemplate(templateFileName)
|