|
@@ -1729,7 +1729,13 @@ public class ArchivesAutoServiceImpl extends BaseServiceImpl<ArchivesAutoMapper,
|
|
|
contractId = node.getContractId();
|
|
|
}
|
|
|
}
|
|
|
- this.refreshFileNumberNoSlipt(list,contractId,nodeId,bforce);
|
|
|
+
|
|
|
+ Integer indexType = 0;
|
|
|
+ ArchiveProjectConfig config = archiveProjectConfigService.getByProjectIdOrNew(projectId);
|
|
|
+ if (config!= null && config.bAutoIndexLen4()) {
|
|
|
+ indexType = 1;
|
|
|
+ }
|
|
|
+ this.refreshFileNumberNoSlipt(list,contractId,nodeId,bforce,indexType);
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -1738,7 +1744,7 @@ public class ArchivesAutoServiceImpl extends BaseServiceImpl<ArchivesAutoMapper,
|
|
|
* @param contractId
|
|
|
* @param nodeId
|
|
|
*/
|
|
|
- public void refreshFileNumberNoSlipt(List<ArchiveTreeContract> archiveTreeContracts,Long contractId,Long nodeId,boolean bforce) {
|
|
|
+ public void refreshFileNumberNoSlipt(List<ArchiveTreeContract> archiveTreeContracts,Long contractId,Long nodeId,boolean bforce,Integer indexType) {
|
|
|
|
|
|
List<ArchiveTreeContractVO2> subTreeList = new ArrayList<>();
|
|
|
List<List<ArchiveTreeContract>> subGroupedList = new ArrayList<>();
|
|
@@ -1795,6 +1801,10 @@ public class ArchivesAutoServiceImpl extends BaseServiceImpl<ArchivesAutoMapper,
|
|
|
}
|
|
|
|
|
|
String fileNumber = fileNumberPrefix +"_"+ index;
|
|
|
+ if (indexType == 1) {
|
|
|
+ String formattedIndex = String.format("%04d", index);
|
|
|
+ fileNumber = fileNumberPrefix + "_" + formattedIndex;
|
|
|
+ }
|
|
|
if (bforce) {
|
|
|
if (archiveAutoPdfService.refreshFileNumberForce(archivesAuto,fileNumber)){
|
|
|
changeList.add(archivesAuto);
|