cl
2026-04-21 228b881e5a893ec010a194ac42011a4169d0c590
rsf-server/src/main/java/com/vincent/rsf/server/manager/service/impl/AsnOrderServiceImpl.java
@@ -448,11 +448,13 @@
        DashboardDto dto = new DashboardDto();
        //获取入库数量
        DashboardDto trandDto = this.baseMapper.getDashbord(OrderType.ORDER_IN.type, TaskType.TASK_TYPE_IN.type + "");
        dto.setInAnf(trandDto.getAnfme()).setTaskIn(trandDto.getRealAnfme()).setTotalIn(trandDto.getAnfme() + trandDto.getRealAnfme());
        dto.setInAnf(trandDto.getAnfme()).setTaskIn(trandDto.getRealAnfme()).setWaitIn(countPendingInOrders())
                .setTotalIn(trandDto.getAnfme() + trandDto.getRealAnfme());
        //获取出库单数量
        DashboardDto outTrand = this.baseMapper.getDashbord(OrderType.ORDER_OUT.type, TaskType.TASK_TYPE_OUT.type + "");
        dto.setOutAnf(outTrand.getAnfme()).setTaskOut(outTrand.getRealAnfme()).setTotalOut(outTrand.getAnfme() + outTrand.getRealAnfme());
        dto.setOutAnf(outTrand.getAnfme()).setTaskOut(outTrand.getRealAnfme()).setWaitOut(countPendingOutOrders())
                .setTotalOut(outTrand.getAnfme() + outTrand.getRealAnfme());
        //获取执行中任务数量
        List<Task> tasks = taskService.list(new LambdaQueryWrapper<>());
@@ -462,6 +464,30 @@
        return R.ok().add(dto);
    }
    /** 未完成入库单:非已完成/取消/关闭 */
    private int countPendingInOrders() {
        return Math.toIntExact(this.count(new LambdaQueryWrapper<WkOrder>()
                .eq(WkOrder::getType, OrderType.ORDER_IN.type)
                .eq(WkOrder::getDeleted, 0)
                .and(w -> w.isNull(WkOrder::getExceStatus).or()
                        .notIn(WkOrder::getExceStatus,
                                AsnExceStatus.ASN_EXCE_STATUS_TASK_DONE.val,
                                AsnExceStatus.ASN_EXCE_STATUS_TASK_CANCEL.val,
                                AsnExceStatus.ASN_EXCE_STATUS_TASK_CLOSE.val))));
    }
    /** 未完成出库单:非已完成/取消/关闭 */
    private int countPendingOutOrders() {
        return Math.toIntExact(this.count(new LambdaQueryWrapper<WkOrder>()
                .eq(WkOrder::getType, OrderType.ORDER_OUT.type)
                .eq(WkOrder::getDeleted, 0)
                .and(w -> w.isNull(WkOrder::getExceStatus).or()
                        .notIn(WkOrder::getExceStatus,
                                AsnExceStatus.OUT_STOCK_STATUS_TASK_DONE.val,
                                AsnExceStatus.ASN_EXCE_STATUS_TASK_CANCEL.val,
                                AsnExceStatus.ASN_EXCE_STATUS_TASK_CLOSE.val))));
    }
    /**
     * 获取出入库趋势
     * @return