56405 法规/认证任务计划展示字段修改。
This commit is contained in:
+28
@@ -360,6 +360,17 @@ public class LawsTechnologyEvaluationEOServiceImpl extends ServiceImpl<LawsTechn
|
||||
//校验文件格式
|
||||
int pos = file.getOriginalFilename().lastIndexOf(".");
|
||||
String fileSuffixStr = file.getOriginalFilename().substring(pos+1).toLowerCase();
|
||||
|
||||
String title = "";
|
||||
String verifyTemplateMsg = "";
|
||||
if (CutEnum.CN.getValue().equals(cut)) {
|
||||
title = "条款号,条款名称,条款内容";
|
||||
verifyTemplateMsg = "模板不正确,请下载正确的模板导入!";
|
||||
} else {
|
||||
title = "Item num,Item name,Item Contents";
|
||||
verifyTemplateMsg = "The template is not correct, please download the correct template to import!";
|
||||
}
|
||||
|
||||
if(!StringUtils.equals(fileSuffixStr,"xls")){
|
||||
if(StringUtils.equals(cut,CutEnum.CN.getValue())){
|
||||
throw new JeroBootException("请上传xls文件");
|
||||
@@ -377,6 +388,23 @@ public class LawsTechnologyEvaluationEOServiceImpl extends ServiceImpl<LawsTechn
|
||||
if (workbook != null) {
|
||||
Sheet sheet = workbook.getSheetAt(0);
|
||||
if (sheet != null) {
|
||||
Row firstRow = sheet.getRow(0);
|
||||
List<String> titleList = Arrays.asList(title.split(","));
|
||||
//校验模板
|
||||
for (int cellIndex = 0; cellIndex < 3; cellIndex++){
|
||||
boolean flag = false;
|
||||
Cell cell = firstRow.getCell(cellIndex);
|
||||
for (String titl : titleList) {
|
||||
if(StringUtils.equals(titl,cell.toString())){
|
||||
flag = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(!flag){
|
||||
throw new JeroBootException(verifyTemplateMsg);
|
||||
}
|
||||
}
|
||||
|
||||
int rowNos = sheet.getPhysicalNumberOfRows();// 得到excel的总记录条数
|
||||
for (int i = 0; i < rowNos ; i++) {
|
||||
Row row = sheet.getRow(i + 1);
|
||||
|
||||
+6
-4
@@ -4,11 +4,13 @@ public enum ProjectTaskPlanningNameEnum {
|
||||
LIST_CONFIRMATION("清单确认"," Checklist confirmation"),
|
||||
LEGAL_TASK_CONFIRMATION("任务确认","Task confirmation"),
|
||||
DESIGN_DEADLINE("设计符合性","Design compliance"),
|
||||
PREHOMO_DEADLINE("Pre-Homo","Pre-Homo"),
|
||||
ATTESTATION_START_TIME("认证开始","Certification begins"),
|
||||
ATTESTATION_END_TIME("认证结束"," End of certification"),
|
||||
// PREHOMO_DEADLINE("Pre-Homo","Pre-Homo"),
|
||||
// ATTESTATION_START_TIME("认证开始","Certification begins"),
|
||||
// ATTESTATION_END_TIME("认证结束"," End of certification"),
|
||||
PREHOMO_DEADLINE("摸底试验结束","Pre-Homo Completion"), // name:Pre-Homo value:Pre-Homo
|
||||
ATTESTATION_START_TIME("认证试验结束","Homo Test Completion"),// name:认证开始 value:Certification begins
|
||||
ATTESTATION_END_TIME("认证批准","Type Approval"),// name:认证结束 value:End of certification
|
||||
VERIFY_DEADLINE("验证符合性","Verify compliance"),
|
||||
|
||||
;
|
||||
String name;
|
||||
String value;
|
||||
|
||||
Reference in New Issue
Block a user