소스 검색

导入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(",")) {