From 633d328380d7788740d3eba54b33aa69dc9afb02 Mon Sep 17 00:00:00 2001 From: ludc Date: 星期四, 25 一月 2024 22:14:38 +0800 Subject: [PATCH] 点击分类不显示按钮(模板创建时绑定的业务类型id有问题):改成用functionid进行查询,也就是菜单上配置的id --- Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/MdmEngineServiceImpl.java | 23 ++++++++++++----------- 1 files changed, 12 insertions(+), 11 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 8c7b56b..12c409e 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 @@ -423,8 +423,7 @@ try { VciBaseUtil.alertNotNull(baseModelDTO, "鏁版嵁淇℃伅", baseModelDTO.getOid(), "涓婚敭", baseModelDTO.getBtmname(), "涓氬姟绫诲瀷", baseModelDTO.getLcStatus(), "鐩爣鐘舵��"); List<String> oids = VciBaseUtil.str2List(baseModelDTO.getOid()); - List<BaseModel> baseModels = new ArrayList<>(); - baseModels = selectByTypeAndOid(baseModelDTO.getBtmname(), baseModelDTO.getOid()); + List<BaseModel> baseModels = selectByTypeAndOid(baseModelDTO.getBtmname(), baseModelDTO.getOid()); if (baseModels.size() == 0) { throw new VciBaseException("鏈煡璇㈠埌鐩稿叧鏁版嵁銆�"); } @@ -1948,7 +1947,7 @@ boolean ignoreCase = VciBaseUtil.getBoolean(resembleRuleVO.getIgnorecaseflag()); boolean ignoreWidth = VciBaseUtil.getBoolean(resembleRuleVO.getIgnorewidthflag()); boolean trimAll = VciBaseUtil.getBoolean(resembleRuleVO.getIgnoreallspaceflag()); - boolean trim = VciBaseUtil.getBoolean(resembleRuleVO.getIgnoreallspaceflag()); + boolean trim = VciBaseUtil.getBoolean(resembleRuleVO.getIgnorecaseflag()); String temp = ""; if (ignoreCase && ignoreSpace && ignoreWidth) { //蹇界暐澶у皬鍐欙紝涓斿幓绌猴紝蹇界暐鍏ㄥ崐瑙� @@ -1982,7 +1981,7 @@ temp = "replace(" + temp + ",'" + s + "','')"; } } - queryValue = String.format(temp, (trim ? value.trim() : value)); + queryValue = String.format(temp, (trim ? "'"+value.trim()+"'" : "'"+value+"'")); temp = temp.replace("to_single_byte('%s')", "to_single_byte(%s)"); queryKey = String.format(temp, "t." + attrId); conditionMap.put(queryKey, QueryOptionConstant.OR + queryValue); @@ -2982,6 +2981,9 @@ conditionMap.put("t.lastr", "1"); conditionMap.put("t.lastv", "1"); DataGrid<Map<String, String>> mapDataGrid = queryGrid(btmTypeId, templateVO, conditionMap, pageHelper); + if(templateVO.getAttributes().isEmpty()){ + throw new ServiceException(String.format("涓婚敭涓猴細{}鐨勬ā鏉夸笅锛屾ā鏉垮睘鎬ч厤缃负绌猴紒",templateVO.getOid())); + } //澶勭悊杩斿洖鏁版嵁涓庢ā鏉挎暟鎹厤缃殑瀛楁涓嶄竴鏍烽棶棰� templateVO.getAttributes().stream().forEach(e -> { for (Map<String, String> datum : mapDataGrid.getData()) { @@ -3435,6 +3437,9 @@ dataList.add(cbo); wrapperData(dataList, templateVO, sqlBO.getSelectFieldList(), true); R<List<Map<String, String>>> result = R.data(Collections.singletonList(cbo)); + if(templateVO.getAttributes().isEmpty()){ + throw new ServiceException(String.format("涓婚敭涓猴細{}鐨勬ā鏉夸笅锛屾ā鏉垮睘鎬ч厤缃负绌猴紒",templateVO.getOid())); + } //澶勭悊杩斿洖鏁版嵁涓庢ā鏉挎暟鎹厤缃殑瀛楁涓嶄竴鏍烽棶棰� templateVO.getAttributes().stream().forEach(e -> { for (Map<String, String> datum : result.getData()) { @@ -3909,13 +3914,9 @@ MdmUIInfoVO uiInfoVO = getTableDefineByTemplateVO(getUsedTemplateByClassifyOid(codeClassifyOid)); uiInfoVO.setLeaf(classifyService.countChildrenByClassifyOid(codeClassifyOid) == 0); if (StringUtils.isNotBlank(functionId) && !"~".equalsIgnoreCase(functionId)) { - List<Menu> buttonVOS = iSysClient.getMenuButtonByType(codeClassifyOid, uiInfoVO.getTemplateVO().getBtmTypeId(), "data_auth").getData(); - // List<SmOperationVO> operationVOS = operationService.listButtonByFunctionId(functionId); - // if (operationVOS == null) { - // operationVOS = new ArrayList<>(); - // } - // //鏌ヨ鎵╁睍鎸夐挳 - // List<CodeButtonVO> buttonVOS = listButtonInToolbarByClassifyOid(codeClassifyOid); + // TODO:2024-1-25 18:42妯℃澘涓婄殑btmtypeid鏈夋椂鍊欎細瀛樺湪澶у皬鍐欑殑闂锛屾寜鐞嗘潵璇磋繖鍎跨洿鎺ョ敤functionId灏辫兘婊¤冻鏌ヨ鑿滃崟鎸夐挳浜唘iInfoVO.getTemplateVO().getBtmTypeId() + List<Menu> buttonVOS = iSysClient.getMenuButtonByType(codeClassifyOid, functionId, "data_auth").getData(); + List<SmOperationVO> operationVOS = new ArrayList<>(); if (!CollectionUtils.isEmpty(buttonVOS)) { for (int i = 0; i < buttonVOS.size(); i++) { -- Gitblit v1.9.3