Forráskód Böngészése

修改保管期限的bug

huangtf 7 hónapja
szülő
commit
d4569d0fde

+ 1 - 1
blade-service/blade-archive/src/main/java/org/springblade/archive/controller/ArchivesAutoController.java

@@ -454,7 +454,7 @@ public class ArchivesAutoController extends BladeController {
 			ContractInfo contract = contractClient.getContractById(contractId);
 
 			Integer isArchivesAuto = contract.getIsArchivesAuto();
-			if(isArchivesAuto!=-1 && isArchivesAuto!=null && isArchivesAuto!=0){
+			if(isArchivesAuto!=null && isArchivesAuto!=-1  && isArchivesAuto!=0){
 				return R.fail("当前合同段已经在自动组卷中,请耐心等待");
 			}
 			log.info("开始自动组卷....");

+ 13 - 0
blade-service/blade-archive/src/main/java/org/springblade/archive/service/impl/ArchiveAutoPdfServiceImpl.java

@@ -534,6 +534,19 @@ public class ArchiveAutoPdfServiceImpl implements IArchiveAutoPdfService {
             }
 
         }
+
+        if ("Archive['storageTime']".equals(formula)){
+            if (object!= null ) {
+                String strObject = object.toString();
+                if (strObject.contains("null")) {
+                    strObject = strObject.replace("null", "");
+                    object =  strObject;
+                }
+            }else {
+                object = "";
+            }
+        }
+
         dataInfo.put(key, object);
     }
 

+ 3 - 3
blade-service/blade-archive/src/main/java/org/springblade/archive/service/impl/ArchivesAutoServiceImpl.java

@@ -1022,8 +1022,8 @@ public class ArchivesAutoServiceImpl extends BaseServiceImpl<ArchivesAutoMapper,
 				for (ContractInfo c : contracts) {
 					if (c.getContractType() == 3) {
 						Integer storagePeriod = c.getStoragePeriod();
-						if (storagePeriod == null) {
-							storageTime = "30";
+						if (storagePeriod == null || storagePeriod == -1) {
+							storageTime = "2";
 						} else {
 							storageTime = storagePeriod.toString();
 						}
@@ -1053,7 +1053,7 @@ public class ArchivesAutoServiceImpl extends BaseServiceImpl<ArchivesAutoMapper,
 				}
 				for (ContractInfo c : contracts) {
 					if (c.getContractType() == 3) {
-						if (c.getSecurityLevel() == null) {
+						if (c.getSecurityLevel() == null || c.getSecurityLevel() == -1) {
 							secretLevel = "4";
 						} else {
 							secretLevel = c.getSecurityLevel().toString();