feat: 导入SAP结果的错误信息统一格式
This commit is contained in:
parent
3fd368c135
commit
780dbb8216
|
|
@ -26,7 +26,6 @@ import org.springframework.util.CollectionUtils;
|
|||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.*;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
@Service
|
||||
|
|
@ -197,18 +196,14 @@ public class SapOpUtilService {
|
|||
list.stream()
|
||||
.filter(f -> f.getFLAG().equals("0"))
|
||||
.forEach(it -> {
|
||||
if (it.getSTATUS().contains("修改失败计量单位")) {
|
||||
errorMsgVOS.add(OperationErrorMsgVO.create(it.getMATNR(), it.getSTATUS()));
|
||||
} else {
|
||||
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 {
|
||||
// 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()));
|
||||
}
|
||||
}
|
||||
// }
|
||||
});
|
||||
|
||||
return errorMsgVOS;
|
||||
|
|
|
|||
Loading…
Reference in New Issue