nc 如何获取表体全部/多行/一个的数据
private IBillCardPanelEditor editor;
public void setEditor(IBillCardPanelEditor editor) {
this.editor = editor;
}
public IBillCardPanelEditor getEditor() {
return editor;
}
int[] row = editor.getBillCardPanel().getBillTable().getSelectedRows();
List<String> list = new ArrayList<String>();
int rows = editor.getBillCardPanel().getBillTable().getRowCount();
if (row.length == 0 && rows > 1) {
for (int i = 0; i < rows; i++) {
TemplatesBVO namesa = (TemplatesBVO) this.getEditor()
.getBillCardPanel().getBillModel()
.getBodyValueRowVO(i, TemplatesBVO.class.getName());
list.add(namesa.getName());
}
} else {
for (int i = 0; i < row.length; i++) {
TemplatesBVO namesa = (TemplatesBVO) this
.getEditor()
.getBillCardPanel()
.getBillModel()
.getBodyValueRowVO(row[i], TemplatesBVO.class.getName());
list.add(namesa.getName());
}
}
StringBuffer sqls = new StringBuffer();
if (list != null && list.size() > 0) {
for (String listas : list) {
sqls.append("'" + listas + "',");
}
if (sqls != null && sqls.length() > 0) {
sqls.deleteCharAt(sqls.length() - 1);
}
String sql = "select '.'|| b.name from md_class b where b.componentid in (select a.id from md_component a where a.displayname in("
+ sqls + ")) and nvl(dr,0)=0 ";
List<String> pk_billtypecode = (List<String>) bs.executeQuery(sql,
new ColumnListProcessor());
}