Ver Fonte

档案文件

qianxb há 8 meses atrás
pai
commit
eae28a5f3d

+ 11 - 1
blade-service/blade-business/src/main/java/org/springblade/business/service/impl/ArchiveFileServiceImpl.java

@@ -21,6 +21,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
 
 import java.util.*;
 import java.util.concurrent.ExecutorService;
+import java.util.stream.Collectors;
 
 /**
  * 服务实现类
@@ -156,7 +157,16 @@ public class ArchiveFileServiceImpl extends BaseServiceImpl<ArchiveFileMapper, A
             });
         }
         }
-
+        for (ArchiveFile vo : list) {
+            // 修改所有的认证状态,如果是不需要认证就设置为已认证,如果是需要认证就设置为未认证
+            if (vo.getIsNeedCertification() == 0){
+                vo.setIsCertification(1);
+            }
+            //循环查看是否把需要审批改为不需要审批,  不可能把不需要审批改为需要审批
+            if (vo.getStatus() == 0 && vo.getIsApproval() == 0) {
+                vo.setStatus(2);
+            }
+        }
         this.updateBatchById(JSONArray.parseArray(JSONObject.toJSONString(list), ArchiveFile.class));
     }