初始版本提交
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
package com.njcn.message.enums;
|
||||
|
||||
/**
|
||||
* Description:
|
||||
* Date: 2024/12/17 10:04【需求编号】
|
||||
*
|
||||
* @author clam
|
||||
* @version V1.0.0
|
||||
*/
|
||||
public interface DeviceRebootType {
|
||||
/***
|
||||
* 1. 新增终端台账
|
||||
*/
|
||||
String ADD_TERMINAL = "add_terminal";
|
||||
|
||||
/***
|
||||
* 1. 删除终端台账
|
||||
*/
|
||||
String DELETE_TERMINAL = "delete_terminal";
|
||||
|
||||
|
||||
/***
|
||||
*修改终端 新增/删除/监测点台账
|
||||
*/
|
||||
String LEDGER_MODIFY = "ledger_modify";
|
||||
/**
|
||||
* Icd变更
|
||||
*/
|
||||
String ICD_CHANGE = "icd_change";
|
||||
|
||||
}
|
||||
@@ -43,6 +43,7 @@ public class DeviceRebootMessage {
|
||||
private String series;
|
||||
//终端识别码
|
||||
private String devKey;
|
||||
private Integer processNo;
|
||||
//
|
||||
private List<MonitorInfo> monitorData;
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ import com.njcn.common.utils.EnumUtils;
|
||||
import com.njcn.message.enums.MessageResponseEnum;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.util.Objects;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* @author hongawen
|
||||
@@ -42,5 +42,20 @@ public class MessageEnumUtil {
|
||||
return commonResponseEnum;
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
Map<Integer, Integer> processCountMap = null;
|
||||
processCountMap = new HashMap<>();
|
||||
processCountMap.put(1,0);
|
||||
processCountMap.put(2,0);
|
||||
processCountMap.put(3,0);
|
||||
processCountMap.put(4,0);
|
||||
//获取数量最少的线程号
|
||||
Optional<Integer> minKey = processCountMap.entrySet()
|
||||
.stream()
|
||||
.min(Comparator.comparingInt(e -> e.getValue()))
|
||||
.map(Map.Entry::getKey);
|
||||
System.out.println(minKey.orElse(2));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user