1、需求详情前后端代码完善
2、缺陷管理详情前后端代码完善
This commit is contained in:
@@ -6,7 +6,10 @@ import com.test.common.core.domain.AjaxResult;
|
||||
import com.test.common.core.page.TableDataInfo;
|
||||
import com.test.common.enums.BusinessType;
|
||||
import com.test.common.utils.poi.ExcelUtil;
|
||||
import com.test.test.domain.TestPlan;
|
||||
import com.test.test.domain.TestPlanDefect;
|
||||
import com.test.test.domain.TestProject;
|
||||
import com.test.test.domain.qo.IDQO;
|
||||
import com.test.test.domain.qo.TestPlanDefectQO;
|
||||
import com.test.test.domain.qo.TestPlanDefectRelQO;
|
||||
import com.test.test.domain.vo.TestPlanDefectVo;
|
||||
@@ -92,4 +95,26 @@ public class TestPlanDefectController extends BaseController
|
||||
{
|
||||
return toAjax(testPlanDefectService.deleteTestPlanDefectByIds(ids));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询缺陷关联测试计划列表
|
||||
*/
|
||||
@PostMapping("/defectPlanList")
|
||||
public TableDataInfo defectPlanList(@RequestBody IDQO qo)
|
||||
{
|
||||
startPage();
|
||||
List<TestPlan> list = testPlanDefectService.selectDefectPlanList(qo.getId());
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询缺陷关联需求列表
|
||||
*/
|
||||
@PostMapping("/defectProjectList")
|
||||
public TableDataInfo defectProjectList(@RequestBody IDQO qo)
|
||||
{
|
||||
startPage();
|
||||
List<TestProject> list = testPlanDefectService.selectDefectProjectList(qo.getId());
|
||||
return getDataTable(list);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,6 +2,8 @@ package com.test.test.controller;
|
||||
|
||||
import com.test.common.core.controller.BaseController;
|
||||
import com.test.common.core.page.TableDataInfo;
|
||||
import com.test.test.domain.TestCase;
|
||||
import com.test.test.domain.TestDefect;
|
||||
import com.test.test.domain.qo.IDQO;
|
||||
import com.test.test.domain.vo.TestPlanProjectVo;
|
||||
import com.test.test.service.ITestPlanProjectService;
|
||||
@@ -36,4 +38,34 @@ public class TestPlanProjectController extends BaseController {
|
||||
List<TestPlanProjectVo> list = testPlanProjectService.selectTestPlanProjectList(qo.getId());
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询需求关联测试计划列表
|
||||
*/
|
||||
@PostMapping("/relatePlanList")
|
||||
public TableDataInfo relatePlanList(@RequestBody IDQO qo) {
|
||||
startPage();
|
||||
List<TestPlanProjectVo> list = testPlanProjectService.selectRelatePlanList(qo.getId());
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询需求关联用例列表
|
||||
*/
|
||||
@PostMapping("/relateCaseList")
|
||||
public TableDataInfo relateCaseList(@RequestBody IDQO qo) {
|
||||
startPage();
|
||||
List<TestCase> list = testPlanProjectService.selectRelateCaseList(qo.getId());
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询需求关联缺陷列表
|
||||
*/
|
||||
@PostMapping("/relateDefectList")
|
||||
public TableDataInfo relateDefectList(@RequestBody IDQO qo) {
|
||||
startPage();
|
||||
List<TestDefect> list = testPlanProjectService.selectRelateDefectList(qo.getId());
|
||||
return getDataTable(list);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.test.test.mapper;
|
||||
|
||||
import com.test.test.domain.TestCase;
|
||||
import com.test.test.domain.TestDefect;
|
||||
import com.test.test.domain.qo.TestCaseListQO;
|
||||
|
||||
import java.util.List;
|
||||
@@ -49,4 +50,9 @@ public interface TestCaseMapper
|
||||
* 批量删除用例
|
||||
*/
|
||||
int deleteTestCaseByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 查询关联的用例列表
|
||||
*/
|
||||
List<TestCase> selectRelateCaseList(Long projectId);
|
||||
}
|
||||
|
||||
@@ -60,4 +60,9 @@ public interface TestDefectMapper
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteTestDefectByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 查询关联的缺陷列表
|
||||
*/
|
||||
List<TestDefect> selectRelateDefectList(Long projectId);
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.test.test.mapper;
|
||||
|
||||
import com.test.test.domain.TestPlan;
|
||||
import com.test.test.domain.TestPlanDefect;
|
||||
import com.test.test.domain.qo.TestPlanDefectQO;
|
||||
import com.test.test.domain.vo.TestPlanDefectVo;
|
||||
@@ -67,4 +68,11 @@ public interface TestPlanDefectMapper
|
||||
* @return
|
||||
*/
|
||||
List<TestPlanDefect> selectRelList(TestPlanDefect testPlanDefect);
|
||||
|
||||
/**
|
||||
* 查询缺陷关联计划列表
|
||||
* @param defectId
|
||||
* @return
|
||||
*/
|
||||
List<TestPlan> selectDefectPlanList(Long defectId);
|
||||
}
|
||||
|
||||
@@ -40,5 +40,12 @@ public interface TestProjectMapper {
|
||||
* @return
|
||||
*/
|
||||
int updateTestProject(TestProject testProject);
|
||||
|
||||
/**
|
||||
* 查询缺陷关联的测试计划
|
||||
* @param defectId
|
||||
* @return
|
||||
*/
|
||||
List<TestProject> selectRelateProjectList(Long defectId);
|
||||
}
|
||||
|
||||
|
||||
@@ -19,4 +19,11 @@ public interface TestProjectPlanMapper {
|
||||
* @return
|
||||
*/
|
||||
List<TestPlanProjectVo> selectTestPlanProjectList(Long planId);
|
||||
|
||||
/**
|
||||
* 查询需求关联计划列表
|
||||
* @param projectId
|
||||
* @return
|
||||
*/
|
||||
List<TestPlanProjectVo> selectRelatePlanList(Long projectId);
|
||||
}
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
package com.test.test.service;
|
||||
|
||||
import com.test.test.domain.TestPlan;
|
||||
import com.test.test.domain.TestPlanDefect;
|
||||
|
||||
import com.test.test.domain.TestProject;
|
||||
import com.test.test.domain.qo.IDQO;
|
||||
import com.test.test.domain.qo.TestPlanDefectQO;
|
||||
import com.test.test.domain.qo.TestPlanDefectRelQO;
|
||||
import com.test.test.domain.vo.TestPlanDefectVo;
|
||||
@@ -62,4 +65,18 @@ public interface ITestPlanDefectService
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteTestPlanDefectById(Long id);
|
||||
|
||||
/**
|
||||
* 查询缺陷关联的测试计划列表
|
||||
* @param defectId
|
||||
* @return
|
||||
*/
|
||||
List<TestPlan> selectDefectPlanList(Long defectId);
|
||||
|
||||
/**
|
||||
* 查询缺陷关联的需求列表
|
||||
* @param defectId
|
||||
* @return
|
||||
*/
|
||||
List<TestProject> selectDefectProjectList(Long defectId);
|
||||
}
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package com.test.test.service;
|
||||
|
||||
import com.test.test.domain.TestCase;
|
||||
import com.test.test.domain.TestDefect;
|
||||
import com.test.test.domain.vo.TestPlanProjectVo;
|
||||
import java.util.List;
|
||||
|
||||
@@ -14,4 +16,25 @@ public interface ITestPlanProjectService {
|
||||
* @return
|
||||
*/
|
||||
List<TestPlanProjectVo> selectTestPlanProjectList(Long planId);
|
||||
|
||||
/**
|
||||
* 查询需求关联测试计划列表
|
||||
* @param projectId
|
||||
* @return
|
||||
*/
|
||||
List<TestPlanProjectVo> selectRelatePlanList(Long projectId);
|
||||
|
||||
/**
|
||||
* 查询需求关联用例列表
|
||||
* @param projectId
|
||||
* @return
|
||||
*/
|
||||
List<TestCase> selectRelateCaseList(Long projectId);
|
||||
|
||||
/**
|
||||
* 查询需求关联缺陷列表
|
||||
* @param projectId
|
||||
* @return
|
||||
*/
|
||||
List<TestDefect> selectRelateDefectList(Long projectId);
|
||||
}
|
||||
|
||||
@@ -1,11 +1,15 @@
|
||||
package com.test.test.service.impl;
|
||||
|
||||
import com.test.common.utils.DateUtils;
|
||||
import com.test.test.domain.TestPlan;
|
||||
import com.test.test.domain.TestPlanDefect;
|
||||
import com.test.test.domain.TestProject;
|
||||
import com.test.test.domain.qo.IDQO;
|
||||
import com.test.test.domain.qo.TestPlanDefectQO;
|
||||
import com.test.test.domain.qo.TestPlanDefectRelQO;
|
||||
import com.test.test.domain.vo.TestPlanDefectVo;
|
||||
import com.test.test.mapper.TestPlanDefectMapper;
|
||||
import com.test.test.mapper.TestProjectMapper;
|
||||
import com.test.test.service.ITestPlanDefectService;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.springframework.stereotype.Service;
|
||||
@@ -25,6 +29,9 @@ public class TestPlanDefectServiceImpl implements ITestPlanDefectService
|
||||
@Resource
|
||||
private TestPlanDefectMapper testPlanDefectMapper;
|
||||
|
||||
@Resource
|
||||
private TestProjectMapper testProjectMapper;
|
||||
|
||||
/**
|
||||
* 查询测试计划测试缺陷关联
|
||||
*
|
||||
@@ -118,4 +125,24 @@ public class TestPlanDefectServiceImpl implements ITestPlanDefectService
|
||||
{
|
||||
return testPlanDefectMapper.deleteTestPlanDefectById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询缺陷关联计划列表
|
||||
* @param defectId
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<TestPlan> selectDefectPlanList(Long defectId) {
|
||||
return testPlanDefectMapper.selectDefectPlanList(defectId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询缺陷关联需求列表
|
||||
* @param defectId
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<TestProject> selectDefectProjectList(Long defectId) {
|
||||
return testProjectMapper.selectRelateProjectList(defectId);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
package com.test.test.service.impl;
|
||||
|
||||
import com.test.test.domain.TestCase;
|
||||
import com.test.test.domain.TestDefect;
|
||||
import com.test.test.domain.vo.TestPlanProjectVo;
|
||||
import com.test.test.mapper.TestCaseMapper;
|
||||
import com.test.test.mapper.TestDefectMapper;
|
||||
import com.test.test.mapper.TestProjectPlanMapper;
|
||||
import com.test.test.service.ITestPlanProjectService;
|
||||
import jakarta.annotation.Resource;
|
||||
@@ -18,6 +22,12 @@ public class TestPlanProjectServiceImpl implements ITestPlanProjectService {
|
||||
@Resource
|
||||
private TestProjectPlanMapper testProjectPlanMapper;
|
||||
|
||||
@Resource
|
||||
private TestCaseMapper testCaseMapper;
|
||||
|
||||
@Resource
|
||||
private TestDefectMapper testDefectMapper;
|
||||
|
||||
/**
|
||||
* 查询测试计划需求关联列表
|
||||
* @param planId
|
||||
@@ -27,4 +37,34 @@ public class TestPlanProjectServiceImpl implements ITestPlanProjectService {
|
||||
public List<TestPlanProjectVo> selectTestPlanProjectList(Long planId) {
|
||||
return testProjectPlanMapper.selectTestPlanProjectList(planId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询需求关联计划列表
|
||||
* @param projectId
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<TestPlanProjectVo> selectRelatePlanList(Long projectId) {
|
||||
return testProjectPlanMapper.selectRelatePlanList(projectId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询需求关联用例列表
|
||||
* @param projectId
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<TestCase> selectRelateCaseList(Long projectId) {
|
||||
return testCaseMapper.selectRelateCaseList(projectId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询需求关联缺陷列表
|
||||
* @param projectId
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<TestDefect> selectRelateDefectList(Long projectId) {
|
||||
return testDefectMapper.selectRelateDefectList(projectId);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -138,4 +138,24 @@
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<select id="selectRelateCaseList" resultType="TestCase">
|
||||
SELECT DISTINCT
|
||||
tc.id,
|
||||
tc.group_id,
|
||||
tc.project_id,
|
||||
tc.name,
|
||||
tc.importance,
|
||||
tc.status,
|
||||
tc.del_flag,
|
||||
tc.create_by AS createBy,
|
||||
tc.create_time,
|
||||
tc.update_by,
|
||||
tc.update_time
|
||||
FROM test_project_plan tpp
|
||||
LEFT JOIN test_plan_case tpc ON tpc.plan_id = tpp.plan_id
|
||||
LEFT JOIN test_case tc ON tc.id = tpc.case_id
|
||||
WHERE tpp.project_id = #{projectId}
|
||||
AND tpc.del_flag = '0'
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
@@ -148,4 +148,30 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<select id="selectRelateDefectList" resultType="TestDefect">
|
||||
SELECT DISTINCT
|
||||
td.id,
|
||||
td.serial_number AS serialNumber,
|
||||
td.name,
|
||||
td.outline,
|
||||
td.detail,
|
||||
td.status,
|
||||
su.user_name AS manager,
|
||||
td.dev,
|
||||
td.level,
|
||||
td.type,
|
||||
td.reappearance,
|
||||
td.test,
|
||||
td.mail,
|
||||
td.version,
|
||||
td.del_flag,
|
||||
td.create_time AS createTime
|
||||
FROM test_project_plan tpp
|
||||
LEFT JOIN test_plan_defect tpd ON tpd.plan_id = tpp.plan_id
|
||||
LEFT JOIN test_defect td ON td.id = tpd.defect_id
|
||||
LEFT JOIN sys_user su ON su.user_id = td.manager
|
||||
WHERE tpp.project_id = #{projectId}
|
||||
AND tpd.del_flag = '0'
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
@@ -74,7 +74,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<insert id="insertTestPlanDefect" parameterType="TestPlanDefect">
|
||||
<insert id="insertTestPlanDefect" parameterType="TestPlanDefect">
|
||||
insert into test_plan_defect
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">id,</if>
|
||||
@@ -124,4 +124,21 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<select id="selectDefectPlanList" resultType="TestPlan">
|
||||
SELECT DISTINCT
|
||||
tp.id,
|
||||
tp.serial_number AS serialNumber,
|
||||
tp.name ,
|
||||
tp.status,
|
||||
su.user_name AS manager,
|
||||
tp.create_time AS createTime,
|
||||
tp.version,
|
||||
tp.del_flag
|
||||
FROM test_plan_defect tpd
|
||||
LEFT JOIN test_plan tp ON tp.id = tpd.plan_id
|
||||
LEFT JOIN sys_user su ON su.user_id = tp.manager
|
||||
WHERE tpd.defect_id = #{defectId}
|
||||
AND tpd.del_flag = '0'
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
@@ -155,4 +155,28 @@
|
||||
<include refid="selectTestProjectVo"/>
|
||||
WHERE id = #{id}
|
||||
</select>
|
||||
|
||||
<select id="selectRelateProjectList" resultType="TestProject">
|
||||
SELECT DISTINCT
|
||||
tp.id,
|
||||
tp.serial_number AS serialNumber,
|
||||
tp.name,
|
||||
tp.outline,
|
||||
tp.detail,
|
||||
tp.priority,
|
||||
tp.estimated_time AS estimatedTime,
|
||||
tp.source,
|
||||
tp.type,
|
||||
tp.status,
|
||||
su.user_name AS manager,
|
||||
tp.create_time AS createTime,
|
||||
tp.version,
|
||||
tp.del_flag
|
||||
FROM test_plan_defect tpd
|
||||
LEFT JOIN test_project_plan tpp ON tpp.plan_id = tpd.plan_id
|
||||
LEFT JOIN test_project tp ON tp.id = tpp.project_id
|
||||
LEFT JOIN sys_user su ON su.user_id = tp.manager
|
||||
WHERE tpd.defect_id = #{defectId}
|
||||
AND tpp.del_flag = '0'
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -45,4 +45,21 @@
|
||||
WHERE tpp.plan_id = #{planId}
|
||||
AND tpp.del_flag = '0'
|
||||
</select>
|
||||
|
||||
<select id="selectRelatePlanList" resultType="TestPlanProjectVo">
|
||||
SELECT
|
||||
tp.id,
|
||||
tp.serial_number AS serialNumber,
|
||||
tp.name ,
|
||||
tp.status,
|
||||
su.user_name AS manager,
|
||||
tp.create_time AS createTime,
|
||||
tp.version,
|
||||
tp.del_flag
|
||||
FROM test_project_plan tpp
|
||||
LEFT JOIN test_plan tp ON tp.id = tpp.plan_id
|
||||
LEFT JOIN sys_user su ON su.user_id = tp.manager
|
||||
WHERE tpp.project_id = #{projectId}
|
||||
AND tpp.del_flag = '0'
|
||||
</select>
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user