From b446560ccc97aedde9917db2273c6c6fb8b71acb Mon Sep 17 00:00:00 2001 From: ludc Date: 星期日, 14 一月 2024 17:05:29 +0800 Subject: [PATCH] 277:参照配置界面,关于包含条件,同一个字段具备多个包含条件时,需要重新设置一下界面更改一下后端查询接口 --- Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/MdmEngineServiceImpl.java | 48 ++++++++++++++++++++++++------------------------ 1 files changed, 24 insertions(+), 24 deletions(-) diff --git a/Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/MdmEngineServiceImpl.java b/Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/MdmEngineServiceImpl.java index c536b4f..c3618b2 100644 --- a/Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/MdmEngineServiceImpl.java +++ b/Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/MdmEngineServiceImpl.java @@ -4397,29 +4397,29 @@ 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() + ""; @@ -4427,8 +4427,8 @@ 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锛屼娇鐢ㄧ殑鍙嶅皠鏂瑰紡鏉ヨ繘琛屽垱寤虹殑 @@ -4476,8 +4476,8 @@ } 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()); -- Gitblit v1.9.3