对应版本下拉

This commit is contained in:
zhn
2023-08-29 09:54:44 +08:00
parent 5a212a54f3
commit 17ffa7dbdc
3 changed files with 27 additions and 0 deletions
@@ -251,4 +251,17 @@ public class ProjectRxswinEOController extends JeroController<ProjectRxswinEO, I
return Result.OK("");
}
/**
* 对应版本下拉
*
* @return
*/
@AutoLog(value = "对应版本下拉")
@ApiOperation(value="对应版本下拉", notes="对应版本下拉")
@GetMapping(value = "/getVersionList")
public Result<List<String>> getVersionList(String projectId) {
List<String> list = projectRxswinEOService.getVersionList(projectId);
return Result.OK(list);
}
}
@@ -98,4 +98,6 @@ public interface IProjectRxswinEOService extends IService<ProjectRxswinEO> {
void addBatch(String projectId,String ids,String flag);
List<String> getVersionList(String projectId);
}
@@ -347,6 +347,18 @@ public class ProjectRxswinEOServiceImpl extends ServiceImpl<ProjectRxswinEOMappe
}
}
@Override
public List<String> getVersionList(String projectId) {
LambdaQueryWrapper<ProjectRxswinEO> wrapper = new LambdaQueryWrapper<>();
wrapper.eq(ProjectRxswinEO::getProjectId,projectId);
List<ProjectRxswinEO> rxswinEOList = this.list(wrapper);
List<String> versionList = rxswinEOList.stream().map(ProjectRxswinEO::getVersion).distinct().collect(Collectors.toList());
Collections.sort(versionList,(a,b)->{
return Integer.parseInt(a) - Integer.parseInt(b);
});
return versionList;
}
public List<BussDocumentLibraryEO> getBussDocumentLibraryEOList(List<String> documentIdList){
LambdaQueryWrapper<BussDocumentLibraryEO> wrapper = new LambdaQueryWrapper<>();