diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/controller/OtaBaCxTxjlController.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/controller/OtaBaCxTxjlController.java index b946675a7..4b2f89866 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/controller/OtaBaCxTxjlController.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/controller/OtaBaCxTxjlController.java @@ -61,8 +61,15 @@ public class OtaBaCxTxjlController extends JeroController queryWrapper = QueryGenerator.initQueryWrapper(otaBaCxTxjl, req.getParameterMap()); + if(StringUtils.isNotEmpty(otaBaCxTxjl.getContext())){ + queryWrapper.and(query -> { + query.lambda().like(OtaBaCxTxjl::getContent,otaBaCxTxjl.getContext()); + query.or().lambda().like(OtaBaCxTxjl::getCreateBy,otaBaCxTxjl.getContext()); + }); + } queryWrapper.orderByDesc("create_time"); IPage pageList = otaBaCxTxjlService.page(page, queryWrapper); + this.otaBaCxTxjlService.disposeData(pageList.getRecords(),otaBaCxTxjl.getCut()); return Result.OK(pageList); } diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/controller/OtaBaSjListController.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/controller/OtaBaSjListController.java index 472fed758..5cbc98052 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/controller/OtaBaSjListController.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/controller/OtaBaSjListController.java @@ -90,6 +90,7 @@ public class OtaBaSjListController extends JeroController pageList = otaBaSjListService.page(page, queryWrapper); + this.otaBaSjListService.disposeData(pageList.getRecords(),otaBaSjList); return Result.OK(pageList); } diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/entity/OtaBaCxTxjl.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/entity/OtaBaCxTxjl.java index 7f71a2b36..624fcb2a6 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/entity/OtaBaCxTxjl.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/entity/OtaBaCxTxjl.java @@ -4,6 +4,7 @@ import java.io.Serializable; import java.io.UnsupportedEncodingException; import java.math.BigDecimal; import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; import lombok.Data; @@ -84,4 +85,11 @@ public class OtaBaCxTxjl implements Serializable { this.module = module; this.content = content; } + + // 内容搜索条件,模糊搜索填写内容、填写人 + @TableField(exist = false) + private String context; + + @TableField(exist = false) + private String cut; } diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/entity/OtaBaSjList.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/entity/OtaBaSjList.java index dc0e38564..74a0b8adc 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/entity/OtaBaSjList.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/entity/OtaBaSjList.java @@ -5,6 +5,7 @@ import java.io.UnsupportedEncodingException; import java.math.BigDecimal; import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; import lombok.Data; @@ -163,6 +164,10 @@ public class OtaBaSjList implements Serializable { @ApiModelProperty(value = "升级状态") private java.lang.String sjzt; + // 任务名称 + @TableField(exist = false) + private String rwmc; + public void updateData(OtaBaSjSjmbcx otaBaSjSjmbcx) { this.cpdjbh = otaBaSjSjmbcx.getBabh(); this.ggpc = otaBaSjSjmbcx.getBapc(); diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/entity/OtaBaSjSjyxpg.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/entity/OtaBaSjSjyxpg.java index ba3534c99..cb092367c 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/entity/OtaBaSjSjyxpg.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/entity/OtaBaSjSjyxpg.java @@ -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; diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/enums/OtaModuleEnum.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/enums/OtaModuleEnum.java index 7aeade984..9e8e5acf6 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/enums/OtaModuleEnum.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/enums/OtaModuleEnum.java @@ -1,22 +1,25 @@ package com.jero.modules.ota.enums; +import com.jero.common.constant.enums.CutEnum; +import com.jero.modules.system.util.StringUtils; + public enum OtaModuleEnum { - CX_CXJBXX("车型基本信息", "1","1"), - CX_ZXSJYQ("在线升级要求", "1","1"), - CX_AQCS("安全措施", "1","1"), - CX_KSJDXTMCYCS("可在线升级的系统名称与参数", "1","1"), - CX_KZXSJDJSFZGNMCYCS("可在线升级的驾驶辅助功能名称与参数", "1","1"), - CX_JSFZXTJCBACS("驾驶辅助系统基础备案参数", "1","1"), - CX_QT("其他", "1","1"), + CX_CXJBXX("车型基本信息", "Basic information of vehicle type","5b123b5672f44986a267942530427e15"), + CX_ZXSJYQ("在线升级要求", "Online upgrade requirements","645c35027e094dd2a51de40ef5a1d1ae"), + CX_AQCS("安全措施", "Safety measure","5fd89d87343f417ea4198187805db601"), + CX_KSJDXTMCYCS("可在线升级的系统名称与参数", "Name and parameters of the system that can be upgraded online","06f921687cf44288819fe0b371dd3ba9"), + CX_KZXSJDJSFZGNMCYCS("可在线升级的驾驶辅助功能名称与参数", "The name and parameters of the driver assistance feature that can be upgraded online","a0921f99bfb042ab90747c964e60474d"), + CX_JSFZXTJCBACS("驾驶辅助系统基础备案参数", "Driver assistance system basic record parameters","0ebcf0ad4ca842c88db4d96297b4a8a3"), + CX_QT("其他", "others","17b94237382e444780537bfa9052e432"), - SJ_SJMBCX("升级目标车型", "1","1"), - SJ_SJMBCL("本次升级的目标车辆", "1","1"), - SJ_SJYXPG("升级影响评估", "1","1"), - SJ_SJXTMCBH("本次升级的系统名称与参数变化", "1","1"), - SJ_SJJSMCBH("本次升级的驾驶辅助功能名称与参数变化", "1","1"), - SJ_YHGZNRFS("用户告知内容及方式", "1","1"), - SJ_QT("其他升级任务信息", "1","1"); + SJ_SJMBCX("升级目标车型", "Upgrade target model","8ed5e877cfbe446297f56891294e54bb"), + SJ_SJMBCL("本次升级的目标车辆", "The target vehicle of this upgrade","67d1366fd2714c03a012c27688a1d906"), + SJ_SJYXPG("升级影响评估", "Upgrade impact assessment","05d6cb54a8844b7cbc50967b69ed6ad7"), + SJ_SJXTMCBH("本次升级的系统名称与参数变化", "The system name and parameters of the upgrade have changed","f372f891416842b99a3d15851758831c"), + SJ_SJJSMCBH("本次升级的驾驶辅助功能名称与参数变化", "The name and parameters of the driver assistance function are changed in this upgrade","503ecaa0076e452f9cb5daa6b4897c2e"), + SJ_YHGZNRFS("用户告知内容及方式", "Content and method of user notification","a20fa7f173674627a6b407c9cc6a2bae"), + SJ_QT("其他升级任务信息", "Information about other upgrade tasks","e815bfc4c8e04deda0d17358224320b0"); String name; String nameEN; @@ -51,4 +54,18 @@ public enum OtaModuleEnum { public void setValue(String value) { this.value = value; } + + public static String getNameByValue(String value,String cut){ + String result = ""; + for (OtaModuleEnum otaModuleEnum : OtaModuleEnum.values()) { + if(StringUtils.equals(otaModuleEnum.value,value)){ + if(StringUtils.equals(cut, CutEnum.CN.getValue())){ + result = otaModuleEnum.name; + }else if(StringUtils.equals(cut,CutEnum.EN.getValue())){ + result = otaModuleEnum.nameEN; + } + } + } + return result; + } } diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/enums/OtaTitleEnum.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/enums/OtaTitleEnum.java index 4b5e5cad3..855ce20b3 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/enums/OtaTitleEnum.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/enums/OtaTitleEnum.java @@ -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), diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/IOtaBaCxTxjlService.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/IOtaBaCxTxjlService.java index cdc585a5a..912110c7f 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/IOtaBaCxTxjlService.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/IOtaBaCxTxjlService.java @@ -65,4 +65,11 @@ public interface IOtaBaCxTxjlService extends IService { List queryList(); List queryByOtaId(String otaId); + + /** + * 处理数据 + * @param datas + * @param cut + */ + void disposeData(List datas, String cut); } diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/IOtaBaSjListService.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/IOtaBaSjListService.java index 8546e69e4..ebbd83ddd 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/IOtaBaSjListService.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/IOtaBaSjListService.java @@ -73,4 +73,11 @@ public interface IOtaBaSjListService extends IService { void importData(MultipartFile file, String cut, StringBuilder errMsg) throws Exception; void exportData(String otaId, HttpServletResponse response, HttpServletRequest request) throws Exception; + + /** + * 处理数据 + * @param datas + * @param otaBaSjList + */ + void disposeData(List datas, OtaBaSjList otaBaSjList); } diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/impl/OtaBaCxAqcsServiceImpl.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/impl/OtaBaCxAqcsServiceImpl.java index e6736d272..5021e2b95 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/impl/OtaBaCxAqcsServiceImpl.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/impl/OtaBaCxAqcsServiceImpl.java @@ -221,9 +221,13 @@ public class OtaBaCxAqcsServiceImpl extends ServiceImpl 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) { diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/impl/OtaBaCxJsfzbacsServiceImpl.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/impl/OtaBaCxJsfzbacsServiceImpl.java index 6adca19af..04df42083 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/impl/OtaBaCxJsfzbacsServiceImpl.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/impl/OtaBaCxJsfzbacsServiceImpl.java @@ -274,8 +274,12 @@ public class OtaBaCxJsfzbacsServiceImpl extends ServiceImpl 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) { diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/impl/OtaBaCxKsjjsmccsServiceImpl.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/impl/OtaBaCxKsjjsmccsServiceImpl.java index 946350682..b1671b877 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/impl/OtaBaCxKsjjsmccsServiceImpl.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/impl/OtaBaCxKsjjsmccsServiceImpl.java @@ -245,9 +245,13 @@ public class OtaBaCxKsjjsmccsServiceImpl extends ServiceImpl res = this.list(queryWrapper); return res; } + + @Override + public void disposeData(List datas, String cut) { + if (CollectionUtils.isNotEmpty(datas)) { + datas.forEach(data -> { + data.setModule(OtaModuleEnum.getNameByValue(data.getModule(),cut)); + }); + } + } } diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/impl/OtaBaCxZxsjyqServiceImpl.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/impl/OtaBaCxZxsjyqServiceImpl.java index 0ea5e2320..921d5ed97 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/impl/OtaBaCxZxsjyqServiceImpl.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/impl/OtaBaCxZxsjyqServiceImpl.java @@ -223,9 +223,13 @@ public class OtaBaCxZxsjyqServiceImpl extends ServiceImpl datas, OtaBaSjList otaBaSjList) { + if(CollectionUtils.isNotEmpty(datas)){ + List otaBaSjListIdList = datas.stream().map(OtaBaSjList::getId).distinct().collect(Collectors.toList()); + QueryWrapper otaBaSjQtsjxxQueryWrap = new QueryWrapper<>(); + otaBaSjQtsjxxQueryWrap.lambda().in(OtaBaSjQtsjxx::getOtaId,otaBaSjListIdList); + List otaBaSjQtsjxxList = this.otaBaSjQtsjxxService.list(otaBaSjQtsjxxQueryWrap); + datas.forEach(data -> { + if (CollectionUtils.isNotEmpty(otaBaSjQtsjxxList)) { + String rwmc = otaBaSjQtsjxxList.stream().filter(otaBaSjQtsjxx -> { + boolean flag = false; + if(StringUtils.equals(otaBaSjQtsjxx.getOtaId(), data.getId())){ + flag = true; + } + return flag; + }).map(OtaBaSjQtsjxx::getRwmc).collect(Collectors.joining(",")); + data.setRwmc(rwmc); + } + }); + } + } } diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/impl/OtaBaSjSjfzbhServiceImpl.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/impl/OtaBaSjSjfzbhServiceImpl.java index 0f88198d6..dd191be72 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/impl/OtaBaSjSjfzbhServiceImpl.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/impl/OtaBaSjSjfzbhServiceImpl.java @@ -229,8 +229,12 @@ public class OtaBaSjSjfzbhServiceImpl extends ServiceImpl 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) { diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/impl/OtaBaSjSjmbclServiceImpl.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/impl/OtaBaSjSjmbclServiceImpl.java index 22d14668c..22cdf4d23 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/impl/OtaBaSjSjmbclServiceImpl.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/impl/OtaBaSjSjmbclServiceImpl.java @@ -184,8 +184,12 @@ public class OtaBaSjSjmbclServiceImpl extends ServiceImpl 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) { diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/impl/OtaBaSjSjmbcxServiceImpl.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/impl/OtaBaSjSjmbcxServiceImpl.java index 1469ad627..25e6ded50 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/impl/OtaBaSjSjmbcxServiceImpl.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/impl/OtaBaSjSjmbcxServiceImpl.java @@ -190,8 +190,12 @@ public class OtaBaSjSjmbcxServiceImpl extends ServiceImpl 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) { diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/impl/OtaBaSjSjxtbhServiceImpl.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/impl/OtaBaSjSjxtbhServiceImpl.java index 54a126f67..52b8714bc 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/impl/OtaBaSjSjxtbhServiceImpl.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/impl/OtaBaSjSjxtbhServiceImpl.java @@ -5,6 +5,7 @@ import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONObject; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.jero.common.exception.JeroBootException; +import com.jero.modules.oss.entity.OSSFile; import com.jero.modules.oss.service.IOSSFileService; import com.jero.modules.ota.entity.*; import com.jero.modules.ota.enums.OtaModuleEnum; @@ -13,21 +14,29 @@ import com.jero.modules.ota.mapper.OtaBaSjSjxtbhMapper; import com.jero.modules.ota.service.IOtaBaCxTxjlService; import com.jero.modules.ota.service.IOtaBaSjGnxtwhService; import com.jero.modules.ota.service.IOtaBaSjSjxtbhService; +import com.jero.modules.ota.service.IOtaBaSjSjyxpgService; import com.jero.modules.ota.utils.ComparisonUtil; import com.jero.modules.ota.utils.ImportFileUtil; +import com.jero.modules.project.util.WordUtil; +import com.jero.modules.split.common.FileUnZip; import com.jero.modules.system.service.ISysDictService; +import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.ObjectUtils; import org.apache.poi.hssf.usermodel.HSSFCellStyle; import org.apache.poi.ss.usermodel.*; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; +import org.springframework.mock.web.MockMultipartFile; import org.springframework.stereotype.Service; import java.io.File; +import java.io.FileInputStream; import java.io.FileOutputStream; +import java.io.IOException; import java.lang.reflect.Field; import java.util.*; +import java.util.stream.Collectors; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import org.springframework.web.multipart.MultipartFile; @@ -61,6 +70,9 @@ public class OtaBaSjSjxtbhServiceImpl extends ServiceImpl 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) { @@ -236,6 +252,21 @@ public class OtaBaSjSjxtbhServiceImpl extends ServiceImpl otaBaSjSjxtbh = this.getByOtaId(otaId); + List oldYjbbList = otaBaSjSjxtbh.stream().map(OtaBaSjSjxtbh::getYjbb).distinct().collect(Collectors.toList()); + List oldTempFileNameList = new ArrayList<>(); + oldYjbbList.forEach(sjSjxtbh -> { + oldTempFileNameList.add(sjSjxtbh.replaceAll("见","") + ".docx"); + }); + + int tempFileIndex = 1; + String tempFilePath = uploadPath + "tempFile" + "/" + otaId; + File tempFile = new File(tempFilePath); + if(!tempFile.exists()){ + tempFile.mkdirs(); + } + List tempFileNames = new ArrayList<>(); for (int i = 4; i < rows; i++) { OtaBaSjSjxtbh xtbh = new OtaBaSjSjxtbh(); Row row = s.getRow(i); @@ -253,7 +284,17 @@ public class OtaBaSjSjxtbhServiceImpl extends ServiceImpl 50){ + String fileName = "附件" + tempFileIndex + ".docx"; + String tempFileUrl = WordUtil.createWord(tempFilePath, fileName, yjbb); + if (StringUtils.isNotEmpty(tempFileUrl)) { + tempFileNames.add(fileName); + } + yjbb = "见附件" + tempFileIndex; + tempFileIndex ++; + } + xtbh.setYjbb(yjbb); cell = row.getCell(4); xtbh.setSjqrjbb(ImportFileUtil.getCellValue(cell, wb)); cell = row.getCell(5); @@ -279,14 +320,75 @@ public class OtaBaSjSjxtbhServiceImpl extends ServiceImpl newClfjList = new ArrayList<>(); + List oldClfjList = new ArrayList<>(); + OtaBaSjSjyxpg otaBaSjSjyxpg = this.otaBaSjSjyxpgService.queryByOtaId(otaId, null); + if(StringUtils.isNotEmpty(otaBaSjSjyxpg.getClfj())){ + List clfjFileList = this.ossFileService.getFileInfos(otaBaSjSjyxpg.getClfj()); + oldClfjList = clfjFileList.stream().filter(clfjFile -> { + boolean flag = true; + for (String oldTempFileName : oldTempFileNameList) { + if (StringUtils.equals(clfjFile.getFileName(), oldTempFileName)) { + flag = false; + break; + } + } + return flag; + }).map(OSSFile::getId).collect(Collectors.toList()); + } + // 读取临时文件,上传至服务器。 + for (String tempFileName : tempFileNames) { + try { + FileInputStream input = new FileInputStream(tempFilePath + "/" + tempFileName); + MultipartFile multipartFile = new MockMultipartFile(tempFileName, tempFileName, "text/plain", input); + OSSFile ossFile = this.ossFileService.uploadLocalOfCos(multipartFile, "", null,null); + if (ObjectUtils.isNotEmpty(ossFile)) { + newClfjList.add(ossFile.getId()); + } + } catch (IOException e) { + e.printStackTrace(); + } + } + if(ObjectUtils.isNotEmpty(otaBaSjSjyxpg)){ + newClfjList.addAll(oldClfjList); + otaBaSjSjyxpg.setClfj(StringUtils.join(newClfjList.stream().distinct().collect(Collectors.toList()), ",")); + this.otaBaSjSjyxpgService.updateById(otaBaSjSjyxpg); + } + } + FileUnZip.deleteDir(tempFile); return list; } @Override public void exportData(File file, String otaId, String cut) throws Exception { + Workbook wb = ImportFileUtil.readExcel(file); + //系统中维护的系统功能与电子控制器维护关系表 + List 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 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); @@ -336,8 +438,9 @@ public class OtaBaSjSjxtbhServiceImpl extends ServiceImpl { String oldStr = parseDictText(ote, field, oldClazz, sysDictService); if (!newStr.equals(oldStr)) { String content = "将" + title + "的'" + oldStr + "'改为'" + newStr + "'"; - resList.add(new OtaBaCxTxjl(otaId, otaModuleEnum.getName(), content)); + resList.add(new OtaBaCxTxjl(otaId, otaModuleEnum.getValue(), content)); } } return resList; diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/utils/ImportFileUtil.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/utils/ImportFileUtil.java index 3fe884ac6..e42993b34 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/utils/ImportFileUtil.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/utils/ImportFileUtil.java @@ -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, String fileName) throws Exception { diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/util/WordUtil.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/util/WordUtil.java index e21195135..11987bc8b 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/util/WordUtil.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/util/WordUtil.java @@ -1,6 +1,9 @@ package com.jero.modules.project.util; import cn.hutool.core.collection.CollectionUtil; +import org.apache.poi.xwpf.usermodel.XWPFDocument; +import org.apache.poi.xwpf.usermodel.XWPFParagraph; +import org.apache.poi.xwpf.usermodel.XWPFRun; import org.docx4j.Docx4J; import org.docx4j.TraversalUtil; import org.docx4j.XmlUtils; @@ -22,10 +25,7 @@ import org.slf4j.LoggerFactory; import org.springframework.util.FileCopyUtils; import javax.xml.bind.JAXBElement; -import java.io.File; -import java.io.FileInputStream; -import java.io.InputStream; -import java.io.OutputStream; +import java.io.*; import java.util.*; import java.util.regex.Matcher; import java.util.regex.Pattern; @@ -632,5 +632,33 @@ public class WordUtil { addImageInlineAndTextToPackage(wordMLPackage, bytes, "这是图3,name.png,看图片的嵌入方式"); wordMLPackage.save(new File("d:/opt/测试" + System.currentTimeMillis() + ".docx")); } + + /** + * 创建word文件。 + * @param path + * @param fileName + * @param content + * @return + */ + public static String createWord(String path,String fileName,String content){ + String result = ""; + try { + result = path + "/" +fileName; + XWPFDocument document = new XWPFDocument(); + // 段落 + XWPFParagraph paragraph = document.createParagraph(); + // 添加文本 + XWPFRun run = paragraph.createRun(); + run.setText(content); + + FileOutputStream out = new FileOutputStream(new File(result)); + document.write(out); + out.close(); + log.info(fileName + " Word文件创建成功!"); + } catch (Exception e) { + e.printStackTrace(); + } + return result; + } } diff --git a/jero-web/src/common/lang/en-us.js b/jero-web/src/common/lang/en-us.js index 533f02122..78cb0073e 100644 --- a/jero-web/src/common/lang/en-us.js +++ b/jero-web/src/common/lang/en-us.js @@ -1834,4 +1834,5 @@ module.exports = { deliveryTime:'Delivery Time', expectedDeliveryTime:'Expected Delivery Time', changeAuthor:'Change Author', + requireddataisnull:'Required data is null', } \ No newline at end of file diff --git a/jero-web/src/common/lang/zh-cn.js b/jero-web/src/common/lang/zh-cn.js index e9e2d3a19..b85aebf9b 100644 --- a/jero-web/src/common/lang/zh-cn.js +++ b/jero-web/src/common/lang/zh-cn.js @@ -1935,4 +1935,5 @@ module.exports = { deliveryTime:'交付时间', expectedDeliveryTime:'预计交付时间', changeAuthor:'更改作者', + requireddataisnull:'必填数据为空', } \ No newline at end of file diff --git a/jero-web/src/views/otamanagement/upgradeactivityrecord/components/auxiliaryupgradehavechanged.vue b/jero-web/src/views/otamanagement/upgradeactivityrecord/components/auxiliaryupgradehavechanged.vue index 564ee46cf..09c93952f 100644 --- a/jero-web/src/views/otamanagement/upgradeactivityrecord/components/auxiliaryupgradehavechanged.vue +++ b/jero-web/src/views/otamanagement/upgradeactivityrecord/components/auxiliaryupgradehavechanged.vue @@ -182,7 +182,7 @@ export default { methods: { // 模板下载 handleModule() { - downloadFile('ota/otaBaSjSjfzbh/exportTemplate', '本次升级的驾驶辅助功能与参数变化' + '.zip', {}) + downloadFile('ota/otaBaSjSjfzbh/exportTemplate', '升级活动备案-本次升级的驾驶辅助功能与参数变化' + '.zip', {}) }, getList() { let queryParam = JSON.parse(JSON.stringify(this.queryParam)) diff --git a/jero-web/src/views/otamanagement/upgradeactivityrecord/components/thetargetvehicleofthisupgrade.vue b/jero-web/src/views/otamanagement/upgradeactivityrecord/components/thetargetvehicleofthisupgrade.vue index 8e42cbf81..4ed59496c 100644 --- a/jero-web/src/views/otamanagement/upgradeactivityrecord/components/thetargetvehicleofthisupgrade.vue +++ b/jero-web/src/views/otamanagement/upgradeactivityrecord/components/thetargetvehicleofthisupgrade.vue @@ -127,7 +127,7 @@ export default { methods: { // 模板下载 handleModule() { - downloadFile('ota/otaBaSjSjmbcl/exportTemplate', '本次升级目标车辆' + '.zip', {}) + downloadFile('ota/otaBaSjSjmbcl/exportTemplate', '升级活动备案-本次升级目标车辆' + '.zip', {}) }, getData(){ let otaIdT=localStorage.getItem('otaIdT') @@ -165,8 +165,8 @@ export default { obj.csv = this.formInline.csv if(this.formInline.dateofproduction){ if(this.formInline.dateofproduction.length>0){ - obj.scrqks = this.formInline.dateofproduction[0] - obj.scrqjs = this.formInline.dateofproduction[1] + obj.scrqks = this.formInline.dateofproduction[0] + obj.scrqjs = this.formInline.dateofproduction[1] }else{ obj.scrqks='' obj.scrqjs ='' diff --git a/jero-web/src/views/otamanagement/upgradeactivityrecord/components/upgradehavechanged.vue b/jero-web/src/views/otamanagement/upgradeactivityrecord/components/upgradehavechanged.vue index 44d8d2237..8583fb4b0 100644 --- a/jero-web/src/views/otamanagement/upgradeactivityrecord/components/upgradehavechanged.vue +++ b/jero-web/src/views/otamanagement/upgradeactivityrecord/components/upgradehavechanged.vue @@ -239,7 +239,7 @@ export default { methods: { // 模板下载 handleModule() { - downloadFile('ota/otaBaSjSjxtbh/exportTemplate', '本次升级的系统名称与参数变化' + '.zip', {}) + downloadFile('ota/otaBaSjSjxtbh/exportTemplate', '升级活动备案-本次升级的系统名称与参数变化' + '.zip', {}) }, clickButtonToUpload(item) { this.$refs.uploadFile.perentHandleFunc() diff --git a/jero-web/src/views/otamanagement/upgradeactivityrecord/components/upgradeimpactassessment.vue b/jero-web/src/views/otamanagement/upgradeactivityrecord/components/upgradeimpactassessment.vue index 0d58ef2e1..1bd0f1aab 100644 --- a/jero-web/src/views/otamanagement/upgradeactivityrecord/components/upgradeimpactassessment.vue +++ b/jero-web/src/views/otamanagement/upgradeactivityrecord/components/upgradeimpactassessment.vue @@ -119,8 +119,8 @@
@@ -344,7 +344,7 @@ this.$forceUpdate() }, // 模板下载 handleModule() { - downloadFile('ota/otaBaSjSjyxpg/exportTemplate', '升级影响评估' + '.zip', {}) + downloadFile('ota/otaBaSjSjyxpg/exportTemplate', '升级活动备案-升级影响评估' + '.zip', {}) }, clickButtonToUpload(item) { this.$refs.uploadFile.perentHandleFunc() @@ -426,8 +426,17 @@ this.$forceUpdate() changeQuery(val) { if(val.indexOf('将车辆置于安全状态') != -1 || val.indexOf('Put the vehicle in a safe position') != -1){ this.flag = true + // let long = localStorage.getItem('language') + // let cut = '' + // if (long && long == 'zh-cn') { + this.form.aqjzWbk = '车辆保持在功能受限制状态,此状态下车辆无法行驶,保证其处于安全状态' + // } else if (long && long == 'en-us') { + // this.form.aqjzWbk = 'The vehicle remains in a functionally restricted state, in which the vehicle cannot be driven to ensure that it is in a safe state' + // } + // this.getData() }else{ this.flag = false + this.form.aqjzWbk = '' } }, } diff --git a/jero-web/src/views/otamanagement/upgradeactivityrecord/components/upgradetargetmodel.vue b/jero-web/src/views/otamanagement/upgradeactivityrecord/components/upgradetargetmodel.vue index 177f37626..0e8268fb1 100644 --- a/jero-web/src/views/otamanagement/upgradeactivityrecord/components/upgradetargetmodel.vue +++ b/jero-web/src/views/otamanagement/upgradeactivityrecord/components/upgradetargetmodel.vue @@ -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') @@ -296,6 +296,10 @@ export default { } }) + }else{ + // let otaflag = 3 + this.$message.warning(this.$t('requireddataisnull')) + // localStorage.setItem('otaflag',otaflag) } // else { // this.form.bapc = undefined diff --git a/jero-web/src/views/otamanagement/upgradeactivityrecord/components/usernotification.vue b/jero-web/src/views/otamanagement/upgradeactivityrecord/components/usernotification.vue index 9ce76afaa..6bbe680d2 100644 --- a/jero-web/src/views/otamanagement/upgradeactivityrecord/components/usernotification.vue +++ b/jero-web/src/views/otamanagement/upgradeactivityrecord/components/usernotification.vue @@ -228,7 +228,7 @@ export default { }, methods: {// 模板下载 handleModule() { - downloadFile('ota/otaBaSjGgnrfs/exportTemplate', '用户告知内容及方式' + '.zip', {}) + downloadFile('ota/otaBaSjGgnrfs/exportTemplate', '升级活动备案-用户告知内容及方式' + '.zip', {}) }, /** 上传文件的回调 */ uploadSuccess(data) { diff --git a/jero-web/src/views/otamanagement/upgradeactivityrecord/index.vue b/jero-web/src/views/otamanagement/upgradeactivityrecord/index.vue index adbea406a..bef35b668 100644 --- a/jero-web/src/views/otamanagement/upgradeactivityrecord/index.vue +++ b/jero-web/src/views/otamanagement/upgradeactivityrecord/index.vue @@ -228,7 +228,16 @@ export default { } else if(this.oldName == this.$t('informationaboutotherupgradetasks')){ this.$refs.otherRef.save() } - this.oldName = tab + setTimeout(()=>{ + let otaflag = localStorage.getItem('otaflag') + if(otaflag){ + console.log(otaflag) + this.tabActive = this.$t('upgradetargetmodel') + this.oldName = this.$t('upgradetargetmodel') + } + this.oldName = tab + },1000) + localStorage.removeItem('otaflag') }, handleToggleSearch() { this.toggleSearchStatus = !this.toggleSearchStatus diff --git a/jero-web/src/views/otamanagement/vehicleinformation/components/basicInformation.vue b/jero-web/src/views/otamanagement/vehicleinformation/components/basicInformation.vue index e76322d82..77a4e69c8 100644 --- a/jero-web/src/views/otamanagement/vehicleinformation/components/basicInformation.vue +++ b/jero-web/src/views/otamanagement/vehicleinformation/components/basicInformation.vue @@ -20,7 +20,7 @@ - + {{ item.value }} @@ -33,15 +33,15 @@
{{$t('theNameOfFirm')}}
- + - + :max-length="50" + class="box-input" + :placeholder="$t('pleaseEnter')" + :title='form.qymc' + disabled + v-model="form.qymc"> + @@ -51,15 +51,15 @@ * {{$t('registrationnumber')}} - + + :max-length="50" + :disabled="disabled" + :title='form.djbh' + class="box-input" + :placeholder="$t('pleaseEnter')" + v-model.trim="form.djbh"> @@ -88,13 +88,13 @@ - + :max-length="500" + :disabled="disabled" + :title='form.ggpc' + class="box-input" + :placeholder="$t('pleaseEnter')" + v-model="form.ggpc"> + @@ -105,13 +105,13 @@ - + :max-length="50" + :disabled="disabled" + :title='form.cpsb' + class="box-input" + :placeholder="$t('pleaseEnter')" + v-model="form.cpsb"> + @@ -122,13 +122,13 @@ - + :max-length="50" + :disabled="disabled" + :title='form.cpmc' + class="box-input" + :placeholder="$t('pleaseEnter')" + v-model="form.cpmc"> + @@ -140,13 +140,13 @@ - + :max-length="50" + :disabled="disabled" + :title='form.cpxh' + class="box-input" + :placeholder="$t('pleaseEnter')" + v-model="form.cpxh"> + @@ -155,44 +155,44 @@
{{$t('Vehicledynamictype')}}
- +
- - - - - - - + + + + + + + -
-
- - - {{ item.text }} - + :disabled="disabled" + :dictCode="'vehicle_dynamic_type'" + :placeholder="$t('PleaseSelect')" + :type="'select'" + @input="changeSelect(form.dllx1)" + :triggerChange="false" + v-model="form.dllx1"/> +
+
+ + + {{ item.text }} + - - - - - - - - + + + + + + + + +
- -
+
@@ -202,12 +202,12 @@ + :disabled="disabled" + :dictCode="'communication_terminal'" + :placeholder="$t('PleaseSelect')" + :type="'select'" + :triggerChange="false" + v-model="form.txzd"/> @@ -218,11 +218,11 @@ + /> @@ -237,318 +237,323 @@ \ No newline at end of file diff --git a/jero-web/src/views/otamanagement/vehicleinformation/components/beupgradedonline.vue b/jero-web/src/views/otamanagement/vehicleinformation/components/beupgradedonline.vue index 0daffffe9..c167eeeb1 100644 --- a/jero-web/src/views/otamanagement/vehicleinformation/components/beupgradedonline.vue +++ b/jero-web/src/views/otamanagement/vehicleinformation/components/beupgradedonline.vue @@ -297,7 +297,7 @@ import ImportFile from '@/components/ImportFileData/index' methods: { // 模板下载 handleModule() { - downloadFile('ota/otaBaCxKsjjsmccs/exportTemplate', '可在线升级的驾驶辅助功能名称与参数' + '.zip', {}) + downloadFile('ota/otaBaCxKsjjsmccs/exportTemplate', '车型及功能备案-可在线升级的驾驶辅助功能名称与参数' + '.zip', {}) }, clickButtonToUpload(item) { this.$refs.uploadFile.perentHandleFunc() diff --git a/jero-web/src/views/otamanagement/vehicleinformation/components/recordparameters.vue b/jero-web/src/views/otamanagement/vehicleinformation/components/recordparameters.vue index 07dc0be6a..56603daa1 100644 --- a/jero-web/src/views/otamanagement/vehicleinformation/components/recordparameters.vue +++ b/jero-web/src/views/otamanagement/vehicleinformation/components/recordparameters.vue @@ -863,7 +863,7 @@ export default { methods: { // 模板下载 handleModule() { - downloadFile('ota/otaBaCxJsfzbacs/exportTemplate', '驾驶辅助系统基础备案参数' + '.zip', {}) + downloadFile('ota/otaBaCxJsfzbacs/exportTemplate', '车型及功能备案-驾驶辅助系统基础备案参数' + '.zip', {}) }, getData(){ // if(this.$route.query.type == 1){ diff --git a/jero-web/src/views/otamanagement/vehicleinformation/components/safetyPrecautions.vue b/jero-web/src/views/otamanagement/vehicleinformation/components/safetyPrecautions.vue index 0a195ba8e..329fb4e9b 100644 --- a/jero-web/src/views/otamanagement/vehicleinformation/components/safetyPrecautions.vue +++ b/jero-web/src/views/otamanagement/vehicleinformation/components/safetyPrecautions.vue @@ -191,7 +191,7 @@ import ImportFile from '@/components/ImportFileData/index' // 模板下载 handleModule() { - downloadFile('ota/otaBaCxAqcs/exportTemplate', '安全措施' + '.zip', {}) + downloadFile('ota/otaBaCxAqcs/exportTemplate', '车型及功能备案-安全措施' + '.zip', {}) }, getData(){ let otaIdT=localStorage.getItem('otaIdT') diff --git a/jero-web/src/views/otamanagement/vehicleinformation/components/upgradeRequirements.vue b/jero-web/src/views/otamanagement/vehicleinformation/components/upgradeRequirements.vue index f94553c1b..433756917 100644 --- a/jero-web/src/views/otamanagement/vehicleinformation/components/upgradeRequirements.vue +++ b/jero-web/src/views/otamanagement/vehicleinformation/components/upgradeRequirements.vue @@ -209,7 +209,7 @@ export default { methods: { // 模板下载 handleModule() { - downloadFile('ota/otaBaCxZxsjyq/exportTemplate', '在线升级要求' + '.zip', {}) + downloadFile('ota/otaBaCxZxsjyq/exportTemplate', '车型及功能备案-在线升级要求' + '.zip', {}) }, getData(){ console.log(localStorage.getItem('otaId')); diff --git a/jero-web/src/views/otamanagement/vehicleinformation/components/upgradedonline.vue b/jero-web/src/views/otamanagement/vehicleinformation/components/upgradedonline.vue index 53849ae28..45fb79701 100644 --- a/jero-web/src/views/otamanagement/vehicleinformation/components/upgradedonline.vue +++ b/jero-web/src/views/otamanagement/vehicleinformation/components/upgradedonline.vue @@ -304,7 +304,7 @@ import uploadFileOta from '@/components/uploadFileOta/file' methods: { // 模板下载 handleModule() { - downloadFile('ota/otaBaCxKsjxtmccs/exportTemplate', '可在线升级的系统名称与参数' + '.zip', {}) + downloadFile('ota/otaBaCxKsjxtmccs/exportTemplate', '车型及功能备案-可在线升级的系统名称与参数' + '.zip', {}) }, getData(){ let otaIdT=localStorage.getItem('otaIdT') diff --git a/jero-web/src/views/otamanagement/vehicleinformation/index.vue b/jero-web/src/views/otamanagement/vehicleinformation/index.vue index 7f291a631..cfe55aff3 100644 --- a/jero-web/src/views/otamanagement/vehicleinformation/index.vue +++ b/jero-web/src/views/otamanagement/vehicleinformation/index.vue @@ -7,11 +7,11 @@ {{$t('fillintherecord')}} - - - - - + + + + + @@ -216,7 +216,9 @@ export default { tabClick(tab,event){ this.tabActive=tab if(this.oldName == this.$t('basicinformationofvehicletype')){ + this.$refs.dealtWithRef.save() + } else if(this.oldName == this.$t('onlineupgraderequirements')){ this.$refs.doneListRef.save() } else if(this.oldName == this.$t('safetymeasure')){ @@ -230,7 +232,17 @@ export default { } else if(this.oldName == this.$t('other')){ this.$refs.otherRef.save() } - this.oldName = tab + setTimeout(()=>{ + let otaflag = localStorage.getItem('otaflag') + if(otaflag){ + console.log(otaflag) + this.tabActive = this.$t('basicinformationofvehicletype') + this.oldName = this.$t('basicinformationofvehicletype') + } + this.oldName = tab + },1000) + localStorage.removeItem('otaflag') + }, handleToggleSearch() { this.toggleSearchStatus = !this.toggleSearchStatus @@ -286,44 +298,44 @@ export default { }, basicInformationForm(){ this.tabActive = this.$t('onlineupgraderequirements') - + }, upgradeRequirementsup(){ this.tabActive = this.$t('basicinformationofvehicletype') - + }, upgradeRequirementsdown(){ this.tabActive = this.$t('safetymeasure') }, safetyPrecautionsup(){ this.tabActive = this.$t('onlineupgraderequirements') - + }, safetyPrecautionsdown(){ this.tabActive = this.$t('upgradedonline') }, upgradedonlineup(){ this.tabActive = this.$t('safetymeasure') - + }, upgradedonlinedown(){ this.tabActive = this.$t('beupgradedonline') - + }, beupgradedonlineup(){ this.tabActive = this.$t('upgradedonline') - + }, beupgradedonlinedown(){ this.tabActive = this.$t('recordparameters') - + }, recordparametersup(){ this.tabActive = this.$t('beupgradedonline') }, recordparametersdown(){ this.tabActive = this.$t('other') - + }, otherup(){ this.tabActive = this.$t('recordparameters')