| | |
| | | if (StringUtils.isNotBlank(baseQueryObject.getConditionMap().get("lcstatus"))) { |
| | | lcstatusSql = "lcstatus =" + VciBaseUtil.toInSql(baseQueryObject.getConditionMap().get("lcstatus")); |
| | | } |
| | | String where = ""; |
| | | |
| | | if (StringUtils.isNotBlank(codesql) || StringUtils.isNotBlank(lcstatusSql) || StringUtils.isNotBlank(namesql)) { |
| | | where="where "; |
| | | } |
| | | |
| | | String num1 = baseQueryObject.getPage() * baseQueryObject.getLimit() + ""; |
| | | String num2 = ((baseQueryObject.getPage()) - 1) * baseQueryObject.getLimit() + 1 + ""; |
| | | |
| | | List<Map> maps = commonsMapper.selectBySql("select * from ( select rownum rn, t.* from (select * from " + listR.getData().get(0).getTableName() + SPACE |
| | | + (StringUtils.isNotBlank(listR.getData().get(0).getRevisionRuleId()) ? (" where lastr = " + VciBaseUtil.toInSql(baseQueryObject.getConditionMap().get("lastr").toString()) |
| | | + " and lastv =" + VciBaseUtil.toInSql(baseQueryObject.getConditionMap().get("lastv").toString())) + " and":" where") + SPACE |
| | | + " and lastv =" + VciBaseUtil.toInSql(baseQueryObject.getConditionMap().get("lastv").toString())) + " and": where) + SPACE |
| | | + lcstatusSql + namesql + codesql + ") t where rownum <=" + num1 + ") where rn >=" + num2 |
| | | ); |
| | | List<BaseModel> baseModels = new ArrayList<>(); |
| | |
| | | } |
| | | int total = commonsMapper.queryCountBySql("select count(*) from " + listR.getData().get(0).getTableName() + SPACE |
| | | + (StringUtils.isNotBlank(listR.getData().get(0).getRevisionRuleId()) ? (" where lastr = " + VciBaseUtil.toInSql(baseQueryObject.getConditionMap().get("lastr").toString()) |
| | | + "and lastv = " + VciBaseUtil.toInSql(baseQueryObject.getConditionMap().get("lastv").toString())) + " and":" where") + SPACE |
| | | + "and lastv = " + VciBaseUtil.toInSql(baseQueryObject.getConditionMap().get("lastv").toString())) + " and" : where) + SPACE |
| | | + lcstatusSql + namesql + codesql |
| | | ); |
| | | IPage<BaseModel> objectDataGrid = new Page<>(); |