开发OTA备案工具-导入导出

This commit is contained in:
高嵩
2023-03-28 10:04:43 +08:00
parent b938986054
commit fe0bd7214e
5 changed files with 381 additions and 371 deletions
@@ -239,6 +239,7 @@ public class OtaBaCxAqcsServiceImpl extends ServiceImpl<OtaBaCxAqcsMapper, OtaBa
@Override
public void exportData(File file, File attFile, String otaId, String cut) throws Exception {
OtaBaCxAqcs aqcs = getByOtaId(otaId);
if (ObjectUtils.isNotEmpty(aqcs)) {
Workbook wb = ImportFileUtil.readExcel(file);
Sheet s = wb.getSheetAt(0);
@@ -281,3 +282,4 @@ public class OtaBaCxAqcsServiceImpl extends ServiceImpl<OtaBaCxAqcsMapper, OtaBa
cell.setCellValue(sb.toString());
}
}
}
@@ -239,6 +239,7 @@ public class OtaBaCxJbxxServiceImpl extends ServiceImpl<OtaBaCxJbxxMapper, OtaBa
@Override
public void exportData(File file, String otaId, String cut) throws Exception {
OtaBaCxJbxx jbxx = this.getByOtaId(otaId);
if (ObjectUtils.isNotEmpty(jbxx)) {
Workbook wb = ImportFileUtil.readExcel(file);
Sheet s = wb.getSheetAt(0);
@@ -281,3 +282,4 @@ public class OtaBaCxJbxxServiceImpl extends ServiceImpl<OtaBaCxJbxxMapper, OtaBa
wb.close();
}
}
}
@@ -583,6 +583,7 @@ public class OtaBaCxJsfzbacsServiceImpl extends ServiceImpl<OtaBaCxJsfzbacsMappe
@Override
public void exportData(File file, String otaId, String cut) throws Exception {
OtaBaCxJsfzbacs bass = getByOtaId(otaId);
if (ObjectUtils.isNotEmpty(bass)) {
Workbook wb = ImportFileUtil.readExcel(file);
Sheet s = wb.getSheetAt(0);
bass.setOtaId(otaId);
@@ -859,6 +860,6 @@ public class OtaBaCxJsfzbacsServiceImpl extends ServiceImpl<OtaBaCxJsfzbacsMappe
cell.setCellValue(sjmk.getBzwz());
startRow++;
}
}
}
}
@@ -365,6 +365,9 @@ public class OtaBaCxKsjxtmccsServiceImpl extends ServiceImpl<OtaBaCxKsjxtmccsMap
startRow++;
}
Row row = s.getRow(startRow);
if(null == row){
row = s.createRow(startRow);
}
Cell cell = row.createCell(0);
cell.setCellValue("证明材料");
cell = row.getCell(1);
@@ -258,6 +258,7 @@ public class OtaBaCxZxsjyqServiceImpl extends ServiceImpl<OtaBaCxZxsjyqMapper, O
@Override
public void exportData(File file, File attFile, String otaId, String cut) throws Exception {
OtaBaCxZxsjyq otaBaCxZxsjyq = this.getByOtaId(otaId);
if (ObjectUtils.isNotEmpty(otaBaCxZxsjyq)) {
Workbook wb = ImportFileUtil.readExcel(file);
Sheet s = wb.getSheetAt(0);
Row row = s.getRow(2);
@@ -313,3 +314,4 @@ public class OtaBaCxZxsjyqServiceImpl extends ServiceImpl<OtaBaCxZxsjyqMapper, O
cell.setCellValue(sb.toString());
}
}
}