导入
This commit is contained in:
@@ -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");
|
||||
|
||||
|
||||
//// //测试接口使用
|
||||
|
||||
+1
-1
@@ -115,7 +115,7 @@ public class ExcelImportUtilByWk {
|
||||
}else {
|
||||
String value = convertCellValueToString(cell);
|
||||
if (StringUtils.isBlank(value)){
|
||||
nums++;
|
||||
value="";
|
||||
}
|
||||
map.get(a).set(o, value);
|
||||
}
|
||||
|
||||
+16
-1
@@ -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++) {
|
||||
|
||||
Reference in New Issue
Block a user