平台被哪些法规引用
This commit is contained in:
+15
-1
@@ -7,8 +7,9 @@ import com.jero.common.api.vo.Result;
|
||||
import com.jero.common.aspect.annotation.AutoLog;
|
||||
import com.jero.common.system.base.controller.JeroController;
|
||||
import com.jero.common.system.vo.DictModel;
|
||||
import com.jero.modules.project.entity.ProjectLibraryBase;
|
||||
import com.jero.modules.platform.service.IPlatformProjectLibraryBaseService;
|
||||
import com.jero.modules.project.entity.ProjectLawsInventoryEO;
|
||||
import com.jero.modules.project.entity.ProjectLibraryBase;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
@@ -307,4 +308,17 @@ public class PlatformProjectLibraryBaseController extends JeroController<Project
|
||||
public Result<?> overallReplacementUser(@RequestBody JSONObject json){
|
||||
return this.platformIProjectLibraryBaseService.overallReplacementUser(json);
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "平台被哪些法规引用")
|
||||
@ApiOperation(value="平台被哪些法规引用", notes="平台被哪些法规引用")
|
||||
@GetMapping(value = "/queryQuoteList")
|
||||
public Result<List<ProjectLawsInventoryEO>> queryQuoteList(String platformLawsInventoryId,String cut) {
|
||||
List<ProjectLawsInventoryEO> list = platformIProjectLibraryBaseService.queryQuoteList(platformLawsInventoryId,cut);
|
||||
return Result.OK(list);
|
||||
}
|
||||
}
|
||||
|
||||
+8
@@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.jero.common.api.vo.Result;
|
||||
import com.jero.common.system.vo.DictModel;
|
||||
import com.jero.modules.project.entity.ProjectLawsInventoryEO;
|
||||
import com.jero.modules.project.entity.ProjectLibraryBase;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
@@ -188,4 +189,11 @@ public interface IPlatformProjectLibraryBaseService extends IService<ProjectLibr
|
||||
List<ProjectLibraryBase> queryList(List<String> projectIdList);
|
||||
|
||||
List<ProjectLibraryBase> getListByIds(List<String> projectIdList);
|
||||
|
||||
/**
|
||||
* 平台被哪些法规引用
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
List<ProjectLawsInventoryEO> queryQuoteList(String platformLawsInventoryId, String cut);
|
||||
}
|
||||
|
||||
+115
@@ -30,6 +30,7 @@ import com.jero.modules.platform.mapper.PlatformProjectLawsInventoryEOMapper;
|
||||
import com.jero.modules.platform.mapper.PlatformProjectLibraryBaseMapper;
|
||||
import com.jero.modules.platform.service.IPlatformProjectCertificationInventoryEOService;
|
||||
import com.jero.modules.platform.service.IPlatformProjectLibraryBaseService;
|
||||
import com.jero.modules.project.entity.LawsInventoryPlatformEO;
|
||||
import com.jero.modules.project.entity.ProjectCertificationInventoryEO;
|
||||
import com.jero.modules.project.entity.ProjectLawsInventoryEO;
|
||||
import com.jero.modules.project.entity.ProjectLawsInventoryLogEO;
|
||||
@@ -58,13 +59,17 @@ import com.jero.modules.project.enums.TopEnum;
|
||||
import com.jero.modules.project.mapper.ProjectRelatedPersonnelMapper;
|
||||
import com.jero.modules.project.mapper.ProjectTaskInventoryEOMapper;
|
||||
import com.jero.modules.project.mapper.ProjectUserPermissionMapper;
|
||||
import com.jero.modules.project.service.ILawsInventoryPlatformEOService;
|
||||
import com.jero.modules.project.service.IProjectLibraryRoleRelEOService;
|
||||
import com.jero.modules.project.service.IProjectLibraryStatisticsService;
|
||||
import com.jero.modules.project.service.IProjectUserPermissionService;
|
||||
import com.jero.modules.project.service.editImpl.ProjectLawsInventoryEOEditServiceImpl;
|
||||
import com.jero.modules.project.service.impl.ProjectLawsInventoryEOServiceImpl;
|
||||
import com.jero.modules.project.service.impl.ProjectLawsInventoryLogEOServiceImpl;
|
||||
import com.jero.modules.project.service.impl.ProjectRelatedPersonnelServiceImpl;
|
||||
import com.jero.modules.project.service.impl.ProjectTaskPlanningServiceImpl;
|
||||
import com.jero.modules.project.vo.TimeNodeVO;
|
||||
import com.jero.modules.system.entity.SysCategory;
|
||||
import com.jero.modules.system.entity.SysDictItem;
|
||||
import com.jero.modules.system.entity.SysUser;
|
||||
import com.jero.modules.system.enums.DicCodeEnum;
|
||||
@@ -74,7 +79,9 @@ import com.jero.modules.system.mapper.SysUserMapper;
|
||||
import com.jero.modules.system.service.IProjectUserBrandService;
|
||||
import com.jero.modules.system.service.ISysDictService;
|
||||
import com.jero.modules.system.service.ISysUserService;
|
||||
import com.jero.modules.system.service.impl.SysCategoryServiceImpl;
|
||||
import com.jero.modules.system.service.impl.SysDictItemServiceImpl;
|
||||
import com.jero.modules.system.util.DictItemUtil;
|
||||
import com.jero.modules.system.util.StringUtils;
|
||||
import com.jero.modules.todoCenter.entity.ProcessInfoDetailEO;
|
||||
import com.jero.modules.todoCenter.service.IProcessInfoDetailEOService;
|
||||
@@ -199,6 +206,14 @@ public class PlatformProjectLibraryBaseServiceImpl extends ServiceImpl<PlatformP
|
||||
private SysDictItemMapper sysDictItemMapper;
|
||||
@Autowired
|
||||
private IOSSFileService iOSSFileService;
|
||||
@Autowired
|
||||
private ILawsInventoryPlatformEOService lawsInventoryPlatformEOService;
|
||||
@Autowired
|
||||
private ProjectLawsInventoryEOServiceImpl projectLawsInventoryEOService;
|
||||
@Autowired
|
||||
private SysCategoryServiceImpl sysCategoryService;
|
||||
@Autowired
|
||||
private ProjectLawsInventoryEOEditServiceImpl editService;
|
||||
|
||||
private static final SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
||||
private static DecimalFormat df = new DecimalFormat("#.00");
|
||||
@@ -3652,6 +3667,106 @@ public class PlatformProjectLibraryBaseServiceImpl extends ServiceImpl<PlatformP
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<ProjectLawsInventoryEO> queryQuoteList(String platformLawsInventoryId,String cut) {
|
||||
if(StringUtils.isBlank(platformLawsInventoryId)){
|
||||
return new ArrayList<>();
|
||||
}
|
||||
LambdaQueryWrapper<LawsInventoryPlatformEO> wrapper = new LambdaQueryWrapper<>();
|
||||
wrapper.eq(LawsInventoryPlatformEO::getPlatformLawsInventoryId,platformLawsInventoryId);
|
||||
List<LawsInventoryPlatformEO> inventoryPlatformEOList = lawsInventoryPlatformEOService.list(wrapper);
|
||||
|
||||
List<ProjectLawsInventoryEO> lawsInventoryEOList = new ArrayList<>();
|
||||
if(ObjectUtils.isNotEmpty(inventoryPlatformEOList)){
|
||||
//树形结构数据字典(技术领域)
|
||||
List<SysCategory> categoryList = sysCategoryService.list();
|
||||
|
||||
List<String> lawsInventoryIdIdList = inventoryPlatformEOList.stream().map(LawsInventoryPlatformEO::getPlatformLawsInventoryId).distinct().collect(Collectors.toList());
|
||||
LambdaQueryWrapper<ProjectLawsInventoryEO> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.in(ProjectLawsInventoryEO::getId,lawsInventoryIdIdList);
|
||||
queryWrapper.orderByDesc(ProjectLawsInventoryEO::getProjectLibraryId);
|
||||
lawsInventoryEOList = projectLawsInventoryEOService.list(queryWrapper);
|
||||
|
||||
List<String> projectLibraryIdList = lawsInventoryEOList.stream().map(ProjectLawsInventoryEO::getProjectLibraryId).distinct().collect(Collectors.toList());
|
||||
List<ProjectLibraryBase> projectLibraryBaseList = platformProjectLibraryBaseMapper.getListByIds(projectLibraryIdList);
|
||||
|
||||
List<DictModel> targetMarketList = sysDictService.queryDictItemsByCode(DicCodeEnum.REGION.getCode());
|
||||
|
||||
for (ProjectLibraryBase projectLibraryBase : projectLibraryBaseList) {
|
||||
//目标市场
|
||||
String targetMarket = DictItemUtil.getDictItemText(cut,projectLibraryBase.getTargetMarket(),targetMarketList);
|
||||
projectLibraryBase.setTargetMarketName(targetMarket);
|
||||
String projectName = projectLibraryBase.getProjectName()+"-"
|
||||
+projectLibraryBase.getYearName()+"-"
|
||||
+targetMarket+"-"
|
||||
+projectLibraryBase.getProjectVersion();
|
||||
projectLibraryBase.setProjectName(projectName);
|
||||
}
|
||||
|
||||
List<String> collect1 = lawsInventoryEOList.stream().filter(e-> org.apache.commons.lang3.StringUtils.isNotBlank(e.getDesignDeliverableTemplate())).map(ProjectLawsInventoryEO::getDesignDeliverableTemplate).distinct().collect(Collectors.toList());
|
||||
List<String> collect2 = lawsInventoryEOList.stream().filter(e-> org.apache.commons.lang3.StringUtils.isNotBlank(e.getVerifyDeliverableTemplate())).map(ProjectLawsInventoryEO::getVerifyDeliverableTemplate).distinct().collect(Collectors.toList());
|
||||
List<String> fileIdList = new ArrayList<>();
|
||||
if(!collect1.isEmpty()){
|
||||
fileIdList.addAll(collect1);
|
||||
}
|
||||
if(!collect2.isEmpty()){
|
||||
fileIdList.addAll(collect2);
|
||||
}
|
||||
//文件
|
||||
List<OSSFile> fileInfos = new ArrayList<>();
|
||||
if (fileIdList.size() != 0) {
|
||||
fileInfos = iOSSFileService.getFileInfos(org.apache.commons.lang3.StringUtils.join(fileIdList, ","));
|
||||
}
|
||||
|
||||
for (ProjectLawsInventoryEO projectLawsInventoryEO : lawsInventoryEOList) {
|
||||
//项目名称
|
||||
List<ProjectLibraryBase> collect = projectLibraryBaseList.stream().filter(e -> e.getId().equals(projectLawsInventoryEO.getProjectLibraryId())).collect(Collectors.toList());
|
||||
if(ObjectUtils.isNotEmpty(collect)){
|
||||
projectLawsInventoryEO.setProjectName(collect.get(0).getProjectName());
|
||||
}
|
||||
//设计
|
||||
String designDeliverableType = projectLawsInventoryEO.getDesignDeliverableType();//交付物类型
|
||||
String designDeliverableTemplate = projectLawsInventoryEO.getDesignDeliverableTemplate();//交付物模板
|
||||
//验证
|
||||
String verifyDeliverableType = projectLawsInventoryEO.getVerifyDeliverableType();//交付物类型
|
||||
String verifyDeliverableTemplate = projectLawsInventoryEO.getVerifyDeliverableTemplate();//交付物模板
|
||||
//设计交付物类型
|
||||
if (org.apache.commons.lang3.StringUtils.isNotBlank(designDeliverableType)) {
|
||||
List<String> designDeliverableTypeList = Arrays.asList(designDeliverableType.split(","));
|
||||
String name = projectLawsInventoryEOService.getTreeName(cut, categoryList, designDeliverableTypeList);
|
||||
projectLawsInventoryEO.setDesignDeliverableTypeName(name);
|
||||
}
|
||||
//验证交付物类型
|
||||
if (org.apache.commons.lang3.StringUtils.isNotBlank(verifyDeliverableType)) {
|
||||
List<String> verifyDeliverableTypeList = Arrays.asList(verifyDeliverableType.split(","));
|
||||
String name = projectLawsInventoryEOService.getTreeName(cut, categoryList, verifyDeliverableTypeList);
|
||||
projectLawsInventoryEO.setVerifyDeliverableTypeName(name);
|
||||
}
|
||||
//交付物类型模板
|
||||
if (fileInfos.size() != 0) {
|
||||
if (org.apache.commons.lang3.StringUtils.isNotBlank(designDeliverableTemplate)) {
|
||||
String fileName = this.editService.getFileName(null, fileInfos, designDeliverableTemplate);
|
||||
if (org.apache.commons.lang3.StringUtils.isNotBlank(fileName)) {
|
||||
projectLawsInventoryEO.setDesignDeliverableTemplateName(fileName);
|
||||
}
|
||||
}
|
||||
if (org.apache.commons.lang3.StringUtils.isNotBlank(verifyDeliverableTemplate)) {
|
||||
String fileName = this.editService.getFileName(null, fileInfos, verifyDeliverableTemplate);
|
||||
if (org.apache.commons.lang3.StringUtils.isNotBlank(fileName)) {
|
||||
projectLawsInventoryEO.setVerifyDeliverableTemplateName(fileName);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return lawsInventoryEOList;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user