文件分类标记
This commit is contained in:
parent
4059dabcc5
commit
5662b27adb
|
|
@ -39,4 +39,6 @@ public interface ArchiveMapper {
|
||||||
Integer getSortById(Integer id);
|
Integer getSortById(Integer id);
|
||||||
|
|
||||||
String getClassifyMark(ArchivalCatalogueDto dto);
|
String getClassifyMark(ArchivalCatalogueDto dto);
|
||||||
|
|
||||||
|
Integer getLevelById(Integer id);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -12,6 +12,7 @@ import com.bonus.web.service.ArchiveService;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
|
import java.util.Iterator;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -27,6 +28,15 @@ public class ArchiveServiceImpl implements ArchiveService {
|
||||||
@Override
|
@Override
|
||||||
public List<ArchivalCatalogueDto> getArchivalCatalogueTree(ArchivalCatalogueDto dto) {
|
public List<ArchivalCatalogueDto> getArchivalCatalogueTree(ArchivalCatalogueDto dto) {
|
||||||
List<ArchivalCatalogueDto> archivalCatalogueDto = archiveMapper.getArchivalCatalogueTree(dto);
|
List<ArchivalCatalogueDto> archivalCatalogueDto = archiveMapper.getArchivalCatalogueTree(dto);
|
||||||
|
if (dto.getId() != null) {
|
||||||
|
Integer level = archiveMapper.getLevelById(dto.getId());
|
||||||
|
for (Iterator<ArchivalCatalogueDto> it = archivalCatalogueDto.iterator(); it.hasNext(); ) {
|
||||||
|
ArchivalCatalogueDto item = it.next();
|
||||||
|
if (level <= item.getLevel()) {
|
||||||
|
it.remove();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
// 构建树
|
// 构建树
|
||||||
List<ArchivalCatalogueDto> tree = TreeBuilder.buildTree(archivalCatalogueDto);
|
List<ArchivalCatalogueDto> tree = TreeBuilder.buildTree(archivalCatalogueDto);
|
||||||
return tree;
|
return tree;
|
||||||
|
|
@ -51,6 +61,8 @@ public class ArchiveServiceImpl implements ArchiveService {
|
||||||
}
|
}
|
||||||
vo.setCreateUserId(SecurityUtils.getLoginUser().getUserId().toString());
|
vo.setCreateUserId(SecurityUtils.getLoginUser().getUserId().toString());
|
||||||
vo.setCreateUserName(SecurityUtils.getLoginUser().getUsername());
|
vo.setCreateUserName(SecurityUtils.getLoginUser().getUsername());
|
||||||
|
vo.setUpdateUserId(SecurityUtils.getLoginUser().getUserId().toString());
|
||||||
|
vo.setUpdateUserName(SecurityUtils.getLoginUser().getUsername());
|
||||||
return R.ok(archiveMapper.saveArchivalCatalogue(vo));
|
return R.ok(archiveMapper.saveArchivalCatalogue(vo));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -182,5 +182,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
left join da_ky_files_classify_mark dkfcm on dkfc.classify_mark = dkfcm.id
|
left join da_ky_files_classify_mark dkfcm on dkfc.classify_mark = dkfcm.id
|
||||||
where dkfc.id = #{id}
|
where dkfc.id = #{id}
|
||||||
</select>
|
</select>
|
||||||
|
<select id="getLevelById" resultType="java.lang.Integer">
|
||||||
|
select `level` from da_ky_files_contents where id = #{id}
|
||||||
|
</select>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue