|
|
@ -287,7 +287,7 @@ public class CustomerFormServiceImpl implements CustomerFormService { |
|
|
@Override |
|
|
@Override |
|
|
public Tree getFieldTree(String key,String token,String cfid) { |
|
|
public Tree getFieldTree(String key,String token,String cfid) { |
|
|
Boolean flag = StringUtils.isBlank(cfid); |
|
|
Boolean flag = StringUtils.isBlank(cfid); |
|
|
System.out.println(StringUtils.isBlank(cfid)); |
|
|
//System.out.println(StringUtils.isBlank(cfid));
|
|
|
Tree tree = new Tree(); |
|
|
Tree tree = new Tree(); |
|
|
if(StringUtils.isBlank(key)||StringUtils.isBlank(token)||StringUtils.isBlank(cfid)){ |
|
|
if(StringUtils.isBlank(key)||StringUtils.isBlank(token)||StringUtils.isBlank(cfid)){ |
|
|
//参数不全不能发送请求.
|
|
|
//参数不全不能发送请求.
|
|
|
@ -314,12 +314,12 @@ public class CustomerFormServiceImpl implements CustomerFormService { |
|
|
param.put("id", cfid); |
|
|
param.put("id", cfid); |
|
|
String post = null; |
|
|
String post = null; |
|
|
|
|
|
|
|
|
System.out.println("requestBody:"+param); |
|
|
/*System.out.println("requestBody:"+param); |
|
|
System.out.println("userKey:"+userKey); |
|
|
System.out.println("userKey:"+userKey); |
|
|
System.out.println("token:"+token); |
|
|
System.out.println("token:"+token);*/ |
|
|
try { |
|
|
try { |
|
|
post = HttpUtils.send(url, param, HTTP.UTF_8, userKey, token); |
|
|
post = HttpUtils.send(url, param, HTTP.UTF_8, userKey, token); |
|
|
System.out.println("post:"+post.toString()); |
|
|
//System.out.println("post:"+post.toString());
|
|
|
} catch (IOException e) { |
|
|
} catch (IOException e) { |
|
|
e.printStackTrace(); |
|
|
e.printStackTrace(); |
|
|
} |
|
|
} |
|
|
@ -511,7 +511,7 @@ public class CustomerFormServiceImpl implements CustomerFormService { |
|
|
} |
|
|
} |
|
|
tree.setChildren(masterTreeList); |
|
|
tree.setChildren(masterTreeList); |
|
|
} |
|
|
} |
|
|
System.out.println(masterTableName.toString().replace("\"","")); |
|
|
//System.out.println(masterTableName.toString().replace("\"",""));
|
|
|
tree.setLabel(masterTableName.toString().replace("\"","")); |
|
|
tree.setLabel(masterTableName.toString().replace("\"","")); |
|
|
}else{ |
|
|
}else{ |
|
|
|
|
|
|
|
|
@ -572,7 +572,8 @@ public class CustomerFormServiceImpl implements CustomerFormService { |
|
|
|
|
|
|
|
|
return stringArrayList; |
|
|
return stringArrayList; |
|
|
}else{ |
|
|
}else{ |
|
|
System.out.println("非法请求!请先登录!"); |
|
|
//System.out.println("非法请求!请先登录!");
|
|
|
|
|
|
logger.error("非法请求!请先登录!"); |
|
|
return null; |
|
|
return null; |
|
|
/* |
|
|
/* |
|
|
|
|
|
|
|
|
@ -640,7 +641,7 @@ public class CustomerFormServiceImpl implements CustomerFormService { |
|
|
return null; |
|
|
return null; |
|
|
}*/ |
|
|
}*/ |
|
|
/* |
|
|
/* |
|
|
关联表单组件下拉数据标题选项获取(所有) |
|
|
关联表单组件下拉数据标题选项获取(已经可以解析数据范围条件) |
|
|
*/ |
|
|
*/ |
|
|
@Override |
|
|
@Override |
|
|
public ArrayList<CustomerFormTableSingleFieldValue> getAsfDataTitles(String key, String token,String formId, String dataTitle,String rangeFormula, String rangeString, String hideFormula, String hideString,String masterOnField) { |
|
|
public ArrayList<CustomerFormTableSingleFieldValue> getAsfDataTitles(String key, String token,String formId, String dataTitle,String rangeFormula, String rangeString, String hideFormula, String hideString,String masterOnField) { |
|
|
@ -674,6 +675,7 @@ public class CustomerFormServiceImpl implements CustomerFormService { |
|
|
List<TreeMap<String, Object>> dataTitleMapList = new ArrayList<>(); |
|
|
List<TreeMap<String, Object>> dataTitleMapList = new ArrayList<>(); |
|
|
if(StringUtils.isBlank(rangeFormula)){//没有配置数据范围条件,直接返回全部数据标题
|
|
|
if(StringUtils.isBlank(rangeFormula)){//没有配置数据范围条件,直接返回全部数据标题
|
|
|
dataTitleMapList = getDataTitles(asfFormName,toSelectDataTitles); |
|
|
dataTitleMapList = getDataTitles(asfFormName,toSelectDataTitles); |
|
|
|
|
|
//System.out.println(dataTitleMapList);
|
|
|
}else{ |
|
|
}else{ |
|
|
HashMap<String,String> leftOperatorsAndRight = splitString(rangeFormula); |
|
|
HashMap<String,String> leftOperatorsAndRight = splitString(rangeFormula); |
|
|
if(null!=leftOperatorsAndRight){ |
|
|
if(null!=leftOperatorsAndRight){ |
|
|
@ -897,7 +899,7 @@ public class CustomerFormServiceImpl implements CustomerFormService { |
|
|
operator = "like"; |
|
|
operator = "like"; |
|
|
whereConditionValue = "'%"+whereConditionValue+"%'"; |
|
|
whereConditionValue = "'%"+whereConditionValue+"%'"; |
|
|
dataTitleMapList = getDataTitlesWithWhere_Master_IsTable(parent,toSelectDataTitles,child,whereConditionField,operator,whereConditionValue); |
|
|
dataTitleMapList = getDataTitlesWithWhere_Master_IsTable(parent,toSelectDataTitles,child,whereConditionField,operator,whereConditionValue); |
|
|
System.out.println(dataTitleMapList); |
|
|
//System.out.println(dataTitleMapList);
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
}else{//条件不涉及到子表字段
|
|
|
}else{//条件不涉及到子表字段
|
|
|
@ -1436,7 +1438,7 @@ public class CustomerFormServiceImpl implements CustomerFormService { |
|
|
String whereConditionValue = right; |
|
|
String whereConditionValue = right; |
|
|
String whereConditionField = leftValue; |
|
|
String whereConditionField = leftValue; |
|
|
dataTitleMapList = getDataTitlesWithWhere_Master_IsTable(parent,toSelectDataTitles,child,whereConditionField,operator,whereConditionValue); |
|
|
dataTitleMapList = getDataTitlesWithWhere_Master_IsTable(parent,toSelectDataTitles,child,whereConditionField,operator,whereConditionValue); |
|
|
System.out.println(dataTitleMapList); |
|
|
//System.out.println(dataTitleMapList);
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
}else{//条件不涉及到子表字段
|
|
|
}else{//条件不涉及到子表字段
|
|
|
@ -1457,7 +1459,7 @@ public class CustomerFormServiceImpl implements CustomerFormService { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
}else{ |
|
|
}else{ |
|
|
System.out.println("非数字条件_"+right); |
|
|
//System.out.println("非数字条件_"+right);
|
|
|
right = "'"+right+"'"; |
|
|
right = "'"+right+"'"; |
|
|
if(operator.equals(">")||operator.equals(">=")||operator.equals("<")||operator.equals("<=")){//非数字条件时,对于这些符号无法处理,返回空数据标题列表
|
|
|
if(operator.equals(">")||operator.equals(">=")||operator.equals("<")||operator.equals("<=")){//非数字条件时,对于这些符号无法处理,返回空数据标题列表
|
|
|
dataTitleMapList = new ArrayList<>(); |
|
|
dataTitleMapList = new ArrayList<>(); |
|
|
@ -1473,7 +1475,7 @@ public class CustomerFormServiceImpl implements CustomerFormService { |
|
|
String whereConditionValue = right; |
|
|
String whereConditionValue = right; |
|
|
String whereConditionField = leftValue; |
|
|
String whereConditionField = leftValue; |
|
|
dataTitleMapList = getDataTitlesWithWhere_Master_IsTable(parent,toSelectDataTitles,child,whereConditionField,operator,whereConditionValue); |
|
|
dataTitleMapList = getDataTitlesWithWhere_Master_IsTable(parent,toSelectDataTitles,child,whereConditionField,operator,whereConditionValue); |
|
|
System.out.println(dataTitleMapList); |
|
|
//System.out.println(dataTitleMapList);
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
}else{//条件不涉及到子表字段
|
|
|
}else{//条件不涉及到子表字段
|
|
|
@ -1521,6 +1523,14 @@ public class CustomerFormServiceImpl implements CustomerFormService { |
|
|
return 1; |
|
|
return 1; |
|
|
} else if (key2.equals("value")) { |
|
|
} else if (key2.equals("value")) { |
|
|
return -1; |
|
|
return -1; |
|
|
|
|
|
}else if (key1.equals("org")) { |
|
|
|
|
|
return 1; |
|
|
|
|
|
} else if (key2.equals("org")) { |
|
|
|
|
|
return -1; |
|
|
|
|
|
}else if (key1.equals("owner")) { |
|
|
|
|
|
return 1; |
|
|
|
|
|
} else if (key2.equals("owner")) { |
|
|
|
|
|
return -1; |
|
|
} |
|
|
} |
|
|
return 0; |
|
|
return 0; |
|
|
} |
|
|
} |
|
|
@ -1542,7 +1552,7 @@ public class CustomerFormServiceImpl implements CustomerFormService { |
|
|
//当前表单的id
|
|
|
//当前表单的id
|
|
|
String currentFormId = ""; |
|
|
String currentFormId = ""; |
|
|
if(StringUtils.isBlank(dataTitle)){ |
|
|
if(StringUtils.isBlank(dataTitle)){ |
|
|
System.out.println("无数据标题"); |
|
|
logger.info("无数据标题"); |
|
|
}else{ |
|
|
}else{ |
|
|
//System.out.println(dataTitle);
|
|
|
//System.out.println(dataTitle);
|
|
|
String[] dataTitles = dataTitle.split("###"); |
|
|
String[] dataTitles = dataTitle.split("###"); |
|
|
@ -1861,7 +1871,7 @@ public class CustomerFormServiceImpl implements CustomerFormService { |
|
|
if(rightArr[0].equals("owner")){ |
|
|
if(rightArr[0].equals("owner")){ |
|
|
if(condition.equals("==")){//李文轩==数据拥有者
|
|
|
if(condition.equals("==")){//李文轩==数据拥有者
|
|
|
String ownerKey = rightArr[1]; |
|
|
String ownerKey = rightArr[1]; |
|
|
System.out.println(targetOrgOrPerson); |
|
|
//System.out.println(targetOrgOrPerson);
|
|
|
return targetOrgOrPerson.equals(ownerKey); |
|
|
return targetOrgOrPerson.equals(ownerKey); |
|
|
}else{ |
|
|
}else{ |
|
|
String ownerKey = rightArr[1]; |
|
|
String ownerKey = rightArr[1]; |
|
|
@ -1897,7 +1907,7 @@ public class CustomerFormServiceImpl implements CustomerFormService { |
|
|
}else if(rightArr[0].equals("org")){ |
|
|
}else if(rightArr[0].equals("org")){ |
|
|
//System.out.println(targetOrgOrPerson+"-----"+condition+"-----"+right);
|
|
|
//System.out.println(targetOrgOrPerson+"-----"+condition+"-----"+right);
|
|
|
if(condition.equals("==")||condition.equals("!=")){ |
|
|
if(condition.equals("==")||condition.equals("!=")){ |
|
|
System.out.println(targetOrgOrPerson+"-----"+condition+"-----"+right); |
|
|
//System.out.println(targetOrgOrPerson+"-----"+condition+"-----"+right);
|
|
|
if(rightArr[1].equals(targetOrgOrPerson)){ |
|
|
if(rightArr[1].equals(targetOrgOrPerson)){ |
|
|
return true; |
|
|
return true; |
|
|
}else{ |
|
|
}else{ |
|
|
|