// 请求响应参数（不包含data）
export interface Result {
  code: string;
  msg: string;
}
// 请求响应参数（不包含rows）
export interface Resultjob {
  code: string;
  msg: string;
  rows: [];
  total: number;
}
// 请求响应参数（包含data）
export interface ResultData<T = any> extends Result {
  total: number;
  data: T;
}

// 分页响应参数
export interface ResPage<T> {
  list: T[];
  pageNum: number;
  pageSize: number;
  total: number;
}

// 分页请求参数
export interface ReqPage {
  pageNum: number;
  pageSize: number;
}

// 文件上传模块
export namespace Upload {
  export interface ResFileUrl {
    fileUrl: string;
  }
}

// 登录模块
export namespace Login {
  export interface ReqLoginForm {
    username: string;
    password: string;
    tenantNo: string;
    rememberMe: boolean;
  }
  export interface ResLogin {
    access_token: string;
  }
  export interface ResAuthButtons {
    [key: string]: string[];
  }
}

// 用户管理模块
export namespace User {
  export interface ReqUserParams extends ReqPage {
    username: string;
    gender: number;
    idCard: string;
    email: string;
    address: string;
    createTime: string[];
    status: number;
  }
  export interface ResUserList {
    id: string;
    username: string;
    gender: number;
    user: { detail: { age: number } };
    idCard: string;
    email: string;
    address: string;
    createTime: string;
    status: number;
    avatar: string;
    photo: any[];
    children?: ResUserList[];
  }
  export interface ResStatus {
    userLabel: string;
    userValue: number;
  }
  export interface ResGender {
    genderLabel: string;
    genderValue: number;
  }
  export interface ResDepartment {
    id: string;
    name: string;
    children?: ResDepartment[];
  }
  export interface ResRole {
    id: string;
    name: string;
    children?: ResDepartment[];
  }
}
// 获取站点列表
export namespace Station {
  export interface todo {
    energyMgrMode: number;
    id: string;
    priceCfgMode: number;
    sortNo: number;
    stationName: string;
    timezone: string;
  }
  // 电价配置
  export interface electricity {
    start: number;
    currencyUnit: null;
    dataSource: number;
    imonth: number;
    isBinding: number;
    iyear: number;
    priceCfgMode: number;
    priceMeasureUnit: null;
    staEleTariffScheduleList: any[];
    stationTmplId: string;
    tmplId: null;
    tmplName: string;
    tariffId: string;
  }
  // 模板管理表格数据
  export interface Tmpl {
    data: TmplData[];
    empty: boolean;
    pn: number;
    size: number;
    startNo: number;
    total: number;
    totalPage: number;
  }

  export interface TmplData {
    createTime: string;
    createUserName: string;
    id: string;
    isUsing: number;
    name: string;
    refCount: number;
    tags: string;
    tagsArray: any[];
  }
  // 单站查询二级接口
  export interface emsSystem {
    emsDeviceId: string;
    emsSystemId: string;
    id: string;
    name: string;
    nominalEnergyCap: null;
    ratedPower: null;
    sysBindStatus: null;
  }
  // 设备监控 tap标签
  export interface deviceList {
    name: string;
    deviceClass: number;
    deviceType: number;
    deviceClassName: string;
    devices: deviceLists[];
  }
  // 设备监控 tap标签
  export interface deviceLists {
    child: [];
    deviceName: string;
    id: string;
  }
  // 收益统计图
  export interface profitday {
    profit: number;
    stationName: string;
  }
  // 收益统计图
  export interface between {
    profit: string;
    ymd: string;
  }
  // 充放电统计图
  export interface power {
    chargeTotal: number;
    dischargeTotal: number;
    ymd: string;
  }
  // 故障告警
  export interface multiStation {
    cnt: string;
    code: null;
    name: string;
  }
  // 电量报表
  export interface summary {
    list: summarylist[];
    total: summarytotal;
  }
  export interface summarylist {
    chargePeak: number;
    chargeSharp: number;
    chargeShoulder: number;
    chargeTotal: number;
    chargeValley: number;
    dischargePeak: number;
    dischargeSharp: number;
    dischargeShoulder: number;
    dischargeTotal: number;
    dischargeValley: number;
    overallEfficiency: number;
    selfUse: null;
    stationName: string;
  }
  export interface summarytotal {
    ymdHour: string;
    year: string;
    ym: string;
    ymd: string;
    chargePeak: number;
    chargeSharp: number;
    chargeShoulder: number;
    chargeTotal: number;
    chargeValley: number;
    dischargePeak: number;
    dischargeSharp: number;
    dischargeShoulder: number;
    dischargeTotal: number;
    dischargeValley: number;
    overallEfficiency: number;
    selfUse: null;
    stationName: string;
  }
  // 电量报表-单站_日报表月报表
  export interface singleStation {
    list: singleStationlist[];
    total: singleStationtotal;
  }
  export interface singleStationlist {
    chargePeak: number;
    chargeSharp: number;
    chargeShoulder: number;
    chargeTotal: number;
    chargeValley: number;
    dischargePeak: number;
    dischargeSharp: number;
    dischargeShoulder: number;
    dischargeTotal: number;
    dischargeValley: number;
    overallEfficiency: number;
    selfUse: number;
    year: null;
  }
  export interface singleStationtotal {
    ym: string;
    ymd: string;
    chargePeak: number;
    chargeSharp: number;
    chargeShoulder: number;
    chargeTotal: number;
    chargeValley: number;
    dischargePeak: number;
    dischargeSharp: number;
    dischargeShoulder: number;
    dischargeTotal: number;
    dischargeValley: number;
    overallEfficiency: number;
    selfUse: number;
    year: string;
  }
  // 收益统计
  export interface profitbetween {
    avgEfficiency: number;
    list: [
      {
        profit: number;
        ymd: string;
      }
    ];
  }
  // 综合效率
  export interface efficiency {
    avgEfficiency: number;
    list: [
      {
        overallEfficiency: number;
        ymd: string;
      }
    ];
  }
  // 放电达成率
  export interface exportKwh {
    avgDischargeCompleteRate: number;
    list: [
      {
        dischargeCompletionRate: number;
        ymd: string;
      }
    ];
  }
  // 站点系统 单站实时数据
  export interface realtimeinfo {
    accumulativeExportKwh: number;
    accumulativeImportKwh: number;
    dayExportKwh: number;
    dayImportKwh: number;
    lastDataTime: string;
    onlineStatus: number;
    soc: number;
  }
  // 站点系统 实时运行背景图
  export interface operation {
    endTime: string;
    periodType: number;
    startTime: string;
  }
  // 站点系统 功率趋势图
  export interface powertrend {
    gridPower: [];
    storedPower: [];
    totalActivePower: string;
    ts: string;
  }
  // 站点系统 告警状态
  export interface systemdevice {
    alarmStatus: number;
    deviceName: string;
    emsCommStatus: number;
  }
  // 站点系统 实时电量收益
  export interface realtimepower {
    list: realtimepowerlist[];
    total: realtimepowertotal;
  }
  // 使时运行-数据类型
  export interface datatype {
    batteryCluster: [
      {
        deviceId: string;
        deviceName: string;
        deviceType: number;
      }
    ];
    batteryStack: [
      {
        deviceId: string;
        deviceName: string;
        deviceType: number;
      }
    ];
    electricMeter: [
      {
        deviceId: string;
        deviceName: string;
        deviceType: number;
      }
    ];
    pcs: [
      {
        deviceId: string;
        deviceName: string;
        deviceType: number;
      }
    ];
  }
  export interface realtimepowerlist {
    chargeKwh: number;
    chargePeakKwh: number;
    chargeSharpKwh: number;
    chargeShoulderKwh: number;
    chargeValleyKwh: number;
    dischargeKwh: number;
    dischargePeakKwh: number;
    dischargeSharpKwh: number;
    dischargeShoulderKwh: number;
    dischargeValleyKwh: number;
    profit: number;
    ymdHour: string;
  }
  export interface realtimepowertotal {
    chargeKwh: number;
    chargePeakKwh: number;
    chargeSharpKwh: number;
    chargeShoulderKwh: number;
    chargeValleyKwh: number;
    dischargeKwh: number;
    dischargePeakKwh: number;
    dischargeSharpKwh: number;
    dischargeShoulderKwh: number;
    dischargeValleyKwh: number;
    profit: number;
    ymdHour: string;
  }
  // 电量报表-单站报表柱状图
}
// 故障告警
export namespace Alarm {
  export interface today {
    code: any;
    todayId: any;
    daviceClass: any;
    cnt: string;
    name: string;
  }
}
export namespace other {
  // 上传
  export interface Data {
    msg: string;
  }
  // 菜单树形
  export interface tableData1 {
    checked: boolean;
    children: tableData1[];
    createBy: string;
    createTime: string;
    icon: string;
    id: string;
    pId: string;
    isRefresh: string;
    menuName: string;
    menuType: string;
    orderNum: string;
    parentId: string;
    parentName: string | null;
    perms: string;
    remark: string | number | null;
    target: string;
    updateBy: string | number | null;
    updateTime: string | number | null;
    url: string;
    visible: string;
  }
  // 电价管理
  export interface Scheduling {
    imonth: number;
    iyear: string;
    startTime: string;
    endTime: string;
    periodType: string;
  }

  export interface Select {
    [key: number]: Scheduling[];
  }
}
