Commit 32aced02 authored by 王飞's avatar 王飞

Feat

1、查询审查任务详情时冗余细则信息便于前端显示。

Reference N/A
parent b0f0eb69
...@@ -53,4 +53,27 @@ public class ReviewDetails { ...@@ -53,4 +53,27 @@ public class ReviewDetails {
@TableField(exist = false) @TableField(exist = false)
private ReviewDetailsResult result; private ReviewDetailsResult result;
/**
* 冗余标准id (为便于前端显示)
*/
@JsonFormat(shape = JsonFormat.Shape.STRING)
@TableField(exist = false)
private Long standardId;
/**
* 冗余审查标准内容 (为便于前端显示)
*/
@TableField(exist = false)
private String standardText;
/**
* 冗余章节 (为便于前端显示)
*/
@TableField(exist = false)
private String chapter;
/**
* 冗余审查要点内容 (为便于前端显示)
*/
@TableField(exist = false)
private String reviewKeypointText;
} }
...@@ -9,6 +9,7 @@ import io.swagger.annotations.ApiModel; ...@@ -9,6 +9,7 @@ import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import java.util.ArrayList;
import java.util.List; import java.util.List;
/** /**
...@@ -80,4 +81,24 @@ public class ReviewStandard { ...@@ -80,4 +81,24 @@ public class ReviewStandard {
@ApiModelProperty("文件路径") @ApiModelProperty("文件路径")
private String file; private String file;
/**
* 冗余细则集合(便于前端显示)
* @return
*/
@TableField(exist = false)
private List<ReviewDetails> details;
public List<ReviewDetails> getDetails() {
List<ReviewDetails> reviewDetailsList = new ArrayList();
for(ReviewKeyPoint reviewKeyPoint : keyPointList) {
for(ReviewDetails reviewDetails : reviewKeyPoint.getReviewDetailsList()) {
reviewDetailsList.add(reviewDetails);
}
}
return reviewDetailsList;
}
} }
...@@ -180,6 +180,7 @@ public class ReviewStandardServiceImpl extends ServiceImpl<ReviewStandardMapper, ...@@ -180,6 +180,7 @@ public class ReviewStandardServiceImpl extends ServiceImpl<ReviewStandardMapper,
for(ReviewDetails reviewDetails : reviewDetailsList) { for(ReviewDetails reviewDetails : reviewDetailsList) {
if(reviewDetails.getReviewKeypointId().equals(keyPointId)) { if(reviewDetails.getReviewKeypointId().equals(keyPointId)) {
reviewDetails.setReviewKeypointText(reviewKeyPoint.getText());
children.add(reviewDetails); children.add(reviewDetails);
} }
} }
...@@ -208,6 +209,14 @@ public class ReviewStandardServiceImpl extends ServiceImpl<ReviewStandardMapper, ...@@ -208,6 +209,14 @@ public class ReviewStandardServiceImpl extends ServiceImpl<ReviewStandardMapper,
for(ReviewKeyPoint reviewKeyPoint : reviewKeyPointList) { for(ReviewKeyPoint reviewKeyPoint : reviewKeyPointList) {
if(reviewKeyPoint.getReviewStandardId().equals(standardId)) { if(reviewKeyPoint.getReviewStandardId().equals(standardId)) {
// 为该要点下的所有细则冗余标准信息,便于前端显示
reviewKeyPoint.getReviewDetailsList().stream().forEach(details -> {
details.setStandardText(reviewStandard.getText());
details.setStandardId(reviewStandard.getId());
details.setChapter(reviewStandard.getChapter());
});
children.add(reviewKeyPoint); children.add(reviewKeyPoint);
} }
} }
......
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