| | |
| | | import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; |
| | | import cn.iocoder.yudao.module.crm.api.customer.CrmCustomerApi; |
| | | import cn.iocoder.yudao.module.crm.api.customer.dto.CrmCustomerRespDTO; |
| | | import cn.iocoder.yudao.module.erp.controller.admin.sale.vo.order.ErpSaleOrderItemRespVO; |
| | | import cn.iocoder.yudao.module.erp.controller.admin.sale.vo.order.ErpSaleOrderPageReqVO; |
| | | import cn.iocoder.yudao.module.erp.controller.admin.sale.vo.order.ErpSaleOrderRespVO; |
| | | import cn.iocoder.yudao.module.erp.controller.admin.sale.vo.order.ErpSaleOrderSaveReqVO; |
| | |
| | | return success(true); |
| | | } |
| | | |
| | | @GetMapping("/item/list-by-order-id") |
| | | @Operation(summary = "查询销售订单的物料明细列表(用于发货通知单创建)") |
| | | @Parameter(name = "orderId", description = "销售订单编号", required = true, example = "1") |
| | | @PreAuthorize("@ss.hasPermission('erp:sale-order:query')") |
| | | public CommonResult<List<ErpSaleOrderItemRespVO>> getSaleOrderItemListByOrderId(@RequestParam("orderId") Long orderId) { |
| | | List<ErpSaleOrderItemDO> itemList = saleOrderService.getSaleOrderItemListByOrderId(orderId); |
| | | Map<Long, MdmItemRespDTO> itemMap = mdmItemApi.getItemMap( |
| | | convertSet(itemList, ErpSaleOrderItemDO::getProductId)); |
| | | return success(BeanUtils.toBean(itemList, ErpSaleOrderItemRespVO.class, vo -> { |
| | | MapUtils.findAndThen(itemMap, vo.getProductId(), item -> |
| | | vo.setProductName(item.getName()).setProductBarCode(item.getBarCode())); |
| | | })); |
| | | } |
| | | |
| | | @GetMapping("/get") |
| | | @Operation(summary = "获得销售订单") |
| | | @Parameter(name = "id", description = "编号", required = true, example = "1024") |