package com.vci.dto;
|
|
import com.vci.common.qt.object.ConditionItem;
|
import lombok.Data;
|
|
import java.util.Iterator;
|
import java.util.Map;
|
|
/**
|
* 条件传输对象
|
* @author yuxc
|
* @date 2024/9/4
|
*/
|
@Data
|
public class ConditionDTO {
|
private String rootCIName;
|
private Map<String, ConditionItemDTO> ciMap;
|
|
public ConditionDTO() {
|
}
|
|
public String getRootCIName() {
|
return this.rootCIName;
|
}
|
|
public void setRootCIName(String rootCIName) {
|
this.rootCIName = rootCIName;
|
}
|
|
public String getRootCINameByCIMap(Map<String, ConditionItem> ciMap) {
|
String rootCIName = "";
|
if (ciMap != null) {
|
Iterator<String> i = ciMap.keySet().iterator();
|
|
while(i.hasNext()) {
|
String ciName = (String)i.next();
|
if (rootCIName.equals("")) {
|
rootCIName = ciName;
|
} else {
|
int rootInt = Integer.valueOf(rootCIName.substring(2));
|
int ciInt = Integer.valueOf(ciName.substring(2));
|
if (ciInt > rootInt) {
|
rootCIName = ciName;
|
}
|
}
|
}
|
}
|
|
return rootCIName;
|
}
|
|
public Map<String, ConditionItemDTO> getCIMap() {
|
return this.ciMap;
|
}
|
|
public void setCIMap(Map<String, ConditionItemDTO> cIMap) {
|
this.ciMap = cIMap;
|
}
|
}
|