|
|
|
@ -90,14 +90,20 @@ public class UdiContrastController {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
} else if (CollUtil.isNotEmpty(combineRequest.getThirdIds())) {
|
|
|
|
|
StringBuffer buffer = new StringBuffer();
|
|
|
|
|
//只添加产品
|
|
|
|
|
for (String thirdId : combineRequest.getThirdIds()) {
|
|
|
|
|
if (udiContrastService.isExit(null, thirdId)) {
|
|
|
|
|
return ResultVOUtils.error(500, "产品编码:" + thirdId + "已存在!");
|
|
|
|
|
buffer.append(thirdId).append(",");
|
|
|
|
|
} else {
|
|
|
|
|
createOnlyMainId(combineRequest, thirdId);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (StrUtil.isNotBlank(buffer.toString())) {
|
|
|
|
|
String errorInfo = StrUtil.removeSuffix(buffer.toString(), ",");
|
|
|
|
|
return ResultVOUtils.error(500, "产品编码:" + errorInfo + "已存在!");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return ResultVOUtils.success("添加成功");
|
|
|
|
|
}
|
|
|
|
|