认证-参数项-导入bug修改
This commit is contained in:
+26
@@ -811,10 +811,18 @@ public class ParamsInfoEOServiceImpl extends ServiceImpl<ParamsInfoEOMapper, Par
|
|||||||
// 第几个sheet页
|
// 第几个sheet页
|
||||||
if (numSheet == 0) { // 企业参数表
|
if (numSheet == 0) { // 企业参数表
|
||||||
if (CutEnum.EN.getValue().equals(cut)) {
|
if (CutEnum.EN.getValue().equals(cut)) {
|
||||||
|
String fields[] ={ "*NIO Number", "*Is Must", "*Params Name","*Technical Field","*Params Batch","*Duty Territory",
|
||||||
|
"Description", "*Control Type", "Control Verify", "Control Values", "File Template"};
|
||||||
|
params.setImportFields(fields);
|
||||||
|
|
||||||
ExcelImportResult<ParamsInfoEnImport> resultEn = ExcelImportUtil.importExcelMore(excelfile,ParamsInfoEnImport.class, params);
|
ExcelImportResult<ParamsInfoEnImport> resultEn = ExcelImportUtil.importExcelMore(excelfile,ParamsInfoEnImport.class, params);
|
||||||
List<ParamsInfoEnImport> paramsInfoEOListEn = resultEn.getList();
|
List<ParamsInfoEnImport> paramsInfoEOListEn = resultEn.getList();
|
||||||
copyParamsInfoList(paramsInfoEOListEn, paramsInfoEOList);
|
copyParamsInfoList(paramsInfoEOListEn, paramsInfoEOList);
|
||||||
} else {
|
} else {
|
||||||
|
String fields[] ={ "*NIO编号", "*是否必填", "*参数名称","*技术领域","*参数批次","*责任领域",
|
||||||
|
"参数说明", "*控件类型", "控件校验", "控件备选值", "附件模板"};
|
||||||
|
params.setImportFields(fields);
|
||||||
|
|
||||||
ExcelImportResult<ParamsInfoCnImport> result = ExcelImportUtil.importExcelMore(excelfile, ParamsInfoCnImport.class, params);
|
ExcelImportResult<ParamsInfoCnImport> result = ExcelImportUtil.importExcelMore(excelfile, ParamsInfoCnImport.class, params);
|
||||||
paramsInfoEOList = result.getList();
|
paramsInfoEOList = result.getList();
|
||||||
}
|
}
|
||||||
@@ -822,10 +830,16 @@ public class ParamsInfoEOServiceImpl extends ServiceImpl<ParamsInfoEOMapper, Par
|
|||||||
if (certCategoryMap.containsKey(sheetName)) {
|
if (certCategoryMap.containsKey(sheetName)) {
|
||||||
List<CertCategoryParamsInfoCnImport> list = new ArrayList<>();
|
List<CertCategoryParamsInfoCnImport> list = new ArrayList<>();
|
||||||
if (CutEnum.EN.getValue().equals(cut)) {
|
if (CutEnum.EN.getValue().equals(cut)) {
|
||||||
|
String fields[] ={ "*NIO Number", "*Number", "*Params Name","Description"};
|
||||||
|
params.setImportFields(fields);
|
||||||
|
|
||||||
ExcelImportResult<CertCategoryParamsInfoEnImport> resultEn = ExcelImportUtil.importExcelMore(excelfile, CertCategoryParamsInfoEnImport.class, params);
|
ExcelImportResult<CertCategoryParamsInfoEnImport> resultEn = ExcelImportUtil.importExcelMore(excelfile, CertCategoryParamsInfoEnImport.class, params);
|
||||||
List<CertCategoryParamsInfoEnImport> listEn = resultEn.getList();
|
List<CertCategoryParamsInfoEnImport> listEn = resultEn.getList();
|
||||||
copycertCategoryParamsInfoList(listEn, list);
|
copycertCategoryParamsInfoList(listEn, list);
|
||||||
} else {
|
} else {
|
||||||
|
String fields[] ={ "*NIO编号", "*编号", "*参数名称","参数说明"};
|
||||||
|
params.setImportFields(fields);
|
||||||
|
|
||||||
ExcelImportResult<CertCategoryParamsInfoCnImport> result = ExcelImportUtil.importExcelMore(excelfile, CertCategoryParamsInfoCnImport.class, params);
|
ExcelImportResult<CertCategoryParamsInfoCnImport> result = ExcelImportUtil.importExcelMore(excelfile, CertCategoryParamsInfoCnImport.class, params);
|
||||||
list = result.getList();
|
list = result.getList();
|
||||||
}
|
}
|
||||||
@@ -1326,6 +1340,18 @@ public class ParamsInfoEOServiceImpl extends ServiceImpl<ParamsInfoEOMapper, Par
|
|||||||
resultMap = validateMustAndLength(paramsNumber, "编号", "Number", IsMustEnum.YES.getValue(),"15", false, cut);
|
resultMap = validateMustAndLength(paramsNumber, "编号", "Number", IsMustEnum.YES.getValue(),"15", false, cut);
|
||||||
errorMsg += (String)resultMap.get("errorMsg");
|
errorMsg += (String)resultMap.get("errorMsg");
|
||||||
countError += (int)resultMap.get("countError");
|
countError += (int)resultMap.get("countError");
|
||||||
|
if (StringUtils.isNotEmpty(ccDto.getParamsNumber())) {
|
||||||
|
// 校验编号 格式:字母数字横杠(-)
|
||||||
|
String numberRegex = "^[A-Za-z0-9-]+$";
|
||||||
|
if (!paramsNumber.matches(numberRegex)) {
|
||||||
|
if(CutEnum.CN.getValue().equals(cut)) {
|
||||||
|
errorMsg += "编号格式错误,仅能为字母,数字,横杠(-);";
|
||||||
|
} else {
|
||||||
|
errorMsg += "Number formatting errors, can only letters, numbers, dash (-);";
|
||||||
|
}
|
||||||
|
countError++;
|
||||||
|
}
|
||||||
|
}
|
||||||
// 参数名称
|
// 参数名称
|
||||||
String paramsName = ccDto.getParamsName();
|
String paramsName = ccDto.getParamsName();
|
||||||
resultMap = validateMustAndLength(paramsName, "参数名称", "Params Name", IsMustEnum.YES.getValue(),"30", false, cut);
|
resultMap = validateMustAndLength(paramsName, "参数名称", "Params Name", IsMustEnum.YES.getValue(),"30", false, cut);
|
||||||
|
|||||||
+1
-1
@@ -52,7 +52,7 @@ public class CertCategoryParamsInfoEnImport {
|
|||||||
private String paramsName;
|
private String paramsName;
|
||||||
|
|
||||||
/**参数说明*/
|
/**参数说明*/
|
||||||
@Excel(name = "参数说明", width = 36, orderNum = "4")
|
@Excel(name = "Description", width = 36, orderNum = "4")
|
||||||
@ApiModelProperty(value = "参数说明")
|
@ApiModelProperty(value = "参数说明")
|
||||||
private String description;
|
private String description;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user