This commit is contained in:
yuezhihang
2022-04-22 17:18:35 +08:00
parent 07eebff61d
commit d5ac4d8f5c
3 changed files with 18 additions and 2 deletions
@@ -126,6 +126,7 @@ public class WebMvcConfig implements WebMvcConfigurer {
addInterceptor.excludePathPatterns("/api/att/attFile/downloadFileForSarNew");
addInterceptor.excludePathPatterns("/api/att/attFile/downloadFileForSarWaterMarkNew");
addInterceptor.excludePathPatterns("/api/att/attFile/uploadNew");
addInterceptor.excludePathPatterns("/api/sarLawsDetailedList/sar-laws-detailed-list/importData");
//// //测试接口使用
@@ -115,7 +115,7 @@ public class ExcelImportUtilByWk {
}else {
String value = convertCellValueToString(cell);
if (StringUtils.isBlank(value)){
nums++;
value="";
}
map.get(a).set(o, value);
}
@@ -819,7 +819,22 @@ public class SarLawsDetailedListServiceImpl extends ServiceImpl<SarLawsDetailedL
arr.forEach(stringStringMap -> {
dict.put(stringStringMap.get("label"),stringStringMap.get("value"));
});
if (null==res){
stringBuilder.append("请误导入空文件;");
}
//先校验是否存在一堆空数据
if (null != res && "".equals(stringBuilder.toString())) {
int i=1;
for (ExportEmptyModel e:res) {
if (null==e.getStandNumber() || e.getStandNumber().isEmpty()){
stringBuilder.append(""+i+"行标准编号不能为空;");
}
if (null==e.getSyrz() || e.getSyrz().isEmpty()){
stringBuilder.append(""+i+"行适用认证不能为空;");
}
i++;
}
}
//数据校验 先做重复交验+再做是否存在校验
if (null != res && "".equals(stringBuilder.toString())) {
for (int i = 0; i <res.size(); i++) {