Просмотр исходного кода

企业台账-料件信息-新增商品序号,完善编辑修改

heguanxun месяцев назад: 2
Родитель
Сommit
29a320db6b

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

@@ -210,10 +210,13 @@ public class QyRecordInfoServiceImpl extends ServiceImpl<QyRecordInfoMapper, QyR
         //料件信息
         List<QyRecardBodyEditParam> bodyAddParams = qyRecordInfoEditParam.getQyRecardBodyEditParams();
         if (CollectionUtil.isNotEmpty(bodyAddParams)){
+            AtomicInteger i = new AtomicInteger();
             bodyAddParams.stream().forEach(qyRecardBodyAddParam -> {
                 qyRecardBodyAddParam.setQyRecordInfoId(qyRecordInfo.getId());
                 QyRecardBody qyRecardBody = BeanUtil.toBean(qyRecardBodyAddParam, QyRecardBody.class);
+                String productNum = BusinessIdGenerator.generateBusinessIdForProductNum(i.get());
                 qyRecardBody.setQyRecordInfoId(qyRecordInfo.getId());
+                qyRecardBody.setProductNum(productNum);
                 qyRecardBody.setId(null);
                 qyRecardBodyService.save(qyRecardBody);
             });