2023-03-04 16:29:55 +08:00
|
|
|
package com.jsowell.pile.service;
|
|
|
|
|
|
2023-06-21 11:19:51 +08:00
|
|
|
import com.jsowell.pile.domain.PileBillingDetail;
|
2023-03-04 16:29:55 +08:00
|
|
|
import com.jsowell.pile.domain.PileBillingRelation;
|
|
|
|
|
import com.jsowell.pile.domain.PileBillingTemplate;
|
|
|
|
|
import com.jsowell.pile.dto.CreateOrUpdateBillingTemplateDTO;
|
|
|
|
|
import com.jsowell.pile.dto.ImportBillingTemplateDTO;
|
2024-07-16 14:07:06 +08:00
|
|
|
import com.jsowell.pile.vo.uniapp.customer.BillingPriceVO;
|
|
|
|
|
import com.jsowell.pile.vo.uniapp.customer.CurrentTimePriceDetails;
|
2023-06-25 17:14:23 +08:00
|
|
|
import com.jsowell.pile.vo.web.BillingDetailVO;
|
2023-03-04 16:29:55 +08:00
|
|
|
import com.jsowell.pile.vo.web.BillingTemplateVO;
|
|
|
|
|
import com.jsowell.pile.vo.web.EchoBillingTemplateVO;
|
|
|
|
|
|
|
|
|
|
import java.util.List;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 计费模板Service接口
|
|
|
|
|
*
|
|
|
|
|
* @author jsowell
|
|
|
|
|
* @date 2022-09-20
|
|
|
|
|
*/
|
2024-01-06 15:20:28 +08:00
|
|
|
public interface PileBillingTemplateService {
|
2023-03-04 16:29:55 +08:00
|
|
|
/**
|
|
|
|
|
* 查询计费模板
|
|
|
|
|
*
|
|
|
|
|
* @param id 计费模板主键
|
|
|
|
|
* @return 计费模板
|
|
|
|
|
*/
|
|
|
|
|
public PileBillingTemplate selectPileBillingTemplateById(Long id);
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 查询计费模板列表
|
|
|
|
|
*
|
|
|
|
|
* @param pileBillingTemplate 计费模板
|
|
|
|
|
* @return 计费模板集合
|
|
|
|
|
*/
|
|
|
|
|
public List<PileBillingTemplate> selectPileBillingTemplateList(PileBillingTemplate pileBillingTemplate);
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 新增计费模板
|
|
|
|
|
*
|
|
|
|
|
* @param pileBillingTemplate 计费模板
|
|
|
|
|
* @return 结果
|
|
|
|
|
*/
|
|
|
|
|
public int insertPileBillingTemplate(PileBillingTemplate pileBillingTemplate);
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 修改计费模板
|
|
|
|
|
*
|
|
|
|
|
* @param pileBillingTemplate 计费模板
|
|
|
|
|
* @return 结果
|
|
|
|
|
*/
|
|
|
|
|
public int updatePileBillingTemplate(PileBillingTemplate pileBillingTemplate);
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 批量删除计费模板
|
|
|
|
|
*
|
|
|
|
|
* @param ids 需要删除的计费模板主键集合
|
|
|
|
|
* @return 结果
|
|
|
|
|
*/
|
|
|
|
|
public int deletePileBillingTemplateByIds(Long[] ids);
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 删除计费模板信息
|
|
|
|
|
*
|
|
|
|
|
* @param id 计费模板主键
|
|
|
|
|
* @return 结果
|
|
|
|
|
*/
|
|
|
|
|
public int deletePileBillingTemplateById(Long id);
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 新增计费模板
|
|
|
|
|
*
|
|
|
|
|
* @param dto 参数
|
|
|
|
|
* @return 计费模板id
|
|
|
|
|
*/
|
|
|
|
|
void createBillingTemplate(CreateOrUpdateBillingTemplateDTO dto);
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 查询公共计费模板
|
|
|
|
|
*
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
|
List<BillingTemplateVO> queryPublicBillingTemplateList();
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 查询站点计费模板
|
|
|
|
|
*
|
|
|
|
|
* @param stationId 站点id
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
|
List<BillingTemplateVO> queryStationBillingTemplateList(String stationId);
|
|
|
|
|
|
2024-02-23 13:55:10 +08:00
|
|
|
List<BillingTemplateVO> queryStationPreferentialBillingTemplateList(String stationId);
|
|
|
|
|
|
2023-03-14 09:19:47 +08:00
|
|
|
/**
|
|
|
|
|
* 查询站点计费模板
|
|
|
|
|
*
|
|
|
|
|
* @param stationId 站点id
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
|
List<BillingTemplateVO> queryStationBillingTemplateListForUniApp(String stationId);
|
|
|
|
|
|
2023-03-04 16:29:55 +08:00
|
|
|
/**
|
|
|
|
|
* 查询正在使用中的计费模板
|
|
|
|
|
* @param stationId 站点id
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
|
BillingTemplateVO queryUsedBillingTemplate(String stationId);
|
|
|
|
|
|
2023-06-25 17:14:23 +08:00
|
|
|
List<BillingPriceVO> conversionParameters(List<BillingDetailVO> billingDetailList);
|
|
|
|
|
|
2023-03-04 16:29:55 +08:00
|
|
|
/**
|
|
|
|
|
* 查询计费价格详情
|
|
|
|
|
* @param stationId 站点id
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
|
List<BillingPriceVO> queryBillingPrice(String stationId);
|
|
|
|
|
|
2024-02-22 14:46:54 +08:00
|
|
|
List<BillingPriceVO> queryBillingPriceOld(String stationId);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
2023-03-04 16:29:55 +08:00
|
|
|
* 通过桩sn号查询计费模板信息
|
|
|
|
|
*
|
|
|
|
|
* @param pileSn 桩sn
|
|
|
|
|
* @return 计费模板编号
|
|
|
|
|
*/
|
|
|
|
|
BillingTemplateVO selectBillingTemplateDetailByPileSn(String pileSn);
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 站点导入计费模板
|
|
|
|
|
*
|
|
|
|
|
* @param dto
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
|
boolean stationImportBillingTemplate(ImportBillingTemplateDTO dto);
|
|
|
|
|
|
|
|
|
|
byte[] generateBillingTemplateMsgBody(String pileSn, BillingTemplateVO billingTemplateVO);
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 根据计费模板id查询计费模板信息
|
|
|
|
|
*
|
|
|
|
|
* @param templateId 计费模板id
|
|
|
|
|
* @return 计费模板信息
|
|
|
|
|
*/
|
|
|
|
|
BillingTemplateVO selectBillingTemplateByTemplateId(String templateId);
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 保存计费模板和桩关系
|
|
|
|
|
*
|
|
|
|
|
* @param relationList
|
|
|
|
|
*/
|
2023-11-30 09:48:50 +08:00
|
|
|
@Deprecated
|
2023-03-04 16:29:55 +08:00
|
|
|
void insertPileBillingRelation(List<PileBillingRelation> relationList);
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 修改计费模板
|
|
|
|
|
*
|
|
|
|
|
* @param dto
|
|
|
|
|
*/
|
|
|
|
|
void updateBillingTemplate(CreateOrUpdateBillingTemplateDTO dto);
|
|
|
|
|
|
|
|
|
|
EchoBillingTemplateVO queryPileBillingTemplateById(Long id);
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 通过站点id查询当前时间的收费详情
|
|
|
|
|
*/
|
|
|
|
|
CurrentTimePriceDetails getCurrentTimePriceDetails(String stationId);
|
2023-06-21 11:19:51 +08:00
|
|
|
|
|
|
|
|
List<PileBillingDetail> queryBillingDetailById(Long id);
|
2023-06-25 17:14:23 +08:00
|
|
|
|
2024-02-23 15:06:29 +08:00
|
|
|
int deletePreferentialBillingTemplate(String stationId);
|
|
|
|
|
|
2023-06-25 17:14:23 +08:00
|
|
|
// 批量查询站点计费模板
|
|
|
|
|
List<BillingTemplateVO> selectBillingTemplateByStationIdList(List<String> stationIdList);
|
2023-06-27 11:11:43 +08:00
|
|
|
|
2023-06-25 17:16:14 +08:00
|
|
|
/**
|
|
|
|
|
* 修改站点计费模板状态并下发最新模板
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
2023-06-27 11:11:43 +08:00
|
|
|
int changeStationTemplate(String stationId, String templateId);
|
2024-01-31 15:34:08 +08:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 创建优惠计费模板
|
|
|
|
|
* @param dto
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
|
int createPreferentialBillingTemplate(CreateOrUpdateBillingTemplateDTO dto);
|
2024-02-02 17:01:07 +08:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 查询优惠计费模板
|
|
|
|
|
*/
|
|
|
|
|
BillingTemplateVO queryPreferentialBillingTemplate(String stationId);
|
2023-03-04 16:29:55 +08:00
|
|
|
}
|