新增运行策略轮询功能

This commit is contained in:
zq
2025-12-29 15:47:28 +08:00
parent 22415df926
commit 5456d4742e
13 changed files with 835 additions and 109 deletions

View File

@ -0,0 +1,32 @@
package com.xzzn.common.enums;
/**
* SOC限制 (%) 1 = 开0 = 关
*
* @author xzzn
*/
public enum SocLimit
{
OFF(0, ""),
ON(1, ""),
;
private final Integer code;
private final String info;
SocLimit(Integer code, String info)
{
this.code = code;
this.info = info;
}
public Integer getCode()
{
return code;
}
public String getInfo()
{
return info;
}
}

View File

@ -0,0 +1,33 @@
package com.xzzn.common.enums;
public enum YesOrNo
{
YES(1, "", "Y"),
NO(0, "", "N");
private final Integer code;
private final String info;
private final String value;
YesOrNo(Integer code, String info, String value)
{
this.code = code;
this.info = info;
this.value = value;
}
public Integer getCode()
{
return code;
}
public String getInfo()
{
return info;
}
public String getValue()
{
return value;
}
}

View File

@ -1,7 +1,5 @@
package com.xzzn.common.utils;
import com.xzzn.common.annotation.Log;
import java.lang.management.ManagementFactory;
import java.text.ParseException;
import java.text.SimpleDateFormat;
@ -161,6 +159,14 @@ public class DateUtils extends org.apache.commons.lang3.time.DateUtils
return Math.abs((int) ((date2.getTime() - date1.getTime()) / (1000 * 3600 * 24)));
}
/**
* 计算相差分钟
*/
public static int differentMinutesByMillisecond(Date date1, Date date2)
{
return Math.abs((int) ((date2.getTime() - date1.getTime()) / (1000 * 60)));
}
/**
* 计算时间差
*