fix(工作台): 修复缺陷本地平台显示加过滤条件问题
--bug=1050351 --user=郭雨琦 修复缺陷本地平台显示加过滤条件问题 https://www.tapd.cn/55049933/bugtrace/bugs/view/1155049933001050351
This commit is contained in:
parent
175efbe100
commit
91e6ce2867
|
@ -139,4 +139,7 @@ public interface ExtBugMapper {
|
||||||
List<Bug>getSimpleList(@Param("projectId") String projectId, @Param("startTime") Long startTime, @Param("endTime") Long endTime,@Param("handleUsers") Set<String> handleUsers,@Param("createUser") String createUser, @Param("platforms") Set<String> platforms);
|
List<Bug>getSimpleList(@Param("projectId") String projectId, @Param("startTime") Long startTime, @Param("endTime") Long endTime,@Param("handleUsers") Set<String> handleUsers,@Param("createUser") String createUser, @Param("platforms") Set<String> platforms);
|
||||||
|
|
||||||
List<Bug>getByHandleUser(@Param("projectId") String projectId, @Param("startTime") Long startTime, @Param("endTime") Long endTime,@Param("localHandleUser") String localHandleUser,@Param("createUser") String createUser,@Param("thirdHandleUser") String thirdHandleUser, @Param("thirdPlatform") String thirdPlatform);
|
List<Bug>getByHandleUser(@Param("projectId") String projectId, @Param("startTime") Long startTime, @Param("endTime") Long endTime,@Param("localHandleUser") String localHandleUser,@Param("createUser") String createUser,@Param("thirdHandleUser") String thirdHandleUser, @Param("thirdPlatform") String thirdPlatform);
|
||||||
|
|
||||||
|
long localBugCount(@Param("projectId") String projectId);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -517,5 +517,14 @@
|
||||||
)
|
)
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<select id="localBugCount"
|
||||||
|
resultType="java.lang.Long">
|
||||||
|
SELECT count(id)
|
||||||
|
FROM bug
|
||||||
|
WHERE bug.deleted = false
|
||||||
|
AND bug.project_id = #{projectId}
|
||||||
|
AND bug.platform = 'Local'
|
||||||
|
</select>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
||||||
|
|
|
@ -1121,9 +1121,13 @@ public class DashboardService {
|
||||||
|
|
||||||
@NotNull
|
@NotNull
|
||||||
private List<SelectOption> getStatusOption(String projectId, String platformName) {
|
private List<SelectOption> getStatusOption(String projectId, String platformName) {
|
||||||
List<SelectOption> allLocalStatusOptions = bugStatusService.getAllLocalStatusOptions(projectId);
|
List<SelectOption> headerStatusOption = new ArrayList<>();
|
||||||
rebuildStatusName(BugPlatform.LOCAL.getName(), allLocalStatusOptions);
|
long localBugCount = extBugMapper.localBugCount(projectId);
|
||||||
List<SelectOption> headerStatusOption = new ArrayList<>(allLocalStatusOptions);
|
if (localBugCount >0 || StringUtils.equals(platformName, BugPlatform.LOCAL.getName())) {
|
||||||
|
List<SelectOption> allLocalStatusOptions = bugStatusService.getAllLocalStatusOptions(projectId);
|
||||||
|
rebuildStatusName(BugPlatform.LOCAL.getName(), allLocalStatusOptions);
|
||||||
|
headerStatusOption.addAll(allLocalStatusOptions);
|
||||||
|
}
|
||||||
if (!StringUtils.equals(platformName, BugPlatform.LOCAL.getName())) {
|
if (!StringUtils.equals(platformName, BugPlatform.LOCAL.getName())) {
|
||||||
List<SelectOption> thirdStatusOptions = bugStatusService.getHeaderStatusOption(projectId);
|
List<SelectOption> thirdStatusOptions = bugStatusService.getHeaderStatusOption(projectId);
|
||||||
rebuildStatusName(platformName, thirdStatusOptions);
|
rebuildStatusName(platformName, thirdStatusOptions);
|
||||||
|
@ -1795,9 +1799,13 @@ public class DashboardService {
|
||||||
|
|
||||||
@NotNull
|
@NotNull
|
||||||
private List<SelectOption> getHeaderStatusOption(String projectId, String platformName, List<String> endStatus) {
|
private List<SelectOption> getHeaderStatusOption(String projectId, String platformName, List<String> endStatus) {
|
||||||
List<SelectOption> allLocalStatusOptions = bugStatusService.getAllLocalStatusOptions(projectId);
|
List<SelectOption> headerStatusOption = new ArrayList<>();
|
||||||
rebuildStatusName(BugPlatform.LOCAL.getName(), allLocalStatusOptions);
|
long localBugCount = extBugMapper.localBugCount(projectId);
|
||||||
List<SelectOption> headerStatusOption = new ArrayList<>(allLocalStatusOptions);
|
if (localBugCount >0 || StringUtils.equals(platformName, BugPlatform.LOCAL.getName())) {
|
||||||
|
List<SelectOption> allLocalStatusOptions = bugStatusService.getAllLocalStatusOptions(projectId);
|
||||||
|
rebuildStatusName(BugPlatform.LOCAL.getName(), allLocalStatusOptions);
|
||||||
|
headerStatusOption.addAll(allLocalStatusOptions);
|
||||||
|
}
|
||||||
if (!StringUtils.equals(platformName, BugPlatform.LOCAL.getName())) {
|
if (!StringUtils.equals(platformName, BugPlatform.LOCAL.getName())) {
|
||||||
List<SelectOption> thirdStatusOptions = bugStatusService.getHeaderStatusOption(projectId);
|
List<SelectOption> thirdStatusOptions = bugStatusService.getHeaderStatusOption(projectId);
|
||||||
rebuildStatusName(platformName, thirdStatusOptions);
|
rebuildStatusName(platformName, thirdStatusOptions);
|
||||||
|
|
Loading…
Reference in New Issue