소스 검색

优化逻辑

yjwang 4 일 전
부모
커밋
bed69a3a09
1개의 변경된 파일9개의 추가작업 그리고 8개의 파일을 삭제
  1. 9 8
      fs-service/src/main/java/com/fs/hisStore/service/impl/FsStoreVerifyCodeScrmServiceImpl.java

+ 9 - 8
fs-service/src/main/java/com/fs/hisStore/service/impl/FsStoreVerifyCodeScrmServiceImpl.java

@@ -37,7 +37,7 @@ public class FsStoreVerifyCodeScrmServiceImpl extends ServiceImpl<FsStoreVerifyC
     private static final Long DELETED = 1L;
     private static final Long STATUS_ENABLE = 1L;
     //出库状态
-    private static final Long OUTBOUND_STATUS_UNDO = 0L;
+    private static final Long OUTBOUND_STATUS_UNDO = 1L;
     //核销状态
     private static final Long VERIFY_STATUS_WRITEOFF = 1L;
     private static final int BATCH_SIZE = 500;
@@ -330,16 +330,17 @@ public class FsStoreVerifyCodeScrmServiceImpl extends ServiceImpl<FsStoreVerifyC
                 .filter(l -> OUTBOUND_STATUS_UNDO.equals(l.getOutboundStatus()))
                 .filter(l -> l.getVerifyCode() != null && !l.getVerifyCode().trim().isEmpty())
                 .collect(Collectors.toList());
-        if (!CollectionUtils.isEmpty(unOutboundList)) {
-            String unOutboundCodes = unOutboundList.stream()
-                    .map(FsStoreVerifyCodeScrm::getVerifyCode)
-                    .collect(Collectors.joining(","));
-            log.warn("溯源码核销失败:部分核销码未出库,未出库核销码={},userId={}", unOutboundCodes, userId);
-            return R.error("操作失败,核销码【" + unOutboundCodes + "】未出库,禁止核销!");
-        }
+//        if (!CollectionUtils.isEmpty(unOutboundList)) {
+//            String unOutboundCodes = unOutboundList.stream()
+//                    .map(FsStoreVerifyCodeScrm::getVerifyCode)
+//                    .collect(Collectors.joining(","));
+//            log.warn("溯源码核销失败:部分核销码未出库,未出库核销码={},userId={}", unOutboundCodes, userId);
+//            return R.error("操作失败,核销码【" + unOutboundCodes + "】未出库,禁止核销!");
+//        }
 
         Date updateTime = new Date();
         dbList.forEach(l -> {
+            l.setOutboundStatus(OUTBOUND_STATUS_UNDO);
             l.setVerifyStatus(VERIFY_STATUS_WRITEOFF);
             l.setUpdateTime(updateTime);
             l.setUpdateBy(userId.trim());