package com.hzya.frame.sysnew.comparison.dao;

import com.baomidou.dynamic.datasource.annotation.DS;
import com.hzya.frame.basedao.dao.IBaseDao;
import com.hzya.frame.sysnew.comparison.entity.ComparisonDetailsEntity;
import com.hzya.frame.sysnew.comparison.entity.ComparisonEntity;

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

public interface IComparisonDao extends IBaseDao<ComparisonEntity, String> {

    /**
     *
     * @content 根据主数据编码查询表名，字段名等信息
     * @Param
     * @Return
     * @Author hecan
     * @Date 2024/5/7 16:05
     * **/
    List<ComparisonEntity> queryComparison(ComparisonEntity comparison);

    /**
     *
     * @content 分页查询数据
     * @Param
     * @Return
     * @Author hecan
     * @Date 2024/5/9 15:11
     * **/
    List<Map<String,Object>> queryComparisonPage(ComparisonEntity comparison);

    /**
     *
     * @content 保存通用数据数据
     * @Param
     * @Return
     * @Author hecan
     * @Date 2024/5/7 16:56
     * **/
    ComparisonEntity saveComparison(ComparisonEntity comparison);

    /**
     *
     * @content 生成单据规则 如：CK-yyyyMMdd-0001
     * @Param
     * @Return
     * @Author hecan
     * @Date 2024/5/9 9:42
     * **/
     ComparisonEntity queryComparisonRule(ComparisonEntity comparison);

    /**
     *
     * @content 更新通用数据数据
     * @Param
     * @Return
     * @Author hecan
     * @Date 2024/5/9 10:32
     * **/
    Integer updateComparisonByType(ComparisonEntity comparison);

    /**
     *
     * @content 删除通用数据
     * @Param
     * @Return
     * @Author hecan
     * @Date 2024/5/9 14:09
     * **/
    Integer deleteComparison(ComparisonEntity comparison);

    /**
     *
     * @content 查询单据规则
     * @Param
     * @Return
     * @Author hecan
     * @Date 2024/5/28 14:39
     * **/
    ComparisonEntity queryComparisonById(ComparisonEntity comparison);

    /**
     *
     * @content 根据主数据编码查询mdm_module数据
     * @Param
     * @Return
     * @Author hecan
     * @Date 2024/6/4 11:37
     * **/
    ComparisonEntity queryComparisonBymdmCode(ComparisonEntity comparison);

    /**
     * 
     * @content 根据mdm_module得id查询mdm_module_db得数据
     * @Param 
     * @Return 
     * @Author hecan 
     * @Date 2024/6/4 11:40
     * **/
    List<ComparisonEntity> queryComparisonBymdmId(ComparisonEntity comparison);
    
    /**
     * 
     * @content 根据mdm_module得id查询mdm_module_db_fileds得数据
     * @Param 
     * @Return 
     * @Author hecan 
     * @Date 2024/6/4 11:45
     * **/
    List<ComparisonEntity> queryComparisonBymdmIdFileds(ComparisonEntity comparison);
    
    /**
     * 
     * @content 根据mdm_id查询mdm_module_db_fileds_rule中的字段是否是必填项
     * @Param 
     * @Return 
     * @Author hecan 
     * @Date 2024/6/25 15:09
     * **/
    List<ComparisonEntity> queryComparisonBymdmIdDbIdFiledId(ComparisonEntity comparison);

}
