Commit 74d17902 authored by wei's avatar wei 🎱

更新案卷为最大密级,年限,文件数,总文件页数

parent 89e2421b
...@@ -390,6 +390,10 @@ public class Constants { ...@@ -390,6 +390,10 @@ public class Constants {
* 密级字典 * 密级字典
*/ */
public static final String SECRET_CODE = "SecretCode"; public static final String SECRET_CODE = "SecretCode";
/**
* 归档保管年限
*/
public static final String DOC_STORAGE_PERIOD = "DocStoragePeriod";
/** /**
* 载体类型字典 * 载体类型字典
*/ */
......
...@@ -276,9 +276,9 @@ public class ExtTransferDocumentServiceImpl<V extends ExtTransferDocumentVO> imp ...@@ -276,9 +276,9 @@ public class ExtTransferDocumentServiceImpl<V extends ExtTransferDocumentVO> imp
String volumeNumber = extFilesVO.getVolumeNumber(); String volumeNumber = extFilesVO.getVolumeNumber();
int pageNumber = 0; //文件页数 int pageNumber = 0; //文件页数
String secretCode = ""; //最大密级 String secretCode = ""; //最大密级
Integer secretCodeDictSeq = 0; Integer secretCodeDictSeq = -99;//初始化最小值
String storagePeriod = ""; //最大年限 String storagePeriod = ""; //最大年限
Integer storagePeriodDictSeq = 0; Integer storagePeriodDictSeq = -99;//初始化最小值
// 案卷下的文档 // 案卷下的文档
SearchQueryCondition queryDoc = SearchQueryCondition.builder() SearchQueryCondition queryDoc = SearchQueryCondition.builder()
.openProp(SearchQueryCondition.builder().name("source").build()) .openProp(SearchQueryCondition.builder().name("source").build())
...@@ -288,16 +288,20 @@ public class ExtTransferDocumentServiceImpl<V extends ExtTransferDocumentVO> imp ...@@ -288,16 +288,20 @@ public class ExtTransferDocumentServiceImpl<V extends ExtTransferDocumentVO> imp
List<ExtTransferDocLinkVO> extTransferDocLinkVOList = extTransferDocLinkService.findRecursion(queryDoc).getContent(); List<ExtTransferDocLinkVO> extTransferDocLinkVOList = extTransferDocLinkService.findRecursion(queryDoc).getContent();
for (ExtTransferDocLinkVO extTransferDocLinkVO : extTransferDocLinkVOList) { for (ExtTransferDocLinkVO extTransferDocLinkVO : extTransferDocLinkVOList) {
// 最大密级
String secretCodeDoc = extTransferDocLinkVO.getSource().getSecretCode(); String secretCodeDoc = extTransferDocLinkVO.getSource().getSecretCode();
List<DictDataVO> dictDataVOByKey = this.getDictDataVOByKey(Constants.SECRET_CODE, secretCodeDoc); DictDataVO secretCodeDocMax = this.getCompareMax(Constants.SECRET_CODE, secretCodeDoc, secretCodeDictSeq);
// todo 获取最大密级和年限 if (ObjectUtils.isNotEmpty(secretCodeDocMax)) {
if (CollectionUtils.isNotEmpty(dictDataVOByKey)) { secretCodeDictSeq = secretCodeDocMax.getDictSeq();
DictDataVO dictDataVO = dictDataVOByKey.get(0); secretCode = secretCodeDocMax.getDictKey();
String dictKey = dictDataVO.getDictKey(); }
secretCodeDictSeq = dictDataVO.getDictSeq(); // 最大年限
secretCode = this.getCompareMax(Constants.SECRET_CODE, secretCode, secretCodeDictSeq); String storagePeriodDoc = extTransferDocLinkVO.getStoragePeriod();
} DictDataVO storagePeriodDocMax = this.getCompareMax(Constants.DOC_STORAGE_PERIOD, storagePeriodDoc, storagePeriodDictSeq);
//storagePeriod = this.getCompareMax(Constants.SECRET_CODE, extTransferDocLinkVO.getStoragePeriod()); if (ObjectUtils.isNotEmpty(storagePeriodDocMax)) {
storagePeriodDictSeq = storagePeriodDocMax.getDictSeq();
storagePeriod = storagePeriodDocMax.getDictKey();
}
pageNumber += extTransferDocLinkVO.getPageNumber(); pageNumber += extTransferDocLinkVO.getPageNumber();
} }
...@@ -310,16 +314,15 @@ public class ExtTransferDocumentServiceImpl<V extends ExtTransferDocumentVO> imp ...@@ -310,16 +314,15 @@ public class ExtTransferDocumentServiceImpl<V extends ExtTransferDocumentVO> imp
} }
} }
private String getCompareMax(String dictCode, String dictKey, Integer max) { private DictDataVO getCompareMax(String dictCode, String dictKey, Integer max) {
List<DictDataVO> dictDataVOList = this.getDictDataVOByKey(dictCode, dictKey); List<DictDataVO> dictDataVOList = this.getDictDataVOByKey(dictCode, dictKey);
if (CollectionUtils.isNotEmpty(dictDataVOList)) { if (CollectionUtils.isNotEmpty(dictDataVOList)) {
DictDataVO dictDataVO = dictDataVOList.get(0); DictDataVO dictDataVO = dictDataVOList.get(0);
Integer dictSeq = dictDataVO.getDictSeq(); if (dictDataVO.getDictSeq() > max) {
if (dictSeq > max) { return dictDataVO;
return dictDataVO.getDictKey();
} }
} }
return dictKey; return null;
} }
private List<DictDataVO> getDictDataVOByKey(String dictCode, String dictKey) { private List<DictDataVO> getDictDataVOByKey(String dictCode, String dictKey) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment