日期:2014-05-18 浏览次数:20727 次
public DTO querydyxsrq(String A, String B) {
DTO dto = new PersonInsureRegDTO();
StringBuffer sb = new StringBuffer();
sb.append("select aae001, b.aae813, to_char(aae001) || aae030 as aae030, to_char(aae001) || aae031 as aae031 ");
sb.append("from table1 b, table2 c where b.aae813 = c.aae813 and c.aae815 < sysdate and c.aae816 > sysdate and b.aae815 < sysdate and b.aae816 > sysdate");
sb.append(" and aae001 = to_number(to_char(sysdate, 'yyyy')) + 1 ");
if (StringUtils.isNotBlank(dto.getSblx())) {
sb.append(" and b.akz135 ='" + dto.getSblx() + "'");
}
if (StringUtils.isNotBlank(dto.getAaa027())) {
sb.append(" and (c.aaa027 = '330600' or c.aaa027 ='" + dto.getAaa027() + "')");
}
return dto;
}