|
@@ -156,6 +156,45 @@ public class ArchivesAutoServiceImpl extends BaseServiceImpl<ArchivesAutoMapper,
|
|
|
return page.setRecords(archivesAutos);
|
|
|
}
|
|
|
|
|
|
+ @Override
|
|
|
+ public List<ArchivesAutoVO> pageByArchivesAuto2(ArchivesAutoVO vo) {
|
|
|
+ IPage<ArchivesAutoVO> page = new Page<>(vo.getCurrent(),vo.getSize());
|
|
|
+ if (StringUtils.isNotBlank(vo.getStorageTime())) {
|
|
|
+ vo.setStorageTimes(Arrays.asList(vo.getStorageTime().split(",")));
|
|
|
+ }
|
|
|
+ if (StringUtils.isNotBlank(vo.getSecretLevel())){
|
|
|
+ vo.setSecretLevels(Arrays.asList(vo.getSecretLevel().split(",")));
|
|
|
+ }
|
|
|
+ if (StringUtils.isNotBlank(vo.getCarrierType())) {
|
|
|
+ vo.setCarrierTypes(Arrays.asList(vo.getCarrierType().split(",")));
|
|
|
+ }
|
|
|
+ if (StringUtils.isNotBlank(vo.getYear())) {
|
|
|
+ vo.setYears(Arrays.asList(vo.getYear().split(",")));
|
|
|
+ }
|
|
|
+ if (StringUtils.isNotBlank(vo.getMonth())) {
|
|
|
+ vo.setMonths(Arrays.asList(vo.getMonth().split(",")));
|
|
|
+ }
|
|
|
+ if (StringUtils.isNotBlank(vo.getCarrierType())) {
|
|
|
+ vo.setCarrierTypes(Arrays.asList(vo.getCarrierType().split(",")));
|
|
|
+ }
|
|
|
+ //获取单位首节点
|
|
|
+ ArchiveTreeContract contract = archiveTreeContractClient.getFirstNodeByTreeCode(vo.getProjectId(),vo.getArchiveType());
|
|
|
+ vo.setNodeId(contract.getId());
|
|
|
+ //根据单位查询所有档案
|
|
|
+ List<ArchivesAutoVO> archivesAutos = baseMapper.pageByArchivesAuto3(page, vo);
|
|
|
+ if (archivesAutos != null && archivesAutos.size() >0) {
|
|
|
+ archivesAutos.stream().forEach(aa -> {
|
|
|
+ if (StringUtils.isNotBlank(aa.getStorageTime())) {
|
|
|
+ aa.setStorageTimeValue("3".equals(aa.getStorageTime()) ? "永久" : ("2".equals(aa.getStorageTime()) ? "30年" : "10年"));
|
|
|
+ }
|
|
|
+ if (StringUtils.isNotBlank(aa.getSecretLevel())) {
|
|
|
+ aa.setSecretLevelValue("1".equals(aa.getSecretLevel()) ? "机密" : ("2".equals(aa.getSecretLevel()) ? "绝密" : "秘密"));
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+ return archivesAutos;
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* 根据搜索获取档案柜
|
|
|
* @param archivesAuto
|
|
@@ -180,10 +219,14 @@ public class ArchivesAutoServiceImpl extends BaseServiceImpl<ArchivesAutoMapper,
|
|
|
//一个柜子
|
|
|
Map<String, String> map = new HashMap<>();
|
|
|
map.put("id",CabinetTotal+"");
|
|
|
- map.put("name",CabinetTotal+"");
|
|
|
- String[] min = list.get(0).getFileNumber().split("-");
|
|
|
- String[] max = list.get(list.size()-1).getFileNumber().split("-");
|
|
|
- map.put("content",min[min.length-1]+"~"+max[max.length-1]);
|
|
|
+ if (CabinetTotal < 10){
|
|
|
+ map.put("name","0"+CabinetTotal);
|
|
|
+ }else {
|
|
|
+ map.put("name",CabinetTotal+"");
|
|
|
+ }
|
|
|
+ String[] min = list.get(0).getFileNumber().split("_");
|
|
|
+ String[] max = list.get(list.size()-1).getFileNumber().split("_");
|
|
|
+ map.put("content","档号"+min[min.length-1]+"~"+"档号"+max[max.length-1]);
|
|
|
//把每一个柜子都添加
|
|
|
allCabinet.add(map);
|
|
|
}
|