From 90746aae01216e955a5afacc99f17c5eb0563552 Mon Sep 17 00:00:00 2001 From: 无关风月 <443237572@qq.com> Date: 星期二, 30 七月 2024 10:09:52 +0800 Subject: [PATCH] 代码提交 依赖整理 bug解决 --- ruoyi-modules/ruoyi-management/src/main/java/com/ruoyi/management/service/impl/SlVolumeProductionRkServiceImpl.java | 39 ++++++++++++++++++++++++++++++++------- 1 files changed, 32 insertions(+), 7 deletions(-) diff --git a/ruoyi-modules/ruoyi-management/src/main/java/com/ruoyi/management/service/impl/SlVolumeProductionRkServiceImpl.java b/ruoyi-modules/ruoyi-management/src/main/java/com/ruoyi/management/service/impl/SlVolumeProductionRkServiceImpl.java index 24eff3c..01a90d0 100644 --- a/ruoyi-modules/ruoyi-management/src/main/java/com/ruoyi/management/service/impl/SlVolumeProductionRkServiceImpl.java +++ b/ruoyi-modules/ruoyi-management/src/main/java/com/ruoyi/management/service/impl/SlVolumeProductionRkServiceImpl.java @@ -71,7 +71,16 @@ list.setIsConsume(slGoodsMaterials.getIsConsume()); list.setSupplierName(data.getNickName()); SlGoodsShelf slGoodsShelf = slGoodsShelfMapper.selectById(list.getShelfId()); - list.setGoodsShelfName(slGoodsShelf.getGoodsShelfName()); + if (slGoodsShelf!=null){ + list.setGoodsShelfName(slGoodsShelf.getGoodsShelfName()); + } + LambdaQueryWrapper<SlGoodsShelf> wrapper5= Wrappers.lambdaQuery(); + wrapper5.eq(SlGoodsShelf::getStoreManagementId,byId.getManagementId()); + wrapper5.eq(SlGoodsShelf::getStoreManagementNumber,list.getStoreManagementNumber()); + wrapper5.eq( SlGoodsShelf::getDelFlag,0); + wrapper5.orderByDesc(SlGoodsShelf::getCreateTime); + List<SlGoodsShelf> page3 = slGoodsShelfMapper.selectList(wrapper5); + list.setSlGoodsShelfs(page3); } } return SlGoodsShelfDTO; @@ -104,14 +113,30 @@ } @Override - public void addVolumeProductionRkgl(SlVolumeProductionRkListDTO slVolumeProductionRkListDTO) { - List<Long> materialsId = slVolumeProductionRkListDTO.getMaterialsId(); - for (Long m:materialsId){ + public void addVolumeProductionRkgl(List<SlVolumeProductionRkListDTO> slVolumeProductionRkListDTO) { + + for (SlVolumeProductionRkListDTO m:slVolumeProductionRkListDTO){ SlVolumeProductionRk slVolumeProductionRk=new SlVolumeProductionRk(); - slVolumeProductionRk.setVolumeProductionRkglId(slVolumeProductionRkListDTO.getVolumeProductionRkglId()); - slVolumeProductionRk.setMaterialsId(m); - slVolumeProductionRk.setManagementId(slVolumeProductionRkListDTO.getManagementId()); + slVolumeProductionRk.setVolumeProductionRkglId(m.getVolumeProductionRkglId()); + slVolumeProductionRk.setMaterialsId(m.getMaterialsId()); + slVolumeProductionRk.setManagementId(m.getManagementId()); slVolumeProductionRk.setRkNumber("CD-"+new Date().getTime()); + if ( m.getErwmNum()!=null){ + slVolumeProductionRk.setErwmNum( m.getErwmNum()); + }if ( m.getRkPice()!=null){ + slVolumeProductionRk.setRkPice( m.getRkPice()); + }if ( m.getRkNum()!=null){ + slVolumeProductionRk.setRkNum( m.getRkNum()); + }if ( m.getShelfId()!=null){ + slVolumeProductionRk.setShelfId( m.getShelfId()); + }if ( m.getRkModel()!=null){ + slVolumeProductionRk.setRkModel( m.getRkModel()); + }if ( m.getStoreManagementNumber()!=null){ + slVolumeProductionRk.setStoreManagementNumber( m.getStoreManagementNumber()); + }if ( m.getRkNumber()!=null){ + slVolumeProductionRk.setRkNumber( m.getRkNumber()); + } + this.save(slVolumeProductionRk); } -- Gitblit v1.7.1