From 689e17c797bf3844f7b6b6f7c086df9bd8f72a0c Mon Sep 17 00:00:00 2001 From: wyu <kknd09321@nate.com> Date: 화, 28 12월 2021 19:45:34 +0900 Subject: [PATCH] Merge branch 'master' of http://192.168.0.25:9001/r/owl-kisa --- src/main/resources/mybatis/query-template/project-template.xml | 98 +++++++------ src/main/java/kr/wisestone/owl/service/impl/WidgetServiceImpl.java | 12 + src/main/webapp/scripts/app/project/projectModify.controller.js | 2 src/main/java/kr/wisestone/owl/service/impl/ProjectServiceImpl.java | 4 src/main/webapp/views/project/projectAdd.html | 12 src/main/webapp/views/project/projectModify.html | 11 src/main/webapp/custom_components/widget/project-progress-widget/project-progress-widget.html | 3 src/main/resources/mybatis/query-template/widget-template.xml | 186 ++++++++++++++------------ src/main/webapp/views/issue/issueDetail.html | 11 - src/main/webapp/scripts/app/issue/issueDetail.controller.js | 53 ++++--- src/main/webapp/scripts/app/project/projectAdd.controller.js | 2 11 files changed, 207 insertions(+), 187 deletions(-) diff --git a/src/main/java/kr/wisestone/owl/service/impl/ProjectServiceImpl.java b/src/main/java/kr/wisestone/owl/service/impl/ProjectServiceImpl.java index 27fb86f..35baccf 100644 --- a/src/main/java/kr/wisestone/owl/service/impl/ProjectServiceImpl.java +++ b/src/main/java/kr/wisestone/owl/service/impl/ProjectServiceImpl.java @@ -121,8 +121,8 @@ project.setProjectKey("BTS"); project.setStatus(Project.PROJECT_OPEN); project.setDescription(this.messageAccessor.message("common.intoTheSystemIssueManagementProject")); // �떆�뒪�뀥�뿉�꽌 湲곕낯�쑝濡� �젣怨듬릺�뒗 �씠�뒋 愿�由� �봽濡쒖젥�듃�엯�땲�떎. - project.setStartDate(DateUtil.convertDateToYYYYMMDD(new Date())); - project.setEndDate(DateUtil.convertDateToYYYYMMDD(DateUtil.addDays(new Date(), 3650))); + //project.setStartDate(DateUtil.convertDateToYYYYMMDD(new Date())); + //project.setEndDate(DateUtil.convertDateToYYYYMMDD(DateUtil.addDays(new Date(), 3650))); // 湲곕낯�쑝濡� �깮�꽦�릺�뒗 �봽濡쒖젥�듃�쓽 �쑀�삎�� BTS project.setProjectType(ProjectType.BTS_PROJECT); project.setWorkspace(workspace); 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 2ae3432..b2b71cc 100644 --- a/src/main/java/kr/wisestone/owl/service/impl/WidgetServiceImpl.java +++ b/src/main/java/kr/wisestone/owl/service/impl/WidgetServiceImpl.java @@ -283,8 +283,10 @@ SetMyDepartmentId(widgetCondition); remainIssue = this.widgetMapper.countRemainIssueByDepartment(widgetCondition); // �옍�뿬 �씠�뒋 delayIssue = this.widgetMapper.countTodayDelayIssueByDepartment(widgetCondition); // 吏��뿰�맂 �씠�뒋 - assigneeIssue = this.widgetMapper.countAssigneeIssueByDepartment(widgetCondition); // �븷�떦�맂 �씠�뒋 - registerIssue = this.widgetMapper.countTodayRegisterIssueByDepartment(widgetCondition); // �벑濡앺븳 �씠�뒋 + //assigneeIssue = this.widgetMapper.countAssigneeIssueByDepartment(widgetCondition); // �븷�떦�맂 �씠�뒋 + assigneeIssue = this.widgetMapper.countAssigneeIssue(widgetCondition); // �븷�떦�맂 �씠�뒋 + //registerIssue = this.widgetMapper.countTodayRegisterIssueByDepartment(widgetCondition); // �벑濡앺븳 �씠�뒋 + registerIssue = this.widgetMapper.countTodayRegisterIssue(widgetCondition); // �벑濡앺븳 �씠�뒋 //noAssigneeIssue = this.widgetMapper.countNoAssigneeIssueByDepartment(widgetCondition); // �씪諛� �쑀���뒗 誘명븷�떦 �씠�뒋 0媛쒕줈 蹂댁씠寃� completeIssue = this.widgetMapper.countCompleteIssueByDepartment(widgetCondition); // �셿猷뚮맂 �씠�뒋 } @@ -448,7 +450,7 @@ if (widgetCondition.getProjectIds().size() > 0) { SetMeAndDownProjectIds(widgetCondition.getProjectIds(), widgetCondition); - + this.SetMyDepartmentId(widgetCondition); delayIssues = this.widgetMapper.findDelayIssue(widgetCondition); totalCount = this.widgetMapper.countDelayIssue(widgetCondition); } @@ -1197,11 +1199,11 @@ excelInfo.setFileName(this.messageAccessor.message("common.managementRisk")); // �쐞�뿕 愿�由� excelInfo.setDatas(riskIssues); excelInfo.addAttrInfos(new ExportExcelAttrVo("issueKey", this.messageAccessor.message("common.issueKey"), 6, ExportExcelAttrVo.ALIGN_CENTER)); // �씠�뒋 踰덊샇 - excelInfo.addAttrInfos(new ExportExcelAttrVo("riskType", this.messageAccessor.message("common.division"), 15, ExportExcelAttrVo.ALIGN_CENTER)); // 援щ텇 + //excelInfo.addAttrInfos(new ExportExcelAttrVo("riskType", this.messageAccessor.message("common.division"), 15, ExportExcelAttrVo.ALIGN_CENTER)); // 援щ텇 excelInfo.addAttrInfos(new ExportExcelAttrVo("projectName", this.messageAccessor.message("common.project"), 15, ExportExcelAttrVo.ALIGN_LEFT)); // �봽濡쒖젥�듃 excelInfo.addAttrInfos(new ExportExcelAttrVo("title", this.messageAccessor.message("common.issueTitle"), 40, ExportExcelAttrVo.ALIGN_LEFT)); // �씠�뒋 excelInfo.addAttrInfos(new ExportExcelAttrVo("issueStatusName", this.messageAccessor.message("common.status"), 6, ExportExcelAttrVo.ALIGN_CENTER)); // �긽�깭 - excelInfo.addAttrInfos(new ExportExcelAttrVo("issueUsers", this.messageAccessor.message("common.assignee"), 20, ExportExcelAttrVo.ALIGN_CENTER)); // �떞�떦�옄 + //excelInfo.addAttrInfos(new ExportExcelAttrVo("issueUsers", this.messageAccessor.message("common.assignee"), 20, ExportExcelAttrVo.ALIGN_CENTER)); // �떞�떦�옄 return excelInfo; } diff --git a/src/main/resources/mybatis/query-template/project-template.xml b/src/main/resources/mybatis/query-template/project-template.xml index 823b0f3..cd7a94e 100644 --- a/src/main/resources/mybatis/query-template/project-template.xml +++ b/src/main/resources/mybatis/query-template/project-template.xml @@ -77,7 +77,7 @@ INNER JOIN user_department ud on ud.department_id = prd.department_id INNER JOIN workspace ws on ws.id = p.workspace_id LEFT JOIN project_closure pc ON p.id = pc.project_id - WHERE 1=1 + WHERE if (pc.parent_project_id > -1, pc.parent_project_id, -1) = -1 <if test="name != '' and name != null"> AND p.name like CONCAT('%',#{name},'%') </if> @@ -181,6 +181,7 @@ INNER JOIN workspace ws on ws.id = p.workspace_id LEFT JOIN project_closure pc on p.id = pc.project_id WHERE prd.department_id = ud.id + AND if (pc.parent_project_id > -1, pc.parent_project_id, -1) = -1 <if test="name != '' and name != null"> AND p.name like CONCAT('%',#{name},'%') </if> @@ -377,43 +378,43 @@ </choose> </select> - <!-- <select id="findByWorkspaceIdAndIncludeProjectAll" resultType="java.util.HashMap" - parameterType="kr.wisestone.owl.web.condition.ProjectCondition"> - SELECT - DISTINCT p.id as id, - p.name as name, - p.description as description, - p.status as status, - p.start_date as startDate, - p.end_date as endDate, - p.project_key as projectKey, - CASE p.default_yn WHEN 'Y' THEN 'true' ELSE 'false' END as defaultYn - FROM - project p - INNER JOIN project_role pr on p.id = pr.project_id - INNER JOIN project_role_user pru on pru.project_role_id = pr.id - WHERE pru.user_id = #{loginUserId} - AND p.workspace_id = #{workspaceId} - <if test="name != '' and name != null"> - AND p.name like CONCAT('%',#{name},'%') - </if> - <choose> - <when test="statuses.size != 0"> - AND p.status IN - <foreach collection="statuses" item="item" index="index" separator="," open="(" close=")"> - #{item} - </foreach> - </when> - </choose> - <choose> - <when test="excludeIds.size != 0"> - AND p.id NOT IN - <foreach collection="excludeIds" item="item" index="index" separator="," open="(" close=")"> - #{item} - </foreach> - </when> - </choose> - </select>--> + <!-- <select id="findByWorkspaceIdAndIncludeProjectAll" resultType="java.util.HashMap" + parameterType="kr.wisestone.owl.web.condition.ProjectCondition"> + SELECT + DISTINCT p.id as id, + p.name as name, + p.description as description, + p.status as status, + p.start_date as startDate, + p.end_date as endDate, + p.project_key as projectKey, + CASE p.default_yn WHEN 'Y' THEN 'true' ELSE 'false' END as defaultYn + FROM + project p + INNER JOIN project_role pr on p.id = pr.project_id + INNER JOIN project_role_user pru on pru.project_role_id = pr.id + WHERE pru.user_id = #{loginUserId} + AND p.workspace_id = #{workspaceId} + <if test="name != '' and name != null"> + AND p.name like CONCAT('%',#{name},'%') + </if> + <choose> + <when test="statuses.size != 0"> + AND p.status IN + <foreach collection="statuses" item="item" index="index" separator="," open="(" close=")"> + #{item} + </foreach> + </when> + </choose> + <choose> + <when test="excludeIds.size != 0"> + AND p.id NOT IN + <foreach collection="excludeIds" item="item" index="index" separator="," open="(" close=")"> + #{item} + </foreach> + </when> + </choose> + </select>--> <!-- �빐�떦 �뾽臾� 怨듦컙�뿉�꽌 李몄뿬�븯怨� �엳�뒗 吏꾪뻾以묒씤 �봽濡쒖젥�듃瑜� 議고쉶�븳�떎 --> <select id="findByWorkspaceIdAndIncludeProjectAll" resultType="java.util.HashMap" @@ -564,6 +565,7 @@ INNER JOIN user_department ud on ud.department_id = prd.department_id LEFT JOIN project_closure pc ON p.id = pc.project_id WHERE prd.department_id = ud.department_id + AND if (pc.parent_project_id > -1, pc.parent_project_id, -1) = -1 AND p.workspace_id = #{workspaceId} <if test="name != '' and name != null"> AND p.name like CONCAT('%',#{name},'%') @@ -623,17 +625,17 @@ <select id="findChildrenProject" resultType="java.util.HashMap" parameterType="long"> SELECT - p.id as id, - p.name as name, - p.description as description, - p.status as status, - p.start_date as startDate, - p.end_date as endDate, - p.project_key as projectKey, - pc.parent_project_id as parentProjectId + p.id as id, + p.name as name, + p.description as description, + p.status as status, + p.start_date as startDate, + p.end_date as endDate, + p.project_key as projectKey, + pc.parent_project_id as parentProjectId FROM - project p - LEFT JOIN project_closure pc ON p.id = pc.project_id + project p + LEFT JOIN project_closure pc ON p.id = pc.project_id WHERE pc.parent_project_id = #{parent_project_id} </select> diff --git a/src/main/resources/mybatis/query-template/widget-template.xml b/src/main/resources/mybatis/query-template/widget-template.xml index 6da8334..1f57277 100644 --- a/src/main/resources/mybatis/query-template/widget-template.xml +++ b/src/main/resources/mybatis/query-template/widget-template.xml @@ -15,9 +15,9 @@ WHERE EXISTS(SELECT 1 FROM issue_status iss WHERE iss.issue_status_type != 'CLOSE' AND i.issue_status_id = iss.id) <choose> - <when test="meAndDownProjectIds != null and meAndDownProjectIds.size != 0"> + <when test="projectIds != null and projectIds.size != 0"> AND i.project_id IN - <foreach collection="meAndDownProjectIds" item="item" index="index" separator="," open="(" close=")"> + <foreach collection="projectIds" item="item" index="index" separator="," open="(" close=")"> #{item} </foreach> </when> @@ -33,9 +33,9 @@ WHERE EXISTS(SELECT 1 FROM issue_status iss WHERE iss.issue_status_type != 'CLOSE' AND i.issue_status_id = iss.id) <choose> - <when test="meAndDownProjectIds != null and meAndDownProjectIds.size != 0"> + <when test="projectIds != null and projectIds.size != 0"> AND i.project_id IN - <foreach collection="meAndDownProjectIds" item="item" index="index" separator="," open="(" close=")"> + <foreach collection="projectIds" item="item" index="index" separator="," open="(" close=")"> #{item} </foreach> </when> @@ -60,9 +60,9 @@ COUNT(i.id) FROM issue i where exists(select 1 from issue_status iss where iss.id = i.issue_status_id and iss.issue_status_type != 'CLOSE') <choose> - <when test="meAndDownProjectIds != null and meAndDownProjectIds.size != 0"> + <when test="projectIds != null and projectIds.size != 0"> AND i.project_id IN - <foreach collection="meAndDownProjectIds" item="item" index="index" separator="," open="(" close=")"> + <foreach collection="projectIds" item="item" index="index" separator="," open="(" close=")"> #{item} </foreach> </when> @@ -79,9 +79,9 @@ INNER JOIN user_department ud ON ud.department_id = isd.department_id where exists(select 1 from issue_status iss where iss.id = i.issue_status_id and iss.issue_status_type != 'CLOSE') <choose> - <when test="meAndDownProjectIds != null and meAndDownProjectIds.size != 0"> + <when test="projectIds != null and projectIds.size != 0"> AND i.project_id IN - <foreach collection="meAndDownProjectIds" item="item" index="index" separator="," open="(" close=")"> + <foreach collection="projectIds" item="item" index="index" separator="," open="(" close=")"> #{item} </foreach> </when> @@ -145,9 +145,9 @@ </choose> ) AND EXISTS(SELECT 1 FROM issue_status iss WHERE iss.id = i.issue_status_id and iss.issue_status_type != 'CLOSE') <choose> - <when test="meAndDownProjectIds != null and meAndDownProjectIds.size != 0"> + <when test="projectIds != null and projectIds.size != 0"> AND i.project_id IN - <foreach collection="meAndDownProjectIds" item="item" index="index" separator="," open="(" close=")"> + <foreach collection="projectIds" item="item" index="index" separator="," open="(" close=")"> #{item} </foreach> </when> @@ -174,9 +174,9 @@ </choose> ) AND EXISTS(SELECT 1 FROM issue_status iss WHERE iss.id = i.issue_status_id and iss.issue_status_type != 'CLOSE') <choose> - <when test="meAndDownProjectIds != null and meAndDownProjectIds.size != 0"> + <when test="projectIds != null and projectIds.size != 0"> AND i.project_id IN - <foreach collection="meAndDownProjectIds" item="item" index="index" separator="," open="(" close=")"> + <foreach collection="projectIds" item="item" index="index" separator="," open="(" close=")"> #{item} </foreach> </when> @@ -190,9 +190,9 @@ count(i.id) as todayCount from issue i where i.register_id = #{loginUserId} <choose> - <when test="meAndDownProjectIds != null and meAndDownProjectIds.size != 0"> + <when test="projectIds != null and projectIds.size != 0"> AND i.project_id IN - <foreach collection="meAndDownProjectIds" item="item" index="index" separator="," open="(" close=")"> + <foreach collection="projectIds" item="item" index="index" separator="," open="(" close=")"> #{item} </foreach> </when> @@ -209,9 +209,9 @@ where i.register_id = #{loginUserId} <choose> - <when test="meAndDownProjectIds != null and meAndDownProjectIds.size != 0"> + <when test="projectIds != null and projectIds.size != 0"> AND i.project_id IN - <foreach collection="meAndDownProjectIds" item="item" index="index" separator="," open="(" close=")"> + <foreach collection="projectIds" item="item" index="index" separator="," open="(" close=")"> #{item} </foreach> </when> @@ -239,9 +239,9 @@ WHERE EXISTS(select 1 from issue_status iss where iss.id = i.issue_status_id and iss.issue_status_type != 'CLOSE') <choose> - <when test="meAndDownProjectIds.size != 0"> + <when test="projectIds.size != 0"> AND i.project_id IN - <foreach collection="meAndDownProjectIds" item="item" index="index" separator="," open="(" close=")"> + <foreach collection="projectIds" item="item" index="index" separator="," open="(" close=")"> #{item} </foreach> </when> @@ -258,9 +258,9 @@ WHERE EXISTS(select 1 from issue_status iss where iss.id = i.issue_status_id and iss.issue_status_type != 'CLOSE') <choose> - <when test="meAndDownProjectIds != null and meAndDownProjectIds.size != 0"> + <when test="projectIds != null and projectIds.size != 0"> AND i.project_id IN - <foreach collection="meAndDownProjectIds" item="item" index="index" separator="," open="(" close=")"> + <foreach collection="projectIds" item="item" index="index" separator="," open="(" close=")"> #{item} </foreach> </when> @@ -276,9 +276,9 @@ WHERE EXISTS(select 1 from issue_status iss where iss.id = i.issue_status_id and iss.issue_status_type != 'CLOSE') <choose> - <when test="meAndDownProjectIds != null and meAndDownProjectIds.size != 0"> + <when test="projectIds != null and projectIds.size != 0"> AND i.project_id IN - <foreach collection="meAndDownProjectIds" item="item" index="index" separator="," open="(" close=")"> + <foreach collection="projectIds" item="item" index="index" separator="," open="(" close=")"> #{item} </foreach> </when> @@ -302,9 +302,9 @@ inner join issue_status iss on iss.id = i.issue_status_id where iss.issue_status_type = 'CLOSE' <choose> - <when test="meAndDownProjectIds != null and meAndDownProjectIds.size != 0"> + <when test="projectIds != null and projectIds.size != 0"> AND i.project_id IN - <foreach collection="meAndDownProjectIds" item="item" index="index" separator="," open="(" close=")"> + <foreach collection="projectIds" item="item" index="index" separator="," open="(" close=")"> #{item} </foreach> </when> @@ -320,9 +320,9 @@ INNER JOIN user_department ud ON ud.department_id = isd.department_id where iss.issue_status_type = 'CLOSE' <choose> - <when test="meAndDownProjectIds != null and meAndDownProjectIds.size != 0"> + <when test="projectIds != null and projectIds.size != 0"> AND i.project_id IN - <foreach collection="meAndDownProjectIds" item="item" index="index" separator="," open="(" close=")"> + <foreach collection="projectIds" item="item" index="index" separator="," open="(" close=")"> #{item} </foreach> </when> @@ -353,9 +353,9 @@ where iss.issue_status_type = 'CLOSE' and i.modify_date between #{searchStartDate} and #{searchEndDate} <choose> - <when test="meAndDownProjectIds != null and meAndDownProjectIds.size != 0"> + <when test="projectIds != null and projectIds.size != 0"> AND i.project_id IN - <foreach collection="meAndDownProjectIds" item="item" index="index" separator="," open="(" close=")"> + <foreach collection="projectIds" item="item" index="index" separator="," open="(" close=")"> #{item} </foreach> </when> @@ -370,9 +370,9 @@ inner join issue_status iss on iss.id = i.issue_status_id where 1=1 <choose> - <when test="meAndDownProjectIds != null and meAndDownProjectIds.size != 0"> + <when test="projectIds != null and projectIds.size != 0"> AND i.project_id IN - <foreach collection="meAndDownProjectIds" item="item" index="index" separator="," open="(" close=")"> + <foreach collection="projectIds" item="item" index="index" separator="," open="(" close=")"> #{item} </foreach> </when> @@ -450,9 +450,9 @@ left outer join issue_status iss on iss.id = i.issue_status_id WHERE 1=1 <choose> - <when test="meAndDownProjectIds != null and meAndDownProjectIds.size != 0"> + <when test="projectIds != null and projectIds.size != 0"> AND p.id IN - <foreach collection="meAndDownProjectIds" item="item" index="index" separator="," open="(" close=")"> + <foreach collection="projectIds" item="item" index="index" separator="," open="(" close=")"> #{item} </foreach> </when> @@ -564,9 +564,9 @@ and isd.register_date BETWEEN (CURDATE()) AND (CURDATE() + INTERVAL 1 DAY)) <choose> - <when test="meAndDownProjectIds != null and meAndDownProjectIds.size != 0"> + <when test="projectIds != null and projectIds.size != 0"> AND i.project_id IN - <foreach collection="meAndDownProjectIds" item="item" index="index" separator="," open="(" close=")"> + <foreach collection="projectIds" item="item" index="index" separator="," open="(" close=")"> #{item} </foreach> </when> @@ -604,9 +604,9 @@ inner join issue_status iss on iss.id = i.issue_status_id WHERE 1=1 <choose> - <when test="meAndDownProjectIds != null and meAndDownProjectIds.size != 0"> + <when test="projectIds != null and projectIds.size != 0"> AND i.project_id IN - <foreach collection="meAndDownProjectIds" item="item" index="index" separator="," open="(" close=")"> + <foreach collection="projectIds" item="item" index="index" separator="," open="(" close=")"> #{item} </foreach> </when> @@ -676,9 +676,9 @@ inner join project p on p.id = i.project_id WHERE 1=1 <choose> - <when test="meAndDownProjectIds != null and meAndDownProjectIds.size != 0"> + <when test="projectIds != null and projectIds.size != 0"> AND p.id IN - <foreach collection="meAndDownProjectIds" item="item" index="index" separator="," open="(" close=")"> + <foreach collection="projectIds" item="item" index="index" separator="," open="(" close=")"> #{item} </foreach> </when> @@ -710,9 +710,9 @@ inner join project p on p.id = i.project_id WHERE 1=1 <choose> - <when test="meAndDownProjectIds != null and meAndDownProjectIds.size != 0"> + <when test="projectIds != null and projectIds.size != 0"> AND p.id IN - <foreach collection="meAndDownProjectIds" item="item" index="index" separator="," open="(" close=")"> + <foreach collection="projectIds" item="item" index="index" separator="," open="(" close=")"> #{item} </foreach> </when> @@ -770,9 +770,9 @@ inner join issue_status iss on iss.id = i.issue_status_id where iss.issue_status_type != 'CLOSE' <choose> - <when test="meAndDownProjectIds != null and meAndDownProjectIds.size != 0"> + <when test="projectIds != null and projectIds.size != 0"> AND i.project_id IN - <foreach collection="meAndDownProjectIds" item="item" index="index" separator="," open="(" close=")"> + <foreach collection="projectIds" item="item" index="index" separator="," open="(" close=")"> #{item} </foreach> </when> @@ -824,9 +824,9 @@ inner join project p on p.id = i.project_id where iss.issue_status_type != 'CLOSE' <choose> - <when test="meAndDownProjectIds != null and meAndDownProjectIds.size != 0"> + <when test="projectIds != null and projectIds.size != 0"> AND p.id IN - <foreach collection="meAndDownProjectIds" item="item" index="index" separator="," open="(" close=")"> + <foreach collection="projectIds" item="item" index="index" separator="," open="(" close=")"> #{item} </foreach> </when> @@ -847,9 +847,9 @@ inner join issue_status iss on iss.id = i.issue_status_id where iss.issue_status_type != 'CLOSE' <choose> - <when test="meAndDownProjectIds != null and meAndDownProjectIds.size != 0"> + <when test="projectIds != null and projectIds.size != 0"> AND i.project_id IN - <foreach collection="meAndDownProjectIds" item="item" index="index" separator="," open="(" close=")"> + <foreach collection="projectIds" item="item" index="index" separator="," open="(" close=")"> #{item} </foreach> </when> @@ -886,9 +886,9 @@ WHERE 1=1 AND i.register_id = #{loginUserId} <choose> - <when test="meAndDownProjectIds != null and meAndDownProjectIds.size != 0"> + <when test="projectIds != null and projectIds.size != 0"> AND i.project_id IN - <foreach collection="meAndDownProjectIds" item="item" index="index" separator="," open="(" close=")"> + <foreach collection="projectIds" item="item" index="index" separator="," open="(" close=")"> #{item} </foreach> </when> @@ -917,9 +917,9 @@ AND EXISTS (SELECT 1 FROM issue_status iss WHERE iss.id = i.issue_status_id AND iss.issue_status_type != 'CLOSE') </if> <choose> - <when test="meAndDownProjectIds != null and meAndDownProjectIds.size != 0"> + <when test="projectIds != null and projectIds.size != 0"> AND i.project_id IN - <foreach collection="meAndDownProjectIds" item="item" index="index" separator="," open="(" close=")"> + <foreach collection="projectIds" item="item" index="index" separator="," open="(" close=")"> #{item} </foreach> </when> @@ -953,12 +953,21 @@ <if test="page != null and !page.equals('')"> INNER JOIN issue_status iss ON iss.id = i.issue_status_id INNER JOIN project p ON p.id = i.project_id + LEFT OUTER join issue_department isd on isd.issue_id = i.id </if> WHERE 1=1 <choose> - <when test="meAndDownProjectIds != null and meAndDownProjectIds.size != 0"> + <when test="projectIds != null and projectIds.size != 0"> AND i.project_id IN - <foreach collection="meAndDownProjectIds" item="item" index="index" separator="," open="(" close=")"> + <foreach collection="projectIds" item="item" index="index" separator="," open="(" close=")"> + #{item} + </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> @@ -977,14 +986,23 @@ SELECT COUNT(DISTINCT i.id) FROM issue i INNER JOIN project p ON p.id = i.project_id + LEFT OUTER join issue_department isd on isd.issue_id = i.id <if test="page != null and !page.equals('')"> INNER JOIN issue_status iss ON iss.id = i.issue_status_id </if> WHERE 1=1 <choose> - <when test="meAndDownProjectIds != null and meAndDownProjectIds.size != 0"> + <when test="projectIds != null and projectIds.size != 0"> AND i.project_id IN - <foreach collection="meAndDownProjectIds" item="item" index="index" separator="," open="(" close=")"> + <foreach collection="projectIds" item="item" index="index" separator="," open="(" close=")"> + #{item} + </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> @@ -1020,9 +1038,9 @@ inner join issue_status iss on iss.id = i.issue_status_id where 1=1 <choose> - <when test="meAndDownProjectIds != null and meAndDownProjectIds.size != 0"> + <when test="projectIds != null and projectIds.size != 0"> AND i.project_id IN - <foreach collection="meAndDownProjectIds" item="item" index="index" separator="," open="(" close=")"> + <foreach collection="projectIds" item="item" index="index" separator="," open="(" close=")"> #{item} </foreach> </when> @@ -1050,9 +1068,9 @@ INNER JOIN user_department ud ON ud.department_id = isd.department_id where 1=1 <choose> - <when test="meAndDownProjectIds != null and meAndDownProjectIds.size != 0"> + <when test="projectIds != null and projectIds.size != 0"> AND i.project_id IN - <foreach collection="meAndDownProjectIds" item="item" index="index" separator="," open="(" close=")"> + <foreach collection="projectIds" item="item" index="index" separator="," open="(" close=")"> #{item} </foreach> </when> @@ -1125,9 +1143,9 @@ inner join project p on p.id = pr.project_id WHERE <choose> - <when test="meAndDownProjectIds != null and meAndDownProjectIds.size != 0"> + <when test="projectIds != null and projectIds.size != 0"> p.id IN - <foreach collection="meAndDownProjectIds" item="item" index="index" separator="," open="(" close=")"> + <foreach collection="projectIds" item="item" index="index" separator="," open="(" close=")"> #{item} </foreach> </when> @@ -1160,9 +1178,9 @@ inner join project p on p.id = pr.project_id WHERE <choose> - <when test="meAndDownProjectIds != null and meAndDownProjectIds.size != 0"> + <when test="projectIds != null and projectIds.size != 0"> p.id IN - <foreach collection="meAndDownProjectIds" item="item" index="index" separator="," open="(" close=")"> + <foreach collection="projectIds" item="item" index="index" separator="," open="(" close=")"> #{item} </foreach> </when> @@ -1195,9 +1213,9 @@ 'CLOSE') AND i.register_id = #{loginUserId} <choose> - <when test="meAndDownProjectIds != null and meAndDownProjectIds.size != 0"> + <when test="projectIds != null and projectIds.size != 0"> AND i.project_id IN - <foreach collection="meAndDownProjectIds" item="item" index="index" separator="," open="(" close=")"> + <foreach collection="projectIds" item="item" index="index" separator="," open="(" close=")"> #{item} </foreach> </when> @@ -1213,9 +1231,9 @@ 'CLOSE') AND i.register_id = #{loginUserId} <choose> - <when test="meAndDownProjectIds != null and meAndDownProjectIds.size != 0"> + <when test="projectIds != null and projectIds.size != 0"> AND i.project_id IN - <foreach collection="meAndDownProjectIds" item="item" index="index" separator="," open="(" close=")"> + <foreach collection="projectIds" item="item" index="index" separator="," open="(" close=")"> #{item} </foreach> </when> @@ -1260,9 +1278,9 @@ </choose> and iss.issue_status_type = 'CLOSE' <choose> - <when test="meAndDownProjectIds != null and meAndDownProjectIds.size != 0"> + <when test="projectIds != null and projectIds.size != 0"> AND i.project_id IN - <foreach collection="meAndDownProjectIds" item="item" index="index" separator="," open="(" close=")"> + <foreach collection="projectIds" item="item" index="index" separator="," open="(" close=")"> #{item} </foreach> </when> @@ -1307,9 +1325,9 @@ </otherwise> </choose> <choose> - <when test="meAndDownProjectIds != null and meAndDownProjectIds.size != 0"> + <when test="projectIds != null and projectIds.size != 0"> AND i.project_id IN - <foreach collection="meAndDownProjectIds" item="item" index="index" separator="," open="(" close=")"> + <foreach collection="projectIds" item="item" index="index" separator="," open="(" close=")"> #{item} </foreach> </when> @@ -1327,9 +1345,9 @@ INNER JOIN issue_type ON issue.issue_type_id = issue_type.id WHERE 1=1 <choose> - <when test="meAndDownProjectIds != null and meAndDownProjectIds.size != 0"> + <when test="projectIds != null and projectIds.size != 0"> AND issue.project_id IN - <foreach collection="meAndDownProjectIds" item="item" index="index" separator="," open="(" close=")"> + <foreach collection="projectIds" item="item" index="index" separator="," open="(" close=")"> #{item} </foreach> </when> @@ -1376,9 +1394,9 @@ WHERE w.id = #{workspaceId} AND iss.issue_status_type != 'CLOSE' <choose> - <when test="meAndDownProjectIds != null and meAndDownProjectIds.size != 0"> + <when test="projectIds != null and projectIds.size != 0"> AND i.project_id IN - <foreach collection="meAndDownProjectIds" item="item" index="index" separator="," open="(" close=")"> + <foreach collection="projectIds" item="item" index="index" separator="," open="(" close=")"> #{item} </foreach> </when> @@ -1402,9 +1420,9 @@ WHERE w.id = #{workspaceId} AND iss.issue_status_type != 'CLOSE' <choose> - <when test="meAndDownProjectIds != null and meAndDownProjectIds.size != 0"> + <when test="projectIds != null and projectIds.size != 0"> AND i.project_id IN - <foreach collection="meAndDownProjectIds" item="item" index="index" separator="," open="(" close=")"> + <foreach collection="projectIds" item="item" index="index" separator="," open="(" close=")"> #{item} </foreach> </when> @@ -1446,9 +1464,9 @@ AND s.id = #{severityId} AND iss.issue_status_type != 'CLOSE' <choose> - <when test="meAndDownProjectIds != null and meAndDownProjectIds.size != 0"> + <when test="projectIds != null and projectIds.size != 0"> AND i.project_id IN - <foreach collection="meAndDownProjectIds" item="item" index="index" separator="," open="(" close=")"> + <foreach collection="projectIds" item="item" index="index" separator="," open="(" close=")"> #{item} </foreach> </when> @@ -1483,9 +1501,9 @@ AND s.id = #{severityId} AND iss.issue_status_type != 'CLOSE' <choose> - <when test="meAndDownProjectIds != null and meAndDownProjectIds.size != 0"> + <when test="projectIds != null and projectIds.size != 0"> AND i.project_id IN - <foreach collection="meAndDownProjectIds" item="item" index="index" separator="," open="(" close=")"> + <foreach collection="projectIds" item="item" index="index" separator="," open="(" close=")"> #{item} </foreach> </when> @@ -1519,9 +1537,9 @@ AND s.id = #{severityId} AND iss.issue_status_type != 'CLOSE' <choose> - <when test="meAndDownProjectIds != null and meAndDownProjectIds.size != 0"> + <when test="projectIds != null and projectIds.size != 0"> AND i.project_id IN - <foreach collection="meAndDownProjectIds" item="item" index="index" separator="," open="(" close=")"> + <foreach collection="projectIds" item="item" index="index" separator="," open="(" close=")"> #{item} </foreach> </when> @@ -1541,9 +1559,9 @@ AND s.id = #{severityId} AND iss.issue_status_type != 'CLOSE' <choose> - <when test="meAndDownProjectIds != null and meAndDownProjectIds.size != 0"> + <when test="projectIds != null and projectIds.size != 0"> AND i.project_id IN - <foreach collection="meAndDownProjectIds" item="item" index="index" separator="," open="(" close=")"> + <foreach collection="projectIds" item="item" index="index" separator="," open="(" close=")"> #{item} </foreach> </when> diff --git a/src/main/webapp/custom_components/widget/project-progress-widget/project-progress-widget.html b/src/main/webapp/custom_components/widget/project-progress-widget/project-progress-widget.html index fd50b40..ced2084 100644 --- a/src/main/webapp/custom_components/widget/project-progress-widget/project-progress-widget.html +++ b/src/main/webapp/custom_components/widget/project-progress-widget/project-progress-widget.html @@ -98,7 +98,8 @@ <span translate="common.issue">�씠�뒋</span> </th> <th class="text-center width-80-p"> - <span translate="dashboard.teamMember">���썝</span> + <!--<span translate="dashboard.teamMember">���썝</span>--> + <span translate="dashboard.teamDepartment">遺��꽌</span> </th> <th class="text-center width-80-p"> <span translate="common.period">湲곌컙</span> diff --git a/src/main/webapp/scripts/app/issue/issueDetail.controller.js b/src/main/webapp/scripts/app/issue/issueDetail.controller.js index 800f3a7..5ea1f0a 100644 --- a/src/main/webapp/scripts/app/issue/issueDetail.controller.js +++ b/src/main/webapp/scripts/app/issue/issueDetail.controller.js @@ -444,15 +444,16 @@ .setHWidth("width-60-p bold") .setHSort(false) .setDRenderer("ISSUE_RELATION_MOVE")) - $scope.vm.relTableConfigs.push($tableProvider.config() - .setHName("issue.relationIssueDelete") - .setDType("renderer") - .setDAlign("text-center") - .setHWidth("width-40-p bold") - .setDRenderer("ISSUE_RELATION_DELETE") - .setHSort(false) - .setDAlign("text-center")) - + if($scope.vm.viewer.modifyPermissionCheck) { + $scope.vm.relTableConfigs.push($tableProvider.config() + .setHName("issue.relationIssueDelete") + .setDType("renderer") + .setDAlign("text-center") + .setHWidth("width-40-p bold") + .setDRenderer("ISSUE_RELATION_DELETE") + .setHSort(false) + .setDAlign("text-center")) + } angular.forEach($scope.vm.relTableConfigs, function (Rel_issueTableConfig) { // �몴�떆 ���긽�씤 而щ읆留� �솕硫댁뿉 洹몃젮以��떎. if (Rel_issueTableConfig.display) { @@ -533,14 +534,15 @@ } }); - $scope.vm.relTableConfigs.push($tableProvider.config() - .setHName("issue.relationIssueDelete") - .setDType("renderer") - .setHWidth("width-40-p bold") - .setDRenderer("ISSUE_RELATION_DELETE") - .setHSort(false) - .setDAlign("text-center")) - + if($scope.vm.viewer.modifyPermissionCheck) { + $scope.vm.relTableConfigs.push($tableProvider.config() + .setHName("issue.relationIssueDelete") + .setDType("renderer") + .setHWidth("width-40-p bold") + .setDRenderer("ISSUE_RELATION_DELETE") + .setHSort(false) + .setDAlign("text-center")) + } } else { makeRelTableConfigs(); } @@ -575,14 +577,15 @@ $scope.fn.setDownTableColumn(Down_issueTableConfig); } }); - $scope.vm.downTableConfigs.push($tableProvider.config() - .setHName("issue.relationIssueDelete") - .setDType("renderer") - .setHWidth("width-40-p bold") - .setDRenderer("ISSUE_DOWN_DELETE") - .setHSort(false) - .setDAlign("text-center")) - + if($scope.vm.viewer.modifyPermissionCheck) { + $scope.vm.downTableConfigs.push($tableProvider.config() + .setHName("issue.relationIssueDelete") + .setDType("renderer") + .setHWidth("width-40-p bold") + .setDRenderer("ISSUE_DOWN_DELETE") + .setHSort(false) + .setDAlign("text-center")) + } } else { makeDownTableConfigs(); } diff --git a/src/main/webapp/scripts/app/project/projectAdd.controller.js b/src/main/webapp/scripts/app/project/projectAdd.controller.js index ab7ba34..664405c 100644 --- a/src/main/webapp/scripts/app/project/projectAdd.controller.js +++ b/src/main/webapp/scripts/app/project/projectAdd.controller.js @@ -84,7 +84,7 @@ name : $rootScope.preventXss($scope.vm.form.name), projectKey : $scope.vm.form.projectKey, projectType : $scope.vm.form.projectType, - parentProjectId : $scope.vm.projectName != null && $scope.vm.projectName.length > 0 ? $scope.vm.form.projects[0].id : null, + //parentProjectId : $scope.vm.projectName != null && $scope.vm.projectName.length > 0 ? $scope.vm.form.projects[0].id : null, status : $scope.vm.form.status, startDate : "", endDate : "", diff --git a/src/main/webapp/scripts/app/project/projectModify.controller.js b/src/main/webapp/scripts/app/project/projectModify.controller.js index 86a5907..722b8ba 100644 --- a/src/main/webapp/scripts/app/project/projectModify.controller.js +++ b/src/main/webapp/scripts/app/project/projectModify.controller.js @@ -112,7 +112,7 @@ var content = { id : $scope.vm.form.id, - parentProjectId : $scope.vm.projectName.length > 0 && $scope.vm.projectName == $scope.vm.form.parentProjects[0].name ? $scope.vm.form.parentProjects[0].id : null, + //parentProjectId : $scope.vm.projectName.length > 0 && $scope.vm.projectName == $scope.vm.form.parentProjects[0].name ? $scope.vm.form.parentProjects[0].id : null, name : $rootScope.preventXss($scope.vm.form.name), status : $scope.vm.form.status, startDate : "", diff --git a/src/main/webapp/views/issue/issueDetail.html b/src/main/webapp/views/issue/issueDetail.html index d7c46b0..71aff7d 100644 --- a/src/main/webapp/views/issue/issueDetail.html +++ b/src/main/webapp/views/issue/issueDetail.html @@ -498,7 +498,7 @@ <js-table data="vm.viewer.issueRelationVos" table-configs="vm.relTableConfigs" event="relTableEvent" detail-view="true" hide-header="false" use-sort="true"></js-table> - <div class="row"> + <div class="row" ng-if="vm.viewer.modifyPermissionCheck"> <div class="col-sm-4"> <select id="relationIssueType" name="relationIssueType" @@ -524,16 +524,13 @@ </div> <div class="col-auto vertical-middle" style="display: flex"> <button type="button" class="btn btn-primary" - ng-if="vm.viewer.modifyPermissionCheck" ng-click="fn.addRelationIssue()" translate="issue.addRelationIssue">�뿰愿� �씠�뒋 異붽�</button> <button type="button" class="btn btn-sm btn-primary btn-roundRel offset-1" - ng-if="vm.viewer.modifyPermissionCheck" ng-click="fn.addRelationIssueForm(vm.viewer.id)"> <i class="os-icon os-icon-plus"><span></span></i> </button> </div> - </div> </div> @@ -557,8 +554,7 @@ <js-table data="vm.viewer.issueDownVos" table-configs="vm.downTableConfigs" event="downTableEvent" detail-view="true" hide-header="false" use-sort="true"></js-table> - <div class="row"> - + <div class="row" ng-if="vm.viewer.modifyPermissionCheck"> <div class="col-sm-6"> <js-autocomplete-single data-input-name="issue" selected-model="vm.form.issuesDown" @@ -573,16 +569,13 @@ </div> <div class="col-auto vertical-middle" style="display: flex"> <button type="button" class="btn btn-primary" - ng-if="vm.viewer.modifyPermissionCheck" ng-click="fn.addDownIssue()" translate="issue.addDownIssue">異붽�</button> <button type="button" class="btn btn-sm btn-primary btn-roundRel offset-1" - ng-if="vm.viewer.modifyPermissionCheck" ng-click="fn.addDownIssueForm(vm.viewer.id)"> <i class="os-icon os-icon-plus"><span></span></i> </button> </div> - </div> </div> diff --git a/src/main/webapp/views/project/projectAdd.html b/src/main/webapp/views/project/projectAdd.html index d9933ff..4b11f4c 100644 --- a/src/main/webapp/views/project/projectAdd.html +++ b/src/main/webapp/views/project/projectAdd.html @@ -64,8 +64,9 @@ </small> </div> - <div class="row"> - <div class="col-lg-6"> + <!--<div class="row">--> + <div> + <div class="form-group"> <div class="form-group"> <label><span translate="common.period">湲곌컙</span></label> <input tabindex="-1" @@ -84,7 +85,7 @@ </div> </div> </div> - <div class="col-lg-6"> + <!--<div class="col-lg-6"> <div class="form-group mb10"> <label> <span translate="common.parentProject">�긽�쐞 �봽濡쒖젥�듃</span></label> <js-autocomplete-single data-input-name="project" @@ -99,7 +100,7 @@ type : '', maxlength : 200, autoResize : false, stopRemoveBodyEvent : true }"> </js-autocomplete-single> </div> - </div> + </div>--> </div> @@ -142,9 +143,8 @@ translation-texts="{ count : 'common.userNum', empty : 'common.emptyProjectDepartment' }" extra-settings="{ displayProp : 'byName' , idProp : 'id', imageable : false, maxlength : 100, autoResize : true }"></js-autocomplete-multi> - <div class="select3-selection__choicediv mt-10"> - <span class="select3-selection__choice" ng-repeat="user in vm.form.users"> + <span class="select3-selection__choice" ng-repeat="department in vm.form.departments"> <span>{{department.byName}}</span> <!--�궗�슜�옄媛� �냽�빐 �엳�뒗 遺��꽌 �씠由� 異쒕젰--> <span class="select3-selection__choice__remove" ng-click="fn.removeDepartment($index)">횞</span> </span> diff --git a/src/main/webapp/views/project/projectModify.html b/src/main/webapp/views/project/projectModify.html index d280b60..24613ea 100644 --- a/src/main/webapp/views/project/projectModify.html +++ b/src/main/webapp/views/project/projectModify.html @@ -30,10 +30,11 @@ <small translate="project.limitNameToSpecialCharacters">�봽濡쒖젥�듃 紐낆� �듅�닔 臾몄옄瑜� �엯�젰�븷 �닔 �뾾�뒿�땲�떎.</small> </div> - <div class="row"> - <div class="col-lg-6"> + <!--<div class="row">--> + <div> + <div class="form-group"> <div class="form-group"> - <label for="projectModifyForm2"><span translate="common.period">湲곌컙</span></label> + <label><span translate="common.period">湲곌컙</span></label> <input tabindex="-1" type="text" class="form-control input-readonly" @@ -50,7 +51,7 @@ </div> </div> </div> - <div class="col-lg-6"> + <!--<div class="col-lg-6"> <div class="form-group mb10"> <label> <span translate="common.parentProject">�긽�쐞 �봽濡쒖젥�듃</span></label> <js-autocomplete-single data-input-name="project" @@ -65,7 +66,7 @@ type : '', maxlength : 200, autoResize : false, stopRemoveBodyEvent : true }"> </js-autocomplete-single> </div> - </div> + </div>--> </div> <div class="form-group"> <label><span translate="project.projectStatus">�봽濡쒖젥�듃 �긽�깭</span> <code class="highlighter-rouge">*</code></label> -- Gitblit v1.8.0