| | |
| | | @GetMapping("/get") |
| | | @Operation(summary = "获得到货通知单") |
| | | @Parameter(name = "id", description = "编号", required = true, example = "1024") |
| | | @PreAuthorize("@ss.hasPermission('mes:wm-arrival-notice:query')") |
| | | public CommonResult<MesWmArrivalNoticeRespVO> getArrivalNotice(@RequestParam("id") Long id) { |
| | | MesWmArrivalNoticeDO notice = arrivalNoticeService.getArrivalNotice(id); |
| | | if (notice == null) { |
| | |
| | | |
| | | @GetMapping("/page") |
| | | @Operation(summary = "获得到货通知单分页") |
| | | @PreAuthorize("@ss.hasPermission('mes:wm-arrival-notice:query')") |
| | | public CommonResult<PageResult<MesWmArrivalNoticeRespVO>> getArrivalNoticePage( |
| | | @Valid MesWmArrivalNoticePageReqVO pageReqVO) { |
| | | PageResult<MesWmArrivalNoticeDO> pageResult = arrivalNoticeService.getArrivalNoticePage(pageReqVO); |
| | |
| | | return BeanUtils.toBean(list, MesWmArrivalNoticeRespVO.class, vo -> { |
| | | MapUtils.findAndThen(supplierMap, vo.getVendorId(), supplier -> |
| | | vo.setVendorName(supplier.getName())); |
| | | MapUtils.findAndThen(purchaseOrderMap, vo.getPurchaseOrderId(), purchaseOrder -> |
| | | vo.setPurchaseOrderNo(purchaseOrder.getNo())); |
| | | MapUtils.findAndThen(purchaseOrderMap, vo.getPurchaseOrderId(), purchaseOrder -> { |
| | | vo.setPurchaseOrderNo(purchaseOrder.getNo()); |
| | | // 历史单据未快照合同号时,回填采购订单上的合同号 |
| | | if (cn.hutool.core.util.StrUtil.isBlank(vo.getContractNo())) { |
| | | vo.setContractNo(purchaseOrder.getContractNo()); |
| | | } |
| | | }); |
| | | }); |
| | | } |
| | | |