Merge remote-tracking branch 'origin/dev_2nd_LCYH' into dev_2nd_LCYH
This commit is contained in:
+1
-1
@@ -183,7 +183,7 @@ public enum OtaTitleEnum {
|
||||
CSRJSJ("csrjsj", "初始软件包的完整性数据", "0", "", 500),
|
||||
SJBYZSJ("sjbyzsj", "升级包完整性验证数据", "0", "", 500),
|
||||
SJBDX("sjbdx", "升级包大小", "0", "", 50),
|
||||
SFCFSJ("sfcfsj", "是否差分升级", "0", "", 50),
|
||||
SFCFSJ("sfcfsj", "是否差分升级", "2", "", 0),
|
||||
SJMDLX("sjmdlx", "升级目的类型", "0", "", 50),
|
||||
GNBGMS("gnbgms", "功能变更描述", "0", "", 500),
|
||||
SYTJBG("sytjbg", "适用条件变更", "0", "", 500),
|
||||
|
||||
+26
-7
@@ -74,6 +74,9 @@ public class OtaBaSjSjxtbhServiceImpl extends ServiceImpl<OtaBaSjSjxtbhMapper, O
|
||||
String otaId = (String) json.get("otaId");
|
||||
if (StringUtils.isNotEmpty(otaId)) {
|
||||
oldList = getByOtaId(otaId);
|
||||
if (ObjectUtils.isEmpty(oldList)) {
|
||||
oldList = setDefault(otaId);
|
||||
}
|
||||
deleteByOtaId(otaId);
|
||||
JSONArray list = json.getJSONArray("list");
|
||||
if (null != list) {
|
||||
@@ -111,6 +114,19 @@ public class OtaBaSjSjxtbhServiceImpl extends ServiceImpl<OtaBaSjSjxtbhMapper, O
|
||||
}
|
||||
}
|
||||
|
||||
public List<OtaBaSjSjxtbh> setDefault(String otaId) {
|
||||
List<OtaBaSjSjxtbh> list = this.getByOtaId(otaId);
|
||||
Date now = new Date();
|
||||
OtaBaSjSjxtbh bh = new OtaBaSjSjxtbh();
|
||||
bh.setOtaId(otaId);
|
||||
bh.setSjkzqmc("ADC ADAS主控制器");
|
||||
bh.setCreateTime(now);
|
||||
bh.setId(UUID.randomUUID().toString().replace("-", ""));
|
||||
list.add(bh);
|
||||
saveBatch(list);
|
||||
return list;
|
||||
}
|
||||
|
||||
public void deleteByOtaId(String otaId) {
|
||||
List<OtaBaSjSjxtbh> list = this.getByOtaId(otaId);
|
||||
List<String> ids = new ArrayList<>();
|
||||
@@ -183,6 +199,9 @@ public class OtaBaSjSjxtbhServiceImpl extends ServiceImpl<OtaBaSjSjxtbhMapper, O
|
||||
if (ObjectUtil.isEmpty(res)) {
|
||||
res = getByOtaId(otaIdT);
|
||||
}
|
||||
if (ObjectUtils.isEmpty(res)) {
|
||||
res = setDefault(otaId);
|
||||
}
|
||||
|
||||
JSONObject json = new JSONObject();
|
||||
json.put("list", res);
|
||||
@@ -204,13 +223,13 @@ public class OtaBaSjSjxtbhServiceImpl extends ServiceImpl<OtaBaSjSjxtbhMapper, O
|
||||
}
|
||||
|
||||
@Override
|
||||
public void importData(MultipartFile file, String otaId, String cut, StringBuilder errMsg) throws Exception{
|
||||
public void importData(MultipartFile file, String otaId, String cut, StringBuilder errMsg) throws Exception {
|
||||
List<File> upLoadFiles = ImportFileUtil.importZip(file, cut, uploadPath);
|
||||
parseFileList(upLoadFiles, otaId, cut,errMsg);
|
||||
parseFileList(upLoadFiles, otaId, cut, errMsg);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void parseFileList(List<File> upLoadFiles, String otaId, String cut, StringBuilder errMsg) throws Exception{
|
||||
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")) {
|
||||
@@ -221,7 +240,7 @@ public class OtaBaSjSjxtbhServiceImpl extends ServiceImpl<OtaBaSjSjxtbhMapper, O
|
||||
throw new JeroBootException("请上传正确的文件");
|
||||
}
|
||||
|
||||
List<OtaBaSjSjxtbh> newList = parseFile(upFile, otaId, cut,errMsg);
|
||||
List<OtaBaSjSjxtbh> newList = parseFile(upFile, otaId, cut, errMsg);
|
||||
List<OtaBaSjSjxtbh> oldList = getByOtaId(otaId);
|
||||
if (ObjectUtils.isEmpty(oldList)) {
|
||||
oldList = new ArrayList<>();
|
||||
@@ -233,7 +252,7 @@ public class OtaBaSjSjxtbhServiceImpl extends ServiceImpl<OtaBaSjSjxtbhMapper, O
|
||||
otaBaCxTxjlService.saveBatch(reList);
|
||||
}
|
||||
|
||||
private List<OtaBaSjSjxtbh> parseFile(File upFile, String otaId, String cut, StringBuilder errMsg) throws Exception{
|
||||
private List<OtaBaSjSjxtbh> parseFile(File upFile, String otaId, String cut, StringBuilder errMsg) throws Exception {
|
||||
Date now = new Date();
|
||||
List<OtaBaSjSjxtbh> list = new ArrayList<>();
|
||||
Workbook wb = ImportFileUtil.readExcel(upFile);
|
||||
@@ -270,7 +289,7 @@ public class OtaBaSjSjxtbhServiceImpl extends ServiceImpl<OtaBaSjSjxtbhMapper, O
|
||||
cell = row.getCell(9);
|
||||
xtbh.setSjbdx(ImportFileUtil.getCellValue(cell, wb));
|
||||
cell = row.getCell(10);
|
||||
xtbh.setSfcfsj(ImportFileUtil.getCellValue(cell, wb));
|
||||
xtbh.setSfcfsj(ImportFileUtil.getCellValueYesOrNo(cell, wb));
|
||||
ComparisonUtil cu = new ComparisonUtil();
|
||||
cu.checkError(xtbh, errMsg, sysDictService, cut);
|
||||
if (xtbh.isNull()) {
|
||||
@@ -319,7 +338,7 @@ public class OtaBaSjSjxtbhServiceImpl extends ServiceImpl<OtaBaSjSjxtbhMapper, O
|
||||
cell = row.createCell(10);
|
||||
cell.setCellValue(bh.getSjbdx());
|
||||
cell = row.createCell(11);
|
||||
cell.setCellValue(bh.getSfcfsj());
|
||||
cell.setCellValue(ImportFileUtil.getCellValueYesOrNo(bh.getSfcfsj()));
|
||||
start++;
|
||||
}
|
||||
wb.write(new FileOutputStream(file));
|
||||
|
||||
+2
-2
@@ -160,8 +160,8 @@ public class OtaBaSjSjyxpgServiceImpl extends ServiceImpl<OtaBaSjSjyxpgMapper, O
|
||||
Date now = new Date();
|
||||
OtaBaSjSjyxpg res = new OtaBaSjSjyxpg();
|
||||
res.setOtaId(otaId);
|
||||
res.setFhgd(2);
|
||||
res.setZdjsxg(1);
|
||||
res.setFhgd(1);
|
||||
res.setZdjsxg(2);
|
||||
res.setZxsj(2);
|
||||
res.setAqjz("2");
|
||||
res.setSfyxaq(2);
|
||||
|
||||
@@ -385,7 +385,7 @@
|
||||
ellipsis: true,
|
||||
dataIndex: 'fileName',
|
||||
scopedSlots: { customRender: 'fileName' },
|
||||
width: 200
|
||||
width: 270
|
||||
},
|
||||
{
|
||||
title: this.$t('fileDeclaration'),
|
||||
@@ -393,7 +393,7 @@
|
||||
ellipsis: true,
|
||||
dataIndex: 'fileDescription',
|
||||
scopedSlots: { customRender: 'projectName' },
|
||||
width: 300
|
||||
width: 390
|
||||
},
|
||||
{
|
||||
title: this.$t('uploadedBy'),
|
||||
@@ -412,7 +412,7 @@
|
||||
align: 'left',
|
||||
ellipsis: true,
|
||||
dataIndex: 'createTime',
|
||||
width: 250
|
||||
width: 245
|
||||
},
|
||||
{
|
||||
title: this.$t('operation'),
|
||||
|
||||
@@ -41,6 +41,7 @@
|
||||
size="middle"
|
||||
rowKey="id"
|
||||
:columns="columns"
|
||||
:components="drag(columns,'columns')"
|
||||
:dataSource="dataSource"
|
||||
:pagination="ipagination"
|
||||
:loading="loading"
|
||||
@@ -61,10 +62,11 @@
|
||||
import DataLogModal from './modules/DataLogModal'
|
||||
import {JeroListMixin} from '@/mixins/JeroListMixin'
|
||||
import JEllipsis from "@/components/jero/JEllipsis";
|
||||
import { ResizeHeader, ResizeColumnProvide } from '@/mixins/header'
|
||||
|
||||
export default {
|
||||
name: 'DataLogList',
|
||||
mixins: [JeroListMixin],
|
||||
mixins: [JeroListMixin, ResizeHeader, ResizeColumnProvide],
|
||||
components: {
|
||||
JEllipsis,
|
||||
DataLogModal
|
||||
@@ -76,28 +78,28 @@
|
||||
columns: [
|
||||
{
|
||||
title: this.$t('tableName'),
|
||||
align: 'center',
|
||||
align: 'left',
|
||||
dataIndex: 'dataTable',
|
||||
width: "120"
|
||||
}, {
|
||||
title: this.$t('DataID'),
|
||||
align: 'center',
|
||||
align: 'left',
|
||||
dataIndex: 'dataId',
|
||||
width: "120"
|
||||
}, {
|
||||
title: this.$t('VersionNumber'),
|
||||
align: 'center',
|
||||
align: 'left',
|
||||
dataIndex: 'dataVersion',
|
||||
width: "50"
|
||||
}, {
|
||||
title: this.$t('DataContent'),
|
||||
align: 'center',
|
||||
align: 'left',
|
||||
dataIndex: 'dataContent',
|
||||
width: "150",
|
||||
scopedSlots: {customRender: 'dataContent'},
|
||||
}, {
|
||||
title: this.$t('creator'),
|
||||
align: 'center',
|
||||
align: 'left',
|
||||
dataIndex: 'createBy',
|
||||
width: "100"
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user