修改OTA变更
This commit is contained in:
+8
-1
@@ -109,7 +109,14 @@ public class OtaBaSjSjyxpg implements Serializable {
|
||||
@Dict(dicCode = "upgrade_failed")
|
||||
private java.lang.String aqjz;
|
||||
|
||||
/**升级活动是否影响车辆安全*/
|
||||
|
||||
/**升级失败或中断后_文本框*/
|
||||
@Excel(name = "升级失败或中断后_文本框", width = 15)
|
||||
@ApiModelProperty(value = "升级失败或中断后_文本框")
|
||||
private java.lang.String aqjzWbk;
|
||||
|
||||
|
||||
/**升级活动是否影响车辆安全*/
|
||||
@Excel(name = "升级活动是否影响车辆安全", width = 15)
|
||||
@ApiModelProperty(value = "升级活动是否影响车辆安全")
|
||||
private java.lang.Integer sfyxaq;
|
||||
|
||||
@@ -165,6 +165,7 @@ public enum OtaTitleEnum {
|
||||
JRXXG("jrxxg", "兼容性评估相关", "2", "", 0),
|
||||
ZXSJ("zxsj", "如何执行升级", "conditions_upgrades", "", 0),
|
||||
AQJZ("aqjz", "升级失败或中断后,车辆采取的安全机制", "upgrade_failed", "", 0),
|
||||
AQJZWBK("aqjzWbk", "升级失败或中断后,车辆采取的安全机制-文本框", "0", "", 1000),
|
||||
SFYXAQ("sfyxaq", "升级活动是否影响车辆安全", "2", "", 0),
|
||||
YHQR("yhqr", "升级活动是否提供用户确认选项", "2", "", 0),
|
||||
SJBCS("sjbcs", "升级包测试", "package_test", "", 0),
|
||||
|
||||
+7
-3
@@ -221,9 +221,13 @@ public class OtaBaCxAqcsServiceImpl extends ServiceImpl<OtaBaCxAqcsMapper, OtaBa
|
||||
File upFile = null;
|
||||
for (File f : upLoadFiles) {
|
||||
if (f.isDirectory() && f.getName().equals("安全措施")) {
|
||||
attFile = f;
|
||||
} else if (f.getName().equals("安全措施.xlsx")) {
|
||||
upFile = f;
|
||||
for (File f1 : f.listFiles()) {
|
||||
if (f1.isDirectory() && f1.getName().equals("安全措施-附件")) {
|
||||
attFile = f1;
|
||||
} else if (f1.getName().equals("安全措施.xlsx")) {
|
||||
upFile = f1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (null == upFile || null == attFile) {
|
||||
|
||||
+6
-2
@@ -211,8 +211,12 @@ public class OtaBaCxJbxxServiceImpl extends ServiceImpl<OtaBaCxJbxxMapper, OtaBa
|
||||
public OtaBaCxJbxx parseFileList(List<File> upLoadFiles, String otaId, String cut, StringBuilder errMsg) throws Exception {
|
||||
File upFile = null;
|
||||
for (File f : upLoadFiles) {
|
||||
if (f.getName().equals("车型基本信息.xlsx")) {
|
||||
upFile = f;
|
||||
if (f.isDirectory() && f.getName().equals("车型基本信息")) {
|
||||
for (File f1 : f.listFiles()) {
|
||||
if (f1.getName().equals("车型基本信息.xlsx")) {
|
||||
upFile = f1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (null == upFile) {
|
||||
|
||||
+6
-2
@@ -274,8 +274,12 @@ public class OtaBaCxJsfzbacsServiceImpl extends ServiceImpl<OtaBaCxJsfzbacsMappe
|
||||
public void parseFileList(List<File> upLoadFiles, String otaId, String cut, StringBuilder errMsg) throws Exception {
|
||||
File upFile = null;
|
||||
for (File f : upLoadFiles) {
|
||||
if (f.getName().equals("驾驶辅助系统基础备案参数.xlsx")) {
|
||||
upFile = f;
|
||||
if (f.isDirectory() && f.getName().equals("驾驶辅助系统基础备案参数")) {
|
||||
for (File f1 : f.listFiles()) {
|
||||
if (f1.getName().equals("驾驶辅助系统基础备案参数.xlsx")) {
|
||||
upFile = f1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (null == upFile) {
|
||||
|
||||
+7
-3
@@ -245,9 +245,13 @@ public class OtaBaCxKsjjsmccsServiceImpl extends ServiceImpl<OtaBaCxKsjjsmccsMap
|
||||
File upFile = null;
|
||||
for (File f : upLoadFiles) {
|
||||
if (f.isDirectory() && f.getName().equals("可在线升级的驾驶辅助功能名称与参数")) {
|
||||
attFile = f;
|
||||
} else if (f.getName().equals("可在线升级的驾驶辅助功能名称与参数.xlsx")) {
|
||||
upFile = f;
|
||||
for (File f1 : f.listFiles()) {
|
||||
if (f1.isDirectory() && f1.getName().equals("可在线升级的驾驶辅助功能名称与参数-附件")) {
|
||||
attFile = f1;
|
||||
} else if (f1.getName().equals("可在线升级的驾驶辅助功能名称与参数.xlsx")) {
|
||||
upFile = f1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (null == upFile || null == attFile) {
|
||||
|
||||
+8
-4
@@ -316,9 +316,13 @@ public class OtaBaCxKsjxtmccsServiceImpl extends ServiceImpl<OtaBaCxKsjxtmccsMap
|
||||
File upFile = null;
|
||||
for (File f : upLoadFiles) {
|
||||
if (f.isDirectory() && f.getName().equals("可在线升级的系统名称与参数")) {
|
||||
attFile = f;
|
||||
} else if (f.getName().equals("可在线升级的系统名称与参数.xlsx")) {
|
||||
upFile = f;
|
||||
for (File f1 : f.listFiles()) {
|
||||
if (f1.isDirectory() && f1.getName().equals("可在线升级的系统名称与参数-附件")) {
|
||||
attFile = f1;
|
||||
} else if (f1.getName().equals("可在线升级的系统名称与参数.xlsx")) {
|
||||
upFile = f1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (null == upFile || null == attFile) {
|
||||
@@ -520,4 +524,4 @@ public class OtaBaCxKsjxtmccsServiceImpl extends ServiceImpl<OtaBaCxKsjxtmccsMap
|
||||
wb.close();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
+5
-5
@@ -200,26 +200,26 @@ public class OtaBaCxListServiceImpl extends ServiceImpl<OtaBaCxListMapper, OtaBa
|
||||
@Override
|
||||
public void exportData(String otaId, HttpServletResponse response, HttpServletRequest request) throws Exception {
|
||||
String cut = "cn";
|
||||
File template = new File(templatePath + "车型及功能备案导出.zip");
|
||||
File template = new File(templatePath + "车型及功能备案-导出.zip");
|
||||
File exportFile = ImportFileUtil.copyZip(ImportFileUtil.createMfileByFile(template), cut, uploadPath);
|
||||
File jbxxFile = ImportFileUtil.findFile(exportFile, "车型基本信息.xlsx");
|
||||
otaBaCxJbxxService.exportData(jbxxFile, otaId, cut);
|
||||
|
||||
File sjyqFile = ImportFileUtil.findFile(exportFile, "在线升级要求.xlsx");
|
||||
File sjyqAttFile = ImportFileUtil.findFoder(exportFile, "在线升级要求");
|
||||
File sjyqAttFile = ImportFileUtil.findFoder(exportFile, "在线升级要求-附件");
|
||||
otaBaCxZxsjyqService.exportData(sjyqFile, sjyqAttFile, otaId, cut);
|
||||
|
||||
|
||||
File aqcsFile = ImportFileUtil.findFile(exportFile, "安全措施.xlsx");
|
||||
File aqcsAttFile = ImportFileUtil.findFoder(exportFile, "安全措施");
|
||||
File aqcsAttFile = ImportFileUtil.findFoder(exportFile, "安全措施-附件");
|
||||
otaBaCxAqcsService.exportData(aqcsFile, aqcsAttFile, otaId, cut);
|
||||
|
||||
File mccsFile = ImportFileUtil.findFile(exportFile, "可在线升级的系统名称与参数.xlsx");
|
||||
File mccsAttFile = ImportFileUtil.findFoder(exportFile, "可在线升级的系统名称与参数");
|
||||
File mccsAttFile = ImportFileUtil.findFoder(exportFile, "可在线升级的系统名称与参数-附件");
|
||||
otaBaCxKsjxtmccsService.exportData(mccsFile, mccsAttFile, otaId, cut);
|
||||
|
||||
File jsmccsFile = ImportFileUtil.findFile(exportFile, "可在线升级的驾驶辅助功能名称与参数.xlsx");
|
||||
File jsmccsAttFile = ImportFileUtil.findFoder(exportFile, "可在线升级的驾驶辅助功能名称与参数");
|
||||
File jsmccsAttFile = ImportFileUtil.findFoder(exportFile, "可在线升级的驾驶辅助功能名称与参数-附件");
|
||||
otaBaCxKsjjsmccsService.exportData(jsmccsFile, jsmccsAttFile, otaId, cut);
|
||||
|
||||
File bacsFile = ImportFileUtil.findFile(exportFile, "驾驶辅助系统基础备案参数.xlsx");
|
||||
|
||||
+7
-3
@@ -223,9 +223,13 @@ public class OtaBaCxZxsjyqServiceImpl extends ServiceImpl<OtaBaCxZxsjyqMapper, O
|
||||
File upFile = null;
|
||||
for (File f : upLoadFiles) {
|
||||
if (f.isDirectory() && f.getName().equals("在线升级要求")) {
|
||||
attFile = f;
|
||||
} else if (f.getName().equals("在线升级要求.xlsx")) {
|
||||
upFile = f;
|
||||
for (File f1 : f.listFiles()) {
|
||||
if (f1.isDirectory() && f1.getName().equals("在线升级要求-附件")) {
|
||||
attFile = f1;
|
||||
} else if (f1.getName().equals("在线升级要求.xlsx")) {
|
||||
upFile = f1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (null == upFile || null == attFile) {
|
||||
|
||||
+4
-4
@@ -198,19 +198,19 @@ public class OtaBaSjListServiceImpl extends ServiceImpl<OtaBaSjListMapper, OtaBa
|
||||
@Override
|
||||
public void exportData(String otaId, HttpServletResponse response, HttpServletRequest request) throws Exception {
|
||||
String cut = "cn";
|
||||
File template = new File(templatePath + "在线升级活动备案导出.zip");
|
||||
File template = new File(templatePath + "在线升级活动备案-导出.zip");
|
||||
File exportFile = ImportFileUtil.copyZip(ImportFileUtil.createMfileByFile(template), cut, uploadPath);
|
||||
|
||||
File sjmbcxFile = ImportFileUtil.findFile(exportFile, "升级目标车型.xlsx");
|
||||
otaBaSjSjmbcxService.exportData(sjmbcxFile, otaId, cut);
|
||||
|
||||
File mbclFile = ImportFileUtil.findFile(exportFile, "本次升级的目标车辆.xlsx");
|
||||
File mbclAttFile = ImportFileUtil.findFoder(exportFile, "本次升级的目标车辆");
|
||||
File mbclAttFile = ImportFileUtil.findFoder(exportFile, "本次升级的目标车辆-附件");
|
||||
otaBaSjSjmbclService.exportData(mbclFile, mbclAttFile, otaId, cut);
|
||||
|
||||
|
||||
File pgFile = ImportFileUtil.findFile(exportFile, "升级影响评估.xlsx");
|
||||
File pgAttFile = ImportFileUtil.findFoder(exportFile, "升级影响评估");
|
||||
File pgAttFile = ImportFileUtil.findFoder(exportFile, "升级影响评估-附件");
|
||||
File pgAtt1File = ImportFileUtil.findFoder(pgAttFile, "测试报告");
|
||||
File pgAtt2File = ImportFileUtil.findFoder(pgAttFile, "硬件版本号附件");
|
||||
otaBaSjSjyxpgService.exportData(pgFile, pgAtt1File, pgAtt2File, otaId, cut);
|
||||
@@ -222,7 +222,7 @@ public class OtaBaSjListServiceImpl extends ServiceImpl<OtaBaSjListMapper, OtaBa
|
||||
otaBaSjSjfzbhService.exportData(sjfzbhFile, otaId, cut);
|
||||
|
||||
File fsFile = ImportFileUtil.findFile(exportFile, "用户告知内容及方式.xlsx");
|
||||
File fsAttFile = ImportFileUtil.findFoder(exportFile, "用户告知内容及方式");
|
||||
File fsAttFile = ImportFileUtil.findFoder(exportFile, "用户告知内容及方式-附件");
|
||||
otaBaSjGgnrfsService.exportData(fsFile, fsAttFile, otaId, cut);
|
||||
|
||||
File qtFile = ImportFileUtil.findFile(exportFile, "其他升级任务信息.xlsx");
|
||||
|
||||
+6
-2
@@ -229,8 +229,12 @@ public class OtaBaSjSjfzbhServiceImpl extends ServiceImpl<OtaBaSjSjfzbhMapper, O
|
||||
public void parseFileList(List<File> upLoadFiles, String otaId, String cut, StringBuilder errMsg) throws Exception {
|
||||
File upFile = null;
|
||||
for (File f : upLoadFiles) {
|
||||
if (f.getName().equals("本次升级的驾驶辅助功能名称与参数变化.xlsx")) {
|
||||
upFile = f;
|
||||
if (f.isDirectory() && f.getName().equals("本次升级的驾驶辅助功能名称与参数变化")) {
|
||||
for (File f1 : f.listFiles()) {
|
||||
if (f1.getName().equals("本次升级的驾驶辅助功能名称与参数变化.xlsx")) {
|
||||
upFile = f1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (null == upFile) {
|
||||
|
||||
+6
-2
@@ -184,8 +184,12 @@ public class OtaBaSjSjmbclServiceImpl extends ServiceImpl<OtaBaSjSjmbclMapper, O
|
||||
public OtaBaSjSjmbcl parseFileList(List<File> upLoadFiles, String otaId, String cut, StringBuilder errMsg) throws Exception {
|
||||
File upFile = null;
|
||||
for (File f : upLoadFiles) {
|
||||
if (f.getName().equals("本次升级的目标车辆.xlsx")) {
|
||||
upFile = f;
|
||||
if (f.isDirectory() && f.getName().equals("本次升级的目标车辆")) {
|
||||
for (File f1 : f.listFiles()) {
|
||||
if (f1.getName().equals("本次升级的目标车辆.xlsx")) {
|
||||
upFile = f1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (null == upFile) {
|
||||
|
||||
+6
-2
@@ -190,8 +190,12 @@ public class OtaBaSjSjmbcxServiceImpl extends ServiceImpl<OtaBaSjSjmbcxMapper, O
|
||||
public OtaBaSjSjmbcx parseFileList(List<File> upLoadFiles, String otaId, String cut, StringBuilder errMsg) throws Exception {
|
||||
File upFile = null;
|
||||
for (File f : upLoadFiles) {
|
||||
if (f.getName().equals("升级目标车型.xlsx")) {
|
||||
upFile = f;
|
||||
if (f.isDirectory() && f.getName().equals("升级目标车型")) {
|
||||
for (File f1 : f.listFiles()) {
|
||||
if (f1.getName().equals("升级目标车型.xlsx")) {
|
||||
upFile = f1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (null == upFile) {
|
||||
|
||||
+6
-2
@@ -222,8 +222,12 @@ public class OtaBaSjSjxtbhServiceImpl extends ServiceImpl<OtaBaSjSjxtbhMapper, O
|
||||
public void parseFileList(List<File> upLoadFiles, String otaId, String cut, StringBuilder errMsg) throws Exception {
|
||||
File upFile = null;
|
||||
for (File f : upLoadFiles) {
|
||||
if (f.getName().equals("本次升级的系统名称与参数变化.xlsx")) {
|
||||
upFile = f;
|
||||
if (f.isDirectory() && f.getName().equals("本次升级的系统名称与参数变化")) {
|
||||
for (File f1 : f.listFiles()) {
|
||||
if (f1.getName().equals("本次升级的系统名称与参数变化.xlsx")) {
|
||||
upFile = f1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (null == upFile) {
|
||||
|
||||
+16
-7
@@ -164,6 +164,7 @@ public class OtaBaSjSjyxpgServiceImpl extends ServiceImpl<OtaBaSjSjyxpgMapper, O
|
||||
res.setZdjsxg(2);
|
||||
res.setZxsj(2);
|
||||
res.setAqjz("2");
|
||||
res.setAqjzWbk("车辆保持在功能受限制状态,此状态下车辆无法行驶,保证其处于安全状态");
|
||||
res.setSfyxaq(2);
|
||||
res.setYhqr(1);
|
||||
res.setSjbcs("3,4");
|
||||
@@ -228,6 +229,7 @@ public class OtaBaSjSjyxpgServiceImpl extends ServiceImpl<OtaBaSjSjyxpgMapper, O
|
||||
sjyxpg.setZdjsxg(1);
|
||||
sjyxpg.setZxsj(2);
|
||||
sjyxpg.setAqjz("2");
|
||||
sjyxpg.setAqjzWbk("车辆保持在功能受限制状态,此状态下车辆无法行驶,保证其处于安全状态");
|
||||
sjyxpg.setSfyxaq(2);
|
||||
sjyxpg.setYhqr(1);
|
||||
sjyxpg.setSjbcs("3,4");
|
||||
@@ -266,11 +268,14 @@ public class OtaBaSjSjyxpgServiceImpl extends ServiceImpl<OtaBaSjSjyxpgMapper, O
|
||||
File attFile1 = null;
|
||||
File attFile2 = null;
|
||||
for (File f : upLoadFiles) {
|
||||
if (f.getName().equals("升级影响评估.docx")) {
|
||||
upFile = f;
|
||||
}
|
||||
if (f.isDirectory() && f.getName().equals("升级影响评估")) {
|
||||
attFile = f;
|
||||
for (File f1 : f.listFiles()) {
|
||||
if (f1.isDirectory() && f1.getName().equals("升级影响评估")) {
|
||||
attFile = f1;
|
||||
} else if (f1.getName().equals("升级影响评估.docx")) {
|
||||
upFile = f1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -332,10 +337,14 @@ public class OtaBaSjSjyxpgServiceImpl extends ServiceImpl<OtaBaSjSjyxpgMapper, O
|
||||
cell.setCellValue(ImportFileUtil.getCellValueYesOrNoInt(pg.getJrxxg()));
|
||||
row = s.getRow(6);
|
||||
cell = row.getCell(1);
|
||||
cell.setCellValue(ComparisonUtil.queryDictTextByKey("conditions_upgrades", pg.getZxsj().toString(), sysDictService));
|
||||
cell.setCellValue(ComparisonUtil.queryDictTextByKey("conditions_upgrades", String.valueOf(pg.getZxsj()), sysDictService));
|
||||
row = s.getRow(7);
|
||||
cell = row.getCell(1);
|
||||
cell.setCellValue(ComparisonUtil.queryDictTextByKey("upgrade_failed", pg.getAqjz(), sysDictService));
|
||||
if (StringUtils.isNotEmpty(pg.getAqjzWbk())) {
|
||||
cell.setCellValue(ComparisonUtil.queryDictTextByKey("upgrade_failed", pg.getAqjz(), sysDictService) + "; " + pg.getAqjzWbk());
|
||||
} else {
|
||||
cell.setCellValue(ComparisonUtil.queryDictTextByKey("upgrade_failed", pg.getAqjz(), sysDictService));
|
||||
}
|
||||
row = s.getRow(8);
|
||||
cell = row.getCell(1);
|
||||
cell.setCellValue(ImportFileUtil.getCellValueYesOrNoInt(pg.getSfyxaq()));
|
||||
@@ -364,7 +373,7 @@ public class OtaBaSjSjyxpgServiceImpl extends ServiceImpl<OtaBaSjSjyxpgMapper, O
|
||||
}
|
||||
}
|
||||
}
|
||||
String attStr2 = pg.getBgfj();
|
||||
String attStr2 = pg.getClfj();
|
||||
if (StringUtils.isNotEmpty(attStr2)) {
|
||||
String[] strs = attStr2.split(",");
|
||||
for (String str : strs) {
|
||||
|
||||
+16
-3
@@ -262,6 +262,7 @@ public class ImportFileUtil {
|
||||
}
|
||||
|
||||
public static File findFile(File file, String fileName) throws Exception {
|
||||
File resFile = null;
|
||||
// 获取此地址中的所有文件以及文件夹(File[] list)
|
||||
File[] listFiles = file.listFiles();// 获取此地址中的所有文件以及文件夹(File[] list)
|
||||
for (File file1 : listFiles) {// 遍历数组
|
||||
@@ -269,14 +270,21 @@ public class ImportFileUtil {
|
||||
if (!file1.isDirectory()) {
|
||||
String name = file1.getName();
|
||||
if (name.equals(fileName)) {
|
||||
return file1;
|
||||
resFile = file1;
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
resFile = findFile(file1, fileName);
|
||||
if (resFile != null) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
return null;
|
||||
return resFile;
|
||||
}
|
||||
|
||||
public static File findFoder(File file, String fileName) throws Exception {
|
||||
File resFile = null;
|
||||
// 获取此地址中的所有文件以及文件夹(File[] list)
|
||||
File[] listFiles = file.listFiles();// 获取此地址中的所有文件以及文件夹(File[] list)
|
||||
for (File file1 : listFiles) {// 遍历数组
|
||||
@@ -285,10 +293,15 @@ public class ImportFileUtil {
|
||||
String name = file1.getName();
|
||||
if (name.equals(fileName)) {
|
||||
return file1;
|
||||
} else {
|
||||
resFile = findFoder(file1, fileName);
|
||||
if (resFile != null) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return null;
|
||||
return resFile;
|
||||
}
|
||||
|
||||
public static File findFile(List<File> file, String fileName) throws Exception {
|
||||
|
||||
Reference in New Issue
Block a user