虚拟清单--模板下载修改

This commit is contained in:
zhn
2022-04-22 10:16:22 +08:00
parent ff37c777b2
commit 5d5f7b752c
@@ -307,17 +307,17 @@ public class DummyInventoryInfoEOServiceImpl extends ServiceImpl<DummyInventoryI
String titleOne = "";
String titleTwo = "";
if(CutEnum.CN.getValue().equals(dummyInventoryInfoEO.getCut())){
titleOne = "编号,标题,子标题,适用范围,状态,对应标准,实施类别," +
"新车实施日期,在产车实施日期,WVTA ID,认证类型," +
"认证级别,技术领域," +
"责任领域,适用地区,备注," +
titleOne = "*编号,标题,实施类别," +
"WVTA ID,认证类型," +
"*认证级别," +
"*责任领域,备注," +
"设计符合性确认,Pre-homo确认,验证符合性确认";
titleTwo = "交付物类型,交付物模板,发起人,责任人,交付物类型,交付物模板,发起人,责任人,交付物类型,交付物模板,发起人,责任人";
}else{
titleOne = "serial number,title,subtitle,scope of application,state,corresponding standard,implementation category," +
"new car implementation date,on the production vehicle implementation date,WVTA ID,certification type," +
"certification level,technical field," +
"area of responsibility,zone of application,remarks," +
titleOne = "*serial number,subtitle,implementation category," +
"WVTA ID,certification type," +
"*certification level," +
"*area of responsibility,remarks," +
"design compliance check,pre-homo check,validation compliance chech";
titleTwo = "type of deliverables,deliverable template,initiator,person liable," +
"type of deliverables,deliverable template,initiator,person liable," +
@@ -360,7 +360,7 @@ public class DummyInventoryInfoEOServiceImpl extends ServiceImpl<DummyInventoryI
new CellRangeAddress(0, 1, i, i);
sheet.addMergedRegion(region1);
}
for (int i = index; i < 19; i++) {
for (int i = index; i < 11; i++) {
if(count > 1){
startLine = startLine + line + 1;
endLine = startLine + line;
@@ -375,29 +375,25 @@ public class DummyInventoryInfoEOServiceImpl extends ServiceImpl<DummyInventoryI
count ++;
}
CellRangeAddress region =
new CellRangeAddress(2, 2, 0, 27); //参数1:起始行 参数2:终止行 参数3:起始列 参数4:终止列
new CellRangeAddress(2, 2, 0, 19); //参数1:起始行 参数2:终止行 参数3:起始列 参数4:终止列
sheet.addMergedRegion(region);
String explain= "";
if(CutEnum.CN.getValue().equals(dummyInventoryInfoEO.getCut())){
explain = "填写说明\n" +
"1.导入数据从第四行开始\n" +
"2.所有带*号的字段必须填写\n"+
"3.状态,认证类型,认证级别,实施类别,交付物类型,发起人,责任人,字段是单选属性,必须和系统中的对应字段选项相匹配\n" +
"4.适用范围,适用地区,责任领域,技术领域,字段是多选属性,必须和系统中的对应字段选项相匹配,填写多个时采用英文或中文逗号分割\n" +
"5.新车型实施日期,在产车实施日期字段为日期,必须精确到日\n" +
"6.编号,标题,子标题,WVTA ID,备注,填写文本内容\n" +
"7.对应标准,填写多个时采用英文或中文逗号分割\n" +
"8.交付物模板字段为文件属性,填写时需要在本文件同级目录下以标准号为名称建立文件夹,并在文件夹下放置文件,假设在AAA标准号下放置了B.docx,则应填写AAA/B.docx";
"3.认证类型,认证级别,实施类别,交付物类型,发起人,责任人,字段是单选属性,必须和系统中的对应字段选项相匹配\n" +
"4.责任领域,字段是多选属性,必须和系统中的对应字段选项相匹配,填写多个时采用英文或中文逗号分割\n" +
"5.编号,子标题,WVTA ID,备注,填写文本内容\n" +
"6.交付物模板字段为文件属性,填写时需要在本文件同级目录下以标准号为名称建立文件夹,并在文件夹下放置文件,假设在AAA标准号下放置了B.docx,则应填写AAA/B.docx";
}else{
explain = "filling explanation\n" +
"1.import data starts at the fourth line\n" +
"2.all fields marked with * must be filled in\n"+
"3.state,certification type,certification level,implementation category,type of deliverables,initiator,person liable,Fields are radio attributes that must match the corresponding field option in the system\n" +
"4.scope of application,zone of application,area of responsibility,technical field, field is a multi-select attribute and must match the corresponding field in the system. If multiple fields are filled in, separate them by commas (,)\n" +
"5.new car implementation date,on the production vehicle implementation date,Must be accurate to the day\n" +
"6.serial number,title,subtitle,WVTA ID,remarks,Fill in the text\n" +
"7.corresponding standard,If multiple entries are filled in, separate them by commas in English or Chinese\n" +
"8.deliverable template,When filling in the field, you need to create a folder in the directory of the same level as the file with the name of the standard number and place the file in the folder. If b. diocx is stored under the AAA standard number, enter AAA/B. diocx";
"3.certification type,certification level,implementation category,type of deliverables,initiator,person liable,Fields are radio attributes that must match the corresponding field option in the system\n" +
"4.area of responsibility, field is a multi-select attribute and must match the corresponding field in the system. If multiple fields are filled in, separate them by commas (,)\n" +
"5.serial number,subtitle,WVTA ID,remarks,Fill in the text\n" +
"6.deliverable template,When filling in the field, you need to create a folder in the directory of the same level as the file with the name of the standard number and place the file in the folder. If b. diocx is stored under the AAA standard number, enter AAA/B. diocx";
}
@@ -422,10 +418,10 @@ public class DummyInventoryInfoEOServiceImpl extends ServiceImpl<DummyInventoryI
//titleTwo
String[] headerArrTwo = titleTwo.split(",");
for (int j = 0; j < headerArrTwo.length; j++) {
row.createCell(16+j).setCellValue(headerArrTwo[j]);
row.createCell(7+j).setCellValue(headerArrTwo[j]);
}
}else{
short height = (short) (10 * 252);
short height = (short) (7 * 252);
row.setHeight((short) height);
Cell cell = row.createCell(0);
cell.setCellStyle(cellStyleTemp);