合并分支 'dev_ota_20230515' 到 'master'
Dev ota 20230515 查看合并请求 laws-nio/laws-weilai!327
This commit is contained in:
+7
@@ -61,8 +61,15 @@ public class OtaBaCxTxjlController extends JeroController<OtaBaCxTxjl, IOtaBaCxT
|
||||
return Result.OK(page);
|
||||
}
|
||||
QueryWrapper<OtaBaCxTxjl> 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<OtaBaCxTxjl> pageList = otaBaCxTxjlService.page(page, queryWrapper);
|
||||
this.otaBaCxTxjlService.disposeData(pageList.getRecords(),otaBaCxTxjl.getCut());
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
|
||||
+1
@@ -90,6 +90,7 @@ public class OtaBaSjListController extends JeroController<OtaBaSjList, IOtaBaSjL
|
||||
}
|
||||
queryWrapper.orderByDesc(OtaBaSjList::getCreateTime);
|
||||
IPage<OtaBaSjList> pageList = otaBaSjListService.page(page, queryWrapper);
|
||||
this.otaBaSjListService.disposeData(pageList.getRecords(),otaBaSjList);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
|
||||
+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;
|
||||
|
||||
+31
-14
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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
@@ -65,4 +65,11 @@ public interface IOtaBaCxTxjlService extends IService<OtaBaCxTxjl> {
|
||||
List<OtaBaCxTxjl> queryList();
|
||||
|
||||
List<OtaBaCxTxjl> queryByOtaId(String otaId);
|
||||
|
||||
/**
|
||||
* 处理数据
|
||||
* @param datas
|
||||
* @param cut
|
||||
*/
|
||||
void disposeData(List<OtaBaCxTxjl> datas, String cut);
|
||||
}
|
||||
|
||||
+7
@@ -73,4 +73,11 @@ public interface IOtaBaSjListService extends IService<OtaBaSjList> {
|
||||
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<OtaBaSjList> datas, OtaBaSjList otaBaSjList);
|
||||
}
|
||||
|
||||
+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");
|
||||
|
||||
+10
@@ -6,6 +6,7 @@ import com.jero.modules.ota.entity.OtaBaCxTxjl;
|
||||
import com.jero.modules.ota.enums.OtaModuleEnum;
|
||||
import com.jero.modules.ota.mapper.OtaBaCxTxjlMapper;
|
||||
import com.jero.modules.ota.service.IOtaBaCxTxjlService;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.Date;
|
||||
@@ -129,4 +130,13 @@ public class OtaBaCxTxjlServiceImpl extends ServiceImpl<OtaBaCxTxjlMapper, OtaBa
|
||||
List<OtaBaCxTxjl> res = this.list(queryWrapper);
|
||||
return res;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void disposeData(List<OtaBaCxTxjl> datas, String cut) {
|
||||
if (CollectionUtils.isNotEmpty(datas)) {
|
||||
datas.forEach(data -> {
|
||||
data.setModule(OtaModuleEnum.getNameByValue(data.getModule(),cut));
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+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) {
|
||||
|
||||
+35
-4
@@ -1,13 +1,16 @@
|
||||
package com.jero.modules.ota.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.jero.common.exception.JeroBootException;
|
||||
import com.jero.modules.ota.entity.OtaBaSjList;
|
||||
import com.jero.modules.ota.entity.OtaBaSjLsjl;
|
||||
import com.jero.modules.ota.entity.OtaBaSjQtsjxx;
|
||||
import com.jero.modules.ota.entity.OtaBaSjSjmbcx;
|
||||
import com.jero.modules.ota.mapper.OtaBaSjListMapper;
|
||||
import com.jero.modules.ota.service.*;
|
||||
import com.jero.modules.ota.utils.ImportFileUtil;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
@@ -21,6 +24,7 @@ import java.io.FileOutputStream;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* @Description: 升级备案-升级活动备案列表
|
||||
@@ -194,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);
|
||||
@@ -218,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");
|
||||
@@ -229,4 +233,31 @@ public class OtaBaSjListServiceImpl extends ServiceImpl<OtaBaSjListMapper, OtaBa
|
||||
ImportFileUtil.toZip(exportFile.getCanonicalPath(), fos1, true);
|
||||
ImportFileUtil.exportTemplate(response, outPath);
|
||||
}
|
||||
|
||||
/**
|
||||
* 处理数据
|
||||
* @param datas
|
||||
* @param otaBaSjList
|
||||
*/
|
||||
@Override
|
||||
public void disposeData(List<OtaBaSjList> datas, OtaBaSjList otaBaSjList) {
|
||||
if(CollectionUtils.isNotEmpty(datas)){
|
||||
List<String> otaBaSjListIdList = datas.stream().map(OtaBaSjList::getId).distinct().collect(Collectors.toList());
|
||||
QueryWrapper<OtaBaSjQtsjxx> otaBaSjQtsjxxQueryWrap = new QueryWrapper<>();
|
||||
otaBaSjQtsjxxQueryWrap.lambda().in(OtaBaSjQtsjxx::getOtaId,otaBaSjListIdList);
|
||||
List<OtaBaSjQtsjxx> 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);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+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) {
|
||||
|
||||
+109
-6
@@ -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<OtaBaSjSjxtbhMapper, O
|
||||
@Value(value = "${ota.uploadPath}")
|
||||
private String uploadPath;
|
||||
|
||||
@Autowired
|
||||
private IOtaBaSjSjyxpgService otaBaSjSjyxpgService;
|
||||
|
||||
/**
|
||||
* 保存
|
||||
*/
|
||||
@@ -210,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) {
|
||||
@@ -236,6 +252,21 @@ public class OtaBaSjSjxtbhServiceImpl extends ServiceImpl<OtaBaSjSjxtbhMapper, O
|
||||
Workbook wb = ImportFileUtil.readExcel(upFile);
|
||||
Sheet s = wb.getSheetAt(0);
|
||||
int rows = s.getPhysicalNumberOfRows();
|
||||
|
||||
List<OtaBaSjSjxtbh> otaBaSjSjxtbh = this.getByOtaId(otaId);
|
||||
List<String> oldYjbbList = otaBaSjSjxtbh.stream().map(OtaBaSjSjxtbh::getYjbb).distinct().collect(Collectors.toList());
|
||||
List<String> 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<String> 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<OtaBaSjSjxtbhMapper, O
|
||||
cell = row.getCell(1);
|
||||
xtbh.setSjhbgcs(ImportFileUtil.getCellValue(cell, wb));
|
||||
cell = row.getCell(3);
|
||||
xtbh.setYjbb(ImportFileUtil.getCellValue(cell, wb));
|
||||
String yjbb = ImportFileUtil.getCellValue(cell, wb);
|
||||
if(yjbb.length() > 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<OtaBaSjSjxtbhMapper, O
|
||||
|
||||
list.add(xtbh);
|
||||
}
|
||||
if(CollectionUtils.isNotEmpty(tempFileNames)){
|
||||
List<String> newClfjList = new ArrayList<>();
|
||||
List<String> oldClfjList = new ArrayList<>();
|
||||
OtaBaSjSjyxpg otaBaSjSjyxpg = this.otaBaSjSjyxpgService.queryByOtaId(otaId, null);
|
||||
if(StringUtils.isNotEmpty(otaBaSjSjyxpg.getClfj())){
|
||||
List<OSSFile> 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<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);
|
||||
@@ -336,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();
|
||||
}
|
||||
}
|
||||
|
||||
+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) {
|
||||
|
||||
+1
-1
@@ -91,7 +91,7 @@ public class ComparisonUtil<T> {
|
||||
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;
|
||||
|
||||
+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 {
|
||||
|
||||
+32
-4
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1834,4 +1834,5 @@ module.exports = {
|
||||
deliveryTime:'Delivery Time',
|
||||
expectedDeliveryTime:'Expected Delivery Time',
|
||||
changeAuthor:'Change Author',
|
||||
requireddataisnull:'Required data is null',
|
||||
}
|
||||
@@ -1935,4 +1935,5 @@ module.exports = {
|
||||
deliveryTime:'交付时间',
|
||||
expectedDeliveryTime:'预计交付时间',
|
||||
changeAuthor:'更改作者',
|
||||
requireddataisnull:'必填数据为空',
|
||||
}
|
||||
+1
-1
@@ -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))
|
||||
|
||||
+3
-3
@@ -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 =''
|
||||
|
||||
+1
-1
@@ -239,7 +239,7 @@ export default {
|
||||
methods: {
|
||||
// 模板下载
|
||||
handleModule() {
|
||||
downloadFile('ota/otaBaSjSjxtbh/exportTemplate', '本次升级的系统名称与参数变化' + '.zip', {})
|
||||
downloadFile('ota/otaBaSjSjxtbh/exportTemplate', '升级活动备案-本次升级的系统名称与参数变化' + '.zip', {})
|
||||
},
|
||||
clickButtonToUpload(item) {
|
||||
this.$refs.uploadFile.perentHandleFunc()
|
||||
|
||||
+12
-3
@@ -119,8 +119,8 @@
|
||||
</div>
|
||||
<div v-if='flag'>
|
||||
<a-input class="box-input2"
|
||||
v-model="form.wbk"
|
||||
:title="form.wbk ? form.wbk : $t('PleaseEnter')"
|
||||
v-model="form.aqjzWbk"
|
||||
:title="form.aqjzWbk ? form.aqjzWbk : $t('PleaseEnter')"
|
||||
:placeholder="$t('PleaseEnter')"></a-input>
|
||||
</div>
|
||||
</td>
|
||||
@@ -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 = ''
|
||||
}
|
||||
},
|
||||
}
|
||||
|
||||
+5
-1
@@ -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
|
||||
|
||||
+1
-1
@@ -228,7 +228,7 @@ export default {
|
||||
},
|
||||
methods: {// 模板下载
|
||||
handleModule() {
|
||||
downloadFile('ota/otaBaSjGgnrfs/exportTemplate', '用户告知内容及方式' + '.zip', {})
|
||||
downloadFile('ota/otaBaSjGgnrfs/exportTemplate', '升级活动备案-用户告知内容及方式' + '.zip', {})
|
||||
},
|
||||
/** 上传文件的回调 */
|
||||
uploadSuccess(data) {
|
||||
|
||||
@@ -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
|
||||
|
||||
+373
-368
@@ -20,7 +20,7 @@
|
||||
</div>
|
||||
<a-form-model-item class="itemModel" prop="dutyTerritory">
|
||||
|
||||
<a-select :disabled="disabled" class="box-input" v-model="form.cxmb" allowClear :placeholder="$t('PleaseSelect')" @change="changeId">
|
||||
<a-select :disabled="disabled" class="box-input" v-model="form.cxmb" allowClear :placeholder="$t('PleaseSelect')" @change="changeId">
|
||||
<a-select-option v-for="(item , key ) in selectList" :key="key" :value="item.id" >
|
||||
{{ item.value }}
|
||||
</a-select-option>
|
||||
@@ -33,15 +33,15 @@
|
||||
<div class="title-text-add">
|
||||
<span class="title-text-text" :title="$t('theNameOfFirm')">{{$t('theNameOfFirm')}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel">
|
||||
<a-form-model-item class="itemModel">
|
||||
<a-input
|
||||
:max-length="50"
|
||||
class="box-input"
|
||||
:placeholder="$t('pleaseEnter')"
|
||||
:title='form.qymc'
|
||||
disabled
|
||||
v-model="form.qymc">
|
||||
</a-input>
|
||||
:max-length="50"
|
||||
class="box-input"
|
||||
:placeholder="$t('pleaseEnter')"
|
||||
:title='form.qymc'
|
||||
disabled
|
||||
v-model="form.qymc">
|
||||
</a-input>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
</a-col>
|
||||
@@ -51,15 +51,15 @@
|
||||
<span class="Required">*</span>
|
||||
<span class="title-text-text" :title="$t('registrationnumber')">{{$t('registrationnumber')}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel" prop="djbh">
|
||||
<a-form-model-item class="itemModel" prop="djbh">
|
||||
|
||||
<a-input
|
||||
:max-length="50"
|
||||
:disabled="disabled"
|
||||
:title='form.djbh'
|
||||
class="box-input"
|
||||
:placeholder="$t('pleaseEnter')"
|
||||
v-model.trim="form.djbh">
|
||||
:max-length="50"
|
||||
:disabled="disabled"
|
||||
:title='form.djbh'
|
||||
class="box-input"
|
||||
:placeholder="$t('pleaseEnter')"
|
||||
v-model.trim="form.djbh">
|
||||
</a-input>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
@@ -88,13 +88,13 @@
|
||||
</div>
|
||||
<a-form-model-item class="itemModel" prop="dutyTerritory">
|
||||
<a-input
|
||||
:max-length="500"
|
||||
:disabled="disabled"
|
||||
:title='form.ggpc'
|
||||
class="box-input"
|
||||
:placeholder="$t('pleaseEnter')"
|
||||
v-model="form.ggpc">
|
||||
</a-input>
|
||||
:max-length="500"
|
||||
:disabled="disabled"
|
||||
:title='form.ggpc'
|
||||
class="box-input"
|
||||
:placeholder="$t('pleaseEnter')"
|
||||
v-model="form.ggpc">
|
||||
</a-input>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
</a-col>
|
||||
@@ -105,13 +105,13 @@
|
||||
</div>
|
||||
<a-form-model-item class="itemModel">
|
||||
<a-input
|
||||
:max-length="50"
|
||||
:disabled="disabled"
|
||||
:title='form.cpsb'
|
||||
class="box-input"
|
||||
:placeholder="$t('pleaseEnter')"
|
||||
v-model="form.cpsb">
|
||||
</a-input>
|
||||
:max-length="50"
|
||||
:disabled="disabled"
|
||||
:title='form.cpsb'
|
||||
class="box-input"
|
||||
:placeholder="$t('pleaseEnter')"
|
||||
v-model="form.cpsb">
|
||||
</a-input>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
</a-col>
|
||||
@@ -122,13 +122,13 @@
|
||||
</div>
|
||||
<a-form-model-item class="itemModel">
|
||||
<a-input
|
||||
:max-length="50"
|
||||
:disabled="disabled"
|
||||
:title='form.cpmc'
|
||||
class="box-input"
|
||||
:placeholder="$t('pleaseEnter')"
|
||||
v-model="form.cpmc">
|
||||
</a-input>
|
||||
:max-length="50"
|
||||
:disabled="disabled"
|
||||
:title='form.cpmc'
|
||||
class="box-input"
|
||||
:placeholder="$t('pleaseEnter')"
|
||||
v-model="form.cpmc">
|
||||
</a-input>
|
||||
</a-form-model-item>
|
||||
|
||||
</div>
|
||||
@@ -140,13 +140,13 @@
|
||||
</div>
|
||||
<a-form-model-item class="itemModel">
|
||||
<a-input
|
||||
:max-length="50"
|
||||
:disabled="disabled"
|
||||
:title='form.cpxh'
|
||||
class="box-input"
|
||||
:placeholder="$t('pleaseEnter')"
|
||||
v-model="form.cpxh">
|
||||
</a-input>
|
||||
:max-length="50"
|
||||
:disabled="disabled"
|
||||
:title='form.cpxh'
|
||||
class="box-input"
|
||||
:placeholder="$t('pleaseEnter')"
|
||||
v-model="form.cpxh">
|
||||
</a-input>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
</a-col>
|
||||
@@ -155,44 +155,44 @@
|
||||
<div class="title-text-add">
|
||||
<span class="title-text-text plus3" :title="$t('Vehicledynamictype')">{{$t('Vehicledynamictype')}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel">
|
||||
<a-form-model-item class="itemModel">
|
||||
<div style="display:flex;flex-wrap: nowrap;width: 100%;">
|
||||
<div style="width: 90%;margin-right: 20px;">
|
||||
<!-- <a-select class="box-input" style="width: 100%;" v-model="form.dllx1" allowClear :disabled="disabled" :placeholder="$t('PleaseSelect')" @change="changeSelect($event,target)">-->
|
||||
<!-- <a-select-option v-for="(item, key) in projectNameList1"-->
|
||||
<!-- :key="key"-->
|
||||
<!-- :value="item">-->
|
||||
<!-- {{ item }}-->
|
||||
<!-- </a-select-option>-->
|
||||
<!-- </a-select>-->
|
||||
<!-- <a-select class="box-input" style="width: 100%;" v-model="form.dllx1" allowClear :disabled="disabled" :placeholder="$t('PleaseSelect')" @change="changeSelect($event,target)">-->
|
||||
<!-- <a-select-option v-for="(item, key) in projectNameList1"-->
|
||||
<!-- :key="key"-->
|
||||
<!-- :value="item">-->
|
||||
<!-- {{ item }}-->
|
||||
<!-- </a-select-option>-->
|
||||
<!-- </a-select>-->
|
||||
<j-dict-select-tag class="box-input"
|
||||
:disabled="disabled"
|
||||
:dictCode="'vehicle_dynamic_type'"
|
||||
:placeholder="$t('PleaseSelect')"
|
||||
:type="'select'"
|
||||
@input="changeSelect(form.dllx1)"
|
||||
:triggerChange="false"
|
||||
v-model="form.dllx1"/>
|
||||
</div>
|
||||
<div style="width: 100%;">
|
||||
<a-select v-model="form.dllx2" class="box-input" allowClear :disabled="disabled" :placeholder="$t('PleaseSelect')" @change="update">
|
||||
<a-select-option v-for="(item, key) in projectNameList2"
|
||||
:key="item.value"
|
||||
:value="item.value">
|
||||
{{ item.text }}
|
||||
</a-select-option>
|
||||
:disabled="disabled"
|
||||
:dictCode="'vehicle_dynamic_type'"
|
||||
:placeholder="$t('PleaseSelect')"
|
||||
:type="'select'"
|
||||
@input="changeSelect(form.dllx1)"
|
||||
:triggerChange="false"
|
||||
v-model="form.dllx1"/>
|
||||
</div>
|
||||
<div style="width: 100%;">
|
||||
<a-select v-model="form.dllx2" class="box-input" allowClear :disabled="disabled" :placeholder="$t('PleaseSelect')" @change="update">
|
||||
<a-select-option v-for="(item, key) in projectNameList2"
|
||||
:key="item.value"
|
||||
:value="item.value">
|
||||
{{ item.text }}
|
||||
</a-select-option>
|
||||
|
||||
</a-select>
|
||||
<!-- <j-dict-select-tag class="box-input"-->
|
||||
<!-- :disabled="disabled"-->
|
||||
<!-- :dictCode="dictCodedllx"-->
|
||||
<!-- :placeholder="$t('PleaseSelect')"-->
|
||||
<!-- :type="'select'"-->
|
||||
<!-- :triggerChange="false"-->
|
||||
<!-- v-model="form.dllx2"/>-->
|
||||
</a-select>
|
||||
<!-- <j-dict-select-tag class="box-input"-->
|
||||
<!-- :disabled="disabled"-->
|
||||
<!-- :dictCode="dictCodedllx"-->
|
||||
<!-- :placeholder="$t('PleaseSelect')"-->
|
||||
<!-- :type="'select'"-->
|
||||
<!-- :triggerChange="false"-->
|
||||
<!-- v-model="form.dllx2"/>-->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</a-form-model-item>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
@@ -202,12 +202,12 @@
|
||||
</div>
|
||||
<a-form-model-item class="itemModel">
|
||||
<j-multi-select-tag class="box-input"
|
||||
:disabled="disabled"
|
||||
:dictCode="'communication_terminal'"
|
||||
:placeholder="$t('PleaseSelect')"
|
||||
:type="'select'"
|
||||
:triggerChange="false"
|
||||
v-model="form.txzd"/>
|
||||
:disabled="disabled"
|
||||
:dictCode="'communication_terminal'"
|
||||
:placeholder="$t('PleaseSelect')"
|
||||
:type="'select'"
|
||||
:triggerChange="false"
|
||||
v-model="form.txzd"/>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
</a-col>
|
||||
@@ -218,11 +218,11 @@
|
||||
</div>
|
||||
<a-form-model-item class="itemModel">
|
||||
<a-textarea
|
||||
:max-length="500"
|
||||
:max-length="500"
|
||||
:placeholder="$t('pleaseStateTheDistribution')"
|
||||
:rows="4"
|
||||
v-model="form.cdotasj"
|
||||
/>
|
||||
/>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
</a-col>
|
||||
@@ -237,318 +237,323 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getAction, postAction, deleteAction,downloadFile } from '@/api/manage'
|
||||
import ImportFile from '@/components/ImportFileData/index'
|
||||
import { getAction, postAction, deleteAction,downloadFile } from '@/api/manage'
|
||||
import ImportFile from '@/components/ImportFileData/index'
|
||||
import { message } from 'ant-design-vue'
|
||||
|
||||
export default {
|
||||
name: 'basicInformation',
|
||||
components:{
|
||||
ImportFile
|
||||
},
|
||||
// props:['otaId'],
|
||||
data() {
|
||||
return {
|
||||
confirmLoading: false,
|
||||
disabled: false,
|
||||
formInline:{},
|
||||
projectNameList:[],
|
||||
formRules:[],
|
||||
flag:'',
|
||||
dictCodedllx:'',
|
||||
url: {
|
||||
exportData: '/ota/otaBaCxJbxx/exportData',
|
||||
importZipUrl: '/ota/otaBaCxJbxx/importData?otaId=' + localStorage.getItem('otaId'),//导入
|
||||
},
|
||||
form:{
|
||||
cxmb:undefined,
|
||||
txzd:'',
|
||||
djbh:'',
|
||||
qymc:'安徽江淮汽车集团股份有限公司',
|
||||
cplb:undefined,
|
||||
cpsb:'',
|
||||
ggpc:'',
|
||||
cpmc:'',
|
||||
cpxh:'',
|
||||
dllx1:undefined,
|
||||
dllx2:undefined,
|
||||
cdotasj:'',
|
||||
},
|
||||
projectNameList1:['传统动力汽车','节能汽车','新能源汽车','其他'],
|
||||
projectNameList2:[],
|
||||
selectList:[],
|
||||
otaId:'',
|
||||
rules:{
|
||||
djbh:[
|
||||
{
|
||||
required: true,
|
||||
message:this.$t('registrationnumber')+this.$t('cannotEmpty'),
|
||||
trigger:'blur'
|
||||
}
|
||||
]
|
||||
}
|
||||
export default {
|
||||
name: 'basicInformation',
|
||||
components:{
|
||||
ImportFile
|
||||
},
|
||||
// props:['otaId'],
|
||||
data() {
|
||||
return {
|
||||
confirmLoading: false,
|
||||
disabled: false,
|
||||
formInline:{},
|
||||
projectNameList:[],
|
||||
formRules:[],
|
||||
flag:'',
|
||||
dictCodedllx:'',
|
||||
url: {
|
||||
exportData: '/ota/otaBaCxJbxx/exportData',
|
||||
importZipUrl: '/ota/otaBaCxJbxx/importData?otaId=' + localStorage.getItem('otaId'),//导入
|
||||
},
|
||||
form:{
|
||||
cxmb:undefined,
|
||||
txzd:'',
|
||||
djbh:'',
|
||||
qymc:'安徽江淮汽车集团股份有限公司',
|
||||
cplb:undefined,
|
||||
cpsb:'',
|
||||
ggpc:'',
|
||||
cpmc:'',
|
||||
cpxh:'',
|
||||
dllx1:undefined,
|
||||
dllx2:undefined,
|
||||
cdotasj:'',
|
||||
},
|
||||
projectNameList1:['传统动力汽车','节能汽车','新能源汽车','其他'],
|
||||
projectNameList2:[],
|
||||
selectList:[],
|
||||
otaId:'',
|
||||
rules:{
|
||||
djbh:[
|
||||
{
|
||||
required: true,
|
||||
message:this.$t('registrationnumber')+this.$t('cannotEmpty'),
|
||||
trigger:'blur'
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$forceUpdate()
|
||||
this.getSelect()
|
||||
this.getData()
|
||||
},
|
||||
methods: {
|
||||
changeId(value,option){
|
||||
localStorage.removeItem('otaId')
|
||||
localStorage.removeItem('otaIdT')
|
||||
localStorage.setItem('otaIdT',value)
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$forceUpdate()
|
||||
this.getSelect()
|
||||
this.getData()
|
||||
},
|
||||
methods: {
|
||||
changeId(value,option){
|
||||
localStorage.removeItem('otaId')
|
||||
localStorage.removeItem('otaIdT')
|
||||
localStorage.setItem('otaIdT',value)
|
||||
|
||||
this.getData('qiehuan')
|
||||
},
|
||||
// 模板下载
|
||||
handleModule() {
|
||||
downloadFile('ota/otaBaCxJbxx/exportTemplate', '车型基本信息' + '.zip', {})
|
||||
},
|
||||
getSelect(){
|
||||
getAction('/ota/otaBaCxList/list').then(res=>{
|
||||
if(res.code==200){
|
||||
this.selectList=[]
|
||||
res.result.forEach(item=>{
|
||||
let obj={}
|
||||
obj.id=item.id
|
||||
if(item.cpmc==null){
|
||||
item.cpmc=''
|
||||
}
|
||||
if(item.cpxh==null){
|
||||
item.cpxh=''
|
||||
}
|
||||
obj.value=item.cpdjbh+'-'+item.ggpc+'-'+item.cpxh
|
||||
this.selectList.push(obj)
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
getData(item){
|
||||
let otaIdT=localStorage.getItem('otaIdT')
|
||||
if(otaIdT==null){
|
||||
otaIdT=''
|
||||
this.getData('qiehuan')
|
||||
},
|
||||
// 模板下载
|
||||
handleModule() {
|
||||
downloadFile('ota/otaBaCxJbxx/exportTemplate', '车型及功能备案-车型基本信息' + '.zip', {})
|
||||
},
|
||||
getSelect(){
|
||||
getAction('/ota/otaBaCxList/list').then(res=>{
|
||||
if(res.code==200){
|
||||
this.selectList=[]
|
||||
res.result.forEach(item=>{
|
||||
let obj={}
|
||||
obj.id=item.id
|
||||
if(item.cpmc==null){
|
||||
item.cpmc=''
|
||||
}
|
||||
if(item.cpxh==null){
|
||||
item.cpxh=''
|
||||
}
|
||||
obj.value=item.cpdjbh+'-'+item.ggpc+'-'+item.cpxh
|
||||
this.selectList.push(obj)
|
||||
})
|
||||
}
|
||||
let otaId=localStorage.getItem('otaId')
|
||||
if(otaId==null){
|
||||
otaId=''
|
||||
}
|
||||
getAction('/ota/otaBaCxJbxx/queryByOtaId',{otaIdT:otaIdT,otaId:otaId}).then(res=>{
|
||||
if(res.code == 200){
|
||||
this.form.qymc=res.result.qymc
|
||||
this.form.djbh=res.result.djbh
|
||||
this.form.cplb=res.result.cplb
|
||||
this.form.ggpc=res.result.ggpc
|
||||
this.form.cpsb=res.result.cpsb
|
||||
this.form.cpmc=res.result.cpmc
|
||||
this.form.cpxh=res.result.cpxh
|
||||
this.form.txzd=res.result.txzd
|
||||
this.form.txzd=res.result.txzd
|
||||
this.form.cdotasj=res.result.cdotasj
|
||||
this.form.id=res.result.id
|
||||
if(this.$route.query.type == 1 && res.result.cxmb == null && !item){
|
||||
this.form.cxmb = this.form.djbh+'-'+ this.form.ggpc+'-'+this.form.cpxh
|
||||
}else {
|
||||
})
|
||||
},
|
||||
getData(item){
|
||||
let otaIdT=localStorage.getItem('otaIdT')
|
||||
if(otaIdT==null){
|
||||
otaIdT=''
|
||||
}
|
||||
let otaId=localStorage.getItem('otaId')
|
||||
if(otaId==null){
|
||||
otaId=''
|
||||
}
|
||||
getAction('/ota/otaBaCxJbxx/queryByOtaId',{otaIdT:otaIdT,otaId:otaId}).then(res=>{
|
||||
if(res.code == 200){
|
||||
this.form.qymc=res.result.qymc
|
||||
this.form.djbh=res.result.djbh
|
||||
this.form.cplb=res.result.cplb
|
||||
this.form.ggpc=res.result.ggpc
|
||||
this.form.cpsb=res.result.cpsb
|
||||
this.form.cpmc=res.result.cpmc
|
||||
this.form.cpxh=res.result.cpxh
|
||||
this.form.txzd=res.result.txzd
|
||||
this.form.txzd=res.result.txzd
|
||||
this.form.cdotasj=res.result.cdotasj
|
||||
this.form.id=res.result.id
|
||||
if(this.$route.query.type == 1 && res.result.cxmb == null && !item){
|
||||
this.form.cxmb = this.form.djbh+'-'+ this.form.ggpc+'-'+this.form.cpxh
|
||||
}else {
|
||||
if(this.$route.query.type == 2 && res.result.cxmb == null && !item){
|
||||
// this.form.cxmb = res.result.cxmb ? res.result.cxmb : this.form.djbh+'-'+ this.form.ggpc+'-'+this.form.cpxh
|
||||
this.form.cxmb = res.result.cxmb ? res.result.cxmb : undefined
|
||||
}else{
|
||||
this.form.cxmb = res.result.cxmb ? res.result.cxmb : this.form.djbh+'-'+ this.form.ggpc+'-'+this.form.cpxh
|
||||
}
|
||||
}
|
||||
if(res.result.dllx1 == '' || res.result.dllx1 == null){
|
||||
res.result.dllx1 = undefined
|
||||
}
|
||||
if(res.result.dllx2 == '' || res.result.dllx2 == null){
|
||||
res.result.dllx2 = undefined
|
||||
}
|
||||
|
||||
if(res.result.cplb == ''){
|
||||
res.result.cplb = undefined
|
||||
}
|
||||
if(res.result.qymc == null){
|
||||
res.result.qymc = '安徽江淮汽车集团股份有限公司'
|
||||
}
|
||||
this.form.dllx1=res.result.dllx1
|
||||
this.form.dllx2=res.result.dllx2
|
||||
this.form.cplb=res.result.cplb
|
||||
this.getDllx2()
|
||||
// this.changeSelect()
|
||||
this.$forceUpdate()
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
},
|
||||
next(){
|
||||
this.$refs.ruleForm.validate(valid=>{
|
||||
if(valid){
|
||||
this.save()
|
||||
setTimeout(()=>{
|
||||
if(this.flag == 1){
|
||||
return
|
||||
}
|
||||
this.$emit('basicInformationForm')
|
||||
},1000)
|
||||
|
||||
}
|
||||
})
|
||||
if(res.result.dllx1 == '' || res.result.dllx1 == null){
|
||||
res.result.dllx1 = undefined
|
||||
}
|
||||
if(res.result.dllx2 == '' || res.result.dllx2 == null){
|
||||
res.result.dllx2 = undefined
|
||||
}
|
||||
|
||||
},
|
||||
save(){
|
||||
this.$refs.ruleForm.validate(valid=>{
|
||||
if(valid){
|
||||
let otaId = localStorage.getItem('otaId')
|
||||
if(otaId==null || otaId == undefined){
|
||||
otaId=''
|
||||
if(res.result.cplb == ''){
|
||||
res.result.cplb = undefined
|
||||
}
|
||||
if(res.result.qymc == null){
|
||||
res.result.qymc = '安徽江淮汽车集团股份有限公司'
|
||||
}
|
||||
this.form.dllx1=res.result.dllx1
|
||||
this.form.dllx2=res.result.dllx2
|
||||
this.form.cplb=res.result.cplb
|
||||
this.getDllx2()
|
||||
// this.changeSelect()
|
||||
this.$forceUpdate()
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
},
|
||||
next(){
|
||||
this.$refs.ruleForm.validate(valid=>{
|
||||
if(valid){
|
||||
this.save()
|
||||
setTimeout(()=>{
|
||||
if(this.flag == 1){
|
||||
return
|
||||
}
|
||||
postAction('/ota/otaBaCxJbxx/add',{ otaId:otaId,...this.form}).then( res => {
|
||||
if(res.success){
|
||||
this.flag = 2
|
||||
localStorage.setItem('otaId', res.result.otaId)
|
||||
this.$message.success(res.message)
|
||||
this.getData()
|
||||
}else{
|
||||
this.$message.warning(res.message)
|
||||
this.flag = 1
|
||||
}
|
||||
})
|
||||
this.$emit('basicInformationForm')
|
||||
},1000)
|
||||
|
||||
}
|
||||
})
|
||||
|
||||
},
|
||||
save(){
|
||||
this.$refs.ruleForm.validate(valid=>{
|
||||
if(valid){
|
||||
let otaId = localStorage.getItem('otaId')
|
||||
if(otaId==null || otaId == undefined){
|
||||
otaId=''
|
||||
}
|
||||
})
|
||||
},
|
||||
changeSelect(target){
|
||||
this.form.dllx2=undefined
|
||||
let list = []
|
||||
getAction('sys/dict/getDictItems/vehicle_dynamic_type1', { }).then((res) => {
|
||||
if (res.success) {
|
||||
res.result.forEach((item,index) => {
|
||||
let w = item.value
|
||||
let a = w.indexOf("-")
|
||||
let l = w.substring(0,a)
|
||||
if(target == l){
|
||||
list.push(item)
|
||||
}
|
||||
})
|
||||
this.projectNameList2 = list
|
||||
}
|
||||
})
|
||||
},
|
||||
getDllx2(){
|
||||
let list = []
|
||||
getAction('sys/dict/getDictItems/vehicle_dynamic_type1', { }).then((res) => {
|
||||
if (res.success) {
|
||||
res.result.forEach((item,index) => {
|
||||
let w = item.value
|
||||
let a = w.indexOf("-")
|
||||
let l = w.substring(0,a)
|
||||
if(this.form.dllx1==undefined){
|
||||
this.projectNameList=[]
|
||||
}
|
||||
if(this.form.dllx1 == l){
|
||||
list.push(item)
|
||||
}
|
||||
})
|
||||
this.projectNameList2 = list
|
||||
}
|
||||
})
|
||||
},
|
||||
update(){
|
||||
this.$forceUpdate()
|
||||
}
|
||||
postAction('/ota/otaBaCxJbxx/add',{ otaId:otaId,...this.form}).then( res => {
|
||||
if(res.success){
|
||||
this.flag = 2
|
||||
localStorage.setItem('otaId', res.result.otaId)
|
||||
this.$message.success(res.message)
|
||||
this.getData()
|
||||
}else{
|
||||
this.$message.warning(res.message)
|
||||
this.flag = 1
|
||||
localStorage.setItem('otaflag',this.flag)
|
||||
}
|
||||
})
|
||||
}else{
|
||||
// let otaflag = 3
|
||||
this.$message.warning(this.$t('requireddataisnull'))
|
||||
// localStorage.setItem('otaflag',otaflag)
|
||||
}
|
||||
})
|
||||
},
|
||||
changeSelect(target){
|
||||
this.form.dllx2=undefined
|
||||
let list = []
|
||||
getAction('sys/dict/getDictItems/vehicle_dynamic_type1', { }).then((res) => {
|
||||
if (res.success) {
|
||||
res.result.forEach((item,index) => {
|
||||
let w = item.value
|
||||
let a = w.indexOf("-")
|
||||
let l = w.substring(0,a)
|
||||
if(target == l){
|
||||
list.push(item)
|
||||
}
|
||||
})
|
||||
this.projectNameList2 = list
|
||||
}
|
||||
})
|
||||
},
|
||||
getDllx2(){
|
||||
let list = []
|
||||
getAction('sys/dict/getDictItems/vehicle_dynamic_type1', { }).then((res) => {
|
||||
if (res.success) {
|
||||
res.result.forEach((item,index) => {
|
||||
let w = item.value
|
||||
let a = w.indexOf("-")
|
||||
let l = w.substring(0,a)
|
||||
if(this.form.dllx1==undefined){
|
||||
this.projectNameList=[]
|
||||
}
|
||||
if(this.form.dllx1 == l){
|
||||
list.push(item)
|
||||
}
|
||||
})
|
||||
this.projectNameList2 = list
|
||||
}
|
||||
})
|
||||
},
|
||||
update(){
|
||||
this.$forceUpdate()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
@import'~@assets/less/common.less';
|
||||
.box {
|
||||
padding: 0 24px 24px 24px;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
@import'~@assets/less/common.less';
|
||||
.box {
|
||||
padding: 0 24px 24px 24px;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.box-title-text-add {
|
||||
line-height: 1.4;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
.box-title-text-add {
|
||||
line-height: 1.4;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.title-text-add {
|
||||
width: 114px;
|
||||
text-align: right;
|
||||
display: inline-block;
|
||||
font-weight: 500;
|
||||
font-size: 14px;
|
||||
margin-right: 16px;
|
||||
// overflow: hidden;
|
||||
// text-overflow: ellipsis;
|
||||
// white-space: nowrap;
|
||||
height: 42px;
|
||||
//line-height: 42px;
|
||||
margin-top: 3px;
|
||||
}
|
||||
.title-text-add {
|
||||
width: 114px;
|
||||
text-align: right;
|
||||
display: inline-block;
|
||||
font-weight: 500;
|
||||
font-size: 14px;
|
||||
margin-right: 16px;
|
||||
// overflow: hidden;
|
||||
// text-overflow: ellipsis;
|
||||
// white-space: nowrap;
|
||||
height: 42px;
|
||||
//line-height: 42px;
|
||||
margin-top: 3px;
|
||||
}
|
||||
|
||||
.title-text-add-input {
|
||||
width: 80%;
|
||||
display: inline-block;
|
||||
font-weight: 500;
|
||||
font-size: 14px;
|
||||
margin-right: 16px;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
height: 42px;
|
||||
//line-height: 42px;
|
||||
margin-top: 3px;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
.title-text-add-input {
|
||||
width: 80%;
|
||||
display: inline-block;
|
||||
font-weight: 500;
|
||||
font-size: 14px;
|
||||
margin-right: 16px;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
height: 42px;
|
||||
//line-height: 42px;
|
||||
margin-top: 3px;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.title-text-text {
|
||||
margin-top: 9px;
|
||||
}
|
||||
.title-text-text {
|
||||
margin-top: 9px;
|
||||
}
|
||||
|
||||
.itemModel {
|
||||
width: calc(100% - 130px);
|
||||
display: inline-block;
|
||||
margin-top: 2px;
|
||||
}
|
||||
// .itemModel-input{
|
||||
// width: calc(100% + 10px);
|
||||
// display: inline-block;
|
||||
// margin-top: 2px;
|
||||
// }
|
||||
.box-input {
|
||||
display: inline-block;
|
||||
width: 100%;
|
||||
height: 38px;
|
||||
margin-top: 2px;
|
||||
}
|
||||
.itemModel {
|
||||
width: calc(100% - 130px);
|
||||
display: inline-block;
|
||||
margin-top: 2px;
|
||||
}
|
||||
// .itemModel-input{
|
||||
// width: calc(100% + 10px);
|
||||
// display: inline-block;
|
||||
// margin-top: 2px;
|
||||
// }
|
||||
.box-input {
|
||||
display: inline-block;
|
||||
width: 100%;
|
||||
height: 38px;
|
||||
margin-top: 2px;
|
||||
}
|
||||
|
||||
.formAdd {
|
||||
margin: 0 auto;
|
||||
width: 670px;
|
||||
}
|
||||
.formAdd {
|
||||
margin: 0 auto;
|
||||
width: 670px;
|
||||
}
|
||||
|
||||
.bootom-button{
|
||||
text-align: center!important;
|
||||
}
|
||||
// /deep/ .ant-input{
|
||||
// width: calc(100%+20px);
|
||||
// }
|
||||
.Required {
|
||||
.bootom-button{
|
||||
text-align: center!important;
|
||||
}
|
||||
// /deep/ .ant-input{
|
||||
// width: calc(100%+20px);
|
||||
// }
|
||||
.Required {
|
||||
color: red;
|
||||
margin-right: 3px;
|
||||
}
|
||||
.plus{
|
||||
margin-top: 5px;
|
||||
line-height: 1.2;
|
||||
}
|
||||
.plus2{
|
||||
width: 134px;
|
||||
margin-top: 5px;
|
||||
line-height: 1.2;
|
||||
}
|
||||
.plus3{
|
||||
word-break: break-word;
|
||||
}
|
||||
margin-top: 5px;
|
||||
line-height: 1.2;
|
||||
}
|
||||
.plus2{
|
||||
width: 134px;
|
||||
margin-top: 5px;
|
||||
line-height: 1.2;
|
||||
}
|
||||
.plus3{
|
||||
word-break: break-word;
|
||||
}
|
||||
</style>
|
||||
@@ -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()
|
||||
|
||||
@@ -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){
|
||||
|
||||
+1
-1
@@ -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')
|
||||
|
||||
+1
-1
@@ -209,7 +209,7 @@ export default {
|
||||
methods: {
|
||||
// 模板下载
|
||||
handleModule() {
|
||||
downloadFile('ota/otaBaCxZxsjyq/exportTemplate', '在线升级要求' + '.zip', {})
|
||||
downloadFile('ota/otaBaCxZxsjyq/exportTemplate', '车型及功能备案-在线升级要求' + '.zip', {})
|
||||
},
|
||||
getData(){
|
||||
console.log(localStorage.getItem('otaId'));
|
||||
|
||||
@@ -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')
|
||||
|
||||
@@ -7,11 +7,11 @@
|
||||
<a-icon type="form"/>
|
||||
{{$t('fillintherecord')}}
|
||||
</div>
|
||||
<!-- <div @click="historicalrecordClick"-->
|
||||
<!-- class="operator-text">-->
|
||||
<!-- <a-icon type="copy"/>-->
|
||||
<!-- {{$t('historicalrecord')}}-->
|
||||
<!-- </div>-->
|
||||
<!-- <div @click="historicalrecordClick"-->
|
||||
<!-- class="operator-text">-->
|
||||
<!-- <a-icon type="copy"/>-->
|
||||
<!-- {{$t('historicalrecord')}}-->
|
||||
<!-- </div>-->
|
||||
</div>
|
||||
<a-tabs class="tabs" v-model="tabActive" @change="callback" @tabClick="tabClick">
|
||||
<a-tab-pane :key="$t('basicinformationofvehicletype')" :tab="$t('basicinformationofvehicletype')">
|
||||
@@ -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')
|
||||
|
||||
Reference in New Issue
Block a user