| | |
| | | throw new VciBaseException("传入业务类型未查询到相应表单,请检查!"); |
| | | } |
| | | // TODO:参照配置的模糊查询过滤条件暂未处理 |
| | | /* String namesql = ""; |
| | | if (StringUtils.isNotBlank(baseQueryObject.getConditionMap().get("name"))) { |
| | | String s = baseQueryObject.getConditionMap().get("name"); |
| | | s = "%" + s + "%"; |
| | | namesql = "and name like" + VciBaseUtil.toInSql(s); |
| | | } |
| | | /* String namesql = ""; |
| | | if (StringUtils.isNotBlank(baseQueryObject.getConditionMap().get("name"))) { |
| | | String s = baseQueryObject.getConditionMap().get("name"); |
| | | s = "%" + s + "%"; |
| | | namesql = "and name like" + VciBaseUtil.toInSql(s); |
| | | } |
| | | |
| | | String codesql = ""; |
| | | if (StringUtils.isNotBlank(baseQueryObject.getConditionMap().get("id"))) { |
| | | String s = baseQueryObject.getConditionMap().get("id"); |
| | | s = "%" + s + "%"; |
| | | codesql = "and id like" + VciBaseUtil.toInSql(s); |
| | | } |
| | | String codesql = ""; |
| | | if (StringUtils.isNotBlank(baseQueryObject.getConditionMap().get("id"))) { |
| | | String s = baseQueryObject.getConditionMap().get("id"); |
| | | s = "%" + s + "%"; |
| | | codesql = "and id like" + VciBaseUtil.toInSql(s); |
| | | } |
| | | |
| | | String lcstatusSql = ""; |
| | | if (StringUtils.isNotBlank(baseQueryObject.getConditionMap().get("lcstatus"))) { |
| | | lcstatusSql = "and lcstatus =" + VciBaseUtil.toInSql(baseQueryObject.getConditionMap().get("lcstatus")); |
| | | }*/ |
| | | // String where = ""; |
| | | String lcstatusSql = ""; |
| | | if (StringUtils.isNotBlank(baseQueryObject.getConditionMap().get("lcstatus"))) { |
| | | lcstatusSql = "and lcstatus =" + VciBaseUtil.toInSql(baseQueryObject.getConditionMap().get("lcstatus")); |
| | | }*/ |
| | | // String where = ""; |
| | | |
| | | // if (StringUtils.isNotBlank(codesql) || StringUtils.isNotBlank(lcstatusSql) || StringUtils.isNotBlank(namesql)) { |
| | | // where = "where "; |
| | | // } |
| | | // if (StringUtils.isNotBlank(codesql) || StringUtils.isNotBlank(lcstatusSql) || StringUtils.isNotBlank(namesql)) { |
| | | // where = "where "; |
| | | // } |
| | | String whereSqlByMap = UBCSCondition.getWhereSqlByMap(baseQueryObject.getConditionMap()); |
| | | |
| | | String num1 = baseQueryObject.getPage() * baseQueryObject.getLimit() + ""; |
| | |
| | | |
| | | 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 + "1=1 and " |
| | | + whereSqlByMap + ") t "+ (baseQueryObject.getLimit()==-1?")": ("where rownum <=" + num1 + ") where rn >=" + num2) |
| | | + " and lastv =" + VciBaseUtil.toInSql(baseQueryObject.getConditionMap().get("lastv").toString())) + " and" : "where") + SPACE + "1=1 " |
| | | + (Func.isNotBlank(whereSqlByMap) ? "and "+whereSqlByMap:"") + ") t "+ (baseQueryObject.getLimit()==-1?")": ("where rownum <=" + num1 + ") where rn >=" + num2) |
| | | )); |
| | | List<BaseModel> baseModels = new ArrayList<>(); |
| | | //将查询到的数据转换为basemodel,使用的反射方式来进行创建的 |
| | |
| | | } |
| | | 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 + "1=1 and " |
| | | + whereSqlByMap |
| | | + "and lastv = " + VciBaseUtil.toInSql(baseQueryObject.getConditionMap().get("lastv").toString())) + " and" : "where") + SPACE + "1=1 " |
| | | + (Func.isNotBlank(whereSqlByMap) ? "and "+whereSqlByMap:"") |
| | | ); |
| | | IPage<BaseModelVO> objectDataGrid = new Page<>(); |
| | | objectDataGrid.setPages(baseQueryObject.getPage()); |