| | |
| | | import cn.iocoder.yudao.module.mes.service.qc.iqc.MesQcIqcService; |
| | | import cn.iocoder.yudao.module.mes.service.wm.arrivalnotice.MesWmArrivalNoticeService; |
| | | import cn.iocoder.yudao.module.mes.service.wm.itemreceipt.MesWmItemReceiptService; |
| | | import cn.iocoder.yudao.module.erp.api.purchase.ErpSupplierApi; |
| | | import cn.iocoder.yudao.module.erp.api.purchase.dto.ErpSupplierRespDTO; |
| | | import cn.iocoder.yudao.module.srm.api.supplier.SrmSupplierApi; |
| | | import cn.iocoder.yudao.module.srm.api.supplier.dto.SrmSupplierRespDTO; |
| | | import io.swagger.v3.oas.annotations.Operation; |
| | | import io.swagger.v3.oas.annotations.Parameter; |
| | | import io.swagger.v3.oas.annotations.tags.Tag; |
| | |
| | | @Resource |
| | | private MesWmItemReceiptService itemReceiptService; |
| | | @Resource |
| | | private ErpSupplierApi supplierApi; |
| | | private SrmSupplierApi srmSupplierApi; |
| | | @Resource |
| | | private MesQcIqcService iqcService; |
| | | @Resource |
| | |
| | | @GetMapping("/get") |
| | | @Operation(summary = "获得采购入库单") |
| | | @Parameter(name = "id", description = "编号", required = true, example = "1024") |
| | | @PreAuthorize("@ss.hasPermission('mes:wm-item-receipt:query')") |
| | | public CommonResult<MesWmItemReceiptRespVO> getItemReceipt(@RequestParam("id") Long id) { |
| | | MesWmItemReceiptDO receipt = itemReceiptService.getItemReceipt(id); |
| | | if (receipt == null) { |
| | |
| | | |
| | | @GetMapping("/page") |
| | | @Operation(summary = "获得采购入库单分页") |
| | | @PreAuthorize("@ss.hasPermission('mes:wm-item-receipt:query')") |
| | | public CommonResult<PageResult<MesWmItemReceiptRespVO>> getItemReceiptPage( |
| | | @Valid MesWmItemReceiptPageReqVO pageReqVO) { |
| | | PageResult<MesWmItemReceiptDO> pageResult = itemReceiptService.getItemReceiptPage(pageReqVO); |
| | |
| | | return Collections.emptyList(); |
| | | } |
| | | // 1. 获得关联数据(采购入库使用 ERP 供应商) |
| | | Map<Long, ErpSupplierRespDTO> supplierMap = supplierApi.getSupplierList( |
| | | Map<Long, SrmSupplierRespDTO> supplierMap = srmSupplierApi.getSupplierList( |
| | | convertSet(list, MesWmItemReceiptDO::getVendorId)).getCheckedData().stream() |
| | | .collect(java.util.stream.Collectors.toMap(ErpSupplierRespDTO::getId, v -> v, (a, b) -> a)); |
| | | .collect(java.util.stream.Collectors.toMap(SrmSupplierRespDTO::getId, v -> v, (a, b) -> a)); |
| | | Map<Long, MesQcIqcDO> iqcMap = iqcService.getIqcMap( |
| | | convertSet(list, MesWmItemReceiptDO::getIqcId)); |
| | | Map<Long, MesWmArrivalNoticeDO> noticeMap = arrivalNoticeService.getArrivalNoticeMap( |