first commit

This commit is contained in:
lihansani
2026-07-13 13:39:10 +08:00
commit 5bbf1f5c78
391 changed files with 169766 additions and 0 deletions

View File

@@ -0,0 +1,45 @@
package com.cbsd.client.pretreatment;
import com.cbsd.client.pretreatment.CalculateUtils;
import com.cbsd.client.pretreatment.IPreTreatmentInterface;
import java.util.Map;
/**
* 预处理脚本示例, 实现 IPreTreatmentInterface 接口
* 累加预处理
*/
public class PreTreatmentTemplate implements IPreTreatmentInterface {
/**
* 预处理
*
* @param command 指令内容
* @param repeatCount 重复次数
* @param hitCount 命中次数
* @param latestHitTime 最后命中时间
* @param dataMap 数据集合key为协议字段属性名labelvalue为物理值
* @param calculateUtils 计算工具类
* @return 结果
*/
@Override
public String pretreatment(String command, int repeatCount, int hitCount, String latestHitTime, Map<String, String> dataMap, CalculateUtils calculateUtils) {
String resultCommand = "";
if (hitCount < 10) {
resultCommand += "0" + hitCount;
} else {
resultCommand = String.valueOf(hitCount);
}
return resultCommand;
}
/**
* 描述
*
* @return 描述内容
*/
@Override
public String comment() {
return "根据命中次数累加拼接";
}
}