lxw
2023-09-11 24cb4c00895e93e3f54c6cc268ea2c44e17d1026
Merge branch 'master' of http://118.89.139.230:10101/r/~whyclxw/CadDrawManager
1个文件已修改
8 ■■■■ 已修改文件
src/main/java/com/whyc/service/ProductService.java 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/whyc/service/ProductService.java
@@ -424,7 +424,7 @@
     * @return
     * @throws IOException
     */
    @Transactional
    @Transactional(rollbackFor = {RuntimeException.class,Exception.class})
    public Response add(Product product) throws IOException {
        String parentCode = product.getParentCode();
        String customCode = product.getCustomCode();
@@ -587,6 +587,9 @@
                                newTemp.setQuantity(bom.getQuantity());
                                //2323-09-08 与杨红兰微信确认<就按照我上传清单的时间,系统里最新的是啥型号,就取什么型号>
                                Material relatedMaterial = mService.getLastByCode(related);
                                if(relatedMaterial == null){
                                    throw new RuntimeException("当前替料"+related+",编码在平台中不存在,无法关联替代");
                                }
                                newTemp.setMaterialId(relatedMaterial.getId());
                                newTemp.setCreateTime(date);
                                newAddedList.add(newTemp);
@@ -612,6 +615,9 @@
                            newTemp.setQuantity(bom.getQuantity());
                            //2323-09-08 与杨红兰微信确认<就按照我上传清单的时间,系统里最新的是啥型号,就取什么型号>
                            Material relatedMaterial = mService.getLastByCode(related);
                            if(relatedMaterial == null){
                                throw new RuntimeException("当前替料"+related+",编码在平台中不存在,无法关联替代");
                            }
                            newTemp.setMaterialId(relatedMaterial.getId());
                            newTemp.setCreateTime(date);
                            newAddedList.add(newTemp);