|
版本: |
X5.2.6 |
小版本号: |
|
|
|
数据库: |
Oracle |
服务器操作系统: |
|
应用服务器: |
|
客户端操作系统: |
|
浏览器: |
|
|
|
代码如下
- // 通过合同名称查询合同信息
- String ksql = "select t.* from BMS_Contract t where t.fContractName = '"
- + fContractName + "'";
- String fContractID = "", fContractCode = "";
- Table table = KSQL.select(ksql, null, "/BMS/contract/data",
- null);
- Iterator<com.justep.system.data.Row> iterator = table
- .iterator();
- if (table.size() > 0) {
- if (iterator.hasNext()) {
- com.justep.system.data.Row row1 = iterator.next();
- fContractID = row1.getString("fContractID");
- System.out.println("fContractID " + fContractID
- + "++++++++++");
- Cell fContractIDCell = row.createCell((short) 25);
- fContractIDCell.setCellType(Cell.CELL_TYPE_STRING);
- fContractIDCell.setCellValue(fContractID);
- fContractCode = row1.getString("fContractCode");
- System.out.println("fContractCode " + fContractCode
- + "++++++++++");
- Cell fContractCodeCell = row.createCell((short) 26);
- fContractCodeCell.setCellType(Cell.CELL_TYPE_STRING);
- fContractCodeCell.setCellValue(fContractCode);
- }
- }
复制代码
如果sql没有查到有合同的相关信息,如何跳过这条数据的导入,进去下一条?
|
|