Commit 6319327f authored by 盖献康's avatar 盖献康

检验内容库-车型试验-检验内容

parent 2ed08e25
...@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper; ...@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ruoyi.domain.ReviewStandard; import com.ruoyi.domain.ReviewStandard;
import com.ruoyi.web.request.ReviewStandardListByPageRequest; import com.ruoyi.web.request.ReviewStandardListByPageRequest;
import com.ruoyi.web.response.ReviewStandardResponse; import com.ruoyi.web.response.ReviewStandardResponse;
import com.ruoyi.web.response.ReviewStandardTestInspectionContentResponse;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository; import org.springframework.stereotype.Repository;
...@@ -22,4 +23,11 @@ public interface ReviewStandardMapper extends BaseMapper<ReviewStandard> { ...@@ -22,4 +23,11 @@ public interface ReviewStandardMapper extends BaseMapper<ReviewStandard> {
* @return * @return
*/ */
List<ReviewStandardResponse> selectReviewStandardList(ReviewStandardListByPageRequest request); List<ReviewStandardResponse> selectReviewStandardList(ReviewStandardListByPageRequest request);
/**
* 根据标准主键ID查询车型试验的检验内容
* @param id
* @return
*/
List<ReviewStandardTestInspectionContentResponse> selectTestInspectionContent(Long id);
} }
...@@ -5,6 +5,7 @@ import com.ruoyi.domain.ReviewStandard; ...@@ -5,6 +5,7 @@ import com.ruoyi.domain.ReviewStandard;
import com.ruoyi.web.request.ReviewStandardListByPageRequest; import com.ruoyi.web.request.ReviewStandardListByPageRequest;
import com.ruoyi.web.response.ReviewStandardInspectionContentResponse; import com.ruoyi.web.response.ReviewStandardInspectionContentResponse;
import com.ruoyi.web.response.ReviewStandardResponse; import com.ruoyi.web.response.ReviewStandardResponse;
import com.ruoyi.web.response.ReviewStandardTestInspectionContentResponse;
import java.util.List; import java.util.List;
...@@ -35,4 +36,11 @@ public interface ReviewStandardService extends IService<ReviewStandard> { ...@@ -35,4 +36,11 @@ public interface ReviewStandardService extends IService<ReviewStandard> {
* @return * @return
*/ */
ReviewStandardInspectionContentResponse selectInspectionContent(Long id); ReviewStandardInspectionContentResponse selectInspectionContent(Long id);
/**
* 根据标准主键ID查询车型试验的检验内容
* @param id
* @return
*/
List<ReviewStandardTestInspectionContentResponse> selectTestInspectionContent(Long id);
} }
...@@ -8,6 +8,7 @@ import com.ruoyi.service.*; ...@@ -8,6 +8,7 @@ import com.ruoyi.service.*;
import com.ruoyi.web.request.ReviewStandardListByPageRequest; import com.ruoyi.web.request.ReviewStandardListByPageRequest;
import com.ruoyi.web.response.ReviewStandardInspectionContentResponse; import com.ruoyi.web.response.ReviewStandardInspectionContentResponse;
import com.ruoyi.web.response.ReviewStandardResponse; import com.ruoyi.web.response.ReviewStandardResponse;
import com.ruoyi.web.response.ReviewStandardTestInspectionContentResponse;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
...@@ -79,13 +80,24 @@ public class ReviewStandardServiceImpl extends ServiceImpl<ReviewStandardMapper, ...@@ -79,13 +80,24 @@ public class ReviewStandardServiceImpl extends ServiceImpl<ReviewStandardMapper,
List<ReviewDetails> reivewDetailsList = reviewDetailsService.findByKeyPointsList(reviewKeyPointList); List<ReviewDetails> reivewDetailsList = reviewDetailsService.findByKeyPointsList(reviewKeyPointList);
// 查询审查场景 // 查询审查场景
List<ReviewScene> reviewSceneList = reviewSceneService.findByDetailsList(reivewDetailsList); List<ReviewScene> reviewSceneList = reviewSceneService.findByDetailsList(reivewDetailsList);
// 调用方法把数据变为树状结构
List<ReviewDetails> reviewDetails = buildDetails(reivewDetailsList, reviewSceneList); List<ReviewDetails> reviewDetails = buildDetails(reivewDetailsList, reviewSceneList);
List<ReviewKeyPoint> keyPoints = buildKeyPoint(reviewKeyPointList, reviewDetails); List<ReviewKeyPoint> keyPoints = buildKeyPoint(reviewKeyPointList, reviewDetails);
ReviewStandardInspectionContentResponse response = ReviewStandardInspectionContentResponse.builder().keyPointList(keyPoints).build(); ReviewStandardInspectionContentResponse response = ReviewStandardInspectionContentResponse.builder().keyPointList(keyPoints).build();
return response; return response;
} }
/**
* 根据标准主键ID查询车型试验的检验内容
* @param id
* @return
*/
@Override
public List<ReviewStandardTestInspectionContentResponse> selectTestInspectionContent(Long id) {
List<ReviewStandardTestInspectionContentResponse> list = reviewStandardMapper.selectTestInspectionContent(id);
return list;
}
/** /**
* 将审查 标准、要点、细则、场景 按照父子关系拆分写入到各自的表中 * 将审查 标准、要点、细则、场景 按照父子关系拆分写入到各自的表中
* @param reviewStandardList * @param reviewStandardList
......
...@@ -72,21 +72,6 @@ public class UserPhotoStorageServiceImpl extends ServiceImpl<UserPhotoStorageMap ...@@ -72,21 +72,6 @@ public class UserPhotoStorageServiceImpl extends ServiceImpl<UserPhotoStorageMap
return photoStorageVOList; return photoStorageVOList;
} }
/**
* 在photoStorageVOList数据没有此时间时新增一条新数据
* @param photoStorageVOList
* @param photoStorage
* @param createTime
*/
private void addPhotoStorageInNotCreateTime(List<PhotoStorageVO> photoStorageVOList, UserPhotoStorage photoStorage, String createTime) {
List<UserPhotoStorage> photoStorageChildren = new ArrayList<>();
photoStorageChildren.add(photoStorage);
PhotoStorageVO photoStorageVO = PhotoStorageVO.builder()
.createTime(createTime)
.userPhotoStorageList(photoStorageChildren).build();
photoStorageVOList.add(photoStorageVO);
}
/** /**
* 新增用户照片存储 * 新增用户照片存储
* *
......
...@@ -9,8 +9,10 @@ import com.ruoyi.domain.ReviewStandard; ...@@ -9,8 +9,10 @@ import com.ruoyi.domain.ReviewStandard;
import com.ruoyi.service.ReviewStandardService; import com.ruoyi.service.ReviewStandardService;
import com.ruoyi.web.request.ReviewStandardInspectionContentRequest; import com.ruoyi.web.request.ReviewStandardInspectionContentRequest;
import com.ruoyi.web.request.ReviewStandardListByPageRequest; import com.ruoyi.web.request.ReviewStandardListByPageRequest;
import com.ruoyi.web.request.ReviewStandardTestInspectionContentRequest;
import com.ruoyi.web.response.ReviewStandardInspectionContentResponse; import com.ruoyi.web.response.ReviewStandardInspectionContentResponse;
import com.ruoyi.web.response.ReviewStandardResponse; import com.ruoyi.web.response.ReviewStandardResponse;
import com.ruoyi.web.response.ReviewStandardTestInspectionContentResponse;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
...@@ -58,4 +60,16 @@ public class ReviewStandardController extends BaseController { ...@@ -58,4 +60,16 @@ public class ReviewStandardController extends BaseController {
ReviewStandardInspectionContentResponse response = reviewStandardService.selectInspectionContent(request.getId()); ReviewStandardInspectionContentResponse response = reviewStandardService.selectInspectionContent(request.getId());
return R.ok(response); return R.ok(response);
} }
/**
* 根据标准主键ID查询车型试验的检验内容
* @param request
* @return
*/
@ApiOperation("车型试验的检验内容详情")
@PostMapping("/test/getInspectionContent")
public R<List<ReviewStandardTestInspectionContentResponse>> getTestInspectionContent(@Validated @RequestBody ReviewStandardTestInspectionContentRequest request) {
List<ReviewStandardTestInspectionContentResponse> response = reviewStandardService.selectTestInspectionContent(request.getId());
return R.ok(response);
}
} }
package com.ruoyi.web.request;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.NotNull;
/**
* 检验内容库-检验内容 DTO
* @author gxk
*/
@Data
@ApiModel
public class ReviewStandardTestInspectionContentRequest {
@ApiModelProperty("标准主键ID")
@NotNull(message = "标准主键ID不能为空")
private Long id;
}
package com.ruoyi.web.response;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* 检验内容库-检验内容 返回类
* @author gxk
*/
@Data
@ApiModel
public class ReviewStandardTestInspectionContentResponse {
@ApiModelProperty("测试场景")
private String testScenario;
@ApiModelProperty("测试类型")
private String testType;
@ApiModelProperty("用例编号")
private String useCaseNumber;
@ApiModelProperty("用例名称")
private String useCaseName;
}
...@@ -48,5 +48,20 @@ ...@@ -48,5 +48,20 @@
chapter chapter
</select> </select>
<select id="selectTestInspectionContent"
resultType="com.ruoyi.web.response.ReviewStandardTestInspectionContentResponse">
SELECT
usecase.NAME useCaseName,
usecase.usecase_no useCaseNumber,
scenario.test_scenario,
type.test_type
FROM
t_test_usecase usecase
LEFT JOIN t_test_scenario scenario ON scenario.id = usecase.test_scenario_id
LEFT JOIN t_test_type type ON type.id = usecase.test_type_id
WHERE
usecase.review_standard_id = #{id}
</select>
</mapper> </mapper>
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