2023-03-04 16:29:55 +08:00
|
|
|
|
package com.jsowell.pile.mapper;
|
|
|
|
|
|
|
|
|
|
|
|
import com.jsowell.pile.domain.PileBillingDetail;
|
|
|
|
|
|
import com.jsowell.pile.domain.PileBillingRelation;
|
|
|
|
|
|
import com.jsowell.pile.domain.PileBillingTemplate;
|
|
|
|
|
|
import com.jsowell.pile.vo.web.BillingTemplateVO;
|
|
|
|
|
|
import org.apache.ibatis.annotations.Param;
|
|
|
|
|
|
import org.springframework.stereotype.Repository;
|
|
|
|
|
|
|
|
|
|
|
|
import java.util.List;
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 计费模板Mapper接口
|
|
|
|
|
|
*
|
|
|
|
|
|
* @author jsowell
|
|
|
|
|
|
* @date 2022-09-20
|
|
|
|
|
|
*/
|
|
|
|
|
|
@Repository
|
|
|
|
|
|
public interface PileBillingTemplateMapper {
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 查询计费模板
|
|
|
|
|
|
*
|
|
|
|
|
|
* @param id 计费模板主键
|
|
|
|
|
|
* @return 计费模板
|
|
|
|
|
|
*/
|
2023-11-30 09:38:02 +08:00
|
|
|
|
PileBillingTemplate selectPileBillingTemplateById(Long id);
|
2023-03-04 16:29:55 +08:00
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 查询计费模板列表
|
|
|
|
|
|
*
|
|
|
|
|
|
* @param pileBillingTemplate 计费模板
|
|
|
|
|
|
* @return 计费模板集合
|
|
|
|
|
|
*/
|
2023-11-30 09:38:02 +08:00
|
|
|
|
List<PileBillingTemplate> selectPileBillingTemplateList(PileBillingTemplate pileBillingTemplate);
|
2023-03-04 16:29:55 +08:00
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 新增计费模板
|
|
|
|
|
|
*
|
|
|
|
|
|
* @param pileBillingTemplate 计费模板
|
|
|
|
|
|
* @return 结果
|
|
|
|
|
|
*/
|
2023-11-30 09:38:02 +08:00
|
|
|
|
int insertPileBillingTemplate(PileBillingTemplate pileBillingTemplate);
|
2023-03-04 16:29:55 +08:00
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 修改计费模板
|
|
|
|
|
|
*
|
|
|
|
|
|
* @param pileBillingTemplate 计费模板
|
|
|
|
|
|
* @return 结果
|
|
|
|
|
|
*/
|
2023-11-30 09:38:02 +08:00
|
|
|
|
int updatePileBillingTemplate(PileBillingTemplate pileBillingTemplate);
|
2023-03-04 16:29:55 +08:00
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 删除计费模板
|
|
|
|
|
|
*
|
|
|
|
|
|
* @param id 计费模板主键
|
|
|
|
|
|
* @return 结果
|
|
|
|
|
|
*/
|
2023-11-30 09:38:02 +08:00
|
|
|
|
int deletePileBillingTemplateById(Long id);
|
2023-03-04 16:29:55 +08:00
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 批量删除计费模板
|
|
|
|
|
|
*
|
|
|
|
|
|
* @param ids 需要删除的数据主键集合
|
|
|
|
|
|
* @return 结果
|
|
|
|
|
|
*/
|
2023-11-30 09:38:02 +08:00
|
|
|
|
int deletePileBillingTemplateByIds(Long[] ids);
|
2023-03-04 16:29:55 +08:00
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 批量删除计费模板详情
|
|
|
|
|
|
*
|
|
|
|
|
|
* @param templateCodes 需要删除的templateCode集合
|
|
|
|
|
|
* @return 结果
|
|
|
|
|
|
*/
|
2023-11-30 09:38:02 +08:00
|
|
|
|
int deletePileBillingDetailByTemplateCodes(@Param("templateCodes") List<String> templateCodes);
|
2023-03-04 16:29:55 +08:00
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 批量新增计费模板详情
|
|
|
|
|
|
*
|
|
|
|
|
|
* @param pileBillingDetailList 计费模板详情列表
|
|
|
|
|
|
* @return 结果
|
|
|
|
|
|
*/
|
2023-11-30 09:38:02 +08:00
|
|
|
|
int batchPileBillingDetail(List<PileBillingDetail> pileBillingDetailList);
|
2023-03-04 16:29:55 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 通过计费模板主键删除计费模板详情信息
|
|
|
|
|
|
*
|
|
|
|
|
|
* @param templateCode 计费模板code
|
|
|
|
|
|
* @return 结果
|
|
|
|
|
|
*/
|
2023-11-30 09:38:02 +08:00
|
|
|
|
int deletePileBillingDetailByTemplateCode(String templateCode);
|
2023-03-04 16:29:55 +08:00
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 查询公共计费模板列表
|
|
|
|
|
|
* @return
|
|
|
|
|
|
*/
|
|
|
|
|
|
List<BillingTemplateVO> queryPublicBillingTemplateList();
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 根据站点id查询站点计费模板列表
|
|
|
|
|
|
* 根据发布时间倒序,最新一条就是目前正在使用的计费模板
|
|
|
|
|
|
* @param stationId 站点id
|
|
|
|
|
|
* @return
|
|
|
|
|
|
*/
|
2023-08-08 16:32:40 +08:00
|
|
|
|
List<BillingTemplateVO> queryStationBillingTemplateListWithAuth(@Param("stationId") String stationId,
|
2024-02-23 13:55:10 +08:00
|
|
|
|
@Param("stationDeptIds") List<String> stationDeptIds,
|
|
|
|
|
|
@Param("memberFlag") String memberFlag);
|
2023-03-04 16:29:55 +08:00
|
|
|
|
|
2023-03-14 09:19:47 +08:00
|
|
|
|
/**
|
|
|
|
|
|
* 根据站点id查询站点计费模板列表
|
|
|
|
|
|
* 根据发布时间倒序,最新一条就是目前正在使用的计费模板
|
|
|
|
|
|
* @param stationId 站点id
|
|
|
|
|
|
* @return
|
|
|
|
|
|
*/
|
2023-08-08 16:32:40 +08:00
|
|
|
|
List<BillingTemplateVO> queryStationBillingTemplateList(@Param("stationId") String stationId);
|
2023-03-14 09:19:47 +08:00
|
|
|
|
|
2023-03-04 16:29:55 +08:00
|
|
|
|
/**
|
|
|
|
|
|
* 通过桩sn号查询计费模板
|
|
|
|
|
|
*
|
|
|
|
|
|
* @param pileSn 桩sn
|
|
|
|
|
|
* @return 计费模板编号
|
|
|
|
|
|
*/
|
|
|
|
|
|
BillingTemplateVO selectBillingTemplateByPileSn(@Param("pileSn") String pileSn);
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 通过计费模板id查询
|
|
|
|
|
|
* @param templateId 计费模板id
|
|
|
|
|
|
* @return
|
|
|
|
|
|
*/
|
|
|
|
|
|
BillingTemplateVO selectBillingTemplateByTemplateId(@Param("templateId") String templateId);
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 查询站点最新发布的计费模板
|
|
|
|
|
|
* @param stationId
|
|
|
|
|
|
* @return
|
|
|
|
|
|
*/
|
|
|
|
|
|
BillingTemplateVO selectBillingTemplateByStationId(@Param("stationId") String stationId);
|
|
|
|
|
|
|
2023-06-25 17:14:23 +08:00
|
|
|
|
/**
|
|
|
|
|
|
* 批量查询站点正在使用的计费模板信息
|
|
|
|
|
|
* @param stationIdList 站点id集合
|
|
|
|
|
|
* @return
|
|
|
|
|
|
*/
|
|
|
|
|
|
List<BillingTemplateVO> selectBillingTemplateByStationIdList(@Param("stationIdList") List<String> stationIdList);
|
|
|
|
|
|
|
2023-03-04 16:29:55 +08:00
|
|
|
|
/**
|
2023-06-21 11:23:55 +08:00
|
|
|
|
* 通过模板id数组批量查询计费模板详情列表
|
2023-03-04 16:29:55 +08:00
|
|
|
|
*/
|
|
|
|
|
|
List<PileBillingDetail> queryBillingDetailByTemplateIds(@Param("templateIds") Long[] templateIds);
|
|
|
|
|
|
|
2023-06-21 11:23:55 +08:00
|
|
|
|
/**
|
|
|
|
|
|
* 通过模板id查询计费模板详情列表
|
|
|
|
|
|
*/
|
|
|
|
|
|
List<PileBillingDetail> queryBillingDetailByTemplateId(@Param("templateId") Long templateId);
|
|
|
|
|
|
|
2023-03-04 16:29:55 +08:00
|
|
|
|
/**
|
|
|
|
|
|
* 插入充电桩和计费模板关系
|
|
|
|
|
|
*/
|
|
|
|
|
|
void insertPileBillingRelation(List<PileBillingRelation> relationList);
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 根据桩号删除计费模板关系
|
|
|
|
|
|
* @param pileSnList
|
|
|
|
|
|
*/
|
|
|
|
|
|
void deleteRelationByPileSn(@Param("pileSnList") List<String> pileSnList);
|
2023-06-27 11:11:43 +08:00
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 根据站点id修改状态
|
2024-09-04 14:03:28 +08:00
|
|
|
|
*
|
2023-06-27 11:11:43 +08:00
|
|
|
|
* @param stationId
|
|
|
|
|
|
* @param status
|
2024-09-04 14:03:28 +08:00
|
|
|
|
* @param deviceType
|
2023-06-27 11:11:43 +08:00
|
|
|
|
*/
|
2024-09-04 14:03:28 +08:00
|
|
|
|
void updateStatusByStationId(@Param("stationId") String stationId, @Param("status") String status, @Param("deviceType")String deviceType);
|
2023-06-27 11:11:43 +08:00
|
|
|
|
|
|
|
|
|
|
void updateStatusByTemplateId(@Param("templateId") String templateId, @Param("status") String status);
|
2024-02-02 17:01:07 +08:00
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 查询站点的集团会员优惠计费模板
|
|
|
|
|
|
* @param stationId
|
|
|
|
|
|
* @return
|
|
|
|
|
|
*/
|
|
|
|
|
|
BillingTemplateVO queryPreferentialBillingTemplate(String stationId);
|
2023-03-04 16:29:55 +08:00
|
|
|
|
}
|