ソースを参照

个人认证链接删除校验

fengx 8 ヶ月 前
コミット
f33c70fa6c
共有1 個のファイルを変更した18 個の追加24 個の削除を含む
  1. 18 24
      src/main/java/com/sunxung/factoring/service/customerinformation/impl/ElectronicSignaturePersonalServiceImpl.java

+ 18 - 24
src/main/java/com/sunxung/factoring/service/customerinformation/impl/ElectronicSignaturePersonalServiceImpl.java

@@ -126,25 +126,19 @@ public class ElectronicSignaturePersonalServiceImpl extends ServiceImpl<Electron
         if (oldInfo == null) {
             throw new ValidatorException(CodeUtil.FAIL, "要修改的数据不存在!");
         } else {
-            if (oldInfo.getAuthStatus().equals(1)) {
-                throw new ValidatorException(CodeUtil.FAIL, "已认证,不能修改!");
-            } else if (oldInfo.getAuthStatus().equals(0)) {
-                electronicSignaturePersonal = getAuthInfo(electronicSignaturePersonal);
-                //更新附件
-                if (CollectionUtil.isNotEmpty(electronicSignaturePersonal.getDeleteIds())){
-                    for (Long id : electronicSignaturePersonal.getDeleteIds()){
-                        fileStorageService.deleteFileStorage(id);
-                    }
+            electronicSignaturePersonal = getAuthInfo(electronicSignaturePersonal);
+            //更新附件
+            if (CollectionUtil.isNotEmpty(electronicSignaturePersonal.getDeleteIds())){
+                for (Long id : electronicSignaturePersonal.getDeleteIds()){
+                    fileStorageService.deleteFileStorage(id);
                 }
-                if (CollectionUtil.isNotEmpty(electronicSignaturePersonal.getFileIds())){
-                    for (Long id : electronicSignaturePersonal.getFileIds()){
-                        fileStorageService.updateBusinessId(id,electronicSignaturePersonal.getId());
-                    }
+            }
+            if (CollectionUtil.isNotEmpty(electronicSignaturePersonal.getFileIds())){
+                for (Long id : electronicSignaturePersonal.getFileIds()){
+                    fileStorageService.updateBusinessId(id,electronicSignaturePersonal.getId());
                 }
-                updateById(electronicSignaturePersonal);
-            } else {
-                throw new ValidatorException(CodeUtil.FAIL, "数据状态错误!");
             }
+            updateById(electronicSignaturePersonal);
         }
     }
 
@@ -182,14 +176,14 @@ public class ElectronicSignaturePersonalServiceImpl extends ServiceImpl<Electron
 
     @Override
     public void flushUrl(Long id) {
-        List<AcceptanceSignConfirmationElectronicInfo> acceptanceSignConfirmationElectronicInfos = acceptanceSignConfirmationElectronicInfoService.lambdaQuery().eq(AcceptanceSignConfirmationElectronicInfo::getElectronicSignaturePersonalId, id).eq(AcceptanceSignConfirmationElectronicInfo::getSignStatus, 0).list();
-        List<SignConfirmationElectronicInfo> signConfirmationElectronicInfos = signConfirmationElectronicInfoService.lambdaQuery().eq(SignConfirmationElectronicInfo::getElectronicSignaturePersonalId, id).eq(SignConfirmationElectronicInfo::getSignStatus, 0).list();
-        if(CollectionUtil.isNotEmpty(acceptanceSignConfirmationElectronicInfos)){
-            throw new ValidatorException(CodeUtil.FAIL,"该签署人有未签署的验收单签署确认信息,不能重新刷新认证链接!");
-        }
-        if(CollectionUtil.isNotEmpty(signConfirmationElectronicInfos)){
-            throw new ValidatorException(CodeUtil.FAIL,"该签署人有未签署的签署确认信息,不能重新刷新认证链接!");
-        }
+//        List<AcceptanceSignConfirmationElectronicInfo> acceptanceSignConfirmationElectronicInfos = acceptanceSignConfirmationElectronicInfoService.lambdaQuery().eq(AcceptanceSignConfirmationElectronicInfo::getElectronicSignaturePersonalId, id).eq(AcceptanceSignConfirmationElectronicInfo::getSignStatus, 0).list();
+//        List<SignConfirmationElectronicInfo> signConfirmationElectronicInfos = signConfirmationElectronicInfoService.lambdaQuery().eq(SignConfirmationElectronicInfo::getElectronicSignaturePersonalId, id).eq(SignConfirmationElectronicInfo::getSignStatus, 0).list();
+//        if(CollectionUtil.isNotEmpty(acceptanceSignConfirmationElectronicInfos)){
+//            throw new ValidatorException(CodeUtil.FAIL,"该签署人有未签署的验收单签署确认信息,不能重新刷新认证链接!");
+//        }
+//        if(CollectionUtil.isNotEmpty(signConfirmationElectronicInfos)){
+//            throw new ValidatorException(CodeUtil.FAIL,"该签署人有未签署的签署确认信息,不能重新刷新认证链接!");
+//        }
         ElectronicSignaturePersonal electronicSignaturePersonal = getById(id);
         electronicSignaturePersonal = getAuthInfo(electronicSignaturePersonal);
         updateById(electronicSignaturePersonal);