|
|
@ -552,9 +552,9 @@ public class WtSpBasicServiceImpl extends BaseServiceImpl<WtSpBasicMapper, WtSpB |
|
|
|
List<WtSpBasicEntity> data = new ArrayList<>(); |
|
|
|
List<WtSpBasicEntity> data = new ArrayList<>(); |
|
|
|
List<WtSpBasicEntity> error = new ArrayList<>(); |
|
|
|
List<WtSpBasicEntity> error = new ArrayList<>(); |
|
|
|
error = JSONArray.parseArray(JSON.toJSONString(entityList), WtSpBasicEntity.class).stream() |
|
|
|
error = JSONArray.parseArray(JSON.toJSONString(entityList), WtSpBasicEntity.class).stream() |
|
|
|
.filter(entity -> Func.isEmpty(entity.getName())).collect(Collectors.toList()); |
|
|
|
.filter(entity -> Func.isEmpty(entity.getCode())).collect(Collectors.toList()); |
|
|
|
data = JSONArray.parseArray(JSON.toJSONString(entityList), WtSpBasicEntity.class).stream() |
|
|
|
data = JSONArray.parseArray(JSON.toJSONString(entityList), WtSpBasicEntity.class).stream() |
|
|
|
.filter(entity -> Func.isNotEmpty(entity.getName())).collect(Collectors.toList()); |
|
|
|
.filter(entity -> Func.isNotEmpty(entity.getCode())).collect(Collectors.toList()); |
|
|
|
Assert.isTrue(CollectionUtil.isEmpty(error), () -> { |
|
|
|
Assert.isTrue(CollectionUtil.isEmpty(error), () -> { |
|
|
|
throw new ServiceException("填入工器具编码不能为空"); |
|
|
|
throw new ServiceException("填入工器具编码不能为空"); |
|
|
|
}); |
|
|
|
}); |
|
|
@ -567,7 +567,7 @@ public class WtSpBasicServiceImpl extends BaseServiceImpl<WtSpBasicMapper, WtSpB |
|
|
|
Integer counter = 2; |
|
|
|
Integer counter = 2; |
|
|
|
//数据校验
|
|
|
|
//数据校验
|
|
|
|
R<String> r = this.validExcel(libraryExcel, codeList, counter); |
|
|
|
R<String> r = this.validExcel(libraryExcel, codeList, counter); |
|
|
|
if (r.getMsg()!=null|| !r.isSuccess()) { |
|
|
|
if ( !r.isSuccess()) { |
|
|
|
return r; |
|
|
|
return r; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|