use of cn.cerc.jdb.mysql.BuildQuery in project summer-bean by cn-cerc.
the class BookOptions method getBookCreateDate.
// 从系统帐套中取开帐日期
private static TDate getBookCreateDate(IHandle handle) {
BuildQuery f = new BuildQuery(handle);
String corpNo = handle.getCorpNo();
f.byField("CorpNo_", corpNo);
f.add("select AppDate_ from %s", SystemTable.get(SystemTable.getBookInfo));
SqlQuery ds = f.open();
if (ds.size() == 0)
throw new RuntimeException(String.format("没有找到帐套:%s", corpNo));
return ds.getDate("AppDate_");
}
use of cn.cerc.jdb.mysql.BuildQuery in project summer-mis by cn-cerc.
the class FieldUseCheck method checkTable.
private boolean checkTable(String tableCode, String fieldCode, String fieldValue) {
BuildQuery bq = new BuildQuery(this);
bq.byField("CorpNo_", handle.getCorpNo());
bq.byParam(String.format("%s=N'%s'", fieldCode, fieldValue));
bq.setMaximum(1);
bq.add("select %s * ");
bq.add("from %s ", tableCode);
bq.open();
return !bq.getDataSet().eof();
}
Aggregations