Files
jsowell-charger-web/jsowell-netty/src/main/java/com/jsowell/netty/handler/BillingTemplateSettingHandler.java
2023-03-04 16:29:55 +08:00

62 lines
1.7 KiB
Java
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
package com.jsowell.netty.handler;
import com.alibaba.fastjson2.JSONObject;
import com.jsowell.common.core.domain.ykc.YKCDataProtocol;
import com.jsowell.common.core.domain.ykc.YKCFrameTypeCode;
import com.jsowell.common.util.YKCUtils;
import com.jsowell.netty.factory.YKCOperateFactory;
import io.netty.channel.Channel;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;
/**
* 计费模型设置
*
* 用户充电费用计算,每半小时为一个费率段,共 48 段,每段对应尖峰平谷其中一个费率 充电时桩屏幕按此费率分别显示已充电费和服务费
*
* @author JS-ZZA
* @date 2022/9/19 15:17
*/
@Slf4j
@Component
public class BillingTemplateSettingHandler extends AbstractHandler{
private final String type = YKCUtils.frameType2Str(YKCFrameTypeCode.BILLING_TEMPLATE_SETTING_CODE.getBytes());
@Override
public void afterPropertiesSet() throws Exception {
YKCOperateFactory.register(type, this);
}
@Override
public byte[] supplyProcess(YKCDataProtocol ykcDataProtocol, Channel channel) {
log.info("[===执行计费模型设置逻辑===] param:{}, channel:{}", JSONObject.toJSONString(ykcDataProtocol), channel.toString());
// 下发
// 桩编号
// 计费模型编码
// 尖电费费率 精确到五位小数
// 尖服务费费率
// 峰电费费率
// 峰服务费费率
// 平电费费率
// 平服务费费率
// 谷电费费率
// 谷服务费费率
// 计损比例
// 48个时段费率号 0尖费率 1峰费率 2平费率 3谷费率
return null;
}
}