add:政策资料中心修改

This commit is contained in:
wxyclub
2023-10-23 16:38:23 +08:00
parent bdcf7fabce
commit b3acedf0e1
2 changed files with 17 additions and 1 deletions
@@ -16,7 +16,7 @@ import java.util.List;
/**
* @author tjzdw
* @description
* @description 政策资料中心
* @date 2023/10/23
*/
@RestController
@@ -1,5 +1,7 @@
package com.adc.da.slrs.sarLawsInformation.service.impl;
import com.adc.da.att.entity.AttFileEO;
import com.adc.da.att.service.IAttFileEOService;
import com.adc.da.slrs.sarLawsInformationCenterTree.entity.SarLawsInformationCenterTree;
import com.adc.da.slrs.sarLawsInformationCenterTree.service.SarLawsInformationCenterTreeService;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
@@ -12,6 +14,7 @@ import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
@@ -26,10 +29,23 @@ public class SarLawsInformationServiceImpl extends ServiceImpl<SarLawsInformatio
@Resource
private SarLawsInformationCenterTreeService treeService;
@Resource
private IAttFileEOService attFileEOService;
@Override
public SarLawsInformation getLawsInformationInfo(String id) {
SarLawsInformation sarLawsInformation = this.baseMapper.selectById(id);
// 查询资料文件信息
if (StringUtils.isNotBlank(sarLawsInformation.getInformationFile())) {
String[] split = sarLawsInformation.getInformationFile().split(",");
List<String> fileNameList = new ArrayList<>();
for (String attId : split) {
AttFileEO fileInfo = attFileEOService.getFileInfo(attId);
fileNameList.add(fileInfo.getOldFileName());
}
sarLawsInformation.setInformationFileName(String.join(",",fileNameList));
}
// 查询体系节点信息
if (StringUtils.isNotBlank(sarLawsInformation.getTreeNodeId())) {
SarLawsInformationCenterTree treeNode = treeService.getById(sarLawsInformation.getTreeNodeId());
sarLawsInformation.setTreeNodeName(treeNode.getName());