|
楼主 |
发表于 2016-10-9 18:02:38
|
显示全部楼层
我看了输出,是参数没传,现在可以认到java了,但是还是没能取到数据:
public static List<List<String>> getlist(String id) {
String query_alias1 = "select a.stuff_en from FIXMNG_TYPE a where a.Type_name= '" +id+ "'";
Table table_alias1 = KSQL.select(query_alias1, null, "/gdms/baoxiu/data", null);
Iterator<Row> it_alias1 = table_alias1.iterator();
String userid1="";
while (it_alias1.hasNext()){
Row r_alias1 = it_alias1.next();
Object v_alias1 = r_alias1.getValue("stuff_en");
if (v_alias1 !=null)
{
userid1 = v_alias1.toString();
}
}
System.out.println( "人名:"+userid1);
String[] arrayStr =new String[]{};
arrayStr = userid1.split(",");
List<List<String>> list1=new ArrayList<List<String>>();
List<String> list2=new ArrayList<String>();
list2=java.util.Arrays.asList(arrayStr);
list1.add(list2);
return list1;
}
能显示println:
2016-10-09 17:55:33 [SQL Time]sql 执行时间:1ms, exec KSQL: select a.stuff_en from FIXMNG_TYPE a where a.Type_name= '电话故障'
--> sql:SELECT a.STUFF_EN AS stuff_en FROM FIXMNG_TYPE a WHERE a.TYPE_NAME = ?
--> binds:[电话故障]
人名:w001,w002,w003
2016-10-09 17:55:33 [SQL Time]sql 执行时间:1ms, exec KSQL: select org.sFID, org.sFName from SA_OPOrg org where org.sValidState=1 and (((org.sFID like '%w001%') and org.sPersonID='w002')) order by org.sSequence
--> sql:SELECT org.sFID AS sFID, org.sFName AS sFName FROM SA_OPOrg org WHERE (org.SVALIDSTATE = ?) AND ( (org.sFID LIKE ?) AND (org.SPERSONID = ?) ) ORDER BY org.SSEQUENCE ASC
--> binds:[1, %w001%, w002] //这里不知道为什么没有w003
其中,w001,w002,w003是用户code,但弹出的组织机构里没值
|
|