Преглед на файлове

导入ERRMSG提示增加判断

hejq преди 7 години
родител
ревизия
92fa9002a2
променени са 1 файла, в които са добавени 3 реда и са изтрити 1 реда
  1. 3 1
      src/main/java/com/uas/platform/b2c/trade/order/service/impl/PurchaseProductServiceImpl.java

+ 3 - 1
src/main/java/com/uas/platform/b2c/trade/order/service/impl/PurchaseProductServiceImpl.java

@@ -374,7 +374,9 @@ public class PurchaseProductServiceImpl implements PurchaseProductService {
             for (ReleaseProductByBatch each : batchList) {
                 // 返回符合标准的唯一的物料信息
                 if (aBatch.compareSameProductTagInfo(each)) {
-                    aBatch.addErrmsg(ErrorInfoConstant.REPEAT_IN_EXCEL.getInfo());
+                    if (!aBatch.getErrmsg().contains(ErrorInfoConstant.REPEAT_IN_EXCEL.getInfo())) {
+                        aBatch.addErrmsg(ErrorInfoConstant.REPEAT_IN_EXCEL.getInfo());
+                    }
                     aBatch.setReleaseStatus(ReleaseStatus.had_exists.getPhrase());
                     aBatch.setReleaseCode(ReleaseStatus.had_exists.value());
                     if (aBatch.getErrmsg().substring(0, 1).equals(",")) {