|
@@ -191,6 +191,7 @@ public class QyRecordInfoServiceImpl extends ServiceImpl<QyRecordInfoMapper, QyR
|
|
|
qyRecordAttachmentService.remove(new LambdaQueryWrapper<QyRecordAttachment>().eq(QyRecordAttachment::getQyRecordInfoId, qyRecordInfo.getId()));
|
|
|
qyRecordProductService.remove(new LambdaQueryWrapper<QyRecordProduct>().eq(QyRecordProduct::getQyRecordInfoId, qyRecordInfo.getId()));
|
|
|
|
|
|
+ //料件信息
|
|
|
List<QyRecardBodyEditParam> bodyAddParams = qyRecordInfoEditParam.getQyRecardBodyEditParams();
|
|
|
if (CollectionUtil.isNotEmpty(bodyAddParams)){
|
|
|
bodyAddParams.stream().forEach(qyRecardBodyAddParam -> {
|
|
@@ -202,6 +203,7 @@ public class QyRecordInfoServiceImpl extends ServiceImpl<QyRecordInfoMapper, QyR
|
|
|
});
|
|
|
}
|
|
|
|
|
|
+ //商品信息
|
|
|
List<QyRecordProductEditParam> productEditParams = qyRecordInfoEditParam.getQyRecordProductAddParams();
|
|
|
if (CollectionUtil.isNotEmpty(productEditParams)){
|
|
|
AtomicInteger i = new AtomicInteger();
|
|
@@ -213,23 +215,23 @@ public class QyRecordInfoServiceImpl extends ServiceImpl<QyRecordInfoMapper, QyR
|
|
|
item.setYlCode(ylCode);
|
|
|
item.setProductNumber(ylCodeProduce);
|
|
|
item.setRecordNumber(ylCodeProduceZz);
|
|
|
- QyRecardBody qyRecardBody = BeanUtil.toBean(item, QyRecardBody.class);
|
|
|
- qyRecardBody.setQyRecordInfoId(qyRecordInfo.getId());
|
|
|
- qyRecardBody.setId(null);
|
|
|
- qyRecardBodyService.save(qyRecardBody);
|
|
|
+ QyRecordProduct qyRecordProduct = BeanUtil.toBean(item, QyRecordProduct.class);
|
|
|
+ qyRecordProduct.setQyRecordInfoId(qyRecordInfo.getId());
|
|
|
+ qyRecordProduct.setId(null);
|
|
|
+ qyRecordProductService.save(qyRecordProduct);
|
|
|
i.getAndIncrement();
|
|
|
|
|
|
});
|
|
|
}
|
|
|
|
|
|
- //商品信息
|
|
|
+ //附件信息
|
|
|
List<QyRecordAttachmentEditParam> attachmentEditParams = qyRecordInfoEditParam.getQyRecordAttachmentEditParams();
|
|
|
if(CollectionUtil.isNotEmpty(attachmentEditParams)){
|
|
|
attachmentEditParams.stream().forEach(qyRecordAttachmentAddParam -> {
|
|
|
qyRecordAttachmentAddParam.setQyRecordInfoId(qyRecordInfo.getId());
|
|
|
- QyRecordProduct product = BeanUtil.toBean(qyRecordAttachmentAddParam, QyRecordProduct.class);
|
|
|
- product.setId(null);
|
|
|
- qyRecordProductService.save(product);
|
|
|
+ QyRecordAttachment attachment = BeanUtil.toBean(qyRecordAttachmentAddParam, QyRecordAttachment.class);
|
|
|
+ attachment.setId(null);
|
|
|
+ qyRecordAttachmentService.save(attachment);
|
|
|
});
|
|
|
}
|
|
|
QyRecordInfoCheckList qyRecordInfoCheckList = new QyRecordInfoCheckList();
|