| | |
| | | slGoodsMaterials.setGoodsMaterialsName(slGoodsMaterialsDTO.getGoodsMaterialsName()); |
| | | slGoodsMaterials.setIsConsume(slGoodsMaterialsDTO.getIsConsume()); |
| | | slGoodsMaterials.setRepertory(slGoodsMaterialsDTO.getRepertory()); |
| | | this.save(slGoodsMaterials); |
| | | }else{ |
| | | SlGoodsMaterials byId = this.getById(slGoodsMaterialsDTO.getId()); |
| | | if (slGoodsMaterialsDTO.getGoodsMaterialsName()!=null){ |
| | |
| | | } |
| | | if (slGoodsMaterialsDTO.getRepertory()!=null){ |
| | | byId.setRepertory(slGoodsMaterialsDTO.getRepertory()); |
| | | LambdaQueryWrapper<ManagementGoodsMaterials> wrapper3= Wrappers.lambdaQuery(); |
| | | wrapper3.eq(ManagementGoodsMaterials::getGoodsMaterialsId,byId.getId()); |
| | | wrapper3.eq( ManagementGoodsMaterials::getDelFlag,0); |
| | | wrapper3.orderByDesc(ManagementGoodsMaterials::getCreateTime); |
| | | List<ManagementGoodsMaterials> page1 = managementGoodsMaterialsService.list(wrapper3); |
| | | for (ManagementGoodsMaterials pg:page1){ |
| | | pg.setRepertory(slGoodsMaterialsDTO.getRepertory()); |
| | | managementGoodsMaterialsService.updateById(pg); |
| | | } |
| | | |
| | | } |
| | | if (slGoodsMaterialsDTO.getIsConsume()!=null){ |
| | | byId.setIsConsume(slGoodsMaterialsDTO.getIsConsume()); |