修改OTA变更

This commit is contained in:
高嵩
2023-05-17 17:56:49 +08:00
parent e4b57f4592
commit 6867495e4d
4 changed files with 31 additions and 6 deletions
@@ -362,9 +362,33 @@ public class OtaBaSjSjxtbhServiceImpl extends ServiceImpl<OtaBaSjSjxtbhMapper, O
@Override
public void exportData(File file, String otaId, String cut) throws Exception {
Workbook wb = ImportFileUtil.readExcel(file);
//系统中维护的系统功能与电子控制器维护关系表
List<OtaBaSjGnxtwh> whList = otaBaSjGnxtwhService.list();
if (ObjectUtils.isNotEmpty(whList)) {
Sheet s1 = wb.getSheetAt(1);
CellStyle style = wb.createCellStyle();
style.setBorderTop(BorderStyle.THIN);
style.setBorderBottom(BorderStyle.THIN);
style.setBorderLeft(BorderStyle.THIN);
style.setBorderRight(BorderStyle.THIN);
Row row1;
Cell cell1;
int start1 = 1;
for (OtaBaSjGnxtwh wh : whList) {
row1 = s1.createRow(start1);
cell1 = row1.createCell(0);
cell1.setCellStyle(style);
cell1.setCellValue(wh.getGnxt());
cell1 = row1.createCell(1);
cell1.setCellStyle(style);
cell1.setCellValue(wh.getDykzq());
start1++;
}
}
//本次升级的系统名称与参数变化
List<OtaBaSjSjxtbh> bhList = this.getByOtaId(otaId);
if (ObjectUtils.isNotEmpty(bhList)) {
Workbook wb = ImportFileUtil.readExcel(file);
Sheet s = wb.getSheetAt(0);
CellStyle style = wb.createCellStyle();
style.setBorderTop(BorderStyle.THIN);
@@ -414,8 +438,9 @@ public class OtaBaSjSjxtbhServiceImpl extends ServiceImpl<OtaBaSjSjxtbhMapper, O
cell.setCellValue(ImportFileUtil.getCellValueYesOrNo(bh.getSfcfsj()));
start++;
}
wb.write(new FileOutputStream(file));
wb.close();
}
wb.write(new FileOutputStream(file));
wb.close();
}
}
@@ -344,7 +344,7 @@ this.$forceUpdate()
},
// 模板下载
handleModule() {
downloadFile('ota/otaBaSjSjyxpg/exportTemplate', '升级影响评估' + '.zip', {})
downloadFile('ota/otaBaSjSjyxpg/exportTemplate', '升级活动备案-升级影响评估' + '.zip', {})
},
clickButtonToUpload(item) {
this.$refs.uploadFile.perentHandleFunc()
@@ -216,7 +216,7 @@ export default {
methods: {
// 模板下载
handleModule() {
downloadFile('ota/otaBaSjSjmbcx/exportTemplate', '升级目标车型' + '.zip', {})
downloadFile('ota/otaBaSjSjmbcx/exportTemplate', '升级活动备案-升级目标车型' + '.zip', {})
},
getData(item) {
let otaIdT = localStorage.getItem('otaIdT')
@@ -304,7 +304,7 @@ export default {
},
// 模板下载
handleModule() {
downloadFile('ota/otaBaCxJbxx/exportTemplate', '车型基本信息' + '.zip', {})
downloadFile('ota/otaBaCxJbxx/exportTemplate', '车型及功能备案-车型基本信息' + '.zip', {})
},
getSelect(){
getAction('/ota/otaBaCxList/list').then(res=>{