| | |
| | | if (StringUtils.isEmpty(drawingNo)) { |
| | | throw new ServiceException("图号不能为空"); |
| | | } |
| | | if (drawingNo.length() > 255) { |
| | | throw new ServiceException("图号长度不能超过255个字符"); |
| | | } |
| | | checkModelAndProductCodeUnique(model, productCode, productModelDto.getId()); |
| | | checkDrawingNoUnique(drawingNo, productModelDto.getId()); |
| | | |
| | |
| | | // 图号:导入时可选,填写则校验唯一 |
| | | String drawingNo = trimToNull(row.getDrawingNo()); |
| | | if (drawingNo != null) { |
| | | if (drawingNo.length() > 255) { |
| | | throw new ServiceException("工作簿【" + sheetName + "】第 " + resolveRowNum(row, i) + " 行:图号长度不能超过255个字符"); |
| | | } |
| | | checkDrawingNoUnique(drawingNo, null); |
| | | } |
| | | |