Merge branch 'dev_2nd_LCYH' of http://git.hzwlsoft.com/laws-nio/laws-weilai into dev_2nd_LCYH
This commit is contained in:
+3
-2
@@ -187,11 +187,12 @@ public class OtaBaSjListServiceImpl extends ServiceImpl<OtaBaSjListMapper, OtaBa
|
|||||||
File template = new File(templatePath + "在线升级活动备案.zip");
|
File template = new File(templatePath + "在线升级活动备案.zip");
|
||||||
File exportFile = ImportFileUtil.copyZip(ImportFileUtil.createMfileByFile(template), cut, uploadPath);
|
File exportFile = ImportFileUtil.copyZip(ImportFileUtil.createMfileByFile(template), cut, uploadPath);
|
||||||
|
|
||||||
|
File sjmbcxFile = ImportFileUtil.findFile(exportFile, "升级目标车型.xlsx");
|
||||||
|
otaBaSjSjmbcxService.exportData(sjmbcxFile, otaId, cut);
|
||||||
|
|
||||||
File jbxxFile = ImportFileUtil.findFile(exportFile, "本次升级涉及的目标车辆.xlsx");
|
File jbxxFile = ImportFileUtil.findFile(exportFile, "本次升级涉及的目标车辆.xlsx");
|
||||||
otaBaSjSjmbclService.exportData(jbxxFile, otaId, cut);
|
otaBaSjSjmbclService.exportData(jbxxFile, otaId, cut);
|
||||||
|
|
||||||
File sjmbcxFile = ImportFileUtil.findFile(exportFile, "升级目标车型.xlsx");
|
|
||||||
otaBaSjSjmbcxService.exportData(sjmbcxFile, otaId, cut);
|
|
||||||
|
|
||||||
File pgFile = ImportFileUtil.findFile(exportFile, "升级影响评估.docx");
|
File pgFile = ImportFileUtil.findFile(exportFile, "升级影响评估.docx");
|
||||||
otaBaSjSjyxpgService.exportData(pgFile, otaId, cut);
|
otaBaSjSjyxpgService.exportData(pgFile, otaId, cut);
|
||||||
|
|||||||
+14
-1
@@ -23,6 +23,7 @@ import org.springframework.beans.factory.annotation.Value;
|
|||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
|
import java.io.FileOutputStream;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
@@ -240,6 +241,18 @@ public class OtaBaSjSjmbcxServiceImpl extends ServiceImpl<OtaBaSjSjmbcxMapper, O
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void exportData(File file, String otaId, String cut) throws Exception {
|
public void exportData(File file, String otaId, String cut) throws Exception {
|
||||||
|
OtaBaSjSjmbcx cx = this.getByOtaId(otaId);
|
||||||
|
if (ObjectUtils.isNotEmpty(cx)) {
|
||||||
|
Workbook wb = ImportFileUtil.readExcel(file);
|
||||||
|
Sheet s = wb.getSheetAt(0);
|
||||||
|
Row row = s.getRow(1);
|
||||||
|
Cell cell = row.getCell(2);
|
||||||
|
cell.setCellValue(cx.getBabh());
|
||||||
|
row = s.getRow(2);
|
||||||
|
cell = row.getCell(2);
|
||||||
|
cell.setCellValue(cx.getBapc());
|
||||||
|
wb.write(new FileOutputStream(file));
|
||||||
|
wb.close();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user