认证清单关联按平台件
This commit is contained in:
+12
@@ -386,4 +386,16 @@ public class ProjectCertificationInventoryEOController extends JeroController<Pr
|
||||
public Result<?> matchRelevantPeople(@RequestBody Map<String,Object> params){
|
||||
return this.projectCertificationInventoryEOService.matchRelevantPeople(params);
|
||||
}
|
||||
|
||||
@AutoLog(value = "认证清单关联按平台件")
|
||||
@ApiOperation(value="认证清单关联按平台件", notes="认证清单关联按平台件")
|
||||
@GetMapping(value = "/connectPlatform")
|
||||
public Result<?> connectPlatform(String id,String cut) {
|
||||
ProjectCertificationInventoryEO projectCertificationInventoryEO = projectCertificationInventoryEOService.connectPlatform(id,cut);
|
||||
if(projectCertificationInventoryEO==null) {
|
||||
return Result.error("未找到对应数据");
|
||||
}
|
||||
return Result.OK(projectCertificationInventoryEO);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+3
@@ -268,4 +268,7 @@ public class ProjectCertificationInventoryEO implements Serializable {
|
||||
@ApiModelProperty(value = "关联平台件数据")
|
||||
@TableField(exist = false)
|
||||
private List<ProjectCertificationInventoryEO> projectCertificationInventoryEOS;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String projectName;
|
||||
}
|
||||
|
||||
+2
@@ -345,4 +345,6 @@ public interface IProjectCertificationInventoryEOService extends IService<Projec
|
||||
* @return
|
||||
*/
|
||||
String listPlatform(Map<String, Object> params);
|
||||
|
||||
ProjectCertificationInventoryEO connectPlatform(String id,String cut);
|
||||
}
|
||||
|
||||
+69
@@ -208,6 +208,8 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
|
||||
private ProjectLibraryBaseMapper projectLibraryBaseMapper;
|
||||
@Autowired
|
||||
private ISysDictService sysDictService;
|
||||
@Autowired
|
||||
private ProjectLibraryBaseServiceImpl projectLibraryBaseServiceImpl;
|
||||
|
||||
|
||||
@Value(value = "${jero.backUrl}")
|
||||
@@ -7456,6 +7458,73 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
|
||||
inventoryPlatformEO.setPlatformLawsInventoryId(certificationInventoryEO.getId());
|
||||
lawsInventoryPlatformEOS.add(inventoryPlatformEO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 认证清单关联按平台件
|
||||
* @param id
|
||||
* @param cut
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public ProjectCertificationInventoryEO connectPlatform(String id,String cut) {
|
||||
//认证清单平台件关联表
|
||||
LambdaQueryWrapper<LawsInventoryPlatformEO> wrapper = new LambdaQueryWrapper<>();
|
||||
wrapper.in(LawsInventoryPlatformEO::getLawsInventoryId,id);
|
||||
List<LawsInventoryPlatformEO> lawsInventoryPlatformEOList = lawsInventoryPlatformEOService.list(wrapper);
|
||||
if(ObjectUtils.isEmpty(lawsInventoryPlatformEOList)){
|
||||
return new ProjectCertificationInventoryEO();
|
||||
}
|
||||
ProjectCertificationInventoryEO certificationInventoryEO = projectCertificationInventoryEOService.queryById(lawsInventoryPlatformEOList.get(0).getLawsInventoryId());
|
||||
|
||||
//交付物模板
|
||||
String deliverableTemplate = certificationInventoryEO.getDeliverableTemplate();
|
||||
if(StringUtils.isNotBlank(deliverableTemplate)){
|
||||
List<OSSFile> fileInfos = iOSSFileService.getFileInfos(StringUtils.join(deliverableTemplate, ","));
|
||||
certificationInventoryEO.setDeliverableTemplateName(fileInfos.get(0).getFileName());
|
||||
}
|
||||
//交付物类型
|
||||
String deliverableType = certificationInventoryEO.getDeliverableType();
|
||||
if(StringUtils.isNotBlank(deliverableType)){
|
||||
List<SysCategory> categoryList = sysCategoryService.list();
|
||||
String name = getTreeName(cut, categoryList, Arrays.asList(deliverableType.split(",")));
|
||||
certificationInventoryEO.setDeliverableTypeName(name);
|
||||
}
|
||||
//平台件项目名称
|
||||
String projectLibraryId = certificationInventoryEO.getProjectLibraryId();
|
||||
List<ProjectLibraryBase> projectLibraryBaseList = projectLibraryBaseMapper.queryById(projectLibraryId);
|
||||
if(ObjectUtils.isNotEmpty(projectLibraryBaseList)){
|
||||
ProjectLibraryBase projectLibraryBase = projectLibraryBaseList.get(0);
|
||||
//目标市场 英文
|
||||
List<DictModel> targetMarketList = sysDictService.queryDictItemsByCode(DicCodeEnum.REGION.getCode());
|
||||
Map<String,Object> paramEn = new HashMap<>();
|
||||
paramEn.put("cut",cut);
|
||||
String targetMarket = projectLibraryBaseServiceImpl.getMarket(paramEn, targetMarketList, projectLibraryBase);
|
||||
String projectName = projectLibraryBase.getPlatformType()+"-"+projectLibraryBase.getPower()+"-"+projectLibraryBase.getProducer()+"-"+targetMarket;
|
||||
certificationInventoryEO.setProjectName(projectName);
|
||||
}
|
||||
return certificationInventoryEO;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// @Override
|
||||
// public void listPlatform(Map<String,Object> params) {
|
||||
// String cut = (String) params.get("cut");//
|
||||
|
||||
Reference in New Issue
Block a user