归档BUG
This commit is contained in:
parent
d394ce0d4f
commit
61350cb0ef
@ -5,6 +5,7 @@ import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
@ -70,12 +71,26 @@ public class FlowHitoryUtil {
|
||||
this.jboSQL="select "+this.jboSQLColumn +" from "+this.jboFrom+" where "+this.jboWhere+" " + this.jboGroup + this.jboOrder;
|
||||
}
|
||||
}
|
||||
|
||||
public static Map<String, String> transformtoUpperCase(Map<String, String> orgMap){
|
||||
Map<String, String> resultMap = new HashMap<>();
|
||||
|
||||
if (orgMap == null || orgMap.isEmpty()){
|
||||
return resultMap;
|
||||
}
|
||||
Set<String> keySet = orgMap.keySet();
|
||||
for (String key : keySet){
|
||||
String newKey = key.toUpperCase();
|
||||
//newKey = newKey.replace("_", "");
|
||||
resultMap.put(newKey, orgMap.get(key));
|
||||
}
|
||||
return resultMap;
|
||||
}
|
||||
public String loadJsonData(Map<String,String>param,String isMulti) throws Exception{
|
||||
Map<String, String> resultMap=this.transformtoUpperCase(param);
|
||||
BizObjectQuery flowQuery=JBOFactory.createBizObjectQuery(this.jboClass,this.jboSQL);
|
||||
List<String> sqlParam=this.getSQLParam(this.jboWhere);
|
||||
for(int i=0;i<sqlParam.size();i++){
|
||||
flowQuery.setParameter(sqlParam.get(i), param.get(sqlParam.get(i)).toString());
|
||||
flowQuery.setParameter(sqlParam.get(i), resultMap.get(sqlParam.get(i)).toString());
|
||||
}
|
||||
List<BizObject> list =flowQuery.getResultList(false);
|
||||
JSONObject phaseInfoJsonObject=JSONObject.createObject();
|
||||
@ -181,7 +196,7 @@ public class FlowHitoryUtil {
|
||||
Pattern p = Pattern.compile("(:[\\S]+)");
|
||||
Matcher m = p.matcher(swhere);
|
||||
while (m.find()) {
|
||||
String key= m.group(1).toString();
|
||||
String key= m.group(1).toString().toUpperCase();
|
||||
key=key.replace(":","");
|
||||
param.add(key);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user