/*
 * Copyright [2022] [https://www.xiaonuo.vip]
 *
 * Snowy采用APACHE LICENSE 2.0开源协议，您在使用过程中，需要注意以下几点：
 *
 * 1.请不要删除和修改根目录下的LICENSE文件。
 * 2.请不要删除和修改Snowy源码头部的版权声明。
 * 3.本项目代码可免费商业使用，商业使用请保留源码和相关描述文件的项目出处，作者声明等。
 * 4.分发源码时候，请注明软件出处 https://www.xiaonuo.vip
 * 5.不可二次分发开源参与同类竞品，如有想法可联系团队xiaonuobase@qq.com商议合作。
 * 6.若您的项目无法满足以上几点，需要更多功能代码，获取Snowy商业授权许可，请在官网购买授权，地址为 https://www.xiaonuo.vip
 */
package com.unis.basic.info.modular.orgInfo.mapper;

import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.unis.basic.info.modular.orgInfo.entity.OrgInfo;
import com.unis.equipmentOnlineRateAssessment.modular.monitorCamera.vo.StatisticalAnalysisPageVO;
import com.unis.equipmentOnlineRateAssessment.modular.monitorCamera.vo.StatisticalAnalysisVO;
import com.unis.reserveLayout.modular.dataSystemInfo.param.DataPageParam;
import org.apache.ibatis.annotations.Mapper;
import com.unis.basic.info.modular.orgInfo.param.OrgInfoPageParam;
import com.unis.common.constant.DBConstant;
import org.apache.ibatis.annotations.Param;

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


/**
 * 组织机构信息表Mapper接口
 *
 * @author shine
 * @date  2024/04/28 11:47
 **/
@DS(DBConstant.DS_DEPOT)
@Mapper
public interface OrgInfoMapper extends BaseMapper<OrgInfo> {
    IPage<Map<String, Object>> findPage(Page<OrgInfo> p, @Param(Constants.WRAPPER)QueryWrapper<OrgInfo> queryWrapper);

    OrgInfo selectOrgInfoBySsSafeProductInspectionId(String ssSafeProductInspectionId);

    Integer findCountPage();

    IPage<Map<String, Object>> selectStoreHousePage(Page<OrgInfo> p, @Param(Constants.WRAPPER) QueryWrapper<OrgInfo> queryWrapper);

    /**
     * 仓房数量
     * @return
     */
    Integer selectStoreHouseCount();

    Integer selectInventoryCount();

    List<Map<String, Object>> selectGrainNatureName(@Param("dataPageParam") DataPageParam dataPageParam);

    IPage<Map<String, Object>> selectKcCountPage(Page<Map> objectPage,@Param("dataPageParam")DataPageParam dataPageParam);

    List<Map<String, Object>> selectKcChart(@Param("dataPageParam") DataPageParam dataPageParam);

    List<Map<String, Object>> selectKcGrainNatureChart(@Param("dataPageParam") DataPageParam dataPageParam);

    Map<String, Object> selectKcSumRepot(@Param("dataPageParam") DataPageParam dataPageParam);

    List<Map<String, Object>> selectKcGrainGradeRepot(@Param("dataPageParam")DataPageParam dataPageParam);

    List<Map<String, Object>> selectKcGrainNatureRepot(@Param("dataPageParam")DataPageParam dataPageParam);

    List<Map<String, Object>> selectKcYearRepot(@Param("dataPageParam")DataPageParam dataPageParam);

    Map<String, Object> selectByOrgInfo(@Param("dataPageParam")DataPageParam dataPageParam);

    /**
     * 在线统计分析-分页
     *
     * @author hjc
     * @date  2024/06/21 10:07
     */
    Page<StatisticalAnalysisPageVO> statisticalAnalysisPage(@Param("page") Page<StatisticalAnalysisPageVO> page,
                                                            @Param("zcdzCityName") String zcdzCityName);

    List<StatisticalAnalysisVO> statisticalAnalysis();

}
