|
@@ -35,7 +35,7 @@ import java.util.stream.Collectors;
|
|
|
@Service
|
|
|
@RequiredArgsConstructor(onConstructor_ = {@Lazy})
|
|
|
public class ReportFieldService extends ServiceImpl<ReportFieldMapper, ReportField> {
|
|
|
-
|
|
|
+ private final ReportFieldMapper reportFieldMapper;
|
|
|
private final LoginUtils loginUtils;
|
|
|
private final ReportFieldTextService reportFieldTextService;
|
|
|
private final ReportFieldOptionService reportFieldOptionService;
|
|
@@ -146,19 +146,9 @@ public class ReportFieldService extends ServiceImpl<ReportFieldMapper, ReportFie
|
|
|
queryWrapper.eq(ReportField::getReportId, projectId);
|
|
|
return this.getOne(queryWrapper);
|
|
|
}
|
|
|
-
|
|
|
- //给报告添加默认自定义字段
|
|
|
- public void addDefaultField(Integer reportId, Integer reportType) {
|
|
|
- LambdaQueryWrapper<ReportField> queryWrapper = new LambdaQueryWrapper<>();
|
|
|
- queryWrapper.eq(ReportField::getType, reportType);
|
|
|
- queryWrapper.eq(ReportField::getReportId, null);
|
|
|
- List<ReportField> reportFields =this.list(queryWrapper);
|
|
|
- if(reportFields.size()!=0||reportFields!=null)
|
|
|
- {
|
|
|
- reportFields.forEach(p->p.setReportId(reportId));
|
|
|
- this.saveBatch(reportFields);
|
|
|
- }
|
|
|
-
|
|
|
+ public String getReportField(int id){
|
|
|
+ List<ReportField> reportFields = reportFieldMapper.find(id);
|
|
|
+ return Response.success(reportFields);
|
|
|
}
|
|
|
|
|
|
}
|