From 3bdf2a1f2757de8ab6570508385d89124243943c Mon Sep 17 00:00:00 2001 From: 이민희 <mhlee@maprex.co.kr> Date: 금, 10 12월 2021 15:34:13 +0900 Subject: [PATCH] 일반회원 대시보드 오류 해결 --- src/main/java/kr/wisestone/owl/service/impl/IssueServiceImpl.java | 4 +- src/main/resources/mybatis/query-template/project-template.xml | 6 +++ src/main/java/kr/wisestone/owl/service/impl/WidgetServiceImpl.java | 1 src/main/resources/mybatis/query-template/issue-template.xml | 3 + src/main/resources/mybatis/query-template/widget-template.xml | 65 +++++++++++++++++++++++++++++++- src/main/webapp/views/common/header.html | 2 6 files changed, 76 insertions(+), 5 deletions(-) diff --git a/src/main/java/kr/wisestone/owl/service/impl/IssueServiceImpl.java b/src/main/java/kr/wisestone/owl/service/impl/IssueServiceImpl.java index 21fc7e7..5f53d71 100644 --- a/src/main/java/kr/wisestone/owl/service/impl/IssueServiceImpl.java +++ b/src/main/java/kr/wisestone/owl/service/impl/IssueServiceImpl.java @@ -718,11 +718,11 @@ public List<IssueVo> findIssue(Map<String, Object> resJsonData, IssueCondition issueCondition, Pageable pageable) { // 寃��깋 議곌굔�쓣 留뚮뱺�떎 - if (!this.makeIssueSearchCondition(issueCondition, Lists.newArrayList("01", "02", "03"), pageable)) { + /*if (!this.makeIssueSearchCondition(issueCondition, Lists.newArrayList("01", "02", "03"), pageable)) { // �씠�뒋 紐⑸줉�쓣 李얠� 紐삵븷 寃쎌슦 湲곕낯 �젙蹂대줈 由ы꽩�븳�떎. this.notFoundIssueList(resJsonData, pageable); return Lists.newArrayList(); - } + }*/ Set<String> issueIds = new HashSet<>(); // �궗�슜�옄 �젙�쓽 �븘�뱶 寃��깋�떆 �굹�삤�뒗 �씠�뒋 �븘�씠�뵒 ���옣 而щ젆�뀡 diff --git a/src/main/java/kr/wisestone/owl/service/impl/WidgetServiceImpl.java b/src/main/java/kr/wisestone/owl/service/impl/WidgetServiceImpl.java index 5551cfa..510d85c 100644 --- a/src/main/java/kr/wisestone/owl/service/impl/WidgetServiceImpl.java +++ b/src/main/java/kr/wisestone/owl/service/impl/WidgetServiceImpl.java @@ -402,6 +402,7 @@ if (widgetCondition.getProjectIds().size() > 0) { SetMeAndDownProjectIds(widgetCondition.getProjectIds(), widgetCondition); + this.SetMyDepartmentId(widgetCondition); todayCount = this.widgetMapper.countTodayMyAssigneeIssue(widgetCondition); assigneeIssues = this.widgetMapper.findMyAssigneeIssue(widgetCondition); totalCount = this.widgetMapper.countMyAssigneeIssue(widgetCondition); diff --git a/src/main/resources/mybatis/query-template/issue-template.xml b/src/main/resources/mybatis/query-template/issue-template.xml index 6df1c93..d6d1ee8 100644 --- a/src/main/resources/mybatis/query-template/issue-template.xml +++ b/src/main/resources/mybatis/query-template/issue-template.xml @@ -718,6 +718,9 @@ #{item} </foreach> </when> + <otherwise> + AND 1 != 1 + </otherwise> </choose> <choose> diff --git a/src/main/resources/mybatis/query-template/project-template.xml b/src/main/resources/mybatis/query-template/project-template.xml index e2d6b13..f5054ef 100644 --- a/src/main/resources/mybatis/query-template/project-template.xml +++ b/src/main/resources/mybatis/query-template/project-template.xml @@ -88,6 +88,9 @@ #{item} </foreach> </when> + <otherwise> + AND 1 != 1 + </otherwise> </choose> <choose> @@ -190,6 +193,9 @@ #{item} </foreach> </when> + <otherwise> + AND 1 != 1 + </otherwise> </choose> <choose> diff --git a/src/main/resources/mybatis/query-template/widget-template.xml b/src/main/resources/mybatis/query-template/widget-template.xml index 22cd788..4b94ec0 100644 --- a/src/main/resources/mybatis/query-template/widget-template.xml +++ b/src/main/resources/mybatis/query-template/widget-template.xml @@ -47,6 +47,9 @@ #{item} </foreach> </when> + <otherwise> + AND 1 != 1 + </otherwise> </choose> </select> @@ -90,6 +93,9 @@ #{item} </foreach> </when> + <otherwise> + AND 1 != 1 + </otherwise> </choose> AND i.complete_date IS NOT NULL AND i.complete_date <![CDATA[ < ]]> #{completeDate} @@ -217,6 +223,9 @@ #{item} </foreach> </when> + <otherwise> + AND 1 != 1 + </otherwise> </choose> AND i.register_date BETWEEN (CURDATE()) AND (CURDATE() + INTERVAL 1 DAY) </select> @@ -325,6 +334,9 @@ #{item} </foreach> </when> + <otherwise> + AND 1 != 1 + </otherwise> </choose> </select> @@ -539,12 +551,15 @@ INNER JOIN user_department ud ON ud.department_id = isd.department_id where isd.issue_id = i.id <choose> - <when test="myDepartmentIds.size != 0"> + <when test="myDepartmentIds != null and myDepartmentIds.size != 0"> AND isd.department_id IN <foreach collection="myDepartmentIds" item="item" index="index" separator="," open="(" close=")"> #{item} </foreach> </when> + <otherwise> + AND 1 != 1 + </otherwise> </choose> and isd.register_date BETWEEN (CURDATE()) AND (CURDATE() + INTERVAL 1 DAY)) @@ -603,6 +618,9 @@ #{item} </foreach> </when> + <otherwise> + AND 1 != 1 + </otherwise> </choose> And iss.issue_status_type != 'CLOSE' </select> @@ -699,12 +717,15 @@ </when> </choose> <choose> - <when test="myDepartmentIds.size != 0"> + <when test="myDepartmentIds != null and myDepartmentIds.size != 0"> AND isd.department_id IN <foreach collection="myDepartmentIds" item="item" index="index" separator="," open="(" close=")"> #{item} </foreach> </when> + <otherwise> + AND 1 != 1 + </otherwise> </choose> and iss.issue_status_type != 'CLOSE' GROUP by i.id @@ -1030,6 +1051,17 @@ </foreach> </when> </choose> + <choose> + <when test="myDepartmentIds != null and myDepartmentIds.size != 0"> + AND isd.department_id IN + <foreach collection="myDepartmentIds" item="item" index="index" separator="," open="(" close=")"> + #{item} + </foreach> + </when> + <otherwise> + AND 1 != 1 + </otherwise> + </choose> group by p.id </select> @@ -1136,6 +1168,9 @@ #{item} </foreach> </when> + <otherwise> + AND 1 != 1 + </otherwise> </choose> and p.status = '02'; </select> @@ -1213,6 +1248,9 @@ #{item} </foreach> </when> + <otherwise> + AND 1 != 1 + </otherwise> </choose> and iss.issue_status_type = 'CLOSE' <choose> @@ -1258,6 +1296,9 @@ #{item} </foreach> </when> + <otherwise> + AND 1 != 1 + </otherwise> </choose> <choose> <when test="meAndDownProjectIds != null and meAndDownProjectIds.size != 0"> @@ -1289,6 +1330,17 @@ INNER JOIN issue_department isd ON isd.issue_id = issue.id INNER JOIN user_department ud ON ud.department_id = isd.department_id WHERE issue.project_id = #{projectId} + <choose> + <when test="myDepartmentIds != null and myDepartmentIds.size != 0"> + AND isd.department_id IN + <foreach collection="myDepartmentIds" item="item" index="index" separator="," open="(" close=")"> + #{item} + </foreach> + </when> + <otherwise> + AND 1 != 1 + </otherwise> + </choose> GROUP BY issue_type.name </select> @@ -1350,6 +1402,9 @@ #{item} </foreach> </when> + <otherwise> + AND 1 != 1 + </otherwise> </choose> </select> @@ -1426,6 +1481,9 @@ #{item} </foreach> </when> + <otherwise> + AND 1 != 1 + </otherwise> </choose> <if test="page != null and !page.equals('')"> limit #{pageSize} offset #{page}; @@ -1481,6 +1539,9 @@ #{item} </foreach> </when> + <otherwise> + AND 1 != 1 + </otherwise> </choose> </select> diff --git a/src/main/webapp/views/common/header.html b/src/main/webapp/views/common/header.html index 74c4e5a..9383080 100644 --- a/src/main/webapp/views/common/header.html +++ b/src/main/webapp/views/common/header.html @@ -27,7 +27,7 @@ </div> <div class="top-right col-lg-4"> <!-- �쟾泥� �봽濡쒖젥�듃 �씪�븣 �씠�뒋 留뚮뱾湲� 踰꾪듉 �닲源� --> - <button class="btn btn-xlg btn-primary btn-rounded mr-10" ng-if="$root.checkMngPermissionSettings() && $root.workProject.id > -1" ng-click="fn.addIssue()" tabindex="-1"> + <button class="btn btn-xlg btn-primary btn-rounded mr-10" ng-if="$root.workProject.id > -1" ng-click="fn.addIssue()" tabindex="-1"> <i class="os-icon os-icon-plus"></i> <span translate="issue.createIssue">�씠�뒋 留뚮뱾湲�</span> </button> -- Gitblit v1.8.0