|
@@ -155,8 +155,28 @@ public class QyRecordInfoServiceImpl extends ServiceImpl<QyRecordInfoMapper, QyR
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public QyRecordInfo detail(QyRecordInfoIdParam qyRecordInfoIdParam) {
|
|
|
- return this.queryEntity(qyRecordInfoIdParam.getId());
|
|
|
+ public QyRecordInfoAddParam detail(QyRecordInfoIdParam qyRecordInfoIdParam) {
|
|
|
+ QyRecordInfo recordInfo = this.queryEntity(qyRecordInfoIdParam.getId());
|
|
|
+ List<QyRecardBody> bodyList = qyRecardBodyService.list(new LambdaQueryWrapper<QyRecardBody>().eq(QyRecardBody::getQyRecordInfoId, recordInfo.getId()));
|
|
|
+ List<QyRecordAttachment> attachmentList = qyRecordAttachmentService.list(new LambdaQueryWrapper<QyRecordAttachment>().eq(QyRecordAttachment::getQyRecordInfoId, recordInfo.getId()));
|
|
|
+ QyRecordInfoAddParam param = BeanUtil.toBean(recordInfo, QyRecordInfoAddParam.class);
|
|
|
+ List<QyRecardBodyAddParam> qyRecardBodyAddParamList = new ArrayList<>();
|
|
|
+ List<QyRecordAttachmentAddParam> qyRecordAttachmentAddParamList = new ArrayList<>();
|
|
|
+ if(CollectionUtil.isNotEmpty(bodyList)){
|
|
|
+ bodyList.stream().forEach(item ->{
|
|
|
+ QyRecardBodyAddParam bean = BeanUtil.toBean(item, QyRecardBodyAddParam.class);
|
|
|
+ qyRecardBodyAddParamList.add(bean);
|
|
|
+ });
|
|
|
+ }
|
|
|
+ if(CollectionUtil.isNotEmpty(attachmentList)){
|
|
|
+ attachmentList.stream().forEach(item ->{
|
|
|
+ QyRecordAttachmentAddParam bean_ = BeanUtil.toBean(item, QyRecordAttachmentAddParam.class);
|
|
|
+ qyRecordAttachmentAddParamList.add(bean_);
|
|
|
+ });
|
|
|
+ }
|
|
|
+ param.setQyRecardBodyAddParams(qyRecardBodyAddParamList);
|
|
|
+ param.setQyRecordAttachmentAddParams(qyRecordAttachmentAddParamList);
|
|
|
+ return param;
|
|
|
}
|
|
|
|
|
|
@Override
|