feat: 导入SAP结果,“修改失败计量单位”错误提示特殊处理

This commit is contained in:
曹鹏飞 2024-07-18 10:31:18 +08:00
parent 3a2e6f883f
commit 901a789da5
1 changed files with 10 additions and 6 deletions

View File

@ -197,13 +197,17 @@ public class SapOpUtilService {
list.stream()
.filter(f -> f.getFLAG().equals("0"))
.forEach(it -> {
Matcher matcher = PATTERN.matcher(it.getSTATUS());
if (matcher.find()) {
if (errorMsgVOS.stream().noneMatch(f -> StrUtil.equals(f.getPrimaryKey(), matcher.group()))) {
errorMsgVOS.add(OperationErrorMsgVO.create(matcher.group(), it.getSTATUS()));
}
if (it.getSTATUS().contains("修改失败计量单位")) {
errorMsgVOS.add(OperationErrorMsgVO.create(it.getMATNR(), it.getSTATUS()));
} else {
errorMsgVOS.add(OperationErrorMsgVO.create(buildErrCol1(it), it.getSTATUS()));
Matcher matcher = PATTERN.matcher(it.getSTATUS());
if (matcher.find()) {
if (errorMsgVOS.stream().noneMatch(f -> StrUtil.equals(f.getPrimaryKey(), matcher.group()))) {
errorMsgVOS.add(OperationErrorMsgVO.create(matcher.group(), it.getSTATUS()));
}
} else {
errorMsgVOS.add(OperationErrorMsgVO.create(buildErrCol1(it), it.getSTATUS()));
}
}
});