package com.xhpc.charging.station.service;

import com.xhpc.common.core.domain.R;
import com.xhpc.common.core.web.domain.AjaxResult;
import com.xhpc.common.domain.XhpcChargingPile;

import javax.servlet.http.HttpServletRequest;
import java.util.List;
import java.util.Map;

/**
 * @author yuyang
 * @date 2021/7/27 14:36
 */
public interface IXhpcChargingPileService {

    /**
     * 桩列表
     *
     * @param serialNumber 桩编号
     * @param type         桩类型
     * @param name         桩名称
     * @return
     */
    List<Map<String, Object>> selectXhpcChargingPileList(HttpServletRequest request,String tenantId,Long operatorId,String name, Integer type, String serialNumber, Long chargingStationId);


    /**
     * 添加桩
     *
     * @param
     * @return
     */
    AjaxResult addXhpcChargingPile(XhpcChargingPile xhpcChargingPile);

    /**
     * 编辑桩
     *
     * @param
     * @return
     */
    AjaxResult updateXhpcChargingPile(XhpcChargingPile xhpcChargingPile);

    /**
     * 桩详情
     *
     * @param
     * @return
     */
    AjaxResult selectXhpcChargingPile(Long chargingPileId);

    /**
     * 停用
     *
     * @return
     */
    AjaxResult updateStatus(Long chargingPileId, Integer status,String prompt);


    /**
     * 删除桩信息
     *
     * @param chargingPileId 桩ID
     * @return 结果
     */
    int updateXhpcChargingPileById(Long chargingPileId);

    /**
     * @Author WH
     * @Date 2021/9/9 16:39
     * @Description
     * @Param [terminalIds]
     * @Return List<XhpcImg>
     * @Since version-1.0
     */
    List<Map<String, Object>> downloadsTerminalImgs(List<Integer> terminalIds);


    String importPile(List<XhpcChargingPile> pileList, Boolean isUpdateSupport, String operName);

    /**
     * generate all qrcode by id of charging station and id of charging pile
     *
     * @author WH
     * @date 2022/2/17 10:20
     * @since version-1.0
     */
    AjaxResult generateQrCode(Long chargingStationId, Long pileId);


    R getChargingPileSerialNumber(String serialNumber);

    void updateXhpcChargingPilePowerNumber(String serialNumber,Integer powerNumber);
}
