|

楼主 |
发表于 2018-7-27 17:03:21
|
显示全部楼层
后台代码如下:Row rows =myParenttable.appendRow(row);这一行出错,说主键不允许为空
public static Table find(String locationCode,String parent){
if("HDFXGS" != locationCode){//
Table table = SQL.select("select * from ZH_EquipmentLocation where fID= '" + parent + "'", null, "/IOMM/assetManagement/data");
Iterator<Row> it = table.iterator();
if (it.hasNext()) {
Row row = it.next();
String RowlocationCode = row.getString("locationCode");
String Rowparent = row.getString("parent");
System.out.println("++++++++++++++++++"+num);
Row rows =myParenttable.appendRow(row);
rows.setString("locationName", row.getString("locationName"));
rows.setString("parent", row.getString("parent"));
rows.setString("locationCode", row.getString("locationCode"));
rows.setString("fID", row.getString("fID"));
rows.setString("locationCode", row.getString("locationCode"));
findParent(RowlocationCode,Rowparent);
}
} |
|