package com.hzya.frame.mdm.mdmModule.dao;

import com.alibaba.fastjson.JSONObject;
import com.hzya.frame.mdm.entity.MdmDataDto;
import com.hzya.frame.mdm.entity.MdmDto;
import com.hzya.frame.mdm.entity.MdmFiledsRuleDto;
import com.hzya.frame.mdm.entity.MdmQuery;
import com.hzya.frame.mdm.mdmModule.entity.MdmModuleEntity;
import com.hzya.frame.basedao.dao.IBaseDao;
import com.hzya.frame.mdm.mdmModuleDbFileds.entity.MdmModuleDbFiledsEntity;
import com.hzya.frame.sys.entity.FormmainDeleteDto;

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

/**
 * 主数据模版(mdm_module: table)表数据库访问层
 *
 * @author makejava
 * @since 2024-06-03 08:46:29
 */
public interface IMdmModuleDao extends IBaseDao<MdmModuleEntity, String> {

    List<MdmModuleEntity> queryMdm(MdmModuleEntity entity);

    MdmModuleEntity getByMdmCode(Long mdmCode);

    Integer checkTable(Map<String, String> maps);
    Integer createTable(Map<String, Object> maps);
    Integer alterTable(Map<String, Object> maps);
    Integer alterTableField(MdmModuleDbFiledsEntity entity);
    Integer alterTableName(Map<String, String> maps);
    List<HashMap<String, Object>> queryMdmShowData(MdmQuery entity);
    List<HashMap<String, Object>> queryTemplateDataMore(MdmDto entity);
    HashMap<String, Object> queryTemplateDataOne(MdmDto entity);
    Integer checkData(Map<String, String> map);
    Integer updateForm(MdmDataDto mdmDataDto);
    Integer saveForm(MdmDataDto mdmDataDto);
    Integer deleteTemplateById(FormmainDeleteDto formmainDeleteDto);
    Integer deleteChilder(FormmainDeleteDto formmainDeleteDto);
    List<HashMap<String, Object>> querySelectData(MdmDto entity);

    List<HashMap<String, Object>> queryDataAll(MdmDto entity);

    Integer deleteMdmModuleEntity(MdmModuleEntity entity);

    Integer queryMainCount(MdmQuery mdmQuery);

    Integer deleteTable(Map<String, Object> maps);


   JSONObject queryMdmST(Map<String, Object> maps);
   List<JSONObject> queryMdmSTDetail(Map<String, Object> maps);

    List<JSONObject> queryMdmSTs(Map<String, Object> map);

    void updateMdmSTs(Map<String, Object> updateMap);
    /****
     * 查询主数据字段
     * @content:
     * @author 👻👻👻👻👻👻👻👻 gjh
     * @date  2024-06-27 16:26
     * @param
     * @return java.util.List<java.lang.Object>
     **/
    List<String> queryMdMFields(Map<String, Object> maps);

    void updataTreeUpData(Map<String, String> updateMaps);

    void updataTreeUpDataDetail(Map<String, String> updateMaps);

    MdmFiledsRuleDto queryDataId(MdmFiledsRuleDto mdmFiledsRuleDto);
}

