Commit 7fc21b5f authored by yuanshuo's avatar yuanshuo

按照最新版原型增加接口

1./review/scene/change/task/getUseCaseListAll 查询所有测试用例,用于发起删除或修改测试用例评审
2./review/scene/change/task/getKeypointListAll 查询所有要点接口,用于发起新增细则评审后发起删除要点评审
3./review/scene/change/task/deleteKeypointListAll 查询所有细则接口,用于删除细则和场景的新增、删除评审
parent f1db482c
......@@ -66,5 +66,7 @@ public class Standard {
@ApiModelProperty("要点文件路径")
private String keypointFile;
@ApiModelProperty("要点名称")
private String keypointName;
}
......@@ -45,4 +45,30 @@ public interface ReviewStandardMapper extends BaseMapper<ReviewStandard> {
* 标准内容库新界面接口
* */
List<ReviewStandardChapterListResponse> findChaptersByStandard(@Param("request") StandardListNewRequest request);
/*
* 查询当前标准下的所有id集合
* */
List<Long> getIdList(@Param("getUseCaseRequestNew") GetUseCaseRequestNew getUseCaseRequestNew);
/*
* 查询当前标准下的所有要点id集合
* */
List<Long> getKeypointIdList(@Param("getKeypointListRequest") GetKeypointListRequest getKeypointListRequest);
/*
* 获取要点id列表
* */
List<KeypointList> getKeypointListByIdList(@Param("idList") List<Long> idList);
List<Long> getDetailsIdList(@Param("deleteDetailsRequest") DeleteDetailsRequest deleteDetailsRequest);
// 获取所有要点ID列表
List<Long> getDelKeypointIdList(@Param("deleteDetailsRequest") DeleteDetailsRequest deleteDetailsRequest);
// 获取与 KeypointList 关联的 DeleteDetails
List<DeleteDetails> getDeleteDetailsByKeypointId(@Param("id") Long id);
// 获取标准信息
ReviewStandardResponseNew selectReviewStandardById(@Param("key") Long key);
}
......@@ -2,10 +2,21 @@ package com.ruoyi.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ruoyi.domain.ReviewUsecase;
import com.ruoyi.web.response.ReviewStandardResponseNew;
import com.ruoyi.web.response.UseCaseResponseDTO;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
import java.util.List;
@Repository
public interface ReviewUsecaseMapper extends BaseMapper<ReviewUsecase> {
ReviewUsecase getById(Long reviewUsecaseId);
/*
* 查询所有测试用例
* */
List<UseCaseResponseDTO> getUseCaseListByIdList(@Param("idList") List<Long> idList);
}
......@@ -3,10 +3,17 @@ package com.ruoyi.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.ruoyi.domain.ReviewDetails;
import com.ruoyi.domain.ReviewKeyPoint;
import com.ruoyi.web.request.DeleteDetailsRequest;
import com.ruoyi.web.response.DeleteDetailsResponse;
import java.util.List;
public interface ReviewDetailsService extends IService<ReviewDetails> {
List<ReviewDetails> findByKeyPointsList(List<ReviewKeyPoint> reviewKeyPointList);
/*
* 删除细则按钮
* */
List<DeleteDetailsResponse> getDeleteDetailsResponseList(DeleteDetailsRequest deleteDetailsRequest);
}
......@@ -87,4 +87,23 @@ public interface ReviewStandardService extends IService<ReviewStandard> {
* 标准内容库新界面接口
* */
ReviewStandardListNewResponse getListNew(StandardListNewRequest request);
/*
* 查询当前标准下的所有id集合
* */
List<Long> getIdList(GetUseCaseRequestNew getUseCaseRequestNew);
/*
* 查询当前标准下的所有要点id集合
* */
List<Long> getKeypointIdList(GetKeypointListRequest getKeypointListRequest);
/*
* 新增细则按钮
* */
List<AddDetailsResponse> getKeypointListByIds(List<Long> idList);
/*
* 删除细则按钮
* */
List<Long> getDetailsIdList(DeleteDetailsRequest deleteDetailsRequest);
}
package com.ruoyi.service;
import com.ruoyi.web.response.GetUseCaseResponse;
import java.util.List;
public interface ReviewUsecaseService {
/*
* 查询所有测试用例
* */
List<GetUseCaseResponse> getUseCaseListByIds(List<Long> idList);
}
......@@ -4,11 +4,17 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.domain.ReviewDetails;
import com.ruoyi.domain.ReviewKeyPoint;
import com.ruoyi.mapper.ReviewDetailsMapper;
import com.ruoyi.mapper.ReviewStandardMapper;
import com.ruoyi.service.ReviewDetailsService;
import com.ruoyi.web.request.DeleteDetailsRequest;
import com.ruoyi.web.response.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
@Service
public class ReviewDetailsServiceImpl extends ServiceImpl<ReviewDetailsMapper, ReviewDetails> implements ReviewDetailsService {
......@@ -16,8 +22,69 @@ public class ReviewDetailsServiceImpl extends ServiceImpl<ReviewDetailsMapper, R
@Autowired
private ReviewDetailsMapper reviewDetailsMapper;
@Autowired
private ReviewStandardMapper reviewStandardMapper;
@Override
public List<ReviewDetails> findByKeyPointsList(List<ReviewKeyPoint> reviewKeyPointList) {
return reviewDetailsMapper.findByKeyPointList(reviewKeyPointList);
}
/*
* 删除细则按钮
* */
@Override
public List<DeleteDetailsResponse> getDeleteDetailsResponseList(DeleteDetailsRequest deleteDetailsRequest) {
// 获取所有要点ID列表
List<Long> idList = reviewStandardMapper.getDelKeypointIdList(deleteDetailsRequest);
// 获取所有的细则列表
List<KeypointList> keypointLists = reviewStandardMapper.getKeypointListByIdList(idList);
// 将要点列表按reviewStandardId分组
Map<Long, List<KeypointList>> groupKeypoint = keypointLists.stream()
.collect(Collectors.groupingBy(KeypointList::getReviewStandardId));
// 创建返回结果列表
List<DeleteDetailsResponse> deleteDetailsResponseList = new ArrayList<>();
for (Map.Entry<Long, List<KeypointList>> entry : groupKeypoint.entrySet()) {
// 获取标准信息
ReviewStandardResponseNew reviewStandardResponseNew = reviewStandardMapper.selectReviewStandardById(entry.getKey());
// 处理标准信息为null的情况
if (reviewStandardResponseNew == null) {
continue;
}
// 组装 DeleteDetailsResponse
DeleteDetailsResponse deleteDetailsResponse = new DeleteDetailsResponse();
deleteDetailsResponse.setId(reviewStandardResponseNew.getId());
deleteDetailsResponse.setChapter(reviewStandardResponseNew.getChapter());
deleteDetailsResponse.setText(reviewStandardResponseNew.getText());
deleteDetailsResponse.setStandardId(reviewStandardResponseNew.getStandardId());
deleteDetailsResponse.setStandardNo(reviewStandardResponseNew.getStandardNo());
// 组装 DeleteDetailsList
List<DeleteDetailsList> deleteDetailsLists = new ArrayList<>();
for (KeypointList keypoint : entry.getValue()) {
DeleteDetailsList deleteDetailsList = new DeleteDetailsList();
deleteDetailsList.setId(keypoint.getId());
deleteDetailsList.setText(keypoint.getText());
deleteDetailsList.setReviewStandardId(keypoint.getReviewStandardId());
// 获取与 KeypointList 关联的 DeleteDetails
List<DeleteDetails> deleteDetails = reviewStandardMapper.getDeleteDetailsByKeypointId(keypoint.getId());
deleteDetailsList.setDeleteDetailsList(deleteDetails);
deleteDetailsLists.add(deleteDetailsList);
}
deleteDetailsResponse.setDeleteDetailsLists(deleteDetailsLists);
// 添加到返回列表
deleteDetailsResponseList.add(deleteDetailsResponse);
}
return deleteDetailsResponseList;
}
}
......@@ -89,12 +89,26 @@ public class ReviewStandardServiceImpl extends ServiceImpl<ReviewStandardMapper,
ReviewStandard reviewStandard = ReviewStandard.builder().id(id).build();
List<ReviewStandard> reviewStandardList = new ArrayList<>();
reviewStandardList.add(reviewStandard);
// 查询审查要点
List<ReviewKeyPoint> reviewKeyPointList = reviewKeyPointService.findByStandardList(reviewStandardList);
if (reviewKeyPointList.size() == 0){
return ReviewStandardInspectionContentResponse.builder().keyPointList(new ArrayList<>()).build();
}
// 查询审查细则
List<ReviewDetails> reivewDetailsList = reviewDetailsService.findByKeyPointsList(reviewKeyPointList);
if (reivewDetailsList.size() == 0){
List<ReviewKeyPoint> keyPoints = buildKeyPoint(reviewKeyPointList, new ArrayList<>());
return ReviewStandardInspectionContentResponse.builder().keyPointList(keyPoints).build();
}
// 查询审查场景
List<ReviewScene> reviewSceneList = reviewSceneService.findByDetailsList(reivewDetailsList);
if (reviewSceneList.size() == 0){
List<ReviewDetails> reviewDetails = buildDetails(reivewDetailsList, reviewSceneList);
List<ReviewKeyPoint> keyPoints = buildKeyPoint(reviewKeyPointList, reviewDetails);
ReviewStandardInspectionContentResponse response = ReviewStandardInspectionContentResponse.builder().keyPointList(keyPoints).build();
return response;
}
// 调用方法把数据变为树状结构
List<ReviewDetails> reviewDetails = buildDetails(reivewDetailsList, reviewSceneList);
List<ReviewKeyPoint> keyPoints = buildKeyPoint(reviewKeyPointList, reviewDetails);
......@@ -484,4 +498,61 @@ public class ReviewStandardServiceImpl extends ServiceImpl<ReviewStandardMapper,
return response;
}
/*
* 查询当前标准下的所有id集合
* */
@Override
public List<Long> getIdList(GetUseCaseRequestNew getUseCaseRequestNew) {
return reviewStandardMapper.getIdList(getUseCaseRequestNew);
}
/*
* 查询当前标准下的所有要点id集合
* */
@Override
public List<Long> getKeypointIdList(GetKeypointListRequest getKeypointListRequest) {
return reviewStandardMapper.getKeypointIdList(getKeypointListRequest);
}
@Override
public List<AddDetailsResponse> getKeypointListByIds(List<Long> idList) {
//获取所有要点
List<KeypointList> keypointLists = reviewStandardMapper.getKeypointListByIdList(idList);
//按reviewStandard 分组
Map<Long,List<KeypointList>> groupKeypoint = keypointLists.stream()
.collect(Collectors.groupingBy(KeypointList::getReviewStandardId));
//创建返回结果列表
List<AddDetailsResponse> addDetailsResponseList = new ArrayList<>();
for (Map.Entry<Long,List<KeypointList>> entry : groupKeypoint.entrySet()) {
//获取标准信息
ReviewStandardResponseNew reviewStandardResponseNew = reviewStandardMapper.selectReviewStandardById(entry.getKey());
//处理标准信息为null的情况
if(reviewStandardResponseNew == null){
continue;
}
//组装
AddDetailsResponse addDetailsResponse = new AddDetailsResponse();
addDetailsResponse.setChapter(reviewStandardResponseNew.getChapter());
addDetailsResponse.setId(reviewStandardResponseNew.getId());
addDetailsResponse.setText(reviewStandardResponseNew.getText());
addDetailsResponse.setStandardId(reviewStandardResponseNew.getStandardId());
addDetailsResponse.setStandardNo(reviewStandardResponseNew.getStandardNo());
addDetailsResponse.setKeypointList(entry.getValue());
//添加到返回列表
addDetailsResponseList.add(addDetailsResponse);
}
return addDetailsResponseList;
}
@Override
public List<Long> getDetailsIdList(DeleteDetailsRequest deleteDetailsRequest) {
return reviewStandardMapper.getDetailsIdList(deleteDetailsRequest);
}
}
package com.ruoyi.service.impl;
import com.ruoyi.mapper.ReviewStandardMapper;
import com.ruoyi.mapper.ReviewUsecaseMapper;
import com.ruoyi.service.ReviewUsecaseService;
import com.ruoyi.web.response.GetUseCaseResponse;
import com.ruoyi.web.response.ReviewStandardResponseNew;
import com.ruoyi.web.response.UseCaseResponseDTO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
@Service
public class ReviewUsecaseServiceImpl implements ReviewUsecaseService {
@Autowired
private ReviewUsecaseMapper reviewUsecaseMapper;
@Autowired
private ReviewStandardMapper reviewStandardMapper;
/*
* 查询所有测试用例
* */
@Override
public List<GetUseCaseResponse> getUseCaseListByIds(List<Long> idList) {
if (idList.size() == 0){
return new ArrayList<>();
}
//获取所有测试用例
List<UseCaseResponseDTO> useCaseResponseDTOList = reviewUsecaseMapper.getUseCaseListByIdList(idList);
// 按 reviewStandardId 分组
Map<Long, List<UseCaseResponseDTO>> groupedUseCases = useCaseResponseDTOList.stream()
.collect(Collectors.groupingBy(UseCaseResponseDTO::getReviewStandardId));
// 创建返回结果列表
List<GetUseCaseResponse> getUseCaseResponseList = new ArrayList<>();
for (Map.Entry<Long, List<UseCaseResponseDTO>> entry : groupedUseCases.entrySet()) {
// 获取标准信息
ReviewStandardResponseNew reviewStandardResponse = reviewStandardMapper.selectReviewStandardById(entry.getKey());
// 处理标准信息为 null 的情况
if (reviewStandardResponse == null) {
// 如果标准信息为 null,则跳过该条记录,或者根据需求处理
continue;
}
// 组装 GetUseCaseResponse 对象
GetUseCaseResponse getUseCaseResponse = new GetUseCaseResponse();
getUseCaseResponse.setId(reviewStandardResponse.getId());
getUseCaseResponse.setText(reviewStandardResponse.getText());
getUseCaseResponse.setStandardId(reviewStandardResponse.getStandardId());
getUseCaseResponse.setStandardNo(reviewStandardResponse.getStandardNo());
getUseCaseResponse.setUseCaseResponseDTOList(entry.getValue());
// 添加到返回列表
getUseCaseResponseList.add(getUseCaseResponse);
}
return getUseCaseResponseList;
}
}
......@@ -9,7 +9,10 @@ import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.utils.bean.BeanUtils;
import com.ruoyi.domain.ReviewKeyPoint;
import com.ruoyi.domain.ReviewSceneChangeTask;
import com.ruoyi.service.ReviewDetailsService;
import com.ruoyi.service.ReviewSceneChangeTaskService;
import com.ruoyi.service.ReviewStandardService;
import com.ruoyi.service.ReviewUsecaseService;
import com.ruoyi.web.request.ReviewSceneChangeTaskCreateRequest;
import com.ruoyi.web.request.ReviewSceneChangeTaskPassRequest;
import com.ruoyi.web.response.*;
......@@ -27,6 +30,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import java.util.ArrayList;
import java.util.List;
@Api(tags = "场景变更任务")
......@@ -37,6 +41,15 @@ public class ReviewSceneChangeTaskController extends BaseController {
@Autowired
private ReviewSceneChangeTaskService reviewSceneChangeTaskService;
@Autowired
private ReviewUsecaseService reviewUsecaseService;
@Autowired
private ReviewStandardService reviewStandardService;
@Autowired
private ReviewDetailsService reviewDetailsService;
@ApiOperation("新建场景变更任务")
@Trace
@Tags({@Tag(key = "param", value = "arg[0]"), @Tag(key = "result", value = "returnedObj")})
......@@ -216,4 +229,44 @@ public class ReviewSceneChangeTaskController extends BaseController {
return R.ok(reviewSceneChangeTaskService.getReviewerOpinion(id));
}
/*
* 查询测试用例
* */
@ApiOperation("查询所有测试用例")
@Trace
@Tags({@Tag(key = "param", value = "arg[0]"), @Tag(key = "result", value = "returnedObj")})
@Log(title = "查询所有测试用例", businessType = BusinessType.UPDATE)
@RequestMapping(method = RequestMethod.POST, value = "/getUseCaseListAll")
public R<List<GetUseCaseResponse>> getUseCaseListAll(@RequestBody GetUseCaseRequestNew GetUseCaseRequestNew){
List<Long> idList = reviewStandardService.getIdList(GetUseCaseRequestNew);
List<GetUseCaseResponse> getUseCaseResponseList = reviewUsecaseService.getUseCaseListByIds(idList);
return R.ok(getUseCaseResponseList);
}
/*
* 新增细则按钮
* */
@ApiOperation("新增细则按钮")
@Trace
@Tags({@Tag(key = "param", value = "arg[0]"), @Tag(key = "result", value = "returnedObj")})
@Log(title = "新增细则按钮", businessType = BusinessType.UPDATE)
@RequestMapping(method = RequestMethod.POST, value = "/getKeypointListAll")
public R<List<AddDetailsResponse>> getDetailsListNew(@RequestBody GetKeypointListRequest getKeypointListRequest){
List<Long> idList = reviewStandardService.getKeypointIdList(getKeypointListRequest);
List<AddDetailsResponse> addDetailsResponseList = reviewStandardService.getKeypointListByIds(idList);
return R.ok(addDetailsResponseList);
}
/*
* 删除细则按钮
* */
@ApiOperation("删除细则按钮")
@Trace
@Tags({@Tag(key = "param", value = "arg[0]"), @Tag(key = "result", value = "returnedObj")})
@Log(title = "删除细则按钮", businessType = BusinessType.UPDATE)
@RequestMapping(method = RequestMethod.POST, value = "/deleteKeypointListAll")
public R<List<DeleteDetailsResponse>> deleteKeypointListAll(@RequestBody DeleteDetailsRequest deleteDetailsRequest){
List<DeleteDetailsResponse> responseList = reviewDetailsService.getDeleteDetailsResponseList(deleteDetailsRequest);
return R.ok(responseList);
}
}
package com.ruoyi.web.request;
import io.swagger.annotations.ApiModel;
import lombok.Data;
@Data
@ApiModel(value = "DeleteDetailsRequest" ,description = "获取细则列表请求request")
public class DeleteDetailsRequest {
private Long standardId;
private String standardNo;
private String type;
}
package com.ruoyi.web.request;
import io.swagger.annotations.ApiModel;
import lombok.Data;
@Data
@ApiModel(value = "GetKeypointListRequest" ,description = "获取要点列表请求request")
public class GetKeypointListRequest {
private Long standardId;
private String standardNo;
private String type;
}
package com.ruoyi.web.request;
import io.swagger.annotations.ApiModel;
import lombok.Data;
@Data
@ApiModel(value = "GetUseCaseRequestNew" ,description = "获取测试用例列表请求request")
public class GetUseCaseRequestNew {
private Long standardId;
private String standardNo;
private String type;
}
package com.ruoyi.web.response;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.List;
@ApiModel(value = "AddDetailsResponse", description = "新增细则按钮响应数据")
@Data
public class AddDetailsResponse {
@ApiModelProperty("id")
private Long id;
@ApiModelProperty("章节")
private String chapter;
@ApiModelProperty("标准内容")
private String text;
@ApiModelProperty("标准id")
private Long standardId;
@ApiModelProperty("标准编号")
private String standardNo;
@ApiModelProperty("标准下keypoint集合")
private List<KeypointList> keypointList;
}
package com.ruoyi.web.response;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@ApiModel(value = "DeleteDetails", description = "新增细则按钮响应数据")
@Data
public class DeleteDetails {
@ApiModelProperty("要点id")
private Long id;
@ApiModelProperty("要点内容")
private String text;
@ApiModelProperty("标准id")
private Long reviewKeypointId;
}
package com.ruoyi.web.response;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.List;
@ApiModel(value = "DeleteDetailsList", description = "新增细则按钮响应数据")
@Data
public class DeleteDetailsList {
@ApiModelProperty("要点id")
private Long id;
@ApiModelProperty("要点内容")
private String text;
@ApiModelProperty("标准id")
private Long reviewStandardId;
@ApiModelProperty("细则集合")
private List<DeleteDetails> deleteDetailsList;
}
package com.ruoyi.web.response;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.List;
@ApiModel(value = "DeleteDetailsResponse", description = "删除细则按钮响应数据")
@Data
public class DeleteDetailsResponse {
@ApiModelProperty("id")
private Long id;
@ApiModelProperty("章节")
private String chapter;
@ApiModelProperty("标准内容")
private String text;
@ApiModelProperty("标准id")
private Long standardId;
@ApiModelProperty("标准编号")
private String standardNo;
@ApiModelProperty("标准下details集合")
private List<DeleteDetailsList> deleteDetailsLists;
}
package com.ruoyi.web.response;
import io.swagger.annotations.ApiModel;
import lombok.Data;
import java.util.List;
@ApiModel(value = "GetUseCaseResponse", description = "查询测试用例")
@Data
public class GetUseCaseResponse {
private Long id;
private String text;
private Long standardId;
private String standardNo;
private List<UseCaseResponseDTO> useCaseResponseDTOList;
}
package com.ruoyi.web.response;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@ApiModel(value = "KeypointList", description = "要点列表")
@Data
public class KeypointList {
@ApiModelProperty("要点id")
private Long id;
@ApiModelProperty("要点内容")
private String text;
@ApiModelProperty("标准id")
private Long reviewStandardId;
}
package com.ruoyi.web.response;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@Data
@ApiModel
public class ReviewStandardResponseNew {
@ApiModelProperty("ID")
@JsonFormat(shape = JsonFormat.Shape.STRING)
private Long id;
/**
* 章节
*/
@ApiModelProperty("章节")
private String chapter;
/**
* 文本内容
*/
@ApiModelProperty("文本内容")
private String text;
/**
* 测试方法(车型试验专有)
*/
@ApiModelProperty("测试方法(车型试验专有)")
private String testMethod;
@ApiModelProperty("标准名称")
private String name;
@ApiModelProperty("标准号")
private String standardNo;
@ApiModelProperty("标准id")
private Long standardId;
}
package com.ruoyi.web.response;
import io.swagger.annotations.ApiModel;
import lombok.Data;
@ApiModel(value = "UseCaseResponseDTO", description = "测试用例DTO")
@Data
public class UseCaseResponseDTO {
private Long id;
private String usecaseId;
private String usecaseDescribe;
private Long reviewStandardId;
}
......@@ -116,6 +116,48 @@
AND standard_id = #{request.standardId}
</select>
<select id="getIdList" resultType="java.lang.Long">
select id
from t_review_standard
where standard_no = #{getUseCaseRequestNew.standardNo}
and type = #{getUseCaseRequestNew.type}
and standard_id = #{getUseCaseRequestNew.standardId}
</select>
<select id="getKeypointIdList" resultType="java.lang.Long">
select id
from t_review_standard
where standard_no = #{getKeypointListRequest.standardNo} and standard_id = #{getKeypointListRequest.standardId} and type = #{getKeypointListRequest.type}
</select>
<select id="getKeypointListByIdList" resultType="com.ruoyi.web.response.KeypointList">
select
id,text,review_standard_id
from t_review_keypoint
where t_review_keypoint.review_standard_id IN
<foreach item="id" collection="idList" open="(" separator="," close=")">
#{id}
</foreach>
</select>
<select id="getDetailsIdList" resultType="java.lang.Long">
select review_keypoint_id
from t_review_details
</select>
<select id="getDelKeypointIdList" resultType="java.lang.Long">
select id
from t_review_standard
where standard_no = #{deleteDetailsRequest.standardNo} and standard_id = #{deleteDetailsRequest.standardId} and type = #{deleteDetailsRequest.type}
</select>
<select id="getDeleteDetailsByKeypointId" resultType="com.ruoyi.web.response.DeleteDetails">
select id, text, review_keypoint_id
from t_review_details
where review_keypoint_id = #{id}
</select>
<select id="selectReviewStandardById" resultType="com.ruoyi.web.response.ReviewStandardResponseNew">
select id,standard_id,standard_no,text,chapter
from t_review_standard
where id = #{key}
</select>
</mapper>
......@@ -14,4 +14,18 @@
from t_review_usecase
where id = #{id}
</select>
<select id="getUseCaseListByIdList" resultType="com.ruoyi.web.response.UseCaseResponseDTO">
SELECT
u.id,
u.usecase_id AS usecaseId,
u.usecase_describe AS usecaseDescribe,
u.review_standard_id AS reviewStandardId
FROM
t_review_usecase u
WHERE
u.review_standard_id IN
<foreach item="id" collection="idList" open="(" separator="," close=")">
#{id}
</foreach>
</select>
</mapper>
......@@ -18,7 +18,7 @@
</resultMap>
<select id="findList" parameterType="com.ruoyi.web.request.StandardListRequest" resultMap="BaseResultMap">
SELECT id, name, standard_no, file,standard_type,standard_status,release_date,implementation_date,status,keypoint_file
SELECT id, name, standard_no, file,standard_type,standard_status,release_date,implementation_date,status,keypoint_file,keypoint_name
FROM t_standard
<where>
<if test="standardType != null and standardType != ''">
......
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