gaoluyang
6 天以前 d39e4f7d839167c16425086dfa2f8747bccfdff9
yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/controller/admin/wm/arrivalnotice/MesWmArrivalNoticeController.java
@@ -77,7 +77,6 @@
    @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) {
@@ -88,7 +87,6 @@
    @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);
@@ -147,8 +145,13 @@
        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());
                }
            });
        });
    }