Commit 503c2040 by ghxdhr

原始记录添加空白标样和配置空白开始行冲突提示

parent 81eda871
......@@ -509,6 +509,12 @@ public class EntrustSampleItemServiceImpl extends BaseServiceImpl<EntrustSampleI
if (CollectionUtils.isEmpty(voList)) {
return null;
}
// 过滤空白样
List<EntrustSampleItemVO> blank = voList.stream().filter(vo -> vo.getSampleCode().contains("空白") || vo.getSampleName().contains("空白")).collect(Collectors.toList());
// 手动插入空白样和配置了空白开始行冲突
if (null != template.getBlankBeginNum() && blank.size() > 0) {
RestAssert.fail("所选原始记录模板中已配置空白开始行,请删除空白标样!");
}
voList = voList.stream().sorted(Comparator.comparing(item -> item.getOrderBy())).collect(Collectors.toList());
Entrust entrust = entrustService.getById(voList.get(0).getEntrustId());
InputStream io = ossClient.download(template.getObjectKey());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment