Browse Source

修复批量导入导出BUG

lin 4 years ago
parent
commit
c199944ffa

+ 49 - 15
smart-city-platform/src/main/java/com/bz/smart_city/excel/AbstractResolverExcelTemplate.java

@@ -1,22 +1,28 @@
 package com.bz.smart_city.excel;
 
+import com.bz.smart_city.commom.util.FileUtil;
 import com.bz.smart_city.commom.util.Util;
 import com.bz.smart_city.entity.Import;
 import com.bz.smart_city.entity.Message;
 import com.bz.smart_city.service.ImportService;
 import com.bz.smart_city.service.MessageService;
+import lombok.extern.slf4j.Slf4j;
 import org.apache.poi.ss.usermodel.Workbook;
+import org.apache.poi.xssf.usermodel.XSSFWorkbook;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.stereotype.Component;
 
+import java.io.FileInputStream;
 import java.io.FileOutputStream;
 import java.io.IOException;
+import java.io.InputStream;
 import java.util.concurrent.atomic.AtomicInteger;
 
 /**
  * excel解析模板
  */
+@Slf4j
 @Component
 public abstract class AbstractResolverExcelTemplate {
 
@@ -47,23 +53,49 @@ public abstract class AbstractResolverExcelTemplate {
     protected AtomicInteger failTime = new AtomicInteger(0);
 
 
-    public void resolver(Integer sysId, Import record, Workbook workbook){
+    public void resolver(Integer sysId, Import record, String messageTitle){
 
         this.sysId = sysId;
         this.record = record;
-        this.workbook = workbook;
+        //this.workbook = workbook;
         this.messageContent = new StringBuffer();
         this.isDownload = false;
         this.invalidTemplate = false;
         this.successTime = new AtomicInteger(0);
         this.failTime = new AtomicInteger(0);
-        cycleExcel();
-        failFile();
-        recordMessage();
+        this.messageTitle = messageTitle;
+        messageContent.append(record.getImportFileName());
+        InputStream inputStream = null;
         try {
-            workbook.close();
-        } catch (IOException e) {
-            e.printStackTrace();
+            inputStream = new FileInputStream(record.getImportFilePath());
+            this.workbook = new XSSFWorkbook(inputStream);
+            cycleExcel();
+            failFile();
+            recordMessage();
+        } catch (Exception e) {
+            messageContent.append("导入失败,读取文件错误。");
+            Message message = new Message();
+            message.setSiteId(record.getUserId());
+            message.setUserId(record.getUserId());
+            message.setMessageType(record.getType());
+            message.setMessageTitle(messageTitle);
+            message.setMessageContent(messageContent.toString());
+            message.setObjId(record.getId());
+            message.setRead(0);
+            messageService.insertSelective(message);
+            log.error("read excel error" + e.getMessage());
+        }finally {
+            FileUtil.deleteFile(record.getImportFilePath());
+            try {
+                if (workbook != null) {
+                    workbook.close();
+                }
+                if (inputStream != null) {
+                    inputStream.close();
+                }
+            } catch (IOException e) {
+                e.printStackTrace();
+            }
         }
     }
     /**
@@ -92,13 +124,7 @@ public abstract class AbstractResolverExcelTemplate {
      * 记录消息
      */
     private final void recordMessage(){
-        messageContent.append("导入完成,");
-        messageContent.append("导入成功");
-        messageContent.append(successTime);
-        messageContent.append("条");
-        messageContent.append("导入失败");
-        messageContent.append(failTime);
-        messageContent.append("条。");
+
 
         //更新导入记录
         record.setImportStatus(1);
@@ -108,6 +134,14 @@ public abstract class AbstractResolverExcelTemplate {
 
         if(!invalidTemplate){
             messageContent.append("无效模板");
+        }else {
+            messageContent.append("导入完成,");
+            messageContent.append("导入成功");
+            messageContent.append(successTime);
+            messageContent.append("条");
+            messageContent.append("导入失败");
+            messageContent.append(failTime);
+            messageContent.append("条。");
         }
         //更新完成生成消息
         Message message = new Message();

+ 0 - 2
smart-city-platform/src/main/java/com/bz/smart_city/excel/resolver/BuildingResolverExcelTemplate.java

@@ -40,9 +40,7 @@ public class BuildingResolverExcelTemplate extends AbstractResolverExcelTemplate
     @Override
     protected void cycleExcel() {
         log.info("begin buildingResolverExcelTemplate");
-        messageTitle = "建筑列表-批量添加";
         String executeSheetName = "省市区";
-        messageContent.append(record.getImportFileName());
         try {
             FormulaEvaluator evaluator = workbook.getCreationHelper().createFormulaEvaluator();
             // 循环工作表Sheet

+ 15 - 2
smart-city-platform/src/main/java/com/bz/smart_city/excel/resolver/CollectorResolveExcelTemplate.java

@@ -45,8 +45,6 @@ public class CollectorResolveExcelTemplate extends AbstractResolverExcelTemplate
     @Override
     protected void cycleExcel() {
         log.info("begin CollectorResolveExcelTemplate");
-        messageTitle = "采集器列表-批量添加";
-        messageContent.append(record.getImportFileName());
         try {
             String executeSheetName = "表格模板";
             // 循环工作表Sheet
@@ -73,20 +71,35 @@ public class CollectorResolveExcelTemplate extends AbstractResolverExcelTemplate
                         concentratorNameCell.setCellType(CellType.STRING);
 
 
+
+                        if (StringUtils.equals("", collectorNameCell.getStringCellValue().trim()) &&
+                                StringUtils.equals("", concentratorNameCell.getStringCellValue().trim()) &&
+                                StringUtils.equals("", customerNameCell.getStringCellValue()) &&
+                                StringUtils.equals("", buildingNameCell.getStringCellValue()) &&
+                                StringUtils.equals("", locDescCell.getStringCellValue().trim())
+                        ) {
+                            continue;
+                        }
+
                         if (StringUtils.equals("", collectorNameCell.getStringCellValue().trim())) {
+                            failTime.incrementAndGet();
                             continue;
                         }
                         if (StringUtils.equals("", concentratorNameCell.getStringCellValue().trim())) {
+                            failTime.incrementAndGet();
                             continue;
                         }
 
                         if (StringUtils.equals("", customerNameCell.getStringCellValue())) {
+                            failTime.incrementAndGet();
                             continue;
                         }
                         if (StringUtils.equals("", buildingNameCell.getStringCellValue())) {
+                            failTime.incrementAndGet();
                             continue;
                         }
                         if (StringUtils.equals("", locDescCell.getStringCellValue().trim())) {
+                            failTime.incrementAndGet();
                             continue;
                         }
 

+ 20 - 2
smart-city-platform/src/main/java/com/bz/smart_city/excel/resolver/ConcentratorResolveExcelTemplate.java

@@ -41,8 +41,6 @@ public class ConcentratorResolveExcelTemplate  extends AbstractResolverExcelTemp
     @Override
     protected void cycleExcel() {
         log.info("begin ConcentratorResolveExcelTemplate");
-        messageTitle = "集中器列表-批量添加";
-        messageContent.append(record.getImportFileName());
         try {
             String executeSheetName = "表格模板";
             // 循环工作表Sheet
@@ -75,28 +73,48 @@ public class ConcentratorResolveExcelTemplate  extends AbstractResolverExcelTemp
                         simNoCell.setCellType(CellType.STRING);
 
 
+                        if (StringUtils.equals("", concentratorNameCell.getStringCellValue().trim()) &&
+                                StringUtils.equals("", deviceTypeNameCell.getStringCellValue()) &&
+                                StringUtils.equals("", customerNameCell.getStringCellValue()) &&
+                                StringUtils.equals("", buildingNameCell.getStringCellValue()) &&
+                                StringUtils.equals("", locDescCell.getStringCellValue().trim()) &&
+                                StringUtils.equals("", ipCell.getStringCellValue().trim()) &&
+                                StringUtils.equals("", baudRateCell.getStringCellValue().trim()) &&
+                                StringUtils.equals("", portCell.getStringCellValue().trim())
+                        ) {
+                            continue;
+                        }
+
                         if (StringUtils.equals("", concentratorNameCell.getStringCellValue().trim())) {
+                            failTime.incrementAndGet();
                             continue;
                         }
                         if (StringUtils.equals("", deviceTypeNameCell.getStringCellValue())) {
+                            failTime.incrementAndGet();
                             continue;
                         }
                         if (StringUtils.equals("", customerNameCell.getStringCellValue())) {
+                            failTime.incrementAndGet();
                             continue;
                         }
                         if (StringUtils.equals("", buildingNameCell.getStringCellValue())) {
+                            failTime.incrementAndGet();
                             continue;
                         }
                         if (StringUtils.equals("", locDescCell.getStringCellValue().trim())) {
+                            failTime.incrementAndGet();
                             continue;
                         }
                         if (StringUtils.equals("", ipCell.getStringCellValue().trim())) {
+                            failTime.incrementAndGet();
                             continue;
                         }
                         if (StringUtils.equals("", baudRateCell.getStringCellValue().trim())) {
+                            failTime.incrementAndGet();
                             continue;
                         }
                         if (StringUtils.equals("", portCell.getStringCellValue().trim())) {
+                            failTime.incrementAndGet();
                             continue;
                         }
 

+ 0 - 2
smart-city-platform/src/main/java/com/bz/smart_city/excel/resolver/GdDeviceResolverExcelTemplate.java

@@ -53,9 +53,7 @@ public class GdDeviceResolverExcelTemplate extends AbstractResolverExcelTemplate
     @Override
     protected void cycleExcel() {
         log.info("begin GdDeviceResolverExcelTemplate");
-        messageTitle = "设备列表-批量添加";
         String executeSheetName = "表格模板";
-        messageContent.append(record.getImportFileName());
         try {
             // 循环工作表Sheet
             for (int numSheet = 0; numSheet < workbook.getNumberOfSheets(); numSheet++) {

+ 0 - 2
smart-city-platform/src/main/java/com/bz/smart_city/excel/resolver/GeneralDeviceResolverExcelTemplate.java

@@ -38,9 +38,7 @@ public class GeneralDeviceResolverExcelTemplate extends AbstractResolverExcelTem
     @Override
     protected void cycleExcel() {
         log.info("begin GeneralDeviceResolverExcelTemplate");
-        messageTitle = "设备列表-批量添加";
         String executeSheetName = "表格模板";
-        messageContent.append(record.getImportFileName());
         try {
             FormulaEvaluator evaluator = workbook.getCreationHelper().createFormulaEvaluator();
             // 循环工作表Sheet

+ 0 - 3
smart-city-platform/src/main/java/com/bz/smart_city/excel/resolver/InstallResolverExcelTemplate.java

@@ -45,13 +45,10 @@ public class InstallResolverExcelTemplate extends AbstractResolverExcelTemplate
     @Override
     protected void cycleExcel() {
         log.info("begin InstallResolverExcelTemplate");
-        messageTitle = "新装水表管理-批量添加水表";
         String executeSheetName = "安装计划模板";
-
         InstallListDTO dto = new InstallListDTO();
         dto.setSiteId(record.getSiteId());
         dto.setInstallTime(LocalDateTime.now());
-        messageContent.append(record.getImportFileName());
         try {
             // 循环工作表Sheet
             for (int numSheet = 0; numSheet < workbook.getNumberOfSheets(); numSheet++) {

+ 0 - 2
smart-city-platform/src/main/java/com/bz/smart_city/excel/resolver/WaterDeviceResolverExcelTemplate.java

@@ -43,9 +43,7 @@ public class WaterDeviceResolverExcelTemplate extends AbstractResolverExcelTempl
     @Override
     protected void cycleExcel() {
         log.info("begin WaterDeviceResolverExcelTemplate");
-        messageTitle = "设备列表-批量添加";
         String executeSheetName = "表格模板";
-        messageContent.append(record.getImportFileName());
         try {
             FormulaEvaluator evaluator = workbook.getCreationHelper().createFormulaEvaluator();
             // 循环工作表Sheet

+ 80 - 34
smart-city-platform/src/main/java/com/bz/smart_city/service/impl/DeviceServiceImpl.java

@@ -199,41 +199,76 @@ public  class DeviceServiceImpl implements DeviceService {
         String title = "设备列表";
         //判断是否是水表场景
         WMeterType wMeterType = wMeterTypeMapper.getChannelIdAndLevel(sysId, 2);
+        Channel channel = channelMapper.findById(sysId);
         if (wMeterType != null || sysId == -99) {
-            DateTimeFormatter df = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
-            String[] rowsName = new String[]{"序号", "设备状态", "设备编号", "水表档案编号", "水表电子号", "集中器编码", "采集器编码", "水表厂商", "客户", "小区", "建筑", "安装地址", "故障类型", "连续故障天数", "水表当前读数", "最后一次更新时间","阀门控制","出厂时间","安装时间","验收时间"};
-            List<Object[]> dataList = newArrayList();
-            Object[] objs = null;
-            for (int i = 0; i < list.size(); i++) {
-                DeviceDto deviceDto = list.get(i);
-                objs = new Object[rowsName.length];
-                objs[0] = i;
-                objs[1] = this.getDeviceStatusName(deviceDto.getDeviceStatus());
-                objs[2] = deviceDto.getDeviceNo();
-                objs[3] = deviceDto.getWaterMeterFileNo();
-                objs[4] = deviceDto.getWaterMeterNo();
-                objs[5] = deviceDto.getConcentratorName();
-                objs[6] = deviceDto.getCollectorName();
-                objs[7] = deviceDto.getManufacturerName();
-                objs[8] = deviceDto.getCustomerName();
-                objs[9] = deviceDto.getCommunityName();
-                objs[10] = deviceDto.getBuildingName();
-                objs[11] = deviceDto.getLocDesc();
-                objs[12] = deviceDto.getLastErrorType();
-                objs[13] = deviceDto.getDays();
-                objs[14] = deviceDto.getMeterReading();
-                objs[15] = deviceDto.getLastReceiveTime()!=null?deviceDto.getLastReceiveTime().format(df):null;
-                objs[16] = this.getValveStatusName(deviceDto.getIsValve(),deviceDto.getValveStatus());
-                objs[17] = deviceDto.getPlanTime()!=null?deviceDto.getPlanTime().format(df):null;
-                objs[18] = deviceDto.getInstallTime()!=null?deviceDto.getInstallTime().format(df):null;
-                objs[19] = deviceDto.getAcceptTime()!=null?deviceDto.getAcceptTime().format(df):null;
-                dataList.add(objs);
-            }
-            ExcelUtil excelUtil = new ExcelUtil(title, rowsName, dataList);
-            try {
-                excelUtil.export(httpServletResponse);
-            } catch (Exception e) {
-                throw new ServiceException(-900, "导出异常");
+            if(StringUtils.equals("photoelectricMeter",channel.getChannelCode())){
+                DateTimeFormatter df = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
+                String[] rowsName = new String[]{"序号", "水表电子号", "设备类型", "客户", "设备状态", "集中器编码", "采集器编码", "下发状态", "当前读数", "建筑", "安装地址", "阀门控制", "最后一次更新时间","出厂时间","安装时间","验收时间"};
+                List<Object[]> dataList = newArrayList();
+                Object[] objs = null;
+                for (int i = 0; i < list.size(); i++) {
+                    DeviceDto deviceDto = list.get(i);
+                    objs = new Object[rowsName.length];
+                    objs[0] = i;
+                    objs[1] = deviceDto.getWaterMeterNo();
+                    objs[2] = deviceDto.getManufacturerName()+"/"+deviceDto.getEquipmentType()+"/"+deviceDto.getManufacturerName();
+                    objs[3] = deviceDto.getCustomerName();
+                    objs[4] = this.getDeviceStatusName(deviceDto.getDeviceStatus());
+                    objs[5] = deviceDto.getConcentratorName();
+                    objs[6] = deviceDto.getCollectorName();
+                    objs[7] = this.getIssueStatusName(deviceDto.getIssueStatus());
+                    objs[8] = deviceDto.getMeterReading();
+                    objs[9] = deviceDto.getBuildingName();
+                    objs[10] = deviceDto.getLocDesc();
+                    objs[11] = this.getValveStatusName(deviceDto.getIsValve(),deviceDto.getValveStatus());
+                    objs[12] = deviceDto.getLastReceiveTime()!=null?deviceDto.getLastReceiveTime().format(df):null;
+                    objs[13] = deviceDto.getPlanTime()!=null?deviceDto.getPlanTime().format(df):null;
+                    objs[14] = deviceDto.getInstallTime()!=null?deviceDto.getInstallTime().format(df):null;
+                    objs[15] = deviceDto.getAcceptTime()!=null?deviceDto.getAcceptTime().format(df):null;
+                    dataList.add(objs);
+                }
+                ExcelUtil excelUtil = new ExcelUtil(title, rowsName, dataList);
+                try {
+                    excelUtil.export(httpServletResponse);
+                } catch (Exception e) {
+                    throw new ServiceException(-900, "导出异常");
+                }
+            }else {
+                DateTimeFormatter df = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
+                String[] rowsName = new String[]{"序号", "设备状态", "设备编号", "水表档案编号", "水表电子号", "集中器编码", "采集器编码", "水表厂商", "客户", "小区", "建筑", "安装地址", "故障类型", "连续故障天数", "水表当前读数", "最后一次更新时间","阀门控制","出厂时间","安装时间","验收时间"};
+                List<Object[]> dataList = newArrayList();
+                Object[] objs = null;
+                for (int i = 0; i < list.size(); i++) {
+                    DeviceDto deviceDto = list.get(i);
+                    objs = new Object[rowsName.length];
+                    objs[0] = i;
+                    objs[1] = this.getDeviceStatusName(deviceDto.getDeviceStatus());
+                    objs[2] = deviceDto.getDeviceNo();
+                    objs[3] = deviceDto.getWaterMeterFileNo();
+                    objs[4] = deviceDto.getWaterMeterNo();
+                    objs[5] = deviceDto.getConcentratorName();
+                    objs[6] = deviceDto.getCollectorName();
+                    objs[7] = deviceDto.getManufacturerName();
+                    objs[8] = deviceDto.getCustomerName();
+                    objs[9] = deviceDto.getCommunityName();
+                    objs[10] = deviceDto.getBuildingName();
+                    objs[11] = deviceDto.getLocDesc();
+                    objs[12] = deviceDto.getLastErrorType();
+                    objs[13] = deviceDto.getDays();
+                    objs[14] = deviceDto.getMeterReading();
+                    objs[15] = deviceDto.getLastReceiveTime()!=null?deviceDto.getLastReceiveTime().format(df):null;
+                    objs[16] = this.getValveStatusName(deviceDto.getIsValve(),deviceDto.getValveStatus());
+                    objs[17] = deviceDto.getPlanTime()!=null?deviceDto.getPlanTime().format(df):null;
+                    objs[18] = deviceDto.getInstallTime()!=null?deviceDto.getInstallTime().format(df):null;
+                    objs[19] = deviceDto.getAcceptTime()!=null?deviceDto.getAcceptTime().format(df):null;
+                    dataList.add(objs);
+                }
+                ExcelUtil excelUtil = new ExcelUtil(title, rowsName, dataList);
+                try {
+                    excelUtil.export(httpServletResponse);
+                } catch (Exception e) {
+                    throw new ServiceException(-900, "导出异常");
+                }
             }
         } else {
             String[] rowsName = new String[]{"序号", "状态", "编号", "系列", "型号", "厂商", "所属建筑", "楼层", "位置"};
@@ -262,6 +297,17 @@ public  class DeviceServiceImpl implements DeviceService {
         }
     }
 
+    protected String getIssueStatusName(Integer issueStatus){
+        String issueStatusName = "未下发";
+        if (issueStatus != null) {
+            if(issueStatus == 1){
+                issueStatusName = "已下发";
+            }
+        }
+
+        return issueStatusName;
+    }
+
     protected String getValveStatusName(Integer isValve, Integer valveStatus){
         String valveStatusName = "关阀";
         if (isValve != null) {

+ 12 - 90
smart-city-platform/src/main/java/com/bz/smart_city/service/importfile/AsyncTaskImportService.java

@@ -105,23 +105,7 @@ public class AsyncTaskImportService {
     @Async
     public void executeAsyncInstallTask(Import record){
         log.info("begin executeAsyncInstallTask!");
-        InputStream inputStream = null;
-        try {
-            inputStream = new FileInputStream(record.getImportFilePath());
-            Workbook workbook = new XSSFWorkbook(inputStream);
-            installResolverExcelTemplate.resolver(null,record,workbook);
-        } catch (Exception e) {
-            e.printStackTrace();
-        }finally {
-            if (inputStream != null) {
-                try {
-                    inputStream.close();
-                } catch (IOException e) {
-                    e.printStackTrace();
-                }
-            }
-
-        }
+        installResolverExcelTemplate.resolver(null,record,"新装水表管理-批量添加水表");
         log.info("begin executeAsyncInstallTask!");
     }
 
@@ -130,30 +114,15 @@ public class AsyncTaskImportService {
         log.info("begin executeAsyncDeviceTask!");
         WMeterType wMeterType = wMeterTypeMapper.getChannelIdAndLevel(sysId, 2);
         Channel channel = channelMapper.findById(sysId);
-        InputStream inputStream = null;
-        try {
-            inputStream = new FileInputStream(record.getImportFilePath());
-            Workbook workbook = new XSSFWorkbook(inputStream);
-            if(StringUtils.equals("photoelectricMeter",channel.getChannelCode())){
-                gdDeviceResolverExcelTemplate.resolver(sysId,record,workbook);
-            }else {
-                //判断是否是水表场景
-                if (wMeterType != null) {
-                    waterDeviceResolverExcelTemplate.resolver(sysId,record,workbook);
-                } else {
-                    generalDeviceResolverExcelTemplate.resolver(sysId,record,workbook);
+        if(StringUtils.equals("photoelectricMeter",channel.getChannelCode())){
+            gdDeviceResolverExcelTemplate.resolver(sysId,record,"设备列表-批量添加");
+        }else {
+            //判断是否是水表场景
+            if (wMeterType != null) {
+                waterDeviceResolverExcelTemplate.resolver(sysId,record,"设备列表-批量添加");
+            } else {
+                generalDeviceResolverExcelTemplate.resolver(sysId,record,"设备列表-批量添加");
 
-                }
-            }
-        } catch (Exception e) {
-            e.printStackTrace();
-        }finally {
-            if (inputStream != null) {
-                try {
-                    inputStream.close();
-                } catch (IOException e) {
-                    e.printStackTrace();
-                }
             }
         }
         log.info("end executeAsyncDeviceTask!");
@@ -162,23 +131,7 @@ public class AsyncTaskImportService {
 
     @Async
     public void executeAsyncBuildingTask(Import record, MultipartFile file){
-        InputStream inputStream = null;
-        try {
-            inputStream = new FileInputStream(record.getImportFilePath());
-            Workbook workbook = new XSSFWorkbook(inputStream);
-            buildingResolverExcelTemplate.resolver(null,record,workbook);
-        } catch (Exception e) {
-            e.printStackTrace();
-        }finally {
-            if (inputStream != null) {
-                try {
-                    inputStream.close();
-                } catch (IOException e) {
-                    e.printStackTrace();
-                }
-            }
-
-        }
+        buildingResolverExcelTemplate.resolver(null,record,"建筑列表-批量添加");
     }
 
     /**
@@ -609,42 +562,11 @@ public class AsyncTaskImportService {
 
     @Async
     public void executeAsyncConcentratorTask(Import record) {
-        InputStream inputStream = null;
-        try {
-            inputStream = new FileInputStream(record.getImportFilePath());
-            Workbook workbook = new XSSFWorkbook(inputStream);
-            concentratorResolveExcelTemplate.resolver(null,record,workbook);
-        } catch (Exception e) {
-            e.printStackTrace();
-        }finally {
-            if (inputStream != null) {
-                try {
-                    inputStream.close();
-                } catch (IOException e) {
-                    e.printStackTrace();
-                }
-            }
-        }
+        concentratorResolveExcelTemplate.resolver(null,record,"集中器列表-批量添加");
     }
 
     @Async
     public void executeAsyncCollectorTask(Import record) {
-        InputStream inputStream = null;
-        try {
-            inputStream = new FileInputStream(record.getImportFilePath());
-            Workbook workbook = new XSSFWorkbook(inputStream);
-            collectorResolveExcelTemplate.resolver(null,record,workbook);
-        } catch (Exception e) {
-            e.printStackTrace();
-        }finally {
-            if (inputStream != null) {
-                try {
-                    inputStream.close();
-                } catch (IOException e) {
-                    e.printStackTrace();
-                }
-            }
-
-        }
+        collectorResolveExcelTemplate.resolver(null,record,"采集器列表-批量添加");
     }
 }