Commit b8f09c33f3d38bf1f028036f23a096f973690ac9
1 parent
9f49bb2a
库存修改
Showing
4 changed files
with
7 additions
and
7 deletions
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/service/materialinventory/MaterialInventoryService.java
| @@ -80,7 +80,7 @@ public interface MaterialInventoryService { | @@ -80,7 +80,7 @@ public interface MaterialInventoryService { | ||
| 80 | * @Date 2025/11/28 23:36 | 80 | * @Date 2025/11/28 23:36 |
| 81 | * @Param materialId | 81 | * @Param materialId |
| 82 | */ | 82 | */ |
| 83 | - MaterialInventoryDO selectMaterialInventoryByMaterialId(Long typeDetailId, Long companyId); | 83 | + MaterialInventoryDO selectMaterialInventoryByMaterialId(Long materialId, Long companyId); |
| 84 | 84 | ||
| 85 | 85 | ||
| 86 | /** | 86 | /** |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/service/materialinventory/MaterialInventoryServiceImpl.java
| @@ -119,12 +119,12 @@ public class MaterialInventoryServiceImpl implements MaterialInventoryService { | @@ -119,12 +119,12 @@ public class MaterialInventoryServiceImpl implements MaterialInventoryService { | ||
| 119 | } | 119 | } |
| 120 | 120 | ||
| 121 | @Override | 121 | @Override |
| 122 | - public MaterialInventoryDO selectMaterialInventoryByMaterialId(Long typeDetailId, Long companyId) { | ||
| 123 | - if (typeDetailId == null) { | 122 | + public MaterialInventoryDO selectMaterialInventoryByMaterialId(Long materialId, Long companyId) { |
| 123 | + if (materialId == null) { | ||
| 124 | throw exception0(BAD_REQUEST.getCode(),"更新库存失败:typeDetailId为空!"); | 124 | throw exception0(BAD_REQUEST.getCode(),"更新库存失败:typeDetailId为空!"); |
| 125 | } | 125 | } |
| 126 | LambdaQueryWrapper<MaterialInventoryDO> queryWrapper = Wrappers.lambdaQuery(); | 126 | LambdaQueryWrapper<MaterialInventoryDO> queryWrapper = Wrappers.lambdaQuery(); |
| 127 | - queryWrapper.eq(MaterialInventoryDO::getTypeDetailId, typeDetailId); | 127 | + queryWrapper.eq(MaterialInventoryDO::getMaterialId, materialId); |
| 128 | queryWrapper.eq(MaterialInventoryDO::getBelongCompanyId, companyId); | 128 | queryWrapper.eq(MaterialInventoryDO::getBelongCompanyId, companyId); |
| 129 | return materialInventoryMapper.selectOne(queryWrapper); | 129 | return materialInventoryMapper.selectOne(queryWrapper); |
| 130 | } | 130 | } |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/service/materialinventoryin/MaterialInventoryInServiceImpl.java
| @@ -144,7 +144,7 @@ public class MaterialInventoryInServiceImpl implements MaterialInventoryInServic | @@ -144,7 +144,7 @@ public class MaterialInventoryInServiceImpl implements MaterialInventoryInServic | ||
| 144 | if (null == materialInventoryIn) { | 144 | if (null == materialInventoryIn) { |
| 145 | throw exception(MATERIAL_INVENTORY_IN_NOT_EXISTS); | 145 | throw exception(MATERIAL_INVENTORY_IN_NOT_EXISTS); |
| 146 | } | 146 | } |
| 147 | - MaterialInventoryDO inventory = materialInventoryService.selectMaterialInventoryByMaterialId(materialInventoryIn.getTypeDetailId(),getCompanyId()); | 147 | + MaterialInventoryDO inventory = materialInventoryService.selectMaterialInventoryByMaterialId(materialInventoryIn.getMaterialId(),getCompanyId()); |
| 148 | if(null == inventory){ | 148 | if(null == inventory){ |
| 149 | throw exception0(BAD_REQUEST.getCode(),"参数错误"); | 149 | throw exception0(BAD_REQUEST.getCode(),"参数错误"); |
| 150 | } | 150 | } |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/service/materialinventoryout/MaterialInventoryOutServiceImpl.java
| @@ -53,7 +53,7 @@ public class MaterialInventoryOutServiceImpl implements MaterialInventoryOutServ | @@ -53,7 +53,7 @@ public class MaterialInventoryOutServiceImpl implements MaterialInventoryOutServ | ||
| 53 | if(null == material){ | 53 | if(null == material){ |
| 54 | throw exception0(BAD_REQUEST.getCode(), "无效参数-materialId"); | 54 | throw exception0(BAD_REQUEST.getCode(), "无效参数-materialId"); |
| 55 | } | 55 | } |
| 56 | - MaterialInventoryDO materialInventory = materialInventoryService.selectMaterialInventoryByMaterialId(material.getTypeDetailId(),getCompanyId()); | 56 | + MaterialInventoryDO materialInventory = materialInventoryService.selectMaterialInventoryByMaterialId(material.getMaterialId(),getCompanyId()); |
| 57 | if(null == materialInventory){ | 57 | if(null == materialInventory){ |
| 58 | throw exception0(BAD_REQUEST.getCode(),createReqVO.getMaterialName()+"没有库存"); | 58 | throw exception0(BAD_REQUEST.getCode(),createReqVO.getMaterialName()+"没有库存"); |
| 59 | } | 59 | } |
| @@ -108,7 +108,7 @@ public class MaterialInventoryOutServiceImpl implements MaterialInventoryOutServ | @@ -108,7 +108,7 @@ public class MaterialInventoryOutServiceImpl implements MaterialInventoryOutServ | ||
| 108 | throw exception(MATERIAL_INVENTORY_OUT_NOT_EXISTS); | 108 | throw exception(MATERIAL_INVENTORY_OUT_NOT_EXISTS); |
| 109 | } | 109 | } |
| 110 | 110 | ||
| 111 | - MaterialInventoryDO inventory = materialInventoryService.selectMaterialInventoryByMaterialId(materialInventoryOut.getTypeDetailId(),getCompanyId()); | 111 | + MaterialInventoryDO inventory = materialInventoryService.selectMaterialInventoryByMaterialId(materialInventoryOut.getMaterialId(),getCompanyId()); |
| 112 | if(null == inventory){ | 112 | if(null == inventory){ |
| 113 | throw exception0(BAD_REQUEST.getCode(),"参数错误"); | 113 | throw exception0(BAD_REQUEST.getCode(),"参数错误"); |
| 114 | } | 114 | } |