Commit 872c6f75 authored by zhengyi's avatar zhengyi

到仓记录查询业务调整

parent 46a8c766
...@@ -19,6 +19,9 @@ public interface OrderWarehouseCheckService extends IService<OrderWarehouseCheck ...@@ -19,6 +19,9 @@ public interface OrderWarehouseCheckService extends IService<OrderWarehouseCheck
*/ */
List<OrderWarehouseCheckDO> list(long orderId); List<OrderWarehouseCheckDO> list(long orderId);
List<OrderWarehouseCheckDO> listByOrderItemId(long orderItemId);
/** /**
* 订单到仓. 复制入仓信息,到仓订单修改已在缷柜逻辑中 * 订单到仓. 复制入仓信息,到仓订单修改已在缷柜逻辑中
* *
......
...@@ -72,6 +72,12 @@ public class OrderWarehouseCheckServiceImpl ...@@ -72,6 +72,12 @@ public class OrderWarehouseCheckServiceImpl
return abstractMapper.selectList(OrderWarehouseCheckDO::getOrderId, orderId); return abstractMapper.selectList(OrderWarehouseCheckDO::getOrderId, orderId);
} }
@Override
public List<OrderWarehouseCheckDO> listByOrderItemId(long orderItemId) {
return abstractMapper.selectList(OrderWarehouseCheckDO::getOrderItemId, orderItemId);
}
// 到仓信息统计 // 到仓信息统计
...@@ -177,7 +183,7 @@ public class OrderWarehouseCheckServiceImpl ...@@ -177,7 +183,7 @@ public class OrderWarehouseCheckServiceImpl
@Override @Override
public void update(OrderWarehouseCheckUpdateReqVO checkUpdateReqVO) { public void update(OrderWarehouseCheckUpdateReqVO checkUpdateReqVO) {
Map<Long, OrderWarehouseCheckDO> mappings = list(checkUpdateReqVO.getOrderId()).stream() Map<Long, OrderWarehouseCheckDO> mappings = listByOrderItemId(checkUpdateReqVO.getOrderItemId()).stream()
.collect(Collectors.toMap(OrderWarehouseCheckDO::getOrderItemId, Function.identity())); .collect(Collectors.toMap(OrderWarehouseCheckDO::getOrderItemId, Function.identity()));
ServiceException exception = ServiceExceptionUtil.exception(ErrorCodeConstants.ORDER_WAREHOUSE_CHECK_NOT_EXISTS); ServiceException exception = ServiceExceptionUtil.exception(ErrorCodeConstants.ORDER_WAREHOUSE_CHECK_NOT_EXISTS);
List<OrderWarehouseCheckDO> newWarehouseCheckDOList = new ArrayList<>(); List<OrderWarehouseCheckDO> newWarehouseCheckDOList = new ArrayList<>();
......
...@@ -34,9 +34,9 @@ public class OrderWarehouseCheckController { ...@@ -34,9 +34,9 @@ public class OrderWarehouseCheckController {
@GetMapping("/query") @GetMapping("/query")
@ApiOperation("到仓查询") @ApiOperation("到仓查询")
@ApiImplicitParam(name = "orderId", value = "订单id", required = true, example = "1024", dataTypeClass = Long.class) @ApiImplicitParam(name = "orderItemId", value = "订单项id", required = true, example = "1024", dataTypeClass = Long.class)
public CommonResult<List<OrderWarehouseCheckDO>> query(@RequestParam("orderId") Long orderId) { public CommonResult<List<OrderWarehouseCheckDO>> query(@RequestParam("orderItemId") Long orderItemId) {
return success(service.list(orderId)); return success(service.listByOrderItemId(orderItemId));
} }
@PostMapping("/force") @PostMapping("/force")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment