/*
 * Copyright (c) 京北方信息技术股份有限公司 Corporation 2022 . All rights reserved.
 *
 */
package net.northking.cctp.dw.db.dao;

import net.northking.cctp.dw.db.mapper.DwAtuScriptInfoMapper;
import net.northking.cctp.dw.dto.ModifyInfoDto;
import net.northking.cctp.dw.dto.ProjectScriptNumDto;
import net.northking.cctp.dw.dto.UIDwAtuScriptInfoQueryDto;
import net.northking.cctp.dw.dto.atu.DwAtuScriptExecutionDataDto;
import net.northking.cctp.dw.dto.atu.DwAtuScriptInfoDetailDto;
import net.northking.cctp.dw.dto.atu.DwAtuScriptInfoDto;
import net.northking.cctp.dw.dto.atu.DwAtuScriptInfoQueryDto;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.Date;
import java.util.List;

/**
 * Mybatis数据库持久层（业务层）：脚本信息同步表
 *
 * <p>文件内容由代码生成器产生，请不要手动修改！ <br>
 * createdate:  2022-11-25 11:15:19  <br>
 *
 * @author: maven-cctp-plugin  <br>
 * @since: 1.0 <br>
 */
@Repository
public interface DwAtuScriptInfoDao extends DwAtuScriptInfoMapper {
    List<DwAtuScriptInfoDetailDto> countByGroup(DwAtuScriptInfoQueryDto query);

    List<DwAtuScriptInfoDto> pageQuery(UIDwAtuScriptInfoQueryDto query);


    List<DwAtuScriptExecutionDataDto> getScriptExecution(UIDwAtuScriptInfoQueryDto query);

    List<ProjectScriptNumDto> projectOverviewQuery(@Param("projectId") String projectId,
                                             @Param("userId") String userId);

    Integer getSenceScriptNum(@Param("projectId") String projectId,
                              @Param("userId") String userId,
                              @Param("queryToday") String queryToday,
                              @Param("todayStart") Date todayStart,
                              @Param("todayEnd")Date todayEnd);

    Integer getScriptNum(@Param("userId") String userId,
                         @Param("queryToday")String queryToday,
                         @Param("todayStart") Date todayStart,
                         @Param("todayEnd")Date todayEnd);

    List<ModifyInfoDto> getModifyInfo(@Param("userId") String userId,
                                      @Param("projectIdList")List<String> projectIdList);

    /**
     * 查询UI自动化脚本编写明细信息
     * @param queryDto
     * @return
     */
    List<DwAtuScriptInfoDto> queryScriptDetail(UIDwAtuScriptInfoQueryDto queryDto);


}
