新增通过销售订单明细id查询订单详情
This commit is contained in:
@@ -2,6 +2,7 @@ package com.zt.plat.module.contractorder.api;
|
||||
|
||||
import com.zt.plat.framework.common.pojo.CommonResult;
|
||||
import com.zt.plat.module.contractorder.api.dto.order.OrderDTO;
|
||||
import com.zt.plat.module.contractorder.api.dto.order.SalesOrdDtlDTO;
|
||||
import com.zt.plat.module.contractorder.api.dto.order.UpdateOrderLstQtyDTO;
|
||||
import com.zt.plat.module.contractorder.enums.ApiConstants;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
@@ -9,8 +10,10 @@ import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import jakarta.validation.Valid;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -34,4 +37,11 @@ public interface OrderApi {
|
||||
@Operation(summary = "根据订单明细id更新累积量(冲销)", description = "根据订单明细id更新收货量(冲销)")
|
||||
CommonResult<Boolean> voidOrderLstQty(@RequestBody @Validated List<UpdateOrderLstQtyDTO> updateOrderLstQtyDTOS);
|
||||
|
||||
@PostMapping(PREFIX + "/get-salas-order-details-by-ids")
|
||||
@Operation(summary = "通过销售订单明细id获取销售订单详情", description = "通过销售订单明细id获取销售订单详情")
|
||||
CommonResult<List<SalesOrdDtlDTO>> getSalesOrderDetailsByOrderIds(@RequestBody List<Long> ids);
|
||||
|
||||
@GetMapping(PREFIX + "/get-salas-order-details-by-id")
|
||||
@Operation(summary = "通过销售订单明细id获取销售订单详情", description = "通过销售订单明细id获取销售订单详情")
|
||||
CommonResult<SalesOrdDtlDTO> getSalesOrderDetailsByOrderId(@RequestParam("id") Long id);
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -171,6 +171,18 @@ public class OrderApiImpl implements OrderApi {
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CommonResult<List<SalesOrdDtlDTO>> getSalesOrderDetailsByOrderIds(List<Long> ids) {
|
||||
List<SalesOrderDetailDO> salesOrderDetailDOS = SpringUtil.getBean(SalesOrderDetailMapper.class).selectList(SalesOrderDetailDO::getId, ids);
|
||||
return success(BeanUtils.toBean(salesOrderDetailDOS, SalesOrdDtlDTO.class));
|
||||
}
|
||||
|
||||
@Override
|
||||
public CommonResult<SalesOrdDtlDTO> getSalesOrderDetailsByOrderId(Long id) {
|
||||
SalesOrderDetailDO salesOrderDetailDOS = SpringUtil.getBean(SalesOrderDetailMapper.class).selectOne(SalesOrderDetailDO::getOrderId, id);
|
||||
return success(BeanUtils.toBean(salesOrderDetailDOS, SalesOrdDtlDTO.class));
|
||||
}
|
||||
|
||||
private List<SalesOrderDO> getOrderByIds(List<Long> ids) {
|
||||
return SpringUtil.getBean(SalesOrderMapper.class).selectByIds(ids); // 采购订单与销售订单的
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user