|
报错内容:
Caused by: com.justep.exception.BusinessException: 编码: JUSTEP150204; 提示: 重复添加的列定义"codename"
at com.justep.exception.BusinessException.create(Unknown Source)
at com.justep.system.data.impl.TableMetaDataImpl.addColumnMetaData(Unknown Source)
at com.justep.system.data.impl.TableImpl.addColumns(Unknown Source)
at com.justep.system.data.impl.TableImpl.createTable(Unknown Source)
at com.justep.system.data.impl.TableUtilsImplement.createTable(Unknown Source)
at com.justep.system.data.TableUtils.createTable(Unknown Source)
at com.justep.system.util.BizUtils.resultSet2Table(Unknown Source)
at com.justep.system.util.BizUtils.resultSet2Table(Unknown Source)
at Asset.queryT_suppliersMessage(Asset.java:2337)
... 26 more
后台代码:
sql="select b.enterpriseName as enterprisename" +
",t.codename as codename1" +
",b.scope as scope" +
",b.enterprisenAddress as enterprisenAddress" +
",sa_oporg.sName as sName,b.statu as statu" +
",tcodes.codename as codename2 " +
"from t_suppliers b inner join (" +
"select businessLicNo,max(addtime) as addtimes " +
"from t_suppliers where (isnull(addtime) = 0) " +
"group by businessLicNo ) a " +
"on (b.businessLicNo = a.businessLicNo and b.addtime = a.addtimes) " +
"left join t_codes t " +
"on (b.enterpriseType=t.codevalue and t.codetype='supplierstype') " +
"left join t_codes tcodes " +
"on (b.statu=tcodes.codevalue and tcodes.codetype='supplierstatus') " +
"left join sa_oporg sa_oporg " +
"on (b.unitId=sa_oporg.sCode and sa_oporg.sOrgKindID='ogn') " ;
// }
sql += " where b.enterpriseName like '%" + enterprisename + "%'";
if(!"".equals(statu)){
sql += " and b.statu = '"+statu+"' ";
}
myconn = ModelUtils.getConnectionInTransaction("/OA_WS/management/data");
mystmt = myconn.createStatement();
ResultSet rs = mystmt.executeQuery(sql);
return com.justep.system.util.BizUtils.resultSet2Table(rs, (String)null);
报错的是最后一行: return com.justep.system.util.BizUtils.resultSet2Table(rs, (String)null);
|
|