From 87e07ac8b8f1868eb4302fac73dfc93c5417f977 Mon Sep 17 00:00:00 2001 From: 无关风月 <443237572@qq.com> Date: 星期二, 30 七月 2024 11:06:14 +0800 Subject: [PATCH] Merge branch 'master' of http://120.76.84.145:10101/gitblit/r/java/ForestFirePrevention --- ruoyi-modules/ruoyi-management/src/main/java/com/ruoyi/management/service/impl/SlVolumeProductionRkServiceImpl.java | 78 +++++++++++++++++++++++++++------------ 1 files changed, 54 insertions(+), 24 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 be8a26d..a6af6c7 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,38 +113,59 @@ } @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()); + slVolumeProductionRk.setNewAddTime(m.getNewAddTime()); + 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); } } @Override - public void uplSlVolumeProductionRk(SlVolumeProductionRkDTO SlVolumeProductionRkDTO) { - SlVolumeProductionRk byId = this.getById(SlVolumeProductionRkDTO.getId()); - if (SlVolumeProductionRkDTO.getErwmNum()!=null){ - byId.setErwmNum(SlVolumeProductionRkDTO.getErwmNum()); - }if (SlVolumeProductionRkDTO.getRkPice()!=null){ - byId.setRkPice(SlVolumeProductionRkDTO.getRkPice()); - }if (SlVolumeProductionRkDTO.getRkNum()!=null){ - byId.setRkNum(SlVolumeProductionRkDTO.getRkNum()); - }if (SlVolumeProductionRkDTO.getShelfId()!=null){ - byId.setShelfId(SlVolumeProductionRkDTO.getShelfId()); - }if (SlVolumeProductionRkDTO.getRkModel()!=null){ - byId.setRkModel(SlVolumeProductionRkDTO.getRkModel()); - }if (SlVolumeProductionRkDTO.getStoreManagementNumber()!=null){ - byId.setStoreManagementNumber(SlVolumeProductionRkDTO.getStoreManagementNumber()); - }if (SlVolumeProductionRkDTO.getRkNumber()!=null){ - byId.setRkNumber(SlVolumeProductionRkDTO.getRkNumber()); + public void uplSlVolumeProductionRk(List<SlVolumeProductionRkDTO> SlVolumeProductionRkDTO) { + for (SlVolumeProductionRkDTO a:SlVolumeProductionRkDTO){ + SlVolumeProductionRk byId = this.getById(a.getId()); + if (a.getErwmNum()!=null){ + byId.setErwmNum(a.getErwmNum()); + }if (a.getRkPice()!=null){ + byId.setRkPice(a.getRkPice()); + }if (a.getRkNum()!=null){ + byId.setRkNum(a.getRkNum()); + }if (a.getShelfId()!=null){ + byId.setShelfId(a.getShelfId()); + }if (a.getRkModel()!=null){ + byId.setRkModel(a.getRkModel()); + }if (a.getStoreManagementNumber()!=null){ + byId.setStoreManagementNumber(a.getStoreManagementNumber()); + }if (a.getRkNumber()!=null){ + byId.setRkNumber(a.getRkNumber()); + } + byId.setNewAddTime(a.getNewAddTime()); + this.updateById(byId); } - this.updateById(byId); + } @Override -- Gitblit v1.7.1