提交 846d8b17 作者: zhangqiliang

确认退货之后恢复库存数量可以被第三方调用

父级 d6d16e7e
......@@ -369,35 +369,34 @@ public class WarehouseController {
/**
* 确认退货之后恢复库存数量
*@param params
* @param url
*@param warehouseId
* @param materialsCode
* @return
*/
@PostMapping(value = "reject/restoreInventoryQuantity")
@ApiOperation(value = "确认退货之后更新库存数量")
public BaseResponse<Void> restoreInventoryQuantity(String url, Map<String, String> params) {
System.out.println("获取数据"+params);
MaterialsEx materials=materialsMapperEx.materialsByMaterialsCode(params.get("materialsCode"));
public BaseResponse<Void> restoreInventoryQuantity(String warehouseId,String materialsCode) {
MaterialsEx materials=materialsMapperEx.materialsByMaterialsCode(materialsCode);
if (materials==null){
throw new ServiceException("物料不存在");
}
materialsMapperEx.RestoreInventoryQuantity(params.get("warehouseId"),materials.getId(), BigDecimal.valueOf(1));
materialsMapperEx.RestoreInventoryQuantity(warehouseId,materials.getId(), BigDecimal.valueOf(1));
return new BaseResponse<>();
}
/**
* 确认收货之后库存扣减
*@param params
* @param url
*@param warehouseId
* @param materialsCode
* @return
*/
@PostMapping(value = "reject/reduceInventoryQuantity")
@ApiOperation(value = "确认收货之后库存扣减")
public BaseResponse<Void> reduceInventoryQuantity(String url, Map<String, String> params) {
MaterialsEx materials=materialsMapperEx.materialsByMaterialsCode(params.get("materialsCode"));
public BaseResponse<Void> reduceInventoryQuantity(String warehouseId,String materialsCode) {
MaterialsEx materials=materialsMapperEx.materialsByMaterialsCode(materialsCode);
if (materials==null){
throw new ServiceException("物料不存在");
}
materialsMapperEx.reduceInventoryQuantity(params.get("warehouseId"),materials.getId(), BigDecimal.valueOf(1));
materialsMapperEx.reduceInventoryQuantity(warehouseId,materials.getId(), BigDecimal.valueOf(1));
return new BaseResponse<>();
}
}
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论