package com.zcxk.dao;

import com.zcxk.dto.generalView.DeviceWaterSupply;
import com.zcxk.dto.generalView.WaterSupplyData;
import com.zcxk.dto.homePage.CompanyCount;
import com.zcxk.dto.homePage.CompanyProduce;
import com.zcxk.dto.homePage.WaterQualityRate;
import com.zcxk.model.ProgramItem;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;
import java.time.LocalDate;
import java.util.List;

/**
 * @description
 * @auto wangli
 * @data 2021/2/24 13:43
 */
@Mapper
public interface HomePageReportMapper {


    List<DeviceWaterSupply> getDeviceWaterForSixMonth(@Param("companyOrgId")Integer companyOrgId,
                                                      @Param("sceneType")String sceneType, @Param("parmType")Integer parmType,
                                                      @Param("tenantId")String tenantId, @Param("userType")String userType,
                                                      @Param("permissonType")Integer permissonType,
                                                      @Param("programItems")List<ProgramItem> programItems);

    List<DeviceWaterSupply> getDeviceWaterForMonth(@Param("companyOrgId")Integer companyOrgId,
                                                      @Param("sceneType")String sceneType, @Param("parmType")Integer parmType,
                                                      @Param("tenantId")String tenantId, @Param("userType")String userType,
                                                      @Param("permissonType")Integer permissonType,
                                                      @Param("programItems")List<ProgramItem> programItems,
                                                      @Param("month")Integer month);


    List<DeviceWaterSupply> getDeviceWaterForDay(@Param("companyOrgId")Integer companyOrgId,
                                                 @Param("sceneType")String sceneType, @Param("parmType")Integer parmType,
                                                 @Param("tenantId")String tenantId, @Param("userType")String userType,
                                                 @Param("permissonType")Integer permissonType,
                                                 @Param("programItems")List<ProgramItem> programItems,
                                                 @Param("day")Integer day);

//    List<DeviceWaterSupply> getDeviceWaterForMonth(@Param("companyOrgId")Integer companyOrgId,
//                                                 @Param("sceneType")String sceneType, @Param("parmType")Integer parmType,
//                                                 @Param("tenantId")String tenantId, @Param("userType")String userType,
//                                                 @Param("permissonType")Integer permissonType,
//                                                 @Param("programItems")List<ProgramItem> programItems,
//                                                 @Param("startYear")Integer startYear,
//                                                 @Param("startMonth")Integer startMonth,
//                                                 @Param("endYear")Integer endYear,
//                                                 @Param("endMonth")Integer endMonth);

    CompanyCount countSceneByType(@Param("companyOrgId")Integer companyOrgId,
                                        @Param("tenantId")String tenantId, @Param("userType")String userType,
                                        @Param("permissonType")Integer permissonType,
                                        @Param("programItems")List<ProgramItem> programItems);

    CompanyProduce getWaterSalesDetails(@Param("companyOrgId")Integer companyOrgId,
                                        @Param("tenantId")String tenantId, @Param("userType")String userType,
                                        @Param("programItems")List<ProgramItem> programItems);

    WaterQualityRate getPipeNetworkQualification(@Param("companyOrgId")Integer companyOrgId,
                                             @Param("tenantId")String tenantId, @Param("userType")String userType,
                                             @Param("permissonType")Integer permissonType,
                                             @Param("programItems")List<ProgramItem> programItems);

    WaterQualityRate getWaterQualification(@Param("companyOrgId")Integer companyOrgId,@Param("sceneType")String sceneType,
                                            @Param("parmTypes")List<Integer> parmTypes,
                                             @Param("tenantId")String tenantId, @Param("userType")String userType,
                                             @Param("permissonType")Integer permissonType,
                                             @Param("programItems")List<ProgramItem> programItems);

    List<DeviceWaterSupply> getMonitorDataFifteenDays(@Param("sceneId")Integer sceneId,@Param("sceneType")String sceneType,@Param("parmType")Integer parmType,
                                                        @Param("tenantId")String tenantId,
                                                      @Param("userType")String userType,@Param("permissonType")Integer permissonType,
                                                      @Param("programItems")List<ProgramItem> programItems);

    BigDecimal getWaterQualificationForScene(@Param("parmType")Integer parmType,@Param("sceneId")Integer sceneId,@Param("sceneType")String sceneType,
                                             @Param("tenantId")String tenantId, @Param("userType")String userType,
                                             @Param("permissonType")Integer permissonType,
                                             @Param("programItems")List<ProgramItem> programItems);

    BigDecimal getWaterQualificationByMonth(@Param("monthDate") LocalDate monthDate, @Param("parmType")Integer parmType, @Param("sceneId")Integer sceneId, @Param("sceneType")String sceneType,
                                            @Param("tenantId")String tenantId, @Param("userType")String userType,
                                            @Param("permissonType")Integer permissonType,
                                            @Param("programItems")List<ProgramItem> programItems);

    List<WaterSupplyData> getWaterSupplyData( @Param("sceneId")Integer sceneId,@Param("sceneType")String sceneType,
                                              @Param("tenantId")String tenantId,
                                             @Param("userType")String userType, @Param("permissonType")Integer permissonType,
                                             @Param("programItems")List<ProgramItem> programItems);

}
