|
|
|
@ -832,7 +832,7 @@ public class BlockFormEnumUtil {
|
|
|
|
|
PASSWORD(230, "PASSWORD", "密码"),
|
|
|
|
|
DATE(300, "DATE", "日期(yyyy-MM-dd)"),
|
|
|
|
|
DATE_TIME(310, "DATE_TIME", "时间(yyyy-MM-dd hh:mm:ss)"),
|
|
|
|
|
// ELEMENT(700, "DICT_SELECT", "元素"),
|
|
|
|
|
// ELEMENT(700, "DICT_SELECT", "元素"),
|
|
|
|
|
DICTIONARY(800, "DICT_SELECT", "字典"),
|
|
|
|
|
CASCADE(900, "CASCADE", "级联");
|
|
|
|
|
//FILE(400, "file", "文件"),
|
|
|
|
@ -1056,7 +1056,99 @@ public class BlockFormEnumUtil {
|
|
|
|
|
return tmp;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public Object getPropertyVirtual(Object ... objs){
|
|
|
|
|
if(this.getValue() == STRING_SPLICE.getValue()){
|
|
|
|
|
return getPropertyVirtualString(objs);
|
|
|
|
|
}else if(this.getValue() == NUM_ADD.getValue()){
|
|
|
|
|
return getPropertyVirtualDoubleAdd(objs);
|
|
|
|
|
}else if(this.getValue() == NUM_LESS.getValue()){
|
|
|
|
|
return getPropertyVirtualDoubleLess(objs);
|
|
|
|
|
}else if(this.getValue() == NUM_MAKE.getValue()){
|
|
|
|
|
return getPropertyVirtualDoubleMake(objs);
|
|
|
|
|
}else if(this.getValue() == NUM_DIVISION.getValue()){
|
|
|
|
|
return getPropertyVirtualDoubleDivision(objs);
|
|
|
|
|
}
|
|
|
|
|
return objs;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private String getPropertyVirtualString(Object ... objs){
|
|
|
|
|
if(objs != null && objs.length > 0){
|
|
|
|
|
StringBuffer result = new StringBuffer();
|
|
|
|
|
for (Object o : objs) {
|
|
|
|
|
result.append(o == null ? "" : o.toString());
|
|
|
|
|
}
|
|
|
|
|
return result.toString();
|
|
|
|
|
}
|
|
|
|
|
return null;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private Double getPropertyVirtualDoubleAdd(Object ... objs){
|
|
|
|
|
if(objs != null && objs.length > 0){
|
|
|
|
|
Double result = new Double(0);
|
|
|
|
|
for (Object o : objs) {
|
|
|
|
|
try {
|
|
|
|
|
if(o != null){
|
|
|
|
|
result += Double.parseDouble(o.toString());
|
|
|
|
|
}
|
|
|
|
|
}catch (Exception e){
|
|
|
|
|
e.printStackTrace();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return result;
|
|
|
|
|
}
|
|
|
|
|
return null;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private Double getPropertyVirtualDoubleLess(Object ... objs){
|
|
|
|
|
if(objs != null && objs.length > 0){
|
|
|
|
|
Double result = new Double(0);
|
|
|
|
|
for (Object o : objs) {
|
|
|
|
|
try {
|
|
|
|
|
if(o != null){
|
|
|
|
|
result -= Double.parseDouble(o.toString());
|
|
|
|
|
}
|
|
|
|
|
}catch (Exception e){
|
|
|
|
|
e.printStackTrace();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return result;
|
|
|
|
|
}
|
|
|
|
|
return null;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private Double getPropertyVirtualDoubleMake(Object ... objs){
|
|
|
|
|
if(objs != null && objs.length > 0){
|
|
|
|
|
Double result = new Double(0);
|
|
|
|
|
for (Object o : objs) {
|
|
|
|
|
try {
|
|
|
|
|
if(o != null){
|
|
|
|
|
result *= Double.parseDouble(o.toString());
|
|
|
|
|
}
|
|
|
|
|
}catch (Exception e){
|
|
|
|
|
e.printStackTrace();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return result;
|
|
|
|
|
}
|
|
|
|
|
return null;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private Double getPropertyVirtualDoubleDivision(Object ... objs){
|
|
|
|
|
if(objs != null && objs.length > 0){
|
|
|
|
|
Double result = new Double(0);
|
|
|
|
|
for (Object o : objs) {
|
|
|
|
|
try {
|
|
|
|
|
if(o != null){
|
|
|
|
|
result /= Double.parseDouble(o.toString());
|
|
|
|
|
}
|
|
|
|
|
}catch (Exception e){
|
|
|
|
|
e.printStackTrace();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return result;
|
|
|
|
|
}
|
|
|
|
|
return null;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|