package com.zjrs.ggfw.rlzysc.blo.impl;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.mohrss.leaf.core.framework.persistens.PageResult;
import org.mohrss.leaf.core.framework.persistens.PageUtil;
import com.zjrs.ggfw.rlzysc.blo.ZzzdBLO;
import com.zjrs.ggfw.rlzysc.dto.grzxjlxx.ZjQueryListDTO;
import com.zjrs.ggfw.rlzysc.dto.zzzd.ZzzdZphListQueryDTO;
import com.zjrs.ggfw.rlzysc.dto.zzzd.ZzzdZwListQueryDTO;
import com.zjrs.ggfw.rlzysc.dto.zzzd.ZzzdZwListQueryForDwDTO;
import com.zjrs.ggfw.rlzysc.entity.ZzzdMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Map;

@Service
public class ZzzdBLOImpl implements ZzzdBLO {


    @Autowired
    private ZzzdMapper zzzdMapper;

    @Override
    public PageResult getZphlist(ZzzdZphListQueryDTO dto) {
        Page<Map<String, Object>> page = new Page<>(dto.getPagenum(), dto.getPagesize());
        Page<Map<String, Object>> pageResult = (Page) zzzdMapper.getZphlist(page, dto);
        PageResult result = PageUtil.PageResult(pageResult);
        return result;
    }

    @Override
    public PageResult getZwListToQy(ZzzdZwListQueryForDwDTO dto) {
        Page<Map<String, Object>> page = new Page<>(dto.getPagenum(), dto.getPagesize());
        Page<Map<String, Object>> pageResult = (Page) zzzdMapper.getZwListToQy(page, dto);
        PageResult result = PageUtil.PageResult(pageResult);
        return result;
    }

    @Override
    public PageResult getZwList(ZzzdZwListQueryDTO dto) {
        Page<Map<String, Object>> page = new Page<>(dto.getPagenum(), dto.getPagesize());
        Page<Map<String, Object>> pageResult = (Page) zzzdMapper.getZwList(page, dto);
        PageResult result = PageUtil.PageResult(pageResult);
        return result;
    }

    @Override
    public PageResult getQyList(ZjQueryListDTO dto) {
        Page<Map<String, Object>> page = new Page<>(dto.getPagenum(), dto.getPagesize());
        Page<Map<String, Object>> pageResult = (Page) zzzdMapper.getQyList(page, dto);
        PageResult result = PageUtil.PageResult(pageResult);
        return result;
    }

}



