|
@@ -33,12 +33,17 @@ public class TableListPlugin extends TableManagerListPlugin {
|
|
|
if ("nckd_remark".equals(itemKey)) {
|
|
|
BillList billList = (BillList)this.getControl("billlistap");
|
|
|
ListSelectedRowCollection list = billList.getSelectedRows();
|
|
|
+
|
|
|
+ int successCount = 0;
|
|
|
+ int failureCount = 0;
|
|
|
+
|
|
|
for (ListSelectedRow detail : list) {
|
|
|
Object pk = detail.getPrimaryKeyValue();
|
|
|
String pkStr = String.valueOf(pk);
|
|
|
String[] info = pkStr.split("@@");
|
|
|
if (info.length < 2) {
|
|
|
- throw new KDException("err data");
|
|
|
+ failureCount++;
|
|
|
+ continue;
|
|
|
}
|
|
|
|
|
|
|
|
@@ -65,12 +70,23 @@ public class TableListPlugin extends TableManagerListPlugin {
|
|
|
|
|
|
String sqlContent = sql.toString();
|
|
|
|
|
|
-
|
|
|
- DBRoute route = DBRoute.of(dbroute);
|
|
|
- DB.execute(route, sqlContent);
|
|
|
+ try {
|
|
|
+
|
|
|
+ DBRoute route = DBRoute.of(dbroute);
|
|
|
+ DB.execute(route, sqlContent);
|
|
|
+ successCount++;
|
|
|
+ } catch (Exception e) {
|
|
|
+
|
|
|
+ e.printStackTrace();
|
|
|
+ failureCount++;
|
|
|
+ }
|
|
|
+ }else {
|
|
|
+ failureCount++;
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ String message = String.format("执行完成:成功 %d 条,失败 %d 条", successCount, failureCount);
|
|
|
+ this.getView().showMessage(message);
|
|
|
}
|
|
|
- this.getView().showMessage("执行成功");
|
|
|
}
|
|
|
}
|