/**
 * 统一对内接口SQL通道接口模块
 * @date 2022-03
 * @author 何华东
 */
import { TyInternalApiClient } from './TyInternalApi';
import * as Entity from './Entity';
import { ApiResponse } from "./TyApiCommon";
/**
 * SQL通道API客户端类
 *
 * ```ts
 * import { Singleton, Inject } from "typescript-ioc";
 * import { IService } from "mslib"
 * import { TyApi, TyExternalApi, ApiResponse, generateTySqlApiClient } from "refs/nslib";
 *
 * export class PostCarInInfo implements IService {
 *    //去掉注释
 *    //@TyApi.Service()
 *    async doService(input: TyExternalApi.PostCarInInfoInput): Promise<ApiResponse> {
 *        let sqlApiClient = generateTySqlApiClient(123456);
 *        let row = sqlApiClient.selectOne('select * from t_2014_config limit 1');
 *        let roww = sqlApiClient.list('select * from t_2014_config');
 *
 *        return ApiResponse.success;
 *    }
 * }
 * ```
 */
export default class TySqlApiClient {
    internalApiClient: TyInternalApiClient;
    parkId: number;
    selectOne(sql: string): Promise<any>;
    list(sql: string): Promise<any[]>;
    execute(sql: string[] | string, openTx?: 0 | 1): Promise<ApiResponse>;
    insert(type: Function, entity: object): Promise<ApiResponse<any>>;
    replace(type: Function, entity: object): Promise<ApiResponse<any>>;
    /**
     * 车场端区域信息
     */
    area: {
        outer: TySqlApiClient;
        getTableName(): string;
        find(id: any): Promise<Entity.area>;
    };
    /**
     * 车场端区域判断
     */
    area_node: {
        outer: TySqlApiClient;
        getTableName(): string;
        find(id: any): Promise<Entity.area_node>;
    };
    /**
     * 内部车审核
     */
    audit: {
        outer: TySqlApiClient;
        getTableName(): string;
        find(id: any): Promise<Entity.audit>;
    };
    /**
     *
     */
    autotoller: {
        outer: TySqlApiClient;
        getTableName(): string;
    };
    /**
     * 数据备份记录
     */
    backup_log: {
        outer: TySqlApiClient;
        getTableName(): string;
        find(id: any): Promise<Entity.backup_log>;
    };
    /**
     * 账单主表
     */
    car_bill: {
        outer: TySqlApiClient;
        getTableName(): string;
        find(id: any): Promise<Entity.car_bill>;
    };
    /**
     * 找零明细表
     */
    car_bill_change_detail: {
        outer: TySqlApiClient;
        getTableName(): string;
        find(id: any): Promise<Entity.car_bill_change_detail>;
        getListByBillId(billId: string): Promise<Entity.car_bill_change_detail[]>;
    };
    /**
     * 抵用券使用表
     */
    car_bill_coupon: {
        outer: TySqlApiClient;
        getTableName(): string;
        find(id: any): Promise<Entity.car_bill_coupon>;
        getListByBillId(billId: string): Promise<Entity.car_bill_coupon[]>;
    };
    /**
     * 账单明细表
     */
    car_bill_detail: {
        outer: TySqlApiClient;
        getTableName(): string;
        find(id: any): Promise<Entity.car_bill_detail>;
        getListByBillId(billId: string): Promise<Entity.car_bill_detail[]>;
    };
    /**
     *
     */
    car_bill_order: {
        outer: TySqlApiClient;
        getTableName(): string;
        find(id: any): Promise<Entity.car_bill_order>;
        getListByBillId(billId: string): Promise<Entity.car_bill_order[]>;
    };
    /**
     *
     */
    car_bill_recover: {
        outer: TySqlApiClient;
        getTableName(): string;
        getListByBillId(billId: string): Promise<Entity.car_bill_recover[]>;
    };
    /**
     *
     */
    car_blacklist: {
        outer: TySqlApiClient;
        getTableName(): string;
        find(id: any): Promise<Entity.car_blacklist>;
    };
    /**
     *
     */
    car_blacklist_modify: {
        outer: TySqlApiClient;
        getTableName(): string;
        find(id: any): Promise<Entity.car_blacklist_modify>;
    };
    /**
     * 车辆信息矫正表
     */
    car_correct: {
        outer: TySqlApiClient;
        getTableName(): string;
        find(id: any): Promise<Entity.car_correct>;
    };
    /**
     * 进出车辆图片扩展表
     */
    car_img_ext: {
        outer: TySqlApiClient;
        getTableName(): string;
        find(id: any): Promise<Entity.car_img_ext>;
        getListByBillId(billId: string): Promise<Entity.car_img_ext[]>;
    };
    /**
     * 车辆进出明细表
     */
    car_inout: {
        outer: TySqlApiClient;
        getTableName(): string;
        find(id: any): Promise<Entity.car_inout>;
        getListByBillId(billId: string): Promise<Entity.car_inout[]>;
        where(where: string): Promise<Entity.car_inout[]>;
    };
    /**
     * 车辆清理审核表  备份被清理车辆信息
     */
    car_leave_audit: {
        outer: TySqlApiClient;
        getTableName(): string;
        getListByBillId(billId: string): Promise<Entity.car_leave_audit[]>;
    };
    /**
     * 车辆在场表
     */
    carcome: {
        outer: TySqlApiClient;
        getTableName(): string;
        find(id: any): Promise<Entity.carcome>;
        getListByBillId(billId: string): Promise<Entity.carcome[]>;
    };
    /**
     * 主卡表内部车
     */
    card: {
        outer: TySqlApiClient;
        getTableName(): string;
        find(id: any): Promise<Entity.card>;
        assist(assist: any): Promise<Entity.card>;
    };
    /**
     * 内部车审核表
     */
    card_audit: {
        outer: TySqlApiClient;
        getTableName(): string;
        find(id: any): Promise<Entity.card_audit>;
    };
    /**
     * 内部车卡片车辆明细
     */
    card_car: {
        outer: TySqlApiClient;
        getTableName(): string;
        find(id: any): Promise<Entity.card_car>;
    };
    /**
     *
     */
    card_car_audit: {
        outer: TySqlApiClient;
        getTableName(): string;
        find(id: any): Promise<Entity.card_car_audit>;
    };
    /**
     *
     */
    card_car_blacklist: {
        outer: TySqlApiClient;
        getTableName(): string;
        find(id: any): Promise<Entity.card_car_blacklist>;
    };
    /**
     *
     */
    card_fee_rule: {
        outer: TySqlApiClient;
        getTableName(): string;
        find(id: any): Promise<Entity.card_fee_rule>;
    };
    /**
     *
     */
    card_log: {
        outer: TySqlApiClient;
        getTableName(): string;
        find(id: any): Promise<Entity.card_log>;
    };
    /**
     *
     */
    card_log_audit: {
        outer: TySqlApiClient;
        getTableName(): string;
        find(id: any): Promise<Entity.card_log_audit>;
    };
    /**
     *
     */
    card_lot: {
        outer: TySqlApiClient;
        getTableName(): string;
        find(id: any): Promise<Entity.card_lot>;
    };
    /**
     *
     */
    card_lot_area: {
        outer: TySqlApiClient;
        getTableName(): string;
        find(id: any): Promise<Entity.card_lot_area>;
    };
    /**
     *
     */
    card_lot_area_audit: {
        outer: TySqlApiClient;
        getTableName(): string;
        find(id: any): Promise<Entity.card_lot_area_audit>;
    };
    /**
     *
     */
    card_lot_audit: {
        outer: TySqlApiClient;
        getTableName(): string;
        find(id: any): Promise<Entity.card_lot_audit>;
    };
    /**
     *
     */
    card_temp: {
        outer: TySqlApiClient;
        getTableName(): string;
        find(id: any): Promise<Entity.card_temp>;
    };
    /**
     *
     */
    card_validtime: {
        outer: TySqlApiClient;
        getTableName(): string;
        find(id: any): Promise<Entity.card_validtime>;
    };
    /**
     *
     */
    card_validtime_audit: {
        outer: TySqlApiClient;
        getTableName(): string;
        find(id: any): Promise<Entity.card_validtime_audit>;
    };
    /**
     *
     */
    config: {
        outer: TySqlApiClient;
        getTableName(): string;
        /**
         * 查找非标配置
         */
        findNsConfig(name: string): Promise<Entity.config>;
        /**
         * 查找非标配置值
         */
        findNsConfigValue(name: string): Promise<string | null>;
        /**
         * 获取非标配置列表
         * @param name 可按name前缀匹配
         */
        getNsConfigList(name?: string): Promise<Entity.config[]>;
    };
    /**
     *
     */
    credible_user: {
        outer: TySqlApiClient;
        getTableName(): string;
        getListByBillId(billId: string): Promise<Entity.credible_user[]>;
    };
    /**
     *
     */
    device: {
        outer: TySqlApiClient;
        getTableName(): string;
    };
    /**
     *
     */
    device_cfg: {
        outer: TySqlApiClient;
        getTableName(): string;
    };
    /**
     *
     */
    dict: {
        outer: TySqlApiClient;
        getTableName(): string;
        find(id: any): Promise<Entity.dict>;
    };
    /**
     * 显示屏模板的显示内容
     */
    display_content: {
        outer: TySqlApiClient;
        getTableName(): string;
        find(id: any): Promise<Entity.display_content>;
    };
    /**
     * 显示屏模板元素
     */
    display_element: {
        outer: TySqlApiClient;
        getTableName(): string;
        find(id: any): Promise<Entity.display_element>;
    };
    /**
     * 显示屏模板元素标签
     */
    display_element_type: {
        outer: TySqlApiClient;
        getTableName(): string;
        find(id: any): Promise<Entity.display_element_type>;
    };
    /**
     * 显示屏模板
     */
    display_template: {
        outer: TySqlApiClient;
        getTableName(): string;
        find(id: any): Promise<Entity.display_template>;
    };
    /**
     *
     */
    drawback: {
        outer: TySqlApiClient;
        getTableName(): string;
        find(id: any): Promise<Entity.drawback>;
    };
    /**
     * 退款审核表
     */
    drawback_audit: {
        outer: TySqlApiClient;
        getTableName(): string;
        find(id: any): Promise<Entity.drawback_audit>;
    };
    /**
     *
     */
    fee_available: {
        outer: TySqlApiClient;
        getTableName(): string;
        find(id: any): Promise<Entity.fee_available>;
    };
    /**
     * 计费规则时间分组
     */
    fee_date_group: {
        outer: TySqlApiClient;
        getTableName(): string;
        find(id: any): Promise<Entity.fee_date_group>;
    };
    /**
     *
     */
    fee_specialdates: {
        outer: TySqlApiClient;
        getTableName(): string;
        find(id: any): Promise<Entity.fee_specialdates>;
    };
    /**
     *
     */
    fee_static: {
        outer: TySqlApiClient;
        getTableName(): string;
        find(id: any): Promise<Entity.fee_static>;
    };
    /**
     *
     */
    fee_type: {
        outer: TySqlApiClient;
        getTableName(): string;
        find(id: any): Promise<Entity.fee_type>;
    };
    /**
     *
     */
    last_carout: {
        outer: TySqlApiClient;
        getTableName(): string;
        find(id: any): Promise<Entity.last_carout>;
    };
    /**
     * 终端缴费设备现金状态表
     */
    machine_cash: {
        outer: TySqlApiClient;
        getTableName(): string;
        find(id: any): Promise<Entity.machine_cash>;
    };
    /**
     * 商家充值记录表
     */
    merchant_recharge: {
        outer: TySqlApiClient;
        getTableName(): string;
        find(id: any): Promise<Entity.merchant_recharge>;
    };
    /**
     *
     */
    modify_carno: {
        outer: TySqlApiClient;
        getTableName(): string;
        find(id: any): Promise<Entity.modify_carno>;
    };
    /**
     *
     */
    node: {
        outer: TySqlApiClient;
        getTableName(): string;
        find(id: any): Promise<Entity.node>;
    };
    /**
     *
     */
    node_control: {
        outer: TySqlApiClient;
        getTableName(): string;
        find(id: any): Promise<Entity.node_control>;
    };
    /**
     *
     */
    node_device: {
        outer: TySqlApiClient;
        getTableName(): string;
    };
    /**
     * 通道自由流开启日志
     */
    node_free_log: {
        outer: TySqlApiClient;
        getTableName(): string;
        find(id: any): Promise<Entity.node_free_log>;
    };
    /**
     * 车道控制配置表
     */
    node_plan: {
        outer: TySqlApiClient;
        getTableName(): string;
        find(id: any): Promise<Entity.node_plan>;
    };
    /**
     * 离线模式报表数据量汇总表
     */
    offline_tab_count: {
        outer: TySqlApiClient;
        getTableName(): string;
    };
    /**
     *
     */
    park: {
        outer: TySqlApiClient;
        getTableName(): string;
    };
    /**
     * 预约车表
     */
    parking_booking: {
        outer: TySqlApiClient;
        getTableName(): string;
        find(id: any): Promise<Entity.parking_booking>;
    };
    /**
     *
     */
    realtime_data: {
        outer: TySqlApiClient;
        getTableName(): string;
    };
    /**
     * 内部车预约车权限管理表
     */
    role_area: {
        outer: TySqlApiClient;
        getTableName(): string;
        find(id: any): Promise<Entity.role_area>;
    };
    /**
     * 找车系统同步的区域信息
     */
    search_car_area: {
        outer: TySqlApiClient;
        getTableName(): string;
        find(id: any): Promise<Entity.search_car_area>;
    };
    /**
     * 找车系统区域和系统区域关系
     */
    search_car_area_bind: {
        outer: TySqlApiClient;
        getTableName(): string;
        find(id: any): Promise<Entity.search_car_area_bind>;
    };
    /**
     *
     */
    special_car: {
        outer: TySqlApiClient;
        getTableName(): string;
        find(id: any): Promise<Entity.special_car>;
    };
    /**
     *
     */
    tab_allsync_assist: {
        outer: TySqlApiClient;
        getTableName(): string;
    };
    /**
     *
     */
    clear_money: {
        outer: TySqlApiClient;
        getTableName(): string;
        find(id: any): Promise<Entity.clear_money>;
    };
    /**
     * 终端班次表
     */
    duty_detail: {
        outer: TySqlApiClient;
        getTableName(): string;
        find(id: any): Promise<Entity.duty_detail>;
    };
    /**
     *
     */
    file: {
        outer: TySqlApiClient;
        getTableName(): string;
        find(id: any): Promise<Entity.file>;
    };
    /**
     * 临时表，仅用于车场初始化校验表结构是否初始化成功用的
     */
    init_temp: {
        outer: TySqlApiClient;
        getTableName(): string;
        find(id: any): Promise<Entity.init_temp>;
    };
}
/**
 * 生成指定车场的TySqlApiClient实例
 *
 * ```ts
 * import { Singleton, Inject } from "typescript-ioc";
 * import { IService } from "mslib"
 * import { TyApi, TyExternalApi, ApiResponse, generateTySqlApiClient } from "refs/nslib";
 *
 * export class PostCarInInfo implements IService {
 *    //去掉注释
 *    //@TyApi.Service()
 *    async doService(input: TyExternalApi.PostCarInInfoInput): Promise<ApiResponse> {
 *        let client = generateTySqlApiClient(123456);
 *        let row = client.selectOne('select * from t_2014_config limit 1');
 *        let roww = client.list('select * from t_2014_config');
 *
 *        return ApiResponse.success;
 *    }
 * }
 * ```
 */
export declare function generateTySqlApiClient(parkId: any): TySqlApiClient;
export { TySqlApiClient };
