|
@@ -34,8 +34,13 @@ public class WbsInfoServiceImpl extends BaseServiceImpl<WbsInfoMapper, WbsInfo>
|
|
|
@Override
|
|
|
public IPage<WbsInfo> selectWbsInfoPage(IPage<WbsInfo> page, WbsInfoDTO wbsInfo) {
|
|
|
Set<Long> wbsIds = new HashSet<>();
|
|
|
- if (StringUtil.hasText(wbsInfo.getProjectName())) {
|
|
|
- List<ProjectInfo> projectInfoList = jdbcTemplate.query("select * from m_project_info where project_name like '%" + wbsInfo.getProjectName() + "%'", new BeanPropertyRowMapper<>(ProjectInfo.class));
|
|
|
+ if (StringUtil.hasText(wbsInfo.getProjectName()) || wbsInfo.getProjectId() != null) {
|
|
|
+ List<ProjectInfo> projectInfoList;
|
|
|
+ if (wbsInfo.getProjectId() != null) {
|
|
|
+ projectInfoList = jdbcTemplate.query("select * from m_project_info where id = " + wbsInfo.getProjectId(), new BeanPropertyRowMapper<>(ProjectInfo.class));
|
|
|
+ } else {
|
|
|
+ projectInfoList = jdbcTemplate.query("select * from m_project_info where project_name like '%" + wbsInfo.getProjectName() + "%'", new BeanPropertyRowMapper<>(ProjectInfo.class));
|
|
|
+ }
|
|
|
if (projectInfoList.isEmpty()) {
|
|
|
return page;
|
|
|
}
|