认证清单关联按平台件

This commit is contained in:
zhn
2023-12-07 10:27:33 +08:00
parent 9889b62776
commit bac497ff10
3 changed files with 9 additions and 7 deletions
@@ -391,11 +391,11 @@ public class ProjectCertificationInventoryEOController extends JeroController<Pr
@ApiOperation(value="认证清单关联按平台件", notes="认证清单关联按平台件")
@GetMapping(value = "/connectPlatform")
public Result<?> connectPlatform(String id,String cut) {
ProjectCertificationInventoryEO projectCertificationInventoryEO = projectCertificationInventoryEOService.connectPlatform(id,cut);
if(projectCertificationInventoryEO==null) {
List<ProjectCertificationInventoryEO> projectCertificationInventoryEOList = projectCertificationInventoryEOService.connectPlatform(id,cut);
if(projectCertificationInventoryEOList==null) {
return Result.error("未找到对应数据");
}
return Result.OK(projectCertificationInventoryEO);
return Result.OK(projectCertificationInventoryEOList);
}
}
@@ -346,5 +346,5 @@ public interface IProjectCertificationInventoryEOService extends IService<Projec
*/
String listPlatform(Map<String, Object> params);
ProjectCertificationInventoryEO connectPlatform(String id,String cut);
List<ProjectCertificationInventoryEO> connectPlatform(String id,String cut);
}
@@ -7466,13 +7466,13 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
* @return
*/
@Override
public ProjectCertificationInventoryEO connectPlatform(String id,String cut) {
public List<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();
return new ArrayList<>();
}
ProjectCertificationInventoryEO certificationInventoryEO = projectCertificationInventoryEOService.queryById(lawsInventoryPlatformEOList.get(0).getLawsInventoryId());
@@ -7502,7 +7502,9 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
String projectName = projectLibraryBase.getPlatformType()+"-"+projectLibraryBase.getPower()+"-"+projectLibraryBase.getProducer()+"-"+targetMarket;
certificationInventoryEO.setProjectName(projectName);
}
return certificationInventoryEO;
List<ProjectCertificationInventoryEO> projectCertificationInventoryEOList = new ArrayList<>();
projectCertificationInventoryEOList.add(certificationInventoryEO);
return projectCertificationInventoryEOList;
}