Commit 872c6f75 authored by zhengyi's avatar zhengyi

到仓记录查询业务调整

parent 46a8c766
......@@ -19,6 +19,9 @@ public interface OrderWarehouseCheckService extends IService<OrderWarehouseCheck
*/
List<OrderWarehouseCheckDO> list(long orderId);
List<OrderWarehouseCheckDO> listByOrderItemId(long orderItemId);
/**
* 订单到仓. 复制入仓信息,到仓订单修改已在缷柜逻辑中
*
......
......@@ -72,6 +72,12 @@ public class OrderWarehouseCheckServiceImpl
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
@Override
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()));
ServiceException exception = ServiceExceptionUtil.exception(ErrorCodeConstants.ORDER_WAREHOUSE_CHECK_NOT_EXISTS);
List<OrderWarehouseCheckDO> newWarehouseCheckDOList = new ArrayList<>();
......
......@@ -34,9 +34,9 @@ public class OrderWarehouseCheckController {
@GetMapping("/query")
@ApiOperation("到仓查询")
@ApiImplicitParam(name = "orderId", value = "订单id", required = true, example = "1024", dataTypeClass = Long.class)
public CommonResult<List<OrderWarehouseCheckDO>> query(@RequestParam("orderId") Long orderId) {
return success(service.list(orderId));
@ApiImplicitParam(name = "orderItemId", value = "订单项id", required = true, example = "1024", dataTypeClass = Long.class)
public CommonResult<List<OrderWarehouseCheckDO>> query(@RequestParam("orderItemId") Long orderItemId) {
return success(service.listByOrderItemId(orderItemId));
}
@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