|
@@ -315,9 +315,9 @@ public class MaterialExtendServiceImpl extends ServiceImpl<MaterialExtendMapper,
|
|
//修改拓展行
|
|
//修改拓展行
|
|
if (!updatedList.isEmpty()) {
|
|
if (!updatedList.isEmpty()) {
|
|
for (MaterialExtend materialExtend : updatedList) {
|
|
for (MaterialExtend materialExtend : updatedList) {
|
|
- //EXCEL中有条码在系统中已存在
|
|
|
|
|
|
+ //新条码和原来条码不一致,判断新条码是否已存在
|
|
MaterialExtend me = getInfoByBarCode(materialExtend.getBarCode());
|
|
MaterialExtend me = getInfoByBarCode(materialExtend.getBarCode());
|
|
- if (me != null && !me.getBarCode().isEmpty()) {
|
|
|
|
|
|
+ if (me != null && !materialExtend.getId().equals(me.getId())) {
|
|
throw new BusinessRunTimeException(ExceptionConstants.MATERIAL_PROPERTY_BARCODE_EXIST_CODE,
|
|
throw new BusinessRunTimeException(ExceptionConstants.MATERIAL_PROPERTY_BARCODE_EXIST_CODE,
|
|
String.format(ExceptionConstants.MATERIAL_PROPERTY_BARCODE_EXIST_MSG, materialExtend.getBarCode()));
|
|
String.format(ExceptionConstants.MATERIAL_PROPERTY_BARCODE_EXIST_MSG, materialExtend.getBarCode()));
|
|
}
|
|
}
|