|

楼主 |
发表于 2017-10-17 09:48:48
|
显示全部楼层
本帖最后由 liufanx5 于 2017-10-17 09:49 编辑
附上biz层相关代码
- public static Table queryLocationBySid() {
- System.out.println("queryLocationBySid===========================");
- System.out.println(ContextHelper.getPerson().getID());
- String sql = "select tl.location_id, " + "tl.F_LOCATION_ID, " + "tl.location_name, " + "tl.lock_no, " + "tl.location_type," + "ft.location_id as f_id," + "ft.location_name as f_name,"
- + "tl.f_workflow_id," + "tw.workflow_name," + "tl.scode, " + "tl.sfcode," + "sop1.sname as create_person, " + "sop2.sname as operate_person " + " from tb_location tl "
- + "LEFT JOIN TB_LOCATION FT ON tl.F_LOCATION_ID = FT.LOCATION_ID AND FT.DEL_FLAG = 0 " + "LEFT JOIN TB_WORKFLOW TW ON tl.F_WORKFLOW_ID = TW.WORKFLOW_ID AND TW.DEL_FLAG = 0 "
- + "inner join TB_LOCATION_DETAIL tld on tl.location_id = tld.location_id and tld.is_exist = '0' " + "left join sa_opperson sop1 on sop1.sid = tl.create_person and tl.del_flag = 0 "
- + "left join sa_opperson sop2 on sop2.sid = tl.operation_person and tl.del_flag = 0 " + "where tl.location_id in " + "(select location_id from tb_location start with location_id in "
- + "(select tul.location_id from tr_user_location tul " + "inner join TB_LOCATION_DETAIL ld on tul.location_id = ld.location_id and ld.is_exist = '0' "
- + "where tul.sid = ? and tul.del_flag = 0 and tul.operate_flag = 0) " + "CONNECT BY nocycle location_id = PRIOR F_LOCATION_ID)";
- Map<String, String> sqlMap = new HashMap<String, String>();
- List<Object> list = new ArrayList<Object>();
- list.add(ContextHelper.getPerson().getID());
- sqlMap.put(SQL.DEFAULT_DB_NAME, sql);
- Table table = SQL.select(sql, list, WLWdata);
- // table.getProperties().put(Table.PROP_NAME_ROWID, "location_id");
- System.out.println(table.size());
- return table;
- }
复制代码
|
|