66936 虚拟法规清单,导入导出、模板下载修改。

This commit is contained in:
wangzhijiang
2023-03-31 14:37:59 +08:00
parent 67bc443bda
commit 1d9a08b2c3
3 changed files with 36 additions and 32 deletions
@@ -215,7 +215,7 @@ public class DummyInventoryInfoEO implements Serializable {
private java.lang.String designDeliverableTemplateName;
/**设计符合性确认-发起人*/
@Excel(name = "设计-发起人", width = 15,dicCode ="fa1_qi3_ren2")
// @Excel(name = "设计-发起人", width = 15,dicCode ="fa1_qi3_ren2")
@ApiModelProperty(value = "设计符合性确认-发起人")
//@Dict(dicCode ="fa1_qi3_ren2")
private java.lang.String designInitiator;
@@ -235,7 +235,7 @@ public class DummyInventoryInfoEO implements Serializable {
private String designRemark;
/**prehomo确认-交付物类型*/
@Excel(name = "Prehomo-交付物类型", width = 15,dicCode ="deliverable_template")
// @Excel(name = "Prehomo-交付物类型", width = 15,dicCode ="deliverable_template")
@ApiModelProperty(value = "prehomo确认-交付物类型")
// @Dict(dicCode ="deliverable_template")
private java.lang.String prehomoDeliverableType;
@@ -253,7 +253,7 @@ public class DummyInventoryInfoEO implements Serializable {
private java.lang.String prehomoDeliverableTemplateName;
/**prehomo确认-发起人*/
@Excel(name = "Prehomo-发起人", width = 15,dicCode ="fa1_qi3_ren2")
// @Excel(name = "Prehomo-发起人", width = 15,dicCode ="fa1_qi3_ren2")
@ApiModelProperty(value = "prehomo确认-发起人")
//@Dict(dicCode ="fa1_qi3_ren2")
private java.lang.String prehomoInitiator;
@@ -261,7 +261,7 @@ public class DummyInventoryInfoEO implements Serializable {
private String prehomoInitiator_dictText;
/**prehomo确认-责任人*/
@Excel(name = "Prehomo-责任人", width = 15,dicCode ="ze2_ren4_ren2")
// @Excel(name = "Prehomo-责任人", width = 15,dicCode ="ze2_ren4_ren2")
@ApiModelProperty(value = "prehomo确认-责任人")
//@Dict(dicCode ="ze2_ren4_ren2")
private java.lang.String prehomoDuty;
@@ -269,7 +269,7 @@ public class DummyInventoryInfoEO implements Serializable {
private String prehomoDuty_dictText;
//prehomo确认-交付物说明
@Excel(name = "prehomo确认-交付物说明", width = 20)
// @Excel(name = "prehomo确认-交付物说明", width = 20)
private String prehomoRemark;
/**验证符合性确认-交付物类型*/
@@ -290,7 +290,7 @@ public class DummyInventoryInfoEO implements Serializable {
private java.lang.String verifyDeliverableTemplateName;
/**验证符合性确认-发起人*/
@Excel(name = "验证-发起人", width = 15,dicCode ="fa1_qi3_ren2")
// @Excel(name = "验证-发起人", width = 15,dicCode ="fa1_qi3_ren2")
@ApiModelProperty(value = "验证符合性确认-发起人")
//@Dict(dicCode ="fa1_qi3_ren2")
private java.lang.String verifyInitiator;
@@ -187,7 +187,7 @@ public class DummyInventoryInfoEOEn implements Serializable {
/**设计符合性确认-发起人*/
@Excel(name = "Design Initiator", width = 30)
// @Excel(name = "Design Initiator", width = 30)
@ApiModelProperty(value = "设计符合性确认-发起人")
@Dict(dicCode ="fa1_qi3_ren2")
private String designInitiator;
@@ -218,7 +218,7 @@ public class DummyInventoryInfoEOEn implements Serializable {
private String prehomoDeliverableTemplateName;
/**prehomo确认-发起人*/
@Excel(name = "Prehomo Initiator", width = 30)
// @Excel(name = "Prehomo Initiator", width = 30)
@ApiModelProperty(value = "prehomo确认-发起人")
@Dict(dicCode ="fa1_qi3_ren2")
private String prehomoInitiator;
@@ -248,7 +248,7 @@ public class DummyInventoryInfoEOEn implements Serializable {
private String verifyDeliverableTemplateName;
/**验证符合性确认-发起人*/
@Excel(name = "Verify Initiator", width = 30)
// @Excel(name = "Verify Initiator", width = 30)
@ApiModelProperty(value = "验证符合性确认-发起人")
@Dict(dicCode ="fa1_qi3_ren2")
private String verifyInitiator;
@@ -1182,6 +1182,14 @@ public class DummyInventoryInfoEOServiceImpl extends ServiceImpl<DummyInventoryI
OutputStream os = null;
HSSFWorkbook workbook = new HSSFWorkbook();
String fileOriName = "虚拟清单导入模板.xls";
String sheetName = "";
if(StringUtils.equals(dummyInventoryInfoEO.getCut(),CutEnum.CN.getValue())){
sheetName = "虚拟清单导入模板";
}else {
sheetName = "Virtual Inventory Import Template";
}
String filePath = uploadpath + File.separator + fileOriName;
try {
String titleOne = "";
@@ -1191,19 +1199,17 @@ public class DummyInventoryInfoEOServiceImpl extends ServiceImpl<DummyInventoryI
"WVTA ID,认证类型," +
"*认证级别," +"适用增补件,"+
"*责任领域,备注," +
"设计符合性确认,Pre-homo确认,验证符合性确认";
titleTwo = "交付物类型,交付物模板,发起人,责任人,交付物说明," +
"交付物类型,交付物模板,发起人,责任人,交付物说明," +
"交付物类型,交付物模板,发起人,责任人,交付物说明";
"设计符合性确认,验证符合性确认";
titleTwo = "交付物类型,交付物模板,责任人,交付物说明," +
"交付物类型,交付物模板,责任人,交付物说明";
}else{
titleOne = "*Number,Sub-Title,Usage," +
"WVTA ID,Certification Type," +
"*Certification Level," +"Applicable Supplement,"+
"*Responsible Field,Comments," +
"Design compliance check,Pre-homo check,Validation compliance chech";
titleTwo = "Type of deliverables,Deliverable template,Initiator,Person liable,Deliverables description," +
"Type of deliverables,Deliverable template,Initiator,Person liable,Deliverables description," +
"Type of deliverables,Deliverable template,Initiator,Person liable,Deliverables description";
"Design compliance check,Validation compliance chech";
titleTwo = "Type of deliverables,Deliverable template,Person liable,Deliverables description," +
"Type of deliverables,Deliverable template,Person liable,Deliverables description";
}
@@ -1221,7 +1227,7 @@ public class DummyInventoryInfoEOServiceImpl extends ServiceImpl<DummyInventoryI
nowFile.delete();
}
nowFile.mkdirs();
HSSFSheet sheet = workbook.createSheet("虚拟清单导入模板");
HSSFSheet sheet = workbook.createSheet(sheetName);
sheet.setDefaultColumnWidth(16);//列宽
HSSFCellStyle cellStyle = workbook.createCellStyle();
cellStyle.setWrapText(true);//自动换行
@@ -1235,7 +1241,7 @@ public class DummyInventoryInfoEOServiceImpl extends ServiceImpl<DummyInventoryI
int count = 1;
int startLine = 0;
int endLine = 0;
int line = 4;
int line = 3;
for (int i = 0; i < index; i++) {
//合并单元格
CellRangeAddress region1 =
@@ -1264,7 +1270,7 @@ public class DummyInventoryInfoEOServiceImpl extends ServiceImpl<DummyInventoryI
explain = "填写说明\n" +
"1.导入数据从第四行开始\n" +
"2.所有带*号的字段必须填写\n"+
"3.实施类别,交付物类型,发起人,责任人,字段是单选属性,必须和系统中的对应字段选项相匹配\n" +
"3.实施类别,交付物类型,责任人,字段是单选属性,必须和系统中的对应字段选项相匹配\n" +
"4.认证类型,认证级别,责任领域,字段是多选属性,必须和系统中的对应字段选项相匹配,填写多个时采用英文或中文逗号分割\n" +
"5.编号,子标题,WVTA ID,备注,填写文本内容\n" +
"6.交付物模板字段为文件属性,填写时需要在本文件同级目录下以标准号为名称建立文件夹,并在文件夹下放置文件,假设在AAA标准号下放置了B.docx,则应填写AAA/B.docx";
@@ -1272,7 +1278,7 @@ public class DummyInventoryInfoEOServiceImpl extends ServiceImpl<DummyInventoryI
explain = "Filling explanation\n" +
"1.Import data starts at the fourth line\n" +
"2.All fields marked with * must be filled in\n"+
"3.Implementation category,Type of deliverables,Initiator,Person liable,Fields are radio attributes that must match the corresponding field option in the system\n" +
"3.Implementation category,Type of deliverables,Person liable,Fields are radio attributes that must match the corresponding field option in the system\n" +
"4.Certification Type,Certification Level,Responsible 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.Number,Sub-Title,WVTA ID,Comments,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.docx";
@@ -1292,7 +1298,7 @@ public class DummyInventoryInfoEOServiceImpl extends ServiceImpl<DummyInventoryI
row.createCell(lineTemp).setCellValue(headerArr[m]);
Cell cell = row.getCell(lineTemp);
cell.setCellStyle(cellStyle);
lineTemp = lineTemp + 5;
lineTemp = lineTemp + 4;
}
}
@@ -1484,17 +1490,15 @@ public class DummyInventoryInfoEOServiceImpl extends ServiceImpl<DummyInventoryI
String title = "";
if(CutEnum.CN.getValue().equals(dummyInventoryInfoEO.getCut())){
title = "*编号,子标题,实施类别,WVTA ID,认证类型,*认证级别,适用增补件,*责任领域,备注," +
"设计交付物类型,设计交付物模板,设计发起人,设计责任人,设计交付物说明," +
"Pre交付物类型,Pre交付物模板,Pre发起人,Pre责任人,Pre交付物说明," +
"验证交付物类型,验证交付物模板,验证发起人,验证责任人,验证交付物说明";
"设计交付物类型,设计交付物模板,设计责任人,设计交付物说明," +
"验证交付物类型,验证交付物模板,验证责任人,验证交付物说明";
}else{
title = "*Number,Sub-Title,Usage," +
"WVTA ID,Certification Type," +
"*Certification Level," +"Applicable Supplement,"+
"*Responsible Field,Comments," +
"Design Type of deliverables,Design Deliverable template,Design Initiator,Design Person liable,Design Deliverables description," +
"Pre Type of deliverables,Pre Deliverable template,Pre Initiator,Pre Person liable,Pre Deliverables description," +
"Verify Type of deliverables,Verify Deliverable template,Verify Initiator,Verify Person liable,Verify Deliverables description";
"Design Type of deliverables,Design Deliverable template,Design Person liable,Design Deliverables description," +
"Verify Type of deliverables,Verify Deliverable template,Verify Person liable,Verify Deliverables description";
}
int pos = file.getOriginalFilename().lastIndexOf(".");
@@ -1618,7 +1622,7 @@ public class DummyInventoryInfoEOServiceImpl extends ServiceImpl<DummyInventoryI
}else if(i == 1){
if(j > 8){
String flag = "";
if(8 < j && j < 14){
if(8 < j && j < 13){
if(CutEnum.CN.getValue().equals(dummyInventoryInfoEO.getCut())){
flag ="设计";
}else{
@@ -1626,15 +1630,15 @@ public class DummyInventoryInfoEOServiceImpl extends ServiceImpl<DummyInventoryI
}
key = flag + headerCell.getStringCellValue();
}
if(13 < j && j < 19){
/*if(13 < j && j < 19){
if(CutEnum.CN.getValue().equals(dummyInventoryInfoEO.getCut())){
flag ="Pre";
}else{
flag ="Pre ";
}
key = flag + headerCell.getStringCellValue();
}
if(18 < j && j < 24){
}*/
if(13 <= j && j < 18){
if(CutEnum.CN.getValue().equals(dummyInventoryInfoEO.getCut())){
flag ="验证";
}else{