2 Коміти e38771398d ... 710011e977

Автор SHA1 Опис Дата
  heguanxun 710011e977 Merge remote-tracking branch 'origin/master' 3 місяців тому
  heguanxun b937fa8353 【口岸监管服务系统】企业台账管理,LHTWL015编辑页面上传一个文件后保存报服务器异常 3 місяців тому

+ 10 - 8
snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/qyrecordinfo/service/impl/QyRecordInfoServiceImpl.java

@@ -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();