Commit c0830b0f authored by 宋源硕's avatar 宋源硕

Merge branch 'songyuanshuo' into 'master'

2024/12/13接口修改

See merge request !29
parents 384683d6 10b09108
...@@ -462,10 +462,10 @@ public class TestUseCaseServiceImpl extends ServiceImpl<TestUseCaseMapper, TestU ...@@ -462,10 +462,10 @@ public class TestUseCaseServiceImpl extends ServiceImpl<TestUseCaseMapper, TestU
} }
@Override @Override
public NewTestUserCaseListResponseNew getCaseListNewNew(ReviewStandardListByPageRequest request) { public NewTestUserCaseListResponseNew getCaseListNewNew(ReviewStandardListByPageRequest request) {
NewTestUserCaseListResponseNew caseResponse = new NewTestUserCaseListResponseNew(); NewTestUserCaseListResponseNew caseResponse = new NewTestUserCaseListResponseNew();
List<NewStandardVONew> newStandardVOList = testUseCaseMapper.getSandardList(request); List<NewStandardVONew> newStandardVOList = testUseCaseMapper.getSandardList(request);
for (NewStandardVONew newStandardVO : newStandardVOList){ /*for (NewStandardVONew newStandardVO : newStandardVOList){
Long id = Long.parseLong(newStandardVO.getId()); Long id = Long.parseLong(newStandardVO.getId());
List<NewScenarioUseCasesVONew> scenarioUseCasesVOList = testUseCaseMapper.getScenarioList(id); List<NewScenarioUseCasesVONew> scenarioUseCasesVOList = testUseCaseMapper.getScenarioList(id);
newStandardVO.setScenarioUseCases(scenarioUseCasesVOList); newStandardVO.setScenarioUseCases(scenarioUseCasesVOList);
...@@ -474,7 +474,7 @@ public class TestUseCaseServiceImpl extends ServiceImpl<TestUseCaseMapper, TestU ...@@ -474,7 +474,7 @@ public class TestUseCaseServiceImpl extends ServiceImpl<TestUseCaseMapper, TestU
List<UseCaseNewVO> useCaseNewVOList = testUseCaseMapper.getUsecaseList(newScenarioUseCasesVONew.getId()); List<UseCaseNewVO> useCaseNewVOList = testUseCaseMapper.getUsecaseList(newScenarioUseCasesVONew.getId());
newScenarioUseCasesVONew.setUseCases(useCaseNewVOList); newScenarioUseCasesVONew.setUseCases(useCaseNewVOList);
} }
} }*/
caseResponse.setUseCases(newStandardVOList); caseResponse.setUseCases(newStandardVOList);
return caseResponse; return caseResponse;
} }
......
...@@ -84,11 +84,35 @@ ...@@ -84,11 +84,35 @@
from from
t_test_usecase t_test_usecase
</select> </select>
<select id="getSandardList" resultType="com.ruoyi.domain.vo.NewStandardVONew">
select id, <resultMap id="StandardResultMap" type="com.ruoyi.domain.vo.NewStandardVONew">
chapter as serialNumber, <id property="id" column="standardId"/>
text as requirements <result property="serialNumber" column="serialNumber"/>
from t_review_standard <result property="requirements" column="requirements"/>
<collection property="scenarioUseCases" ofType="com.ruoyi.domain.vo.NewScenarioUseCasesVONew">
<id property="id" column="testScenarioId"/>
<result property="testScenario" column="testScenario"/>
<collection property="useCases" ofType="com.ruoyi.domain.vo.UseCaseNewVO">
<id property="id" column="usecaseId"/>
<result property="customizedID" column="customizedID"/>
<result property="description" column="description"/>
</collection>
</collection>
</resultMap>
<select id="getSandardList" resultMap="StandardResultMap">
select trs.id as standardId,
trs.chapter as serialNumber,
trs.text as requirements,
tuts.id as testScenarioId,
tuts.test_scenario as testScenario,
tud.id as usecaseId,
tud.customized_id as customizedID,
tud.description as description
from t_review_standard trs
left join t_usecase_test_scenario tuts on trs.id = tuts.standard_id
left join t_usecase_details tud on tuts.id = tud.test_scenario_id
<where> <where>
<if test="chapter != null and chapter != ''"> <if test="chapter != null and chapter != ''">
and chapter like concat('%', #{chapter}, '%') and chapter like concat('%', #{chapter}, '%')
...@@ -106,7 +130,17 @@ ...@@ -106,7 +130,17 @@
and name = #{name} and name = #{name}
</if> </if>
</where> </where>
-- 对 chapter 进行数字分段排序
ORDER BY
CAST(SUBSTRING_INDEX(trs.chapter, '.', 1) AS UNSIGNED),
CAST(SUBSTRING_INDEX(SUBSTRING_INDEX(trs.chapter, '.', 2), '.', -1) AS UNSIGNED),
CAST(SUBSTRING_INDEX(SUBSTRING_INDEX(trs.chapter, '.', 3), '.', -1) AS UNSIGNED),
tuts.id asc,
-- 对 customizedID 的主编号进行数字分段排序
CAST(SUBSTRING_INDEX(tud.customized_id, '-', 1) AS UNSIGNED) asc,
-- 对 customizedID 的子编号进行数值排序
CAST(SUBSTRING_INDEX(tud.customized_id, '-', -1) AS UNSIGNED) asc,
tud.id asc
</select> </select>
<select id="getScenarioList" resultType="com.ruoyi.domain.vo.NewScenarioUseCasesVONew"> <select id="getScenarioList" resultType="com.ruoyi.domain.vo.NewScenarioUseCasesVONew">
select id, select id,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment