package com.mosty.sjzx.service.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.mosty.base.model.query.sjzx.*;
import com.mosty.common.token.UserInfo;
import com.mosty.common.token.UserInfoManager;
import com.mosty.common.util.PermissionsUtil;
import com.mosty.sjzx.mapper.SgfxMapper;
import com.mosty.sjzx.service.SgfxService;
import lombok.AllArgsConstructor;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

@Service
@AllArgsConstructor
public class SgfxServiceImpl implements SgfxService {

    private final SgfxMapper sgfxMapper;

    @Override
    public List<Map<String, Object>> jmjq(YszxQuery dto) {
        Map<String, Object> map = new HashMap<>();
        map.put("useSql", PermissionsUtil.createSqlOfCode("", UserInfoManager.get()));
        map.put("dto", dto);
        return this.sgfxMapper.jmjq(map);
    }

    @Override
    public List<Map<String, Object>> wffzjq(YszxQuery dto) {
        Map<String, Object> map = new HashMap<>();
        map.put("useSql", PermissionsUtil.createSqlOfCode("", UserInfoManager.get()));
        map.put("dto", dto);
        return this.sgfxMapper.wffzjq(map);
    }

    @Override
    public List<Map<String, Object>> zjq(YszxQuery dto) {
        Map<String, Object> map = new HashMap<>();
        map.put("useSql", PermissionsUtil.createSqlOfCode("", UserInfoManager.get()));
        map.put("dto", dto);
        return this.sgfxMapper.zjq(map);
    }

    @Override
    public List<Map<String, Object>> yjmjq(YszxNyQuery dto) {
        Map<String, Object> map = new HashMap<>();
        map.put("useSql", PermissionsUtil.createSqlOfCode("", UserInfoManager.get()));
        map.put("dto", dto);
        return this.sgfxMapper.yjmjq(map);
    }

    @Override
    public List<Map<String, Object>> yzwffzjq(YszxNyQuery dto) {
        Map<String, Object> map = new HashMap<>();
        map.put("useSql", PermissionsUtil.createSqlOfCode("", UserInfoManager.get()));
        map.put("dto", dto);
        return this.sgfxMapper.yzwffzjq(map);
    }

    @Override
    public List<Map<String, Object>> yzjq(YszxNyQuery dto) {
        Map<String, Object> map = new HashMap<>();
        map.put("useSql", PermissionsUtil.createSqlOfCode("", UserInfoManager.get()));
        map.put("dto", dto);
        return this.sgfxMapper.yzjq(map);
    }

    @Override
    public List<Map<String, Object>> zjmjq(YszxQuery dto) {
        Map<String, Object> map = new HashMap<>();
        map.put("useSql", PermissionsUtil.createSqlOfCode("", UserInfoManager.get()));
        map.put("dto", dto);
        return this.sgfxMapper.zjmjq(map);
    }

    @Override
    public List<Map<String, Object>> zwffzjq(YszxQuery dto) {
        Map<String, Object> map = new HashMap<>();
        map.put("useSql", PermissionsUtil.createSqlOfCode("", UserInfoManager.get()));
        map.put("dto", dto);
        return this.sgfxMapper.zwffzjq(map);
    }

    @Override
    public List<Map<String, Object>> zzjq(YszxQuery dto) {
        Map<String, Object> map = new HashMap<>();
        map.put("useSql", PermissionsUtil.createSqlOfCode("", UserInfoManager.get()));
        map.put("dto", dto);
        return this.sgfxMapper.zzjq(map);
    }

    @Override
    public List<Map<String, Object>> gfsdfxJmjq(YszxQuery dto) {
        Map<String, Object> map = new HashMap<>();
        map.put("useSql", PermissionsUtil.createSqlOfCode("", UserInfoManager.get()));
        map.put("dto", dto);
        return this.sgfxMapper.gfsdfxJmjq(map);
    }

    @Override
    public List<Map<String, Object>> gfsdfxWffzjq(YszxQuery dto) {
        Map<String, Object> map = new HashMap<>();
        map.put("useSql", PermissionsUtil.createSqlOfCode("", UserInfoManager.get()));
        map.put("dto", dto);
        return this.sgfxMapper.gfsdfxWffzjq(map);
    }

    @Override
    public List<Map<String, Object>> gfsdfxZjq(YszxQuery dto) {
        Map<String, Object> map = new HashMap<>();
        map.put("useSql", PermissionsUtil.createSqlOfCode("", UserInfoManager.get()));
        map.put("dto", dto);
        return this.sgfxMapper.gfsdfxZjq(map);
    }

    @Override
    public List<Map<String, Object>> gfsdfxYjmjq(YszxNyQuery dto) {
        Map<String, Object> map = new HashMap<>();
        map.put("useSql", PermissionsUtil.createSqlOfCode("", UserInfoManager.get()));
        map.put("dto", dto);
        return this.sgfxMapper.gfsdfxYjmjq(map);
    }

    @Override
    public List<Map<String, Object>> ywffzjq(YszxNyQuery dto) {
        Map<String, Object> map = new HashMap<>();
        map.put("useSql", PermissionsUtil.createSqlOfCode("", UserInfoManager.get()));
        map.put("dto", dto);
        return this.sgfxMapper.ywffzjq(map);
    }

    @Override
    public List<Map<String, Object>> gfsdfxYzjq(YszxNyQuery dto) {
        Map<String, Object> map = new HashMap<>();
        map.put("useSql", PermissionsUtil.createSqlOfCode("", UserInfoManager.get()));
        map.put("dto", dto);
        return this.sgfxMapper.gfsdfxYzjq(map);
    }

    @Override
    public List<Map<String, Object>> gfsdfxZjmjq(YszxQuery dto) {
        Map<String, Object> map = new HashMap<>();
        map.put("useSql", PermissionsUtil.createSqlOfCode("", UserInfoManager.get()));
        map.put("dto", dto);
        return this.sgfxMapper.gfsdfxZjmjq(map);
    }

    @Override
    public List<Map<String, Object>> gfsdfxZwffzjq(YszxQuery dto) {
        Map<String, Object> map = new HashMap<>();
        map.put("useSql", PermissionsUtil.createSqlOfCode("", UserInfoManager.get()));
        map.put("dto", dto);
        return this.sgfxMapper.gfsdfxZwffzjq(map);
    }

    @Override
    public List<Map<String, Object>> gfsdfxZzjq(YszxQuery dto) {
        Map<String, Object> map = new HashMap<>();
        map.put("useSql", PermissionsUtil.createSqlOfCode("", UserInfoManager.get()));
        map.put("dto", dto);
        return this.sgfxMapper.gfsdfxZzjq(map);
    }

    @Override
    public List<Map<String, Object>> aylx(String code) {
        return this.sgfxMapper.aylx(code);
    }

    @Override
    public List<Map<String, Object>> zzjg() {
        return this.sgfxMapper.zzjg();
    }

    @Override
    public List<Map<String, Object>> zdgzJqtj(YszxQuery dto) {
        Map<String, Object> map = new HashMap<>();
        map.put("useSql", PermissionsUtil.createSqlOfCode("", UserInfoManager.get()));
        map.put("dto", dto);
        return this.sgfxMapper.zdgzJqtj(map);
    }

    @Override
    public List<Map<String, Object>> rtj(YszxQuery dto) {
        Map<String, Object> map = new HashMap<>();
        map.put("useSql", PermissionsUtil.createSqlOfCode("", UserInfoManager.get()));
        map.put("dto", dto);
        return this.sgfxMapper.rtj(map);
    }

    @Override
    public List<Map<String, Object>> ytj(YszxNyQuery dto) {
        Map<String, Object> map = new HashMap<>();
        map.put("useSql", PermissionsUtil.createSqlOfCode("", UserInfoManager.get()));
        map.put("dto", dto);
        return this.sgfxMapper.ytj(map);
    }

    @Override
    public List<Map<String, Object>> ztj(YszxQuery dto) {
        Map<String, Object> map = new HashMap<>();
        map.put("useSql", PermissionsUtil.createSqlOfCode("", UserInfoManager.get()));
        map.put("dto", dto);
        return this.sgfxMapper.ztj(map);
    }

    @Override
    public List<Map<String, Object>> scryyj(YszxQuery dto) {
        Map<String, Object> map = new HashMap<>();
        map.put("useSql", PermissionsUtil.createSqlOfCode("", UserInfoManager.get()));
        map.put("dto", dto);
        return this.sgfxMapper.scryyj(map);
    }

    @Override
    public List<Map<String, Object>> yscryyj(YszxQuery dto) {
        Map<String, Object> map = new HashMap<>();
        map.put("useSql", PermissionsUtil.createSqlOfCode("", UserInfoManager.get()));
        map.put("dto", dto);
        return this.sgfxMapper.yscryyj(map);
    }

    @Override
    public List<Map<String, Object>> zscryyj(YszxQuery dto) {
        Map<String, Object> map = new HashMap<>();
        map.put("useSql", PermissionsUtil.createSqlOfCode("", UserInfoManager.get()));
        map.put("dto", dto);
        return this.sgfxMapper.zscryyj(map);
    }

    @Override
    public List<Map<String, Object>> pcsfafxRtj(YszxQuery dto) {
        Map<String, Object> map = new HashMap<>();
        map.put("useSql", PermissionsUtil.createSqlOfCode("", UserInfoManager.get()));
        map.put("dto", dto);
        return this.sgfxMapper.pcsfafxRtj(map);
    }

    @Override
    public List<Map<String, Object>> pcsfafxytj(YszxNyQuery dto) {
        Map<String, Object> map = new HashMap<>();
        map.put("useSql", PermissionsUtil.createSqlOfCode("", UserInfoManager.get()));
        map.put("dto", dto);
        return this.sgfxMapper.pcsfafxytj(map);
    }

    @Override
    public List<Map<String, Object>> pcsfafxztj(YszxQuery dto) {
        Map<String, Object> map = new HashMap<>();
        map.put("useSql", PermissionsUtil.createSqlOfCode("", UserInfoManager.get()));
        map.put("dto", dto);
        return this.sgfxMapper.pcsfafxztj(map);
    }

    @Override
    public List<Map<String, Object>> ztsjtj(YszxQuery dto) {
        Map<String, Object> map = new HashMap<>();
        map.put("useSql", PermissionsUtil.createSqlOfCode("", UserInfoManager.get()));
        map.put("dto", dto);
        return this.sgfxMapper.ztsjtj(map);
    }

    @Override
    public List<Map<String, Object>> yztsjtj(YszxNyQuery dto) {
        Map<String, Object> map = new HashMap<>();
        map.put("useSql", PermissionsUtil.createSqlOfCode("", UserInfoManager.get()));
        map.put("dto", dto);
        return this.sgfxMapper.yztsjtj(map);
    }

    @Override
    public List<Map<String, Object>> jrjqczfx(XftjQuery dto) {
        Map<String, Object> map = new HashMap<>();
        map.put("useSql", PermissionsUtil.createSqlOfCode("", UserInfoManager.get()));
        map.put("dto", dto);
        return this.sgfxMapper.jrjqczfx(map);
    }

    @Override
    public List<Map<String, Object>> jrjqslzs(XftjQuery dto) {
        Map<String, Object> map = new HashMap<>();
        map.put("useSql", PermissionsUtil.createSqlOfCode("", UserInfoManager.get()));
        map.put("dto", dto);
        return this.sgfxMapper.jrjqslzs(map);
    }

    @Override
    public List<Map<String, Object>> jrjqyj(XftjQuery dto) {
        Map<String, Object> map = new HashMap<>();
        map.put("useSql", PermissionsUtil.createSqlOfCode("", UserInfoManager.get()));
        map.put("dto", dto);
        return this.sgfxMapper.jrjqyj(map);
    }

    @Override
    public List<Map<String, Object>> jqlxtj(XftjQuery dto) {
        Map<String, Object> map = new HashMap<>();
        map.put("useSql", PermissionsUtil.createSqlOfCode("", UserInfoManager.get()));
        map.put("dto", dto);
        return this.sgfxMapper.jqlxtj(map);
    }

    @Override
    public IPage<Map<String, Object>> jqlb(XftjJqlbQuery dto) {
        Map<String, Object> map = new HashMap<>();
        UserInfo user = UserInfoManager.get();
        map.put("pageIndex", (dto.getPageCurrent() - 1) * dto.getPageSize());
        map.put("pageSize", dto.getPageSize());
        map.put("useSql", PermissionsUtil.createSqlOfCode("", user));
        map.put("dto", dto);
        int count = this.sgfxMapper.jqlbCount(map);
        List<Map<String, Object>> list = this.sgfxMapper.jqlb(map);
        IPage<Map<String, Object>> page = new Page<>(dto.getPageCurrent(), dto.getPageSize());
        page.setTotal(count);
        page.setRecords(list);
        return page;
    }

    @Override
    public List<Map<String, Object>> sblxtj(XftjQuery dto) {
        Map<String, Object> map = new HashMap<>();
        UserInfo user = UserInfoManager.get();
        map.put("useSql", PermissionsUtil.createSqlOfCode("", user));
        map.put("dto", dto);
        return this.sgfxMapper.sblxtj(map);
    }

    @Override
    public IPage<Map<String, Object>> sblb(XftjJqlbQuery dto) {
        Map<String, Object> map = new HashMap<>();
        UserInfo user = UserInfoManager.get();
        map.put("pageIndex", (dto.getPageCurrent() - 1) * dto.getPageSize());
        map.put("pageSize", dto.getPageSize());
        map.put("useSql", PermissionsUtil.createSqlOfCode("", user));
        map.put("dto", dto);
        int count = this.sgfxMapper.sblbCount(map);
        List<Map<String, Object>> list = this.sgfxMapper.sblb(map);
        IPage<Map<String, Object>> page = new Page<>(dto.getPageCurrent(), dto.getPageSize());
        page.setTotal(count);
        page.setRecords(list);
        return page;
    }

    @Override
    public List<Map<String, Object>> jwzbmlbtj(XftjJwzQuery dto) {
        Map<String, Object> map = new HashMap<>();
        UserInfo user = UserInfoManager.get();
        map.put("useSql", PermissionsUtil.createSqlOfCode("", user));
        map.put("dto", dto);
        return this.sgfxMapper.jwzbmlbtj(map);
    }

    @Override
    public List<Map<String, Object>> bmtjjwz(XftjJwzQuery dto) {
        Map<String, Object> map = new HashMap<>();
        UserInfo user = UserInfoManager.get();
        map.put("useSql", PermissionsUtil.createSqlOfCode("", user));
        map.put("dto", dto);
        return this.sgfxMapper.bmtjjwz(map);
    }

    @Override
    public List<Map<String, Object>> clbmtj(XftjXfllQuery dto) {
        Map<String, Object> map = new HashMap<>();
        UserInfo user = UserInfoManager.get();
        map.put("useSql", PermissionsUtil.createSqlOfCode("", user));
        map.put("dto", dto);
        return this.sgfxMapper.clbmtj(map);
    }

    @Override
    public List<Map<String, Object>> fjbmtj(XftjXfllQuery dto) {
        Map<String, Object> map = new HashMap<>();
        UserInfo user = UserInfoManager.get();
        map.put("useSql", PermissionsUtil.createSqlOfCode("", user));
        map.put("dto", dto);
        return this.sgfxMapper.fjbmtj(map);
    }

    @Override
    public List<Map<String, Object>> mjbmtj(XftjXfllQuery dto) {
        Map<String, Object> map = new HashMap<>();
        UserInfo user = UserInfoManager.get();
        map.put("useSql", PermissionsUtil.createSqlOfCode("", user));
        map.put("dto", dto);
        return this.sgfxMapper.mjbmtj(map);
    }

    @Override
    public List<Map<String, Object>> zttjz(XftjXfllQuery dto) {
        Map<String, Object> map = new HashMap<>();
        UserInfo user = UserInfoManager.get();
        map.put("useSql", PermissionsUtil.createSqlOfCode("", user));
        map.put("dto", dto);
        return this.sgfxMapper.zttjz(map);
    }

    @Override
    public List<Map<String, Object>> lbtj(XftjYdzbQuery dto) {
        Map<String, Object> map = new HashMap<>();
        UserInfo user = UserInfoManager.get();
        map.put("useSql", PermissionsUtil.createSqlOfCode("", user));
        map.put("dto", dto);
        return this.sgfxMapper.lbtj(map);
    }

    @Override
    public List<Map<String, Object>> bmtj(XftjYdzbQuery dto) {
        Map<String, Object> map = new HashMap<>();
        UserInfo user = UserInfoManager.get();
        map.put("useSql", PermissionsUtil.createSqlOfCode("", user));
        map.put("dto", dto);
        return this.sgfxMapper.bmtj(map);
    }

    @Override
    public List<Map<String, Object>> gzybmlbtj(XftjJqlbQuery dto) {
        Map<String, Object> map = new HashMap<>();
        UserInfo user = UserInfoManager.get();
        map.put("useSql", PermissionsUtil.createSqlOfCode("", user));
        map.put("dto", dto);
        return this.sgfxMapper.gzybmlbtj(map);
    }
}
