Browse Source

导入ERRMSG提示增加判断

hejq 7 years ago
parent
commit
92fa9002a2

+ 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) {
             for (ReleaseProductByBatch each : batchList) {
                 // 返回符合标准的唯一的物料信息
                 // 返回符合标准的唯一的物料信息
                 if (aBatch.compareSameProductTagInfo(each)) {
                 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.setReleaseStatus(ReleaseStatus.had_exists.getPhrase());
                     aBatch.setReleaseCode(ReleaseStatus.had_exists.value());
                     aBatch.setReleaseCode(ReleaseStatus.had_exists.value());
                     if (aBatch.getErrmsg().substring(0, 1).equals(",")) {
                     if (aBatch.getErrmsg().substring(0, 1).equals(",")) {