|
|
@ -5603,14 +5603,7 @@ public class PartInformationServiceImpl extends ServiceImpl<PartInformationMappe |
|
|
part.setCustomerPartNo(getStringCellValue(row, 2)); |
|
|
part.setCustomerPartNo(getStringCellValue(row, 2)); |
|
|
part.setApplicationDesc(getStringCellValue(row, 3)); |
|
|
part.setApplicationDesc(getStringCellValue(row, 3)); |
|
|
part.setProductCategory(getStringCellValue(row, 4)); |
|
|
part.setProductCategory(getStringCellValue(row, 4)); |
|
|
if (!StringUtils.hasText(part.getApplicationDesc())) { |
|
|
|
|
|
flag = false; |
|
|
|
|
|
emptyApplicationDescRows.add(j + 1); |
|
|
|
|
|
} |
|
|
|
|
|
if (!StringUtils.hasText(part.getProductCategory())) { |
|
|
|
|
|
flag = false; |
|
|
|
|
|
emptyProductCategoryRows.add(j + 1); |
|
|
|
|
|
} else if (!isValidProjectPartProductCategory(part.getProductCategory())) { |
|
|
|
|
|
|
|
|
if (StringUtils.hasText(part.getProductCategory()) && !isValidProjectPartProductCategory(part.getProductCategory())) { |
|
|
flag = false; |
|
|
flag = false; |
|
|
wrongProductCategoryRows.add(j + 1); |
|
|
wrongProductCategoryRows.add(j + 1); |
|
|
} |
|
|
} |
|
|
@ -5646,6 +5639,16 @@ public class PartInformationServiceImpl extends ServiceImpl<PartInformationMappe |
|
|
vo.setCustomerPartNo(part.getCustomerPartNo()); |
|
|
vo.setCustomerPartNo(part.getCustomerPartNo()); |
|
|
vo.setApplicationDesc(part.getApplicationDesc()); |
|
|
vo.setApplicationDesc(part.getApplicationDesc()); |
|
|
vo.setProductCategory(StringUtils.hasText(part.getProductCategory()) ? part.getProductCategory().trim() : null); |
|
|
vo.setProductCategory(StringUtils.hasText(part.getProductCategory()) ? part.getProductCategory().trim() : null); |
|
|
|
|
|
if (isTemporaryPart(vo.getSite(), vo)) { |
|
|
|
|
|
if (!StringUtils.hasText(vo.getApplicationDesc())) { |
|
|
|
|
|
flag = false; |
|
|
|
|
|
emptyApplicationDescRows.add(ifsPartNoMap.get(part.getFinalPartNo())); |
|
|
|
|
|
} |
|
|
|
|
|
if (!StringUtils.hasText(vo.getProductCategory())) { |
|
|
|
|
|
flag = false; |
|
|
|
|
|
emptyProductCategoryRows.add(ifsPartNoMap.get(part.getFinalPartNo())); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
list1.add(vo); |
|
|
list1.add(vo); |
|
|
} |
|
|
} |
|
|
if (flag){ |
|
|
if (flag){ |
|
|
@ -5788,10 +5791,18 @@ public class PartInformationServiceImpl extends ServiceImpl<PartInformationMappe |
|
|
} |
|
|
} |
|
|
for (int i = 0; i < partList.size(); i++) { |
|
|
for (int i = 0; i < partList.size(); i++) { |
|
|
PartInformationVo part = partList.get(i); |
|
|
PartInformationVo part = partList.get(i); |
|
|
String partNo = part == null ? null : (StringUtils.hasText(part.getPartNo()) ? part.getPartNo() : part.getPlmPartNo()); |
|
|
|
|
|
|
|
|
if (part == null) { |
|
|
|
|
|
continue; |
|
|
|
|
|
} |
|
|
|
|
|
String partNo = StringUtils.hasText(part.getPartNo()) ? part.getPartNo() : part.getPlmPartNo(); |
|
|
String prefix = StringUtils.hasText(partNo) ? "物料[" + partNo + "]:" : "第" + (i + 1) + "条物料:"; |
|
|
String prefix = StringUtils.hasText(partNo) ? "物料[" + partNo + "]:" : "第" + (i + 1) + "条物料:"; |
|
|
validateProjectPartRequiredFields(part == null ? null : part.getApplicationDesc(), |
|
|
|
|
|
part == null ? null : part.getProductCategory(), prefix); |
|
|
|
|
|
|
|
|
if (!isTemporaryPart(part.getSite(), part)) { |
|
|
|
|
|
if (StringUtils.hasText(part.getProductCategory()) && !isValidProjectPartProductCategory(part.getProductCategory())) { |
|
|
|
|
|
throw new RuntimeException(prefix + "产品类别无效,仅支持 Label/Diecut/Decoration/Material"); |
|
|
|
|
|
} |
|
|
|
|
|
continue; |
|
|
|
|
|
} |
|
|
|
|
|
validateProjectPartRequiredFields(part.getApplicationDesc(), part.getProductCategory(), prefix); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|